diff --git a/bukkit/build.gradle b/bukkit/build.gradle index dc13854..e4314ba 100644 --- a/bukkit/build.gradle +++ b/bukkit/build.gradle @@ -8,11 +8,11 @@ repositories { dependencies { implementation project(':azlink-common') - compileOnly 'dev.folia:folia-api:1.19.4-R0.1-SNAPSHOT' - compileOnly 'io.netty:netty-all:4.1.25.Final' - compileOnly 'fr.xephi:authme:5.6.0-beta2' - compileOnly 'com.nickuc.login:nlogin-api:10.3' - compileOnly 'me.clip:placeholderapi:2.11.1' + compileOnly libs.folia + compileOnly libs.bundles.netty + compileOnly libs.authme + compileOnly libs.nlogin + compileOnly libs.placeholderapi } // Folia is compiled with Java 17 diff --git a/bungee/build.gradle b/bungee/build.gradle index cd2f2e8..9a6eff9 100644 --- a/bungee/build.gradle +++ b/bungee/build.gradle @@ -5,8 +5,8 @@ repositories { dependencies { implementation project(':azlink-common') - compileOnly 'net.md-5:bungeecord-api:1.16-R0.4' - compileOnly 'com.nickuc.login:nlogin-api:10.3' + compileOnly libs.bungeecord + compileOnly libs.nlogin } processResources { diff --git a/common/build.gradle b/common/build.gradle index dc11dc5..825db97 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -4,14 +4,14 @@ repositories { } dependencies { - compileOnly 'org.slf4j:slf4j-api:1.7.36' - compileOnly 'com.google.code.gson:gson:2.10.1' - compileOnly 'io.netty:netty-all:4.1.42.Final' - compileOnly 'net.skinsrestorer:skinsrestorer-api:15.0.2' - compileOnly 'com.nickuc.login:nlogin-api:10.3' + compileOnly libs.slf4j + compileOnly libs.gson + compileOnly libs.bundles.netty + compileOnly libs.skinsrestorer + compileOnly libs.nlogin - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + testImplementation libs.junit.jupiter + testRuntimeOnly libs.junit.platform } test { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..e0b5521 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,31 @@ +[plugins] +shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" } +blossom = { id = "net.kyori.blossom", version = "1.3.1" } + +[versions] +netty = "4.1.109.Final" + +[libraries] +netty-handler = { module = "io.netty:netty-handler", version.ref = "netty" } +netty-codec-http = { module = "io.netty:netty-codec-http", version.ref = "netty" } + +junit-jupiter = "org.junit.jupiter:junit-jupiter:5.11.0-M2" +junit-platform = "org.junit.platform:junit-platform-launcher:1.11.0-M2" + +folia = "dev.folia:folia-api:1.19.4-R0.1-SNAPSHOT" +authme = "fr.xephi:authme:5.6.0-beta2" +nlogin = "com.nickuc.login:nlogin-api:10.3" +placeholderapi = "me.clip:placeholderapi:2.11.1" +bungeecord = "net.md-5:bungeecord-api:1.16-R0.4" +slf4j = "org.slf4j:slf4j-api:1.7.36" +gson = "com.google.code.gson:gson:2.10.1" +skinsrestorer = "net.skinsrestorer:skinsrestorer-api:15.0.2" +nukkit = "cn.nukkit:nukkit:1.0-SNAPSHOT" +sponge = "org.spongepowered:spongeapi:8.0.0" +sponge-legacy = "org.spongepowered:spongeapi:7.4.0" +velocity = "com.velocitypowered:velocity-api:3.1.1" +limboapi = "net.elytrium.limboapi:api:1.1.13" +limboauth = "net.elytrium:limboauth:1.1.1" + +[bundles] +netty = ["netty-handler", "netty-codec-http"] \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 249e583..c1962a7 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae0804..20db9ad 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index a69d9cb..aeb74cb 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/gradlew.bat b/gradlew.bat index f127cfd..93e3f59 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% diff --git a/nukkit/build.gradle b/nukkit/build.gradle index e5b5de3..e8bb0f0 100644 --- a/nukkit/build.gradle +++ b/nukkit/build.gradle @@ -5,7 +5,7 @@ repositories { dependencies { implementation project(':azlink-common') - compileOnly 'cn.nukkit:nukkit:1.0-SNAPSHOT' + compileOnly libs.nukkit } processResources { diff --git a/sponge-legacy/build.gradle b/sponge-legacy/build.gradle index 01a0f7f..44fa406 100644 --- a/sponge-legacy/build.gradle +++ b/sponge-legacy/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'net.kyori.blossom' version '1.3.1' + alias(libs.plugins.blossom) } repositories { @@ -8,8 +8,8 @@ repositories { dependencies { implementation project(':azlink-common') - compileOnly 'org.spongepowered:spongeapi:7.4.0' - annotationProcessor 'org.spongepowered:spongeapi:7.4.0' + compileOnly libs.sponge.legacy + annotationProcessor libs.sponge.legacy } blossom { diff --git a/sponge/build.gradle b/sponge/build.gradle index 2514859..9ec0abc 100644 --- a/sponge/build.gradle +++ b/sponge/build.gradle @@ -4,7 +4,7 @@ repositories { dependencies { implementation project(':azlink-common') - compileOnly 'org.spongepowered:spongeapi:8.0.0' + compileOnly libs.sponge } processResources { diff --git a/universal-legacy/build.gradle b/universal-legacy/build.gradle index 10edb6c..da95471 100644 --- a/universal-legacy/build.gradle +++ b/universal-legacy/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.github.johnrengelman.shadow' version '8.1.1' + alias(libs.plugins.shadow) } dependencies { @@ -11,9 +11,8 @@ dependencies { implementation project(':azlink-velocity') implementation project(':azlink-nukkit') - implementation 'com.google.code.gson:gson:2.8.9' - implementation 'io.netty:netty-handler:4.1.100.Final' - implementation 'io.netty:netty-codec-http:4.1.100.Final' + implementation libs.gson + implementation libs.bundles.netty } shadowJar { diff --git a/universal/build.gradle b/universal/build.gradle index b79d924..12ae5f6 100644 --- a/universal/build.gradle +++ b/universal/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.github.johnrengelman.shadow' version '8.1.1' + alias(libs.plugins.shadow) } dependencies { diff --git a/velocity/build.gradle b/velocity/build.gradle index b9d7188..08ae29a 100644 --- a/velocity/build.gradle +++ b/velocity/build.gradle @@ -1,20 +1,20 @@ plugins { - id 'net.kyori.blossom' version '1.3.1' + alias(libs.plugins.blossom) } repositories { - maven { url 'https://nexus.velocitypowered.com/repository/maven-public/' } + maven { url 'https://repo.papermc.io/repository/maven-public/' } maven { url 'https://maven.elytrium.net/repo/' } maven { url 'https://repo.nickuc.com/maven-releases/' } } dependencies { implementation project(':azlink-common') - compileOnly 'com.velocitypowered:velocity-api:3.1.1' - compileOnly 'net.elytrium.limboapi:api:1.1.13' - compileOnly 'net.elytrium:limboauth:1.1.1' - compileOnly 'com.nickuc.login:nlogin-api:10.3' - annotationProcessor 'com.velocitypowered:velocity-api:3.1.1' + compileOnly libs.velocity + compileOnly libs.limboapi + compileOnly libs.limboauth + compileOnly libs.nlogin + annotationProcessor libs.velocity } // LimboAuth support diff --git a/velocity/src/main/java/com/azuriom/azlink/velocity/AzLinkVelocityPlugin.java b/velocity/src/main/java/com/azuriom/azlink/velocity/AzLinkVelocityPlugin.java index 2cb3e09..2412e29 100644 --- a/velocity/src/main/java/com/azuriom/azlink/velocity/AzLinkVelocityPlugin.java +++ b/velocity/src/main/java/com/azuriom/azlink/velocity/AzLinkVelocityPlugin.java @@ -67,7 +67,7 @@ public void onProxyInitialization(ProxyInitializeEvent event) { Class.forName("com.velocitypowered.api.command.SimpleCommand"); } catch (ClassNotFoundException e) { this.logger.error("AzLink requires Velocity 1.1.0 or higher"); - this.logger.error("You can download the latest version of Velocity on https://velocitypowered.com/downloads"); + this.logger.error("You can download the latest version of Velocity on https://papermc.io/downloads/velocity"); return; }