Quantcast
Channel: User blacktide - Stack Overflow
Viewing all articles
Browse latest Browse all 49

Answer by blacktide for How to set project.version by passing version property on gradle command line?

$
0
0

I've found this to be the easiest and cleanest way, without requiring a gradle.properties file or changing the version variable name.

In build.gradle:

// Note - there is intentionally no equals sign hereversion project.hasProperty('version') ? version : '1.0.0'

From the command line:

./gradlew -Pversion=1.5.2 build

Viewing all articles
Browse latest Browse all 49

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>