Help importing Library

Sponge Build: 1.9-5.0.0-BETA-11
Java Version: Version 8 Update 91

Hello everyone,
I’ve been recently getting into sponge and trying to import a SQL library I like. I’ve added it to my Gradle Build file and also imported the jar to my build path, and get no errors in Eclipse. However, when I try to run the server, I get the following error:

http://pastebin.com/0w5XsUNc

My build.gradle

http://pastebin.com/nzbZWsSQ

Any ideas on why this error is occurring? Please let me know if I need to supply any additional information.

Thanks in advance,
Dylan

Could you post your build.gradle file?

Willing to bet your using a compile time dependency in gradle (which the IDE will resolve), but not importing it into sponge. If you do have the library as a shadow, I’ve got no idea.

So:

  1. Is the dependency marked with “compile” or “shadow?”
  2. If the dependency is “compile,” do you have the library in the mods folder?

Yes, I added it in the topic. Thanks for your reply!

It is marked with compile, and I put the library in the mods folder of my SpongeVanilla Folder, but that doesn’t help but give me more errors. Thanks for your reply as well!

Actually, shadow is badly named - it actually means “exempt from shadow”. The reason it’s not getting shadowed is that the shadow plugin isn’t being used.

How do you install/use the “shadow” plugin? Will this solve my issue?

In my experiende, “shadow,” doesn’t even exist in a non-plugged-in environment. There are plugins and configurations you can set up to make it work as expected, and I assumed that if it was marked with “shadow” op was using one of these…

Could you clarify? I’m still a little confused on what I specifically need to do.

Use the plugin of ForgeGradle: Instructions
Look at my build.gradle. There I am shading the kotlin runtime, kotlin library and a database helper for kotlin.

Thanks, I copied part of your config and now it works!

1 Like

You can mark this topic as solved by ticking the checkbox next to my post above.