buildscript { repositories { mavenCentral() maven { url = "https://maven.minecraftforge.net/" } maven { url = "https://repo.spongepowered.org/repository/maven-public/" } maven { url = "https://repo.viaversion.com" } maven { url = "https://jitpack.io/" } } dependencies { classpath "net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT" classpath "org.spongepowered:mixingradle:0.6-SNAPSHOT" classpath "com.github.johnrengelman:shadow:4.0.4" } } apply plugin: "net.minecraftforge.gradle.forge" apply plugin: "org.spongepowered.mixin" apply plugin: "com.github.johnrengelman.shadow" apply plugin: "java" apply plugin: "idea" version = "1.8.9-${maven_version}" group = "${maven_group}.${maven_name}" archivesBaseName = maven_name sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 compileJava.options.encoding = "UTF-8" repositories { mavenCentral() maven { url = "https://maven.minecraftforge.net/" } maven { url = "https://repo.spongepowered.org/repository/maven-public/" } maven { url = "https://repo.viaversion.com" } maven { url = "https://jitpack.io/" } } minecraft { version = "1.8.9-11.15.1.2318-1.8.9" runDir = "run" mappings = "stable_20" makeObfSourceJar = false clientJvmArgs += ["-Dfml.coreMods.load=de.florianmichael.viaforge.mixin.MixinLoader"] } sourceSets { main.java.srcDirs += 'src/main/java' main.java.srcDirs += '../shared/main/java' main.resources.srcDirs += '../shared/main/resources' } configurations { include implementation.extendsFrom(include) } dependencies { include compile ("org.spongepowered:mixin:${project.mixin_version}") { exclude module: "launchwrapper" } include "com.viaversion:viaversion:${project.viaversion_version}" include "com.viaversion:viabackwards:${project.viabackwards_version}" include "com.viaversion:viarewind-universal:${project.viarewind_version}" include ("net.raphimc:ViaLegacy:${project.vialegacy_version}") { exclude group: "com.google.code.gson", module: "gson" } include "net.raphimc:ViaAprilFools:${project.viaaprilfools_version}" include "net.raphimc:ViaLoader:${project.vialoader_version}" include "org.slf4j:slf4j-api:${project.slf4j_version}" include "org.yaml:snakeyaml:${project.snake_yml_version}" } processResources { inputs.property "version", project.version from(sourceSets.main.resources.srcDirs) { include "mcmod.info" expand "version": project.version } from(sourceSets.main.resources.srcDirs) { exclude "mcmod.info" } rename '(.+_at.cfg)', 'META-INF/$1' } mixin { add sourceSets.main, "mixins.${maven_name}-mc18.refmap.json" } jar { manifest.attributes( "MixinConfigs": "mixins.${maven_name}-mc18.json", "tweakClass": "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder": 0, "FMLCorePluginContainsFMLMod": "de.florianmichael.viaforge.mixin.MixinLoader" ) enabled = false } idea { module { inheritOutputDirs = true } } shadowJar { archiveName = jar.archiveName configurations = [project.configurations.include] // Include the dependencies from the include configuration duplicatesStrategy DuplicatesStrategy.EXCLUDE // Prevent conflicts with Forge's weird service loading exclude("META-INF/maven/**") exclude("META-INF/versions/**") } reobf { shadowJar {} } jar.dependsOn("shadowJar")