gradle-advanced-build-version
gradle-advanced-build-version copied to clipboard
AUTO_INCREMENT_ONE_STEP runs for all project in multi-project build
So my structure is as follow:
- Root Project
- Client (depends on Commons), used in other projects
- Commons
- Server (depends on Commons)
I want to create jar artifacts of commons and client. In those 2 projects I have configured advancedVersioning like
advancedVersioning {
codeOptions {
versionCodeType org.moallemi.gradle.internal.VersionCodeType.AUTO_INCREMENT_ONE_STEP
dependsOnTasks 'uploadarchives'
}
}
but when I run uploadArchives task inside one project ie Clients both version are updated (Client and Commons) because whole gradle landscape need to be configured as explained here
Currently I found workaround by using different tasknames for different projects (ie. commons):
advancedVersioning {
codeOptions {
versionCodeType org.moallemi.gradle.internal.VersionCodeType.AUTO_INCREMENT_ONE_STEP
dependsOnTasks 'uploadarchivescommons'
}
}
task uploadArchivesCommons {
}
uploadArchivesCommons.dependsOn uploadArchives