Posted March 21, 20169 yr i am using 3 libraries for my mod: CodeChickenLib-dev.jar, Mantle-dev.jar, mysql-connector.jar-bin.jar the game works fine when i run it in eclipse, but when I try to gradlew build it, those dependencies are not being included into my mods' compiled jar. The libraries are located in the root project folder, inside of a folder named 'libs' I tried adding this to the build.gradle file: dependencies{ compile files('libs/CodeChickenLib-1.7.10-1.1.3.140-dev.jar', 'libs/Mantle-1.7.10dev.jar', 'libs/mysql-connector-java-5.1.38-bin.jar') } but it still won't added the dependencies.
March 21, 20169 yr Dependencies are never shaded (included in your JAR) by default, you always need to specify that they should be. For CodeChickenLib, I'd recommend have it auto-download like ChickenBones does: Include the DepLoader class from CodeChickenCore in your code, call it from an IFMLLoadingPlugin specified in your manifest and include a dependencies.info file that specifies CodeChickenLib as a dependency. For examples, search GitHub for DepLoader and limit the search to Java code. For Mantle, don't shade it all. Tinkers' Construct doesn't include it, neither should you. For MySQL Connector, you can shade it using this technique or using a proper shading plugin like shadow. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.