mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 14:00:14 +00:00
build: address review comments
This commit is contained in:
1 parent
2e2b315ab7
commit
e99ae48f1a
3 files changed
+5
-11
No files matched your search
@@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,5 +11,5 @@ tasks.named("jar") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<JavaCompile>().configureEach {
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
options.release.set(25)
|
options.release = 25
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,7 @@ tasks.withType<Jar> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<JavaCompile>().configureEach {
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
options.release.set(25)
|
options.release = 25
|
||||||
}
|
}
|
||||||
|
|
||||||
application {
|
application {
|
||||||
|
|||||||
Reference in new issue
Block a user