Sitemap
Dipien

Productivity tools & ideas for Android, Kotlin & Gradle developers.

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.

2 min readFeb 24, 2023

--

Press enter or click to view image in full size

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.properties file:
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=999

Support 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=true

Support Us

There are different ways to support our work:

  • With Bitcoin Lightning using Alby:
  • With PayPal or a credit card using Ko-fi.

--

--

Dipien
Dipien

Published in Dipien

Productivity tools & ideas for Android, Kotlin & Gradle developers.

Maxi Rosson
Maxi Rosson

Written by Maxi Rosson

I write about Productivity tools & ideas for Android, Kotlin & Gradle developers. Founder of smarthomecompared.com where I compare the best Smart Home device.

No responses yet