Fix regression of Java sources not being processed before compiling
All checks were successful
Build / build (push) Successful in 11s

This commit is contained in:
Tobi Schäfer 2025-04-11 11:44:35 +02:00
parent 96f2dce50f
commit 6b88318bcd
Signed by: tobi
GPG key ID: 91FAE6FE2EBAC4C8

View file

@ -147,9 +147,11 @@ installDist {
dependsOn build
}
tasks.register('processSource', Sync) {
def processSource = tasks.register('processSource', Sync) {
def gitOutput = new ByteArrayOutputStream()
outputs.dir "${project.buildDir}/src"
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = gitOutput
@ -164,9 +166,11 @@ tasks.register('processSource', Sync) {
.replaceAll('__builddate__', new Date().format("d MMM yyyy"))
.replaceAll('__commithash__', gitOutput.toString().trim())
.replaceAll('__version__', version)
} into "${project.buildDir}/src"
} into outputs.files.singleFile
}
tasks.compileJava.source = processSource.map { it.outputs.files }
tasks.register('update') {
dependsOn installDist