Currently struggling with my shadow jar build, as it compiles correctly but involves every package/class/etc that I've used, and not just the one I put in the shadowjar. This is my build.gradle Code (Text): buildscript { repositories { jcenter() } dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0' } } apply plugin: 'java' apply plugin: 'com.github.johnrengelman.shadow' group = pluginGroup version = pluginVersion sourceCompatibility = '1.8' targetCompatibility = '1.8' repositories { mavenCentral() maven { name = 'spigotmc-repo' url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' } maven { name = 'sonatype' url = 'https://oss.sonatype.org/content/groups/public/' } maven { url 'https://jitpack.io' } maven { name = 'codemc-repo' url = 'https://repo.codemc.io/repository/maven-public/' } } dependencies { testCompile group: 'junit', name: 'junit', version: '4.12' compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT' compileOnly "com.github.MilkBowl:VaultAPI:1.7" compile group: 'de.tr7zw', name: 'item-nbt-api-plugin', version: '2.2.0' compile fileTree(include: ['*.jar'], dir: 'libs') } shadowJar { dependencies { include dependency("de.tr7zw:item-nbt-api-plugin:2.2.0") } relocate("de.tr7zw", "shaded.de.tr7zw") } import org.apache.tools.ant.filters.ReplaceTokens processResources { from(sourceSets.main.resources.srcDirs) { filter ReplaceTokens, tokens: [version: version] } } Anyone know how to fix this?
I have the Spigot 1.15.2 NMS jar, should I just change the dir to "libraries" and make my build.gradle use that?