2

I'm writing a components that will be working with some particular version of platform. Let's say the platform is in version 1.18.0, then I want to release component e.g. with version 1.18.0.1, then 1.18.0.2. If platform updates I want to release 1.19.0.1 etc. This of course breaks semantic versioning.

I need a release plugin for Gradle, that supports this versioning scheme, but it uses only tags to store version (no commits during release, so I cannot use https://github.com/researchgate/gradle-release).

There are two plugins that from what I've seen enforce semantic versioning so I cannot use them:

How can I achieve basically the same as axion-release-plugin but with my custom versioning scheme that does not follow semver?

Michal Kordas
  • 10,475
  • 7
  • 58
  • 103

1 Answers1

1

Actually https://github.com/researchgate/gradle-release could do what you want. Disable the tasks you don't need in your build.gradle

preTagCommit.enabled = false
commitNewVersion.enabled = false

At the end you should have only the tag in git. But why not having it committed to git? You will need the new version at least I think (would be commitNewVersion).

Hillkorn
  • 633
  • 4
  • 12
  • I don't want commits in Git as I don't want to pollute the history. In my case there is release after almost every commit. If I set properties as you recommend then how gradle-release will know what is the next version to use? Axion reads tags to determine that. – Michal Kordas Jun 03 '19 at 14:16
  • 1
    Ah okay, got it. When I look at the config documentation https://axion-release-plugin.readthedocs.io/en/latest/configuration/overview/ I think it should be possible to have custom version schema. Specify your own versionIncrementer for example to have your own schema. It looks highly customizable. – Hillkorn Jun 04 '19 at 07:10