I believe project properties are available in the buildscript block, so you should be able to add a gradle.properties file to the root directory of your project and place the line foo=1.2.3 in there and then just use $foo where you need it.
FAILS with
Could not find org.webpieces:gradle-plugin-htmlcompiler:${webpiecesVersion}
IMPORTANT files
webpiecesexample-all/gradle.properties contains variable
webpiecesexample-all/build.gradle USES variable just fine
webpiecesexample-all/webpiecesexample/build.gradle has buildscript trying to use the variable and fails
@Schalk_Cronje hmmm, do you have an example with it working in properties files. I mean I am thinking I don’t want to put all property versions on the command line. That would be really annoying for something that never changes. ie.
kind of gets a bit unweildy for people that want to build the project, right? (and more importantly, than they need to know all the versions or I need to create a bash script but gradle should really handle that instead so I don’t need a bash script).
@deanhiller The problem is not gradle.properties, but the fact that you used a non-interpolated string in webpiecesexample/build.gradle. Switch to using "org.webpieces:gradle-plugin-htmlcompiler:${webpiecesVersion}" instead.