I’m seeing something very similar with my project. What’s odd in mine is that it appears the org.gradle properties are being read, but not my custom ones. For example, I can set org.gradle.parallel=true in my ~/.gradle.properties and on my next build I’ll see the message “Parallel execution is an incubating feature.”
However, I used the “printProps” task from the documentation, except I modified it a little:
$ ./gradlew -DnexusDeployUser=blah printProps
Parallel execution is an incubating feature.
:printProps
/home/me
Property "nexusDeployUser" Not Found
Property "nexusDeployPassword" Not Found
It only says there to use hasProperty, and nothing about properties being scoped to a task or needing to use “project.hasProperties”. If you could update the documentation, that would be wonderful.
I would expect the following line to print “blah”:
println project.hasProperty('nexusDeployUser') ? nexusDeployUser : 'Property "nexusDeployUser" Not Found'
however, it prints the username from my gradle.properties file. I thought from reading the documentation, that the command line -D would override the properties file setting. Could you clearify what I may be doing wrong there?
Thanks, I somehow missed the -P option in the doc on my first read through. Perhaps it should be given more than a single line, or all the options grouped together in a table of some kind.