import net.fabricmc.loom.task.RemapJarTask buildscript { repositories { jcenter() maven { name = 'Fabric' url = 'https://maven.fabricmc.net/' } maven { name = 'sponge' url = 'https://repo.spongepowered.org/maven' } } dependencies { classpath 'net.fabricmc:fabric-loom:0.2.4-SNAPSHOT' classpath 'org.spongepowered:mixin:0.7.11-SNAPSHOT' } } apply plugin: 'eclipse' apply plugin: 'fabric-loom' def minecraftVersion = "1.14.3" def fabricVersion = "0.3.0+build.187" def yarnMappings = "1.14.3+build.1" def loaderVersion = "0.4.8+build.155" configurations.all { Configuration it -> it.resolutionStrategy { ResolutionStrategy rs -> rs.force("com.google.guava:guava:21.0") } } dependencies { compile project(':worldedit-core') compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.8.1' minecraft "com.mojang:minecraft:${minecraftVersion}" mappings "net.fabricmc:yarn:${yarnMappings}" modCompile "net.fabricmc:fabric-loader:${loaderVersion}" modCompile "net.fabricmc.fabric-api:fabric-api:${fabricVersion}" testCompile group: 'org.mockito', name: 'mockito-core', version: '1.9.0-rc1' } sourceCompatibility = 1.8 targetCompatibility = 1.8 minecraft { } project.archivesBaseName = "${project.archivesBaseName}-mc${minecraftVersion}" processResources { // this will ensure that this task is redone when the versions change. inputs.property 'version', project.internalVersion from(sourceSets.main.resources.srcDirs) { include "fabric.mod.json" expand "version": project.internalVersion } // copy everything else except the mod json from(sourceSets.main.resources.srcDirs) { exclude "fabric.mod.json" } } jar { manifest { attributes("Class-Path": "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar", "WorldEdit-Version": version) } } shadowJar { classifier = 'dist-dev' dependencies { relocate "org.slf4j", "com.sk89q.worldedit.slf4j" relocate "org.apache.logging.slf4j", "com.sk89q.worldedit.log4jbridge" include(dependency('org.slf4j:slf4j-api')) include(dependency("org.apache.logging.log4j:log4j-slf4j-impl")) } } task deobfJar(type: Jar) { from sourceSets.main.output classifier = 'dev' } artifacts { archives deobfJar } task shadowJarRemap(type: RemapJarTask) { input shadowJar.archivePath output new File(shadowJar.archivePath.getAbsolutePath().replaceFirst('-dev\\.jar$', ".jar")) } shadowJarRemap.dependsOn(shadowJar) build.dependsOn(shadowJarRemap)