Fix libraries not working due to upstream issue

This commit is contained in:
2025-07-07 17:02:27 -04:00
parent 88686c52a2
commit a559313e05
6 changed files with 19 additions and 19 deletions

View File

@ -3,7 +3,7 @@ plugins {
id("maven-publish") id("maven-publish")
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.10" id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.10"
id("net.kyori.blossom") version "2.1.0" id("net.kyori.blossom") version "2.1.0"
id("com.gradleup.shadow") version "9.0.0-beta12" id("com.gradleup.shadow") version "9.0.0-rc1"
} }
group = "dev.plex" group = "dev.plex"
@ -26,10 +26,6 @@ subprojects {
url = uri("https://repository.apache.org/content/repositories/snapshots/") url = uri("https://repository.apache.org/content/repositories/snapshots/")
} }
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
maven { maven {
url = uri("https://jitpack.io") url = uri("https://jitpack.io")
content { content {

Binary file not shown.

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.13-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

5
gradlew vendored
View File

@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
@ -206,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command: # Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped. # and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line. # treated as '${Hostname}' itself on the command line.

View File

@ -17,22 +17,22 @@ dependencies {
library("org.projectlombok:lombok:1.18.38") library("org.projectlombok:lombok:1.18.38")
library("org.json:json:20250107") library("org.json:json:20250107")
library("commons-io:commons-io:2.19.0") library("commons-io:commons-io:2.19.0")
library("redis.clients:jedis:6.0.0-beta2") library("redis.clients:jedis:6.0.0")
library("org.mariadb.jdbc:mariadb-java-client:3.5.3") library("org.mariadb.jdbc:mariadb-java-client:3.5.4")
library("com.zaxxer:HikariCP:6.3.0") library("com.zaxxer:HikariCP:6.3.0")
library("org.apache.maven.resolver:maven-resolver-transport-http:1.9.22") library("org.apache.maven.resolver:maven-resolver-transport-http:1.9.24")
library("org.jetbrains:annotations:26.0.2") library("org.jetbrains:annotations:26.0.2")
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT")
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") { compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") {
exclude("org.bukkit", "bukkit") exclude("org.bukkit", "bukkit")
} }
compileOnly("net.coreprotect:coreprotect:22.4") compileOnly("net.coreprotect:coreprotect:22.4")
compileOnly("network.darkhelmet.prism:Prism-Api:1.0.0") compileOnly("network.darkhelmet.prism:Prism-Api:1.0.0")
compileOnly("com.github.LeonMangler:SuperVanish:6.2.19")
implementation("org.bstats:bstats-base:3.1.0") implementation("org.bstats:bstats-base:3.1.0")
implementation("org.bstats:bstats-bukkit:3.1.0") implementation("org.bstats:bstats-bukkit:3.1.0")
implementation("com.github.LeonMangler:SuperVanish:6.2.18-3")
annotationProcessor("org.projectlombok:lombok:1.18.38") annotationProcessor("org.projectlombok:lombok:1.18.38")
} }

View File

@ -4,6 +4,7 @@ import com.google.gson.Gson;
import io.papermc.paper.plugin.loader.PluginClasspathBuilder; import io.papermc.paper.plugin.loader.PluginClasspathBuilder;
import io.papermc.paper.plugin.loader.PluginLoader; import io.papermc.paper.plugin.loader.PluginLoader;
import io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver; import io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
@ -11,6 +12,7 @@ import java.nio.charset.StandardCharsets;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.eclipse.aether.artifact.DefaultArtifact; import org.eclipse.aether.artifact.DefaultArtifact;
import org.eclipse.aether.graph.Dependency; import org.eclipse.aether.graph.Dependency;
import org.eclipse.aether.repository.RemoteRepository; import org.eclipse.aether.repository.RemoteRepository;
@ -39,7 +41,12 @@ public class PlexLibraryManager implements PluginLoader
{ {
try (var in = getClass().getResourceAsStream("/paper-libraries.json")) try (var in = getClass().getResourceAsStream("/paper-libraries.json"))
{ {
return new Gson().fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), PluginLibraries.class); PluginLibraries libraries = new Gson().fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), PluginLibraries.class);
// Patch the MavenRepo to use the default mirror
libraries.repositories.put("MavenRepo", MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR);
return libraries;
} }
catch (IOException e) catch (IOException e)
{ {
@ -51,14 +58,12 @@ public class PlexLibraryManager implements PluginLoader
{ {
public Stream<Dependency> asDependencies() public Stream<Dependency> asDependencies()
{ {
return dependencies.stream() return dependencies.stream().map(d -> new Dependency(new DefaultArtifact(d), null));
.map(d -> new Dependency(new DefaultArtifact(d), null));
} }
public Stream<RemoteRepository> asRepositories() public Stream<RemoteRepository> asRepositories()
{ {
return repositories.entrySet().stream() return repositories.entrySet().stream().map(e -> new RemoteRepository.Builder(e.getKey(), "default", e.getValue()).build());
.map(e -> new RemoteRepository.Builder(e.getKey(), "default", e.getValue()).build());
} }
} }
} }