AFKDetector/build.gradle.kts
2026-04-06 14:41:24 +02:00

60 lines
1.3 KiB
Plaintext

import java.io.ByteArrayOutputStream
plugins {
id("java")
}
group = "com.alttd"
version = System.getenv("BUILD_NUMBER") ?: gitCommit()
description = "Altitude AFK Detector plugin."
apply<JavaLibraryPlugin>()
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
tasks {
withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
}
withType<Javadoc> {
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"
}