mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 02:20:57 +00:00
build: address review comments
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,5 +11,5 @@ tasks.named("jar") {
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.release.set(25)
|
||||
options.release = 25
|
||||
}
|
||||
@@ -21,7 +21,7 @@ tasks.withType<Jar> {
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.release.set(25)
|
||||
options.release = 25
|
||||
}
|
||||
|
||||
application {
|
||||
|
||||
Reference in New Issue
Block a user