This is likely user error, as I'm still pretty new to Gradle.
My incredibly pared down build.gradle, untested in this context:
plugins {
id 'scala'
id "com.cinnober.gradle.semver-git" version "2.2.2" // semantic versioning from git
}
apply plugin: 'scala'
ext {
nextVersion = "patch"
snapshotSuffix = "-dev-<count>-g<sha>"
}
apply plugin: "com.cinnober.gradle.semver-git"
task printVersion << {
println project.ext.properties.containsKey("nextVersion")
println project.ext.properties.get("nextVersion")
println project.ext.nextVersion
println project.ext.snapshotSuffix
println project.version
}
I have a tag I created with git tag -a 99.9.9 -m "Test tag for testing". I have one commit more on top of it.
I expect the output of ./gradlew printVersion to contain 99.9.10-dev-1-gd34db33f or something similar. It instead prints something like this:
:printVersion
true
patch
patch
-dev-<count>-g<sha>
99.10.0-SNAPSHOT
I pretty certain that I have ext in the right place, but it appears not to be effective. What do I need to change?
I'm on Gradle 2.10.
This is likely user error, as I'm still pretty new to Gradle.
My incredibly pared down
build.gradle, untested in this context:I have a tag I created with
git tag -a 99.9.9 -m "Test tag for testing". I have one commit more on top of it.I expect the output of
./gradlew printVersionto contain99.9.10-dev-1-gd34db33for something similar. It instead prints something like this:I pretty certain that I have
extin the right place, but it appears not to be effective. What do I need to change?I'm on Gradle 2.10.