refactor(01): align scaffold with Mythlane conventions (Kotlin DSL, CamelCase manifest, pinned server version)

- 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.
This commit is contained in:
2026-04-22 23:32:25 +02:00
parent 2e26f8a10f
commit 59b33615df
10 changed files with 102 additions and 53 deletions
-34
View File
@@ -1,34 +0,0 @@
plugins {
id 'java'
id 'com.gradleup.shadow' version '9.3.1'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
repositories {
mavenCentral()
maven {
name = 'hytale'
url = 'https://maven.hytale.com/release'
}
}
dependencies {
compileOnly 'com.hypixel.hytale:Server:+'
}
tasks.named('jar') {
enabled = false
}
tasks.named('build') {
dependsOn tasks.named('shadowJar')
}
tasks.named('shadowJar') {
archiveClassifier.set('')
}
+74
View File
@@ -0,0 +1,74 @@
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()
}
}
+6 -2
View File
@@ -1,2 +1,6 @@
group=com.mythlane pluginGroup=com.mythlane
version=0.1.0 pluginVersion=0.1.0
pluginDescription=Hytale plugin - inverted gravity zones defined via an in-game wand
hytaleServerVersion=2026.03.26-89796e57b
org.gradle.jvmargs=-Xmx1024m
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
Vendored
+2 -5
View File
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015-2021 the original authors. # Copyright © 2015 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java # For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" ) JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"'
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@" "$@"
Vendored
+1 -2
View File
@@ -70,11 +70,10 @@ goto fail
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
-1
View File
@@ -1 +0,0 @@
rootProject.name = 'hytale-gravity-flip'
+1
View File
@@ -0,0 +1 @@
rootProject.name = "hytale-gravity-flip"
+17 -8
View File
@@ -1,11 +1,20 @@
{ {
"group": "com.mythlane", "Group": "Mythlane",
"name": "hytale-gravity-flip", "Name": "GravityFlip",
"version": "0.1.0", "Version": "${version}",
"serverVersion": "2026.03.26-89796e57b", "Description": "${description}",
"description": "Inverted gravity zones defined via an in-game wand.", "Authors": [
"authors": [ {
{ "name": "Mythlane" } "Name": "Mythlane Team",
"Email": "contact@mythlane.com",
"Url": "https://mythlane.com"
}
], ],
"main": "com.mythlane.gravityflip.GravityFlipPlugin" "Website": "https://mythlane.com",
"Main": "com.mythlane.gravityflip.GravityFlipPlugin",
"ServerVersion": "${hytaleServerVersion}",
"Dependencies": {},
"OptionalDependencies": {},
"DisabledByDefault": false,
"IncludesAssetPack": false
} }