-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
Hudson 1.338, Linux
The Ant plugin passes properties specified in a build step through shell expansion, allowing me to specify something like
-Dapp.version=${RELEASE_VERSION:-4.1dev.r${SVN_REVISION}.${BUILD_NUMBER}}
This works on a Linux system with Bash. It results in app.version being set to the value of the RELEASE_VERSION variable, if it is set, or something based on SVN_REVISION otherwise.
Unfortunately the Gradle plugin does not support this. If I put
-Pversion=${RELEASE_VERSION:-4.1dev.r${SVN_REVISION}.${BUILD_NUMBER}}
in the Switches field of the build step, what gets passed to Gradle is the verbatim string
${RELEASE_VERSION:-4.1dev.r1234.56}. So the built-in environment variables have been expanded but there is no shell expansion.
It would be preferable if the two plugins had uniform behaviour so that it would be easier to migrate between the build tools.
This issue is fixed in trunk.
Have you got the possibility to test it?