Switch to gradle

This commit is contained in:
auto committed 2023-03-30 01:45:49 +02:00
1 parent 5b1f5e2ad2
commit af47035b8b
6 files changed
+394 -47

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
plugins {
id("java")
id("com.github.johnrengelman.shadow") version "7.1.0"
}
group = "com.alttd"
version = "2.1.4"
description = "Altitude AFK Detector plugin."
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()
}
shadowJar {
dependsOn(getByName("relocateJars") as ConfigureShadowRelocation)
archiveFileName.set("${project.name}-${project.version}.jar")
minimize()
configurations = listOf(project.configurations.shadow.get())
}
build {
dependsOn(shadowJar)
}
create<ConfigureShadowRelocation>("relocateJars") {
target = shadowJar.get()
prefix = "${project.name}.lib"
}
}
dependencies {
implementation("com.alttd:Galaxy-API:1.19-R0.1-SNAPSHOT")
}