Integrate creation of jgit/svnkit version status text files into build.gradle

Over the course of a very long time, the interpolation strings for the versions in the scm-git-plugin and scm-svn-plugin had not been processed. One assumption was that this was related to a discontinued Maven process.

The behavior was now realized by two tasks process after the gradle build lifecycle step. It remains to be discussed whether it's worth the time and effort to integrate the change into the smp plugin.
This commit is contained in:
Till-André Diegeler
2024-10-28 23:19:47 +01:00
parent 141e45aa06
commit cd16f0b033
5 changed files with 24 additions and 2 deletions

View File

@@ -63,6 +63,17 @@ task testJar(type: Jar) {
from sourceSets.test.output
}
task insertSVNKitVersionFile() {
def file = new File(project.buildDir, "resources/main/sonia/scm/version/scm-svn-plugin")
file.parentFile.mkdirs()
file.createNewFile()
file.text = "scm-svn-plugin/${project.version} svnkit/${svnkitVersion}"
}
tasks.named("build") {
it.finalizedBy(insertSVNKitVersionFile)
}
configurations {
tests {
canBeConsumed = true

View File

@@ -1 +0,0 @@
scm-svn-plugin/${project.version} svnkit/${svnkit.version}