PlayerShops/build.gradle.kts

40 lines
785 B
Plaintext
Raw Normal View History

import java.io.ByteArrayOutputStream
plugins {
id("java")
}
2022-07-09 12:53:27 +00:00
allprojects {
group = "com.alttd.playershops"
version = "1.0-SNAPSHOT"
description = "Player Shop plugin for Altitude."
}
2022-07-09 12:53:27 +00:00
subprojects {
apply<JavaLibraryPlugin>()
2022-07-09 12:53:27 +00:00
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
2022-07-09 12:53:27 +00:00
tasks {
withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
}
2022-07-09 12:53:27 +00:00
withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
}
}
fun gitCommit(): String {
val os = ByteArrayOutputStream()
2022-06-07 12:38:30 +00:00
project.exec {
commandLine = "git rev-parse --short HEAD".split(" ")
standardOutput = os
}
return String(os.toByteArray()).trim()
}