Semantic Version Gradle Plugin v2.0.0
The latest changes of this Gradle Plugin to use the Semantic Versioning specification on your android and non-android Gradle project.
The Semantic Versioning specification consists of a couple of conventions to assign and increment version numbers to your software. With the Semantic Version Gradle Plugin you can automatically apply the Semantic Versioning specification to your Gradle project.
Here you can read more about it:
The Semantic Version Gradle Plugin v2.0.0 was released with some breaking changes and new features.
Releases Notes
Removed some properties from the extension
The following properties can’t be defined on the semanticVersion extension anymore:
- maximumVersion
- versionClassifier
- snapshot
- beta
- alpha
Given that the plugin uses them to create and assign the version, it needs to read them before the semanticVersion extension is created. So having them on the extension was a bad idea.
You can still define them in multiple ways:
- As a command-line parameter:
./gradlew ... -Palpha=true- As a property on a
gradle.propertiesfile:
alpha = true- As an extra property on the root
build.gradle[.kts], before applying the plugin:
ext.alpha = true
apply plugin: "com.dipien.android.semantic-version"- As a System Environment property
Support for different maximum versions for major, minor and patch
The maximumVersion Gradle property was removed and replaced by maximumMajorVersion, maximumMinorVersion & maximumPatchVersion. So, now you can define different maximum values for each of them.
For example:
./gradlew printVersion -PmaximumMajorVersion=9 -PmaximumMinorVersion=99 -PmaximumPatchVersion=999Support for RC version classifier
A new rc Gradle property was added, so you can set it to true if you want versions with the -RC classifier.
For example:
./gradlew printVersion -Prc=trueSupport Us
There are different ways to support our work:

