build: address review comments

This commit is contained in:
Christian Bergschneider
2025-12-11 08:55:49 +00:00
parent 2e2b315ab7
commit e99ae48f1a
3 changed files with 5 additions and 11 deletions

View File

@@ -2,26 +2,20 @@ import java.io.ByteArrayOutputStream
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.kotlin.dsl.support.serviceOf
import org.gradle.process.ExecOperations
var isPrerelease = false
fun Project.getGitHash(): String {
val stdout = ByteArrayOutputStream()
serviceOf<ExecOperations>().exec {
return providers.exec {
commandLine = mutableListOf("git", "rev-parse", "--short", "HEAD")
standardOutput = stdout
}
return stdout.toString().trim()
}.standardOutput.asText.get().trim()
}
fun Project.gitClone(name: String) {
val stdout = ByteArrayOutputStream()
serviceOf<ExecOperations>().exec {
providers.exec {
commandLine = mutableListOf("git", "clone", name)
standardOutput = stdout
}
}

View File

@@ -11,5 +11,5 @@ tasks.named("jar") {
}
tasks.withType<JavaCompile>().configureEach {
options.release.set(25)
options.release = 25
}

View File

@@ -21,7 +21,7 @@ tasks.withType<Jar> {
}
tasks.withType<JavaCompile>().configureEach {
options.release.set(25)
options.release = 25
}
application {