Axion Plugin – Versioning Issue with Multi-Module Setup
Description
Hi,
I have a question regarding the usage of the Axion plugin in my setup. I'm trying to implement versioning for a microservice that consists of a private (implementation) part and a public part. The public part contains the interfaces that other microservices use for communication.
Project Structure
ROOT (Private Part)
├── settings.gradle
├── build.gradle
└── PUBLIC PART (Public Interface)
├── settings.gradle
├── build.gradle
- The private part (implementation) is the root project.
- The public part (interface) is a subproject.
- The Axion plugin is added to both the root and the public part.
Expected Versioning Behavior
I want to release the root project whenever there is a change—whether it's in the root itself or in the public part.
- If only the private part changes → Only the private version should increase, the public version stays the same.
- If the public part changes → Both versions should be updated.
Example:
- Initial version:
1.0.0
- Change in private part → Expected:
- Private:
1.0.1
- Public:
1.0.0 (no new release)
- Change in public part → Expected:
- Private:
1.0.2
- Public:
1.0.2
Current Configuration in the Public Part
scmVersion {
versionCreator({ version, position -> return rootProject.getVersion() })
versionIncrementer("incrementPatch")
tag {
initialVersion({ config, position -> rootProject.getVersion() })
prefix.set("public")
versionSeparator.set("/")
}
}
Issue
With this configuration, I run into the problem where the public version lags behind the private version.
I suspect this happens due to different Gradle phases affecting the versioning.
Git Log
commit 1a787ae985d86697d1f5559b0533da1d91af8a85 (HEAD -> test_publish, tag: v1.0.195, tag: public/1.0.194)
Author: Timo Frye
Date: Thu Mar 6 12:31:43 2025 +0100
change public
commit 47f4ea2c0a732b5885d6c8abf7e2070fcbde557d (tag: v1.0.194)
Author: Timo
Date: Thu Mar 6 12:31:17 2025 +0100
change private
commit 61416a6d8b16185e3f107f871c7d885c698f7c23 (tag: v1.0.193, tag: public/1.0.193)
Author: Timo
Date: Thu Mar 6 12:30:50 2025 +0100
change public
Question
Do you have any suggestions on how to fix this issue and ensure both versions remain correctly aligned?
Best regards,
Timo
Axion Plugin – Versioning Issue with Multi-Module Setup
Description
Hi,
I have a question regarding the usage of the Axion plugin in my setup. I'm trying to implement versioning for a microservice that consists of a private (implementation) part and a public part. The public part contains the interfaces that other microservices use for communication.
Project Structure
Expected Versioning Behavior
I want to release the root project whenever there is a change—whether it's in the root itself or in the public part.
Example:
1.0.01.0.11.0.0(no new release)1.0.21.0.2Current Configuration in the Public Part
Issue
With this configuration, I run into the problem where the public version lags behind the private version.
I suspect this happens due to different Gradle phases affecting the versioning.
Git Log
Question
Do you have any suggestions on how to fix this issue and ensure both versions remain correctly aligned?
Best regards,
Timo