Change name of default properties file (gradle.properties)


(Frank Herrmann) #1

I like the possibility to rename the build files of subprojects like this:

rootProject.children.each { proj ->
    proj.buildFileName = "${proj.name}.gradle"
}

Is there also a way to rename the gradle.properties files of the subprojects similarly ?


(Peter Niederwieser) #2

No, you’ll have to do your own properties file handling to achieve this. Have a look at the third-party properties plugin which was recently announced in the forum.

In general, I’d recommend to use properties files sparingly. More often than not, it’s better to keep information in regular build scripts. Remember that you can have an arbitrary number of specialized build scripts that are brought in with ‘apply from: “relative/path/to/some-script.gradle”’.