2023-09-22 16:50:38 +02:00
|
|
|
/*
|
|
|
|
|
* This file was generated by the Gradle 'init' task.
|
|
|
|
|
*
|
|
|
|
|
* This project uses @Incubating APIs which are subject to change.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
|
// Required by axion-release
|
|
|
|
|
id 'org.ajoberstar.grgit'
|
|
|
|
|
// Git based versioning
|
|
|
|
|
id 'pl.allegro.tech.build.axion-release'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
scmVersion {
|
|
|
|
|
versionIncrementer 'incrementMinor'
|
|
|
|
|
tag {
|
|
|
|
|
def shortened = project.name.startsWith(project.group + ".") ?
|
|
|
|
|
project.name.substring(project.group.length() + 1) : project.name
|
2023-10-22 14:47:39 +02:00
|
|
|
if (shortened == "manager") {
|
|
|
|
|
shortened = "manager-app";
|
|
|
|
|
}
|
2023-09-22 16:50:38 +02:00
|
|
|
var p = shortened.replace('.', '-') + "-"
|
|
|
|
|
if (grgit.branch.current.name != "main"
|
2024-06-01 11:54:23 +02:00
|
|
|
&& !grgit.branch.current.name.startsWith("release")
|
|
|
|
|
&& !grgit.branch.current.name.startsWith("develop")) {
|
2023-09-22 16:50:38 +02:00
|
|
|
p = p + grgit.branch.current.name.replace('/', '-') + "-"
|
|
|
|
|
}
|
|
|
|
|
prefix = p
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-06-01 13:26:47 +02:00
|
|
|
project.version = scmVersion.version
|
2023-09-22 16:50:38 +02:00
|
|
|
ext.isSnapshot = version.endsWith('-SNAPSHOT')
|