I have a simple plugin that uses a library of mine as an external dependency. When I build a Jar that includes this library (and it’s dependencies) with Gradle Shadow plugin, sponge crashes when trying to search for plugins, with an IllegalArgumentException.
java.lang.IllegalArgumentException: null
at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at org.spongepowered.server.launch.plugin.PluginScanner.scanClassFile(PluginScanner.java:341) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at org.spongepowered.server.launch.plugin.PluginScanner.scanJar(PluginScanner.java:245) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at org.spongepowered.server.launch.plugin.PluginScanner.scanDirectory(PluginScanner.java:173) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at org.spongepowered.server.launch.plugin.VanillaLaunchPluginManager.findPlugins(VanillaLaunchPluginManager.java:66) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at org.spongepowered.server.launch.VanillaServerTweaker.searchPlugins(VanillaServerTweaker.java:171) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at org.spongepowered.server.launch.VanillaServerTweaker.injectIntoClassLoader(VanillaServerTweaker.java:94) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:115) ~[launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) ~[launchwrapper-1.12.jar:?]
at org.spongepowered.server.launch.VanillaServerMain.main(VanillaServerMain.java:126) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
at org.spongepowered.server.launch.VersionCheckingMain.main(VersionCheckingMain.java:38) ~[spongevanilla-1.12.2-7.1.5.jar:1.12.2-7.1.5]
When I make a simple Jar without the deps, it loads the plugin (and I get a ClassNotFoundException, 'case the deps aren’t there)…
I’m absolutely clueless… Any ideas what could be causing this?