40 lines
785 B
Plaintext
40 lines
785 B
Plaintext
import java.io.ByteArrayOutputStream
|
|
|
|
plugins {
|
|
id("java")
|
|
}
|
|
|
|
allprojects {
|
|
group = "com.alttd.playershops"
|
|
version = "1.0-SNAPSHOT"
|
|
description = "Player Shop plugin for Altitude."
|
|
}
|
|
|
|
subprojects {
|
|
apply<JavaLibraryPlugin>()
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(17))
|
|
}
|
|
}
|
|
|
|
tasks {
|
|
withType<JavaCompile> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
|
|
withType<Javadoc> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
}
|
|
}
|
|
|
|
fun gitCommit(): String {
|
|
val os = ByteArrayOutputStream()
|
|
project.exec {
|
|
commandLine = "git rev-parse --short HEAD".split(" ")
|
|
standardOutput = os
|
|
}
|
|
return String(os.toByteArray()).trim()
|
|
} |