update slimjar

This commit is contained in:
Julian Krings 2025-07-27 18:43:33 +02:00
parent 76a6f1465a
commit 472a98da16
No known key found for this signature in database
GPG Key ID: 208C6E08C3B718D2
3 changed files with 6 additions and 3 deletions

View File

@ -158,6 +158,7 @@ tasks {
mergeServiceFiles()
//minimize()
relocate("io.github.slimjar", "$lib.slimjar")
exclude("modules/loader-agent.isolated-jar")
}
}

View File

@ -5,8 +5,8 @@ import com.volmit.iris.core.nms.container.Pair;
import io.github.slimjar.app.builder.ApplicationBuilder;
import io.github.slimjar.exceptions.InjectorException;
import io.github.slimjar.injector.loader.Injectable;
import io.github.slimjar.injector.loader.InjectableFactory;
import io.github.slimjar.injector.loader.IsolatedInjectableClassLoader;
import io.github.slimjar.injector.loader.factory.InjectableFactory;
import io.github.slimjar.logging.ProcessLogger;
import io.github.slimjar.resolver.data.Repository;
import org.jetbrains.annotations.NotNull;
@ -31,6 +31,7 @@ public class SlimJar {
private static final ReentrantLock lock = new ReentrantLock();
private static final AtomicBoolean loaded = new AtomicBoolean();
private static final InjectableFactory FACTORY = InjectableFactory.selecting(InjectableFactory.ERROR, InjectableFactory.INJECTABLE, InjectableFactory.WRAPPED, InjectableFactory.UNSAFE);
public static void load(@Nullable File localRepository) {
if (loaded.get()) return;
@ -73,6 +74,7 @@ public class SlimJar {
} catch (Throwable e) {
Iris.warn("Failed to inject the library loader, falling back to application builder");
ApplicationBuilder.appending(NAME)
.injectableFactory(FACTORY)
.downloadDirectoryPath(downloadPath)
.logger(logger)
.build();
@ -91,7 +93,7 @@ public class SlimJar {
final var factory = pair.getB();
final var libraries = factory.apply(new URL[0], libraryLoader == null ? current.getParent() : libraryLoader);
final var injecting = InjectableFactory.create(downloadPath, List.of(Repository.central()), libraries);
final var injecting = FACTORY.create(downloadPath, List.of(Repository.central()), libraries);
ApplicationBuilder.injecting(NAME, new Injectable() {
@Override

View File

@ -5,7 +5,7 @@
[versions]
# Plugins
shadow = "9.0.0-rc1" # https://plugins.gradle.org/plugin/com.gradleup.shadow
slimjar = "2.1.0" # https://plugins.gradle.org/plugin/de.crazydev22.slimjar
slimjar = "2.1.1" # https://plugins.gradle.org/plugin/de.crazydev22.slimjar
download = "5.6.0" # https://plugins.gradle.org/plugin/de.undercouch.download
runPaper = "2.3.1" # https://plugins.gradle.org/plugin/xyz.jpenilla.run-paper
sentryPlugin = "5.8.0" # https://github.com/getsentry/sentry-android-gradle-plugin