Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.6k 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 Answer

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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...