Closed pepov closed 10 years ago
It plugin does not support environment variables or system properties. I'll try to add that support as soon as I can. I'll need to figure out where these 2 levels fit into the order of precedence for setting a property.
I did not checked this in the code yet, but if I can help please let me know and I will try to take the time for fixing this.
System properties are the highest precedence and right after comes the env vars I suppose.
I've published a fix to Maven's snapshot repository (https://oss.sonatype.org/content/repositories/snapshots/) as version 1.3.0-SNAPSHOT. The precedence that made the most sense based on the standard Gradle behavior was as follows:
Fixing the plugin was pretty straightforward, but the unit tests were quite the challenge. I've never tried to set an environment variable in Java before - it is not easy :-)
If you get some time, give it a try and let me know if it fixes your issue, and I'll do a formal release.
Thank you for pointing out this missing requirement,
Steve
Very nice of you taking care of this, now it works just like I would expect! Thank you!
I just created the official 1.3.0 release, it should be available on Maven Central in the next hour or so.
When I use the plugin no environment system properties can be applied on previously defined properties. (non existent properties are ok)
Example property:
Without properties plugin:
With properties plugin applied on the project:
It does not work using GRADLE_OPTS either: