Skip to content

Commit

Permalink
chore: update and make use of libs.versions
Browse files Browse the repository at this point in the history
  • Loading branch information
RealBauHD committed May 20, 2024
1 parent 1042bb7 commit 6570d75
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 40 deletions.
10 changes: 5 additions & 5 deletions bukkit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions bungee/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
14 changes: 7 additions & 7 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
31 changes: 31 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"]
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
19 changes: 12 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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/.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%

Expand Down
2 changes: 1 addition & 1 deletion nukkit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repositories {

dependencies {
implementation project(':azlink-common')
compileOnly 'cn.nukkit:nukkit:1.0-SNAPSHOT'
compileOnly libs.nukkit
}

processResources {
Expand Down
6 changes: 3 additions & 3 deletions sponge-legacy/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'net.kyori.blossom' version '1.3.1'
alias(libs.plugins.blossom)
}

repositories {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion sponge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repositories {

dependencies {
implementation project(':azlink-common')
compileOnly 'org.spongepowered:spongeapi:8.0.0'
compileOnly libs.sponge
}

processResources {
Expand Down
7 changes: 3 additions & 4 deletions universal-legacy/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
alias(libs.plugins.shadow)
}

dependencies {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion universal/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
alias(libs.plugins.shadow)
}

dependencies {
Expand Down
14 changes: 7 additions & 7 deletions velocity/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6570d75

Please sign in to comment.