59b33615df
- Convert build.gradle/settings.gradle to Kotlin DSL matching VotePipe + myth_*
- Manifest keys: lowercase -> CamelCase (Group/Name/Version/Main/ServerVersion/...)
matching production Mythlane plugins (empirical authority)
- gradle.properties adopts pluginGroup/pluginVersion/pluginDescription/hytaleServerVersion
- Template manifest via processResources.expand(${version}, ${description}, ${hytaleServerVersion})
- Add baseline deps: gson (relocated), jetbrains annotations, JUnit 5
- shadowJar archiveBaseName=hytale-gravity-flip
Rebuild: BUILD SUCCESSFUL, fat JAR regenerated with CamelCase manifest.
75 lines
1.7 KiB
Kotlin
75 lines
1.7 KiB
Kotlin
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")
|
|
|
|
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()
|
|
}
|
|
}
|