plugins { id("java-library") id("com.gradleup.shadow") version "9.3.1" } group = findProperty("pluginGroup") as String? ?: "com.mythlane" version = findProperty("pluginVersion") as String? ?: "0.1.0" description = findProperty("pluginDescription") as String? ?: "Hytale Gravity Flip" val hytaleServerVersion: String by project repositories { mavenLocal() mavenCentral() maven { name = "hytale" url = uri("https://maven.hytale.com/release") } } dependencies { compileOnly("com.hypixel.hytale:Server:$hytaleServerVersion") implementation("com.google.code.gson:gson:2.10.1") implementation("org.jetbrains:annotations:24.1.0") // Tests need the Hytale Server API (codecs, ExtraInfo, BsonValue) on the classpath. testImplementation("com.hypixel.hytale:Server:$hytaleServerVersion") testImplementation("org.junit.jupiter:junit-jupiter:5.10.0") testRuntimeOnly("org.junit.platform:junit-platform-launcher") } java { toolchain { languageVersion.set(JavaLanguageVersion.of(25)) } } tasks { compileJava { options.encoding = Charsets.UTF_8.name() options.release = 25 } processResources { filteringCharset = Charsets.UTF_8.name() val props = mapOf( "group" to project.group, "version" to project.version, "description" to project.description, "hytaleServerVersion" to hytaleServerVersion ) inputs.properties(props) filesMatching("manifest.json") { expand(props) } } shadowJar { archiveBaseName.set("hytale-gravity-flip") archiveClassifier.set("") relocate("com.google.gson", "com.mythlane.gravityflip.libs.gson") } jar { enabled = false } build { dependsOn(shadowJar) } test { useJUnitPlatform() } }