plugins { id 'java' id 'maven-publish' id 'java-gradle-plugin' id 'idea' id 'eclipse' } sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'net.fabricmc' archivesBaseName = project.name version = '0.0.12-SNAPSHOT' // Remove the gradleApi so it isn't merged into the jar file. configurations.compile.dependencies.remove dependencies.gradleApi() repositories { mavenCentral() maven { name = "Modmuss" url = 'http://maven.modmuss50.me/' } maven { name = 'Mojang' url = 'https://libraries.minecraft.net/' } maven { name = 'Forge' //For ModLauncher url = 'http://files.minecraftforge.net/maven/' } maven { name = 'SpongePowered' url = 'http://repo.spongepowered.org/maven' } } configurations { deployerJars shade compile.extendsFrom shade } dependencies { implementation gradleApi() shade('commons-io:commons-io:2.6') shade('org.zeroturnaround:zt-zip:1.13') shade('com.google.code.gson:gson:2.8.5') shade('com.google.guava:guava:27.0-jre') shade('net.fabricmc:stitch:0.1.0.+') { transitive = false } shade('net.fabricmc:tiny-remapper:0.1.0.16') shade('org.spongepowered:mixin:0.7.11-SNAPSHOT') { exclude module: 'launchwrapper' exclude module: 'guava' } } jar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE from(configurations.shade.collect { it.isDirectory() ? it : zipTree(it) }) { exclude 'META-INF/*' exclude 'META-INF' } } apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.gradle' task wrapper(type: Wrapper) { gradleVersion = '4.10.2' } gradlePlugin { plugins { register("fabricLoom") { id = "fabric-loom" implementationClass = "net.fabricmc.loom.LoomGradlePlugin" } } } publishing { publications { pluginMaven(MavenPublication) { publication -> groupId project.group artifactId project.archivesBaseName version project.version //Removes all of the dependencies from the maven pom, prevents sub projects downloading all the libs, as we use a fat jar pom.withXml { asNode().remove(asNode().get('dependencies')) } } } repositories { maven { url "http://mavenupload.modmuss50.me/" if (project.hasProperty('mavenPass')) { credentials { username 'buildslave' password project.getProperty('mavenPass') } } } } }