feat: bump required version to Java 21

This commit is contained in:
ineanto 2024-05-16 21:09:56 +02:00
parent 81b66b6110
commit eb23580bc4
Signed by: ineanto
GPG key ID: E511F9CAA2F9CE84
3 changed files with 28 additions and 26 deletions

View file

@ -1,3 +1,9 @@
1.1.8: Update n°12 (XX/XX/24)
[FEATURES]
[OTHER]
- Dropped the release candidate status as Nicko is now considered stable.
1.1.7-RC1: Hotfix n°5 (04/05/24) 1.1.7-RC1: Hotfix n°5 (04/05/24)
[OTHER] [OTHER]
- Restored download link again on spigotmc.org - Restored download link again on spigotmc.org

View file

@ -1,21 +1,17 @@
plugins { plugins {
id("java") id("java")
id("io.github.goooler.shadow") version "8.1.2" id("io.github.goooler.shadow") version "8.1.7"
id("xyz.jpenilla.run-paper") version "2.2.2" id("xyz.jpenilla.run-paper") version "2.2.2"
} }
group = "xyz.ineanto" group = "xyz.ineanto"
version = "1.1.7-RC1" version = "1.1.8"
val shadowImplementation: Configuration by configurations.creating
configurations["implementation"].extendsFrom(shadowImplementation)
configurations["testImplementation"].extendsFrom(shadowImplementation)
java { java {
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_21
toolchain { toolchain {
languageVersion = JavaLanguageVersion.of(17) languageVersion = JavaLanguageVersion.of(21)
} }
} }
@ -45,21 +41,22 @@ repositories {
} }
dependencies { dependencies {
implementation("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT") // Nicko
implementation("com.comphenix.protocol:ProtocolLib:5.2.0-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT")
compileOnly("com.comphenix.protocol:ProtocolLib:5.2.0-SNAPSHOT")
compileOnly("me.clip:placeholderapi:2.11.5")
compileOnly("net.kyori:adventure-api:4.14.0")
shadowImplementation("me.clip:placeholderapi:2.11.5") implementation("xyz.xenondevs.invui:invui:1.30")
shadowImplementation("net.kyori:adventure-api:4.14.0") implementation("net.wesjd:anvilgui:1.9.4-SNAPSHOT")
shadowImplementation("xyz.xenondevs.invui:invui:1.30") implementation("com.github.jsixface:yamlconfig:1.2")
shadowImplementation("net.wesjd:anvilgui:1.9.3-SNAPSHOT") implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2")
shadowImplementation("com.github.jsixface:yamlconfig:1.2") implementation("com.fasterxml.jackson.core:jackson-core:2.15.2")
shadowImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2") implementation("com.mysql:mysql-connector-j:8.2.0")
shadowImplementation("com.fasterxml.jackson.core:jackson-core:2.15.2") implementation("org.mariadb.jdbc:mariadb-java-client:3.3.1")
shadowImplementation("com.mysql:mysql-connector-j:8.2.0") implementation("redis.clients:jedis:5.1.2")
shadowImplementation("org.mariadb.jdbc:mariadb-java-client:3.3.1") implementation("com.google.code.gson:gson:2.10.1")
shadowImplementation("redis.clients:jedis:5.1.2") implementation("org.bstats:bstats-bukkit:3.0.2")
shadowImplementation("com.google.code.gson:gson:2.10.1")
shadowImplementation("org.bstats:bstats-bukkit:3.0.2")
testImplementation("com.github.seeseemelk:MockBukkit-v1.20:3.86.0") testImplementation("com.github.seeseemelk:MockBukkit-v1.20:3.86.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2") testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
@ -77,8 +74,6 @@ tasks {
} }
shadowJar { shadowJar {
configurations = listOf(shadowImplementation)
// NAMING // NAMING
archiveBaseName.set("nicko") archiveBaseName.set("nicko")
archiveVersion.set(version.toString()) archiveVersion.set(version.toString())

View file

@ -13,6 +13,7 @@ import javax.net.ssl.HttpsURLConnection;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.URI;
import java.net.URL; import java.net.URL;
import java.util.HashMap; import java.util.HashMap;
import java.util.Optional; import java.util.Optional;
@ -103,7 +104,7 @@ public class MojangAPI {
private JsonObject getRequestToUrl(String parametrizedUrl) throws ExecutionException, InterruptedException { private JsonObject getRequestToUrl(String parametrizedUrl) throws ExecutionException, InterruptedException {
return worker.submit(() -> { return worker.submit(() -> {
final URL url = new URL(parametrizedUrl); final URL url = URI.create(parametrizedUrl).toURL();
final HttpsURLConnection con = (HttpsURLConnection) url.openConnection(); final HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
con.setDoInput(true); con.setDoInput(true);
con.setRequestMethod("GET"); con.setRequestMethod("GET");