build: address review comments

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

No files matched your search

+3 -9
View File
@@ -2,26 +2,20 @@ import java.io.ByteArrayOutputStream
import org.gradle.api.Action import org.gradle.api.Action
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.kotlin.dsl.support.serviceOf import org.gradle.kotlin.dsl.support.serviceOf
import org.gradle.process.ExecOperations
var isPrerelease = false var isPrerelease = false
fun Project.getGitHash(): String { fun Project.getGitHash(): String {
val stdout = ByteArrayOutputStream() return providers.exec {
serviceOf<ExecOperations>().exec {
commandLine = mutableListOf("git", "rev-parse", "--short", "HEAD") commandLine = mutableListOf("git", "rev-parse", "--short", "HEAD")
standardOutput = stdout }.standardOutput.asText.get().trim()
}
return stdout.toString().trim()
} }
fun Project.gitClone(name: String) { fun Project.gitClone(name: String) {
val stdout = ByteArrayOutputStream() providers.exec {
serviceOf<ExecOperations>().exec {
commandLine = mutableListOf("git", "clone", name) commandLine = mutableListOf("git", "clone", name)
standardOutput = stdout
} }
} }
+1 -1
View File
@@ -11,5 +11,5 @@ tasks.named("jar") {
} }
tasks.withType<JavaCompile>().configureEach { tasks.withType<JavaCompile>().configureEach {
options.release.set(25) options.release = 25
} }
+1 -1
View File
@@ -21,7 +21,7 @@ tasks.withType<Jar> {
} }
tasks.withType<JavaCompile>().configureEach { tasks.withType<JavaCompile>().configureEach {
options.release.set(25) options.release = 25
} }
application { application {