import java.io.ByteArrayOutputStream plugins { id("java") } group = "com.alttd" version = System.getenv("BUILD_NUMBER") ?: gitCommit() description = "Altitude AFK Detector plugin." apply() java { toolchain { languageVersion.set(JavaLanguageVersion.of(21)) } } tasks { withType { options.encoding = Charsets.UTF_8.name() } withType { options.encoding = Charsets.UTF_8.name() } jar { archiveFileName.set("${rootProject.name}.jar") } processResources { filteringCharset = Charsets.UTF_8.name() duplicatesStrategy = DuplicatesStrategy.INCLUDE filesMatching("plugin.yml") { expand(Pair("projectVersion", project.version)) } } } dependencies { compileOnly("com.alttd.cosmos:cosmos-api:1.21.9-R0.1-SNAPSHOT") { isChanging = true } compileOnly("de.keyle:mypet:3.11-SNAPSHOT") compileOnly("com.alttd:VillagerShopUI:1.1-SNAPSHOT") { isChanging = true } } fun gitCommit(): String { // val os = ByteArrayOutputStream() // project.exec { // isIgnoreExitValue = true // commandLine = "git rev-parse --short HEAD".split(" ") // standardOutput = os // } // return String(os.toByteArray()).trim() return "FIXME" }