Fixed plugin not enabling on Sponge or nukkit

- Removed module-info.class that came from asm
- Don't relocate SQLite since the NativeDB class is not relocated properly
This commit is contained in:
Risto Lahtela 2021-03-15 18:24:40 +02:00
parent ac526e7542
commit 7e08ea8245
4 changed files with 11 additions and 7 deletions

View File

@ -66,7 +66,7 @@ subprojects {
ext.daggerVersion = "2.33"
ext.daggerCompilerVersion = "2.33"
ext.palVersion = "4.0.9"
ext.palVersion = "4.0.10"
ext.bukkitVersion = "1.13.2-R0.1-SNAPSHOT"
ext.spigotVersion = "1.13.2-R0.1-SNAPSHOT"

View File

@ -43,6 +43,7 @@ shadowJar {
exclude "**/*.psd"
exclude "**/module-info.class"
exclude "module-info.class"
exclude 'META-INF/versions/' // Causes Sponge to crash
exclude 'org/apache/http/**/*' // Unnecessary http client depended on by geolite2 implementation
exclude 'mozilla/**/*'

View File

@ -22,6 +22,7 @@ import net.playeranalytics.plugin.me.lucko.jarrelocator.Relocation;
import net.playeranalytics.plugin.server.PluginLogger;
import java.io.IOException;
import java.util.Collections;
public class DependencyStartup {
@ -54,11 +55,12 @@ public class DependencyStartup {
);
dependencyLoader.addDependency(REPOSITORY_MAVEN_CENTRAL,
"org.xerial", "sqlite-jdbc", "3.34.0",
Lists.builder(Relocation.class)
.add(new Relocation(
new String(new char[]{'o', 'r', 'g', '.', 's', 'q', 'l', 'i', 't', 'e'}),
"plan.org.sqlite"
)).build()
Collections.emptyList()
// Lists.builder(Relocation.class)
// .add(new Relocation(
// new String(new char[]{'o', 'r', 'g', '.', 's', 'q', 'l', 'i', 't', 'e'}),
// "plan.org.sqlite"
// )).build()
);
logger.info("Loading runtime dependencies..");
dependencyLoader.load();

View File

@ -22,7 +22,8 @@ shadowJar {
relocate 'dagger', 'plan.dagger'
relocate 'com.mysql', 'plan.com.mysql'
relocate 'com.mysql', 'plan.com.mysql'
relocate 'org.sqlite', 'plan.org.sqlite'
// Don't relocate SQLite since the org.sqlite.NativeDB class calls are not relocated properly
// relocate 'org.sqlite', 'plan.org.sqlite'
relocate 'javax.inject', 'plan.javax.inject'
relocate 'com.github.benmanes', 'plan.com.github.benmanes'