Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.2k views
in Technique[技术] by (71.8m points)

gradle - Change name of given package on build

I have a Java project compiled with gradle (Kotlin DSL build.gradle.kts)

I want to Change in all of my Class present on src this occurence "v1_16_R3" to "v1_11_R1"

Usualy a build my plugin with the normal version v1_16_R3. But i have create another build.gradle.kts for the 1.11 version, for not duplicate my repository.

Regards, Lucas.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Usually, a IDE will have some form of tool that automates this process.

For example, if you are using JetBrains IDEA as your IDE, follow theses steps:

  1. Press Ctrl+Shift+H or select Edit | Find | Replace in Path from the main menu.
  2. In the Replace In Path dialog, specify the search and replace strings, search options, and the scope.
  3. Click Replace All to replace all matching occurrences or Replace to replace items one by one.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...