The gradle properties file under
my.fav.prop = ABC:DEF
The command line:
./gradlew --gradle-user-home /tmp/otherhome/me
Cannot get property 'my.fav.prop' on extra properties extension as it does not exist
Using Gradle 2.7. What’s wrong?
From Build Environment document properties is loaded from this order.
gradle.properties in project directory.
gradle user home directory.
- system properties.
So, in your case, you have to move your
gradle.properties file from
And command line option
=, so the command will be as follows.
Or alternatively, to be “consistent” with the default, try to use a “GRADLE_USER_HOME” value of “/tmp/otherhome/me/.gradle”, which would require just changing your command line, not moving the properties file.