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:
@@ -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('')
|
||||
}
|
||||
@@ -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
@@ -1,2 +1,6 @@
|
||||
group=com.mythlane
|
||||
version=0.1.0
|
||||
pluginGroup=com.mythlane
|
||||
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
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
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
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (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.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -114,7 +114,6 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# 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
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"'
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
|
||||
Vendored
+1
-2
@@ -70,11 +70,10 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@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
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
rootProject.name = 'hytale-gravity-flip'
|
||||
@@ -0,0 +1 @@
|
||||
rootProject.name = "hytale-gravity-flip"
|
||||
@@ -1,11 +1,20 @@
|
||||
{
|
||||
"group": "com.mythlane",
|
||||
"name": "hytale-gravity-flip",
|
||||
"version": "0.1.0",
|
||||
"serverVersion": "2026.03.26-89796e57b",
|
||||
"description": "Inverted gravity zones defined via an in-game wand.",
|
||||
"authors": [
|
||||
{ "name": "Mythlane" }
|
||||
],
|
||||
"main": "com.mythlane.gravityflip.GravityFlipPlugin"
|
||||
"Group": "Mythlane",
|
||||
"Name": "GravityFlip",
|
||||
"Version": "${version}",
|
||||
"Description": "${description}",
|
||||
"Authors": [
|
||||
{
|
||||
"Name": "Mythlane Team",
|
||||
"Email": "contact@mythlane.com",
|
||||
"Url": "https://mythlane.com"
|
||||
}
|
||||
],
|
||||
"Website": "https://mythlane.com",
|
||||
"Main": "com.mythlane.gravityflip.GravityFlipPlugin",
|
||||
"ServerVersion": "${hytaleServerVersion}",
|
||||
"Dependencies": {},
|
||||
"OptionalDependencies": {},
|
||||
"DisabledByDefault": false,
|
||||
"IncludesAssetPack": false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user