We would like to have all subprojects be called sdi-xxx and sdi-yyy so when we run gradle eclipse it generates eclipse project names correctly in .project and when we build it creates a jar file with the name sdi-xxxx.jar and sid-yyyy.jar. I have seen this somewhere but for the life of me, I can't find it in the doc(that doc is huge and I know I saw it there somewhere).
thanks, Dean
First, open the project directory by right-clicking on the project name and click at show in explorer option. Step 2: Close the android studio, and go to the window explorer of the project directory and rename the root folder with a new name.
To rename the project, simply right-click the project and select "Refactor/Rename...". Fill in the new name and click OK.
settings.gradle:
prefixProjectName(rootProject, "sdi-")
def prefixProjectName(project, prefix) {
project.name = prefix + project.name
project.children.each { prefixProjectName(it, prefix) }
}
Based on suggestion of Peter N, I currently have the following in my parent settings.gradle
include 'xxx', 'yyy'
rootProject.children.each { it.name = "sdi-" + it.name }
If you want the name of the root parent used as prefix, you could do
include 'xxx', 'yyy'
rootProject.children.each { it.name = rootProject.name + it.name }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With