Skip to content

Commit e99ae48

Browse files
build: address review comments
1 parent 2e2b315 commit e99ae48

3 files changed

Lines changed: 5 additions & 11 deletions

File tree

buildSrc/src/main/kotlin/Utils.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,20 @@ import java.io.ByteArrayOutputStream
22
import org.gradle.api.Action
33
import org.gradle.api.Project
44
import org.gradle.kotlin.dsl.support.serviceOf
5-
import org.gradle.process.ExecOperations
65

76

87
var isPrerelease = false
98

109

1110
fun Project.getGitHash(): String {
12-
val stdout = ByteArrayOutputStream()
13-
serviceOf<ExecOperations>().exec {
11+
return providers.exec {
1412
commandLine = mutableListOf("git", "rev-parse", "--short", "HEAD")
15-
standardOutput = stdout
16-
}
17-
return stdout.toString().trim()
13+
}.standardOutput.asText.get().trim()
1814
}
1915

2016
fun Project.gitClone(name: String) {
21-
val stdout = ByteArrayOutputStream()
22-
serviceOf<ExecOperations>().exec {
17+
providers.exec {
2318
commandLine = mutableListOf("git", "clone", name)
24-
standardOutput = stdout
2519
}
2620
}
2721

platforms/minestom/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ tasks.named("jar") {
1111
}
1212

1313
tasks.withType<JavaCompile>().configureEach {
14-
options.release.set(25)
14+
options.release = 25
1515
}

platforms/minestom/example/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ tasks.withType<Jar> {
2121
}
2222

2323
tasks.withType<JavaCompile>().configureEach {
24-
options.release.set(25)
24+
options.release = 25
2525
}
2626

2727
application {

0 commit comments

Comments
 (0)