buildscript { ext.kotlin_version = "1.6.10" repositories { jcenter() maven { name = "forge" url = "https://files.minecraftforge.net/maven" } maven { url "https://jitpack.io" } maven { url "https://repo.spongepowered.org/repository/maven-public/" } } dependencies { classpath "com.github.Skytils:ForgeGradle:41dfce0a70" classpath "com.github.jengelman.gradle.plugins:shadow:6.1.0" classpath "com.github.debuggingss:MixinGradle:0.6-SNAPSHOT" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } apply plugin: "kotlin" apply plugin: "net.minecraftforge.gradle.forge" apply plugin: "com.github.johnrengelman.shadow" apply plugin: "org.spongepowered.mixin" version = "1.0.23" group = "me.night0721.lilase" archivesBaseName = "Lilase" sourceCompatibility = 1.8 compileJava.options.encoding = "UTF-8" sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaVersion.VERSION_1_8 minecraft { version = "1.8.9-11.15.1.2318-1.8.9" runDir = "run" mappings = "stable_22" makeObfSourceJar = false replace "@VERSION@": project.version clientRunArgs += ["--tweakClass cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker", "--mixin mixins.night0721.json"] } configurations { include implementation.extendsFrom(include) } repositories { mavenCentral() maven { url "https://jitpack.io/" } maven { url "https://repo.spongepowered.org/repository/maven-public/" } maven { url "https://repo.sk1er.club/repository/maven-public" } maven { url "https://repo.sk1er.club/repository/maven-releases/" } maven { url "https://storehouse.okaeri.eu/repository/maven-public/" } maven { url "https://repo.polyfrost.cc/releases" } } dependencies { compileOnly("gg.essential:essential-1.8.9-forge:2581") include("gg.essential:loader-launchwrapper:1.1.3") implementation("org.spongepowered:mixin:0.7.11-SNAPSHOT") annotationProcessor("org.spongepowered:mixin:0.7.11-SNAPSHOT") include("org.apache.commons:commons-collections4:4.4") include("org.json:json:20220924") compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.2.0-alpha+') include("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta9") include(fileTree(dir: "libs", include: "*.jar")) implementation(fileTree(dir: "libs", include: "*.jar")) } mixin { disableRefMapWarning = true defaultObfuscationEnv searge add sourceSets.main, "mixins.night0721.refmap.json" } jar { manifest.attributes("FMLCorePluginContainsFMLMod": true, "FMLCorePlugin": "me.night0721.lilase.mixins.MixinLoader", "ForceLoadAsMod": true, "MixinConfigs": "mixins.night0721.json", "ModSide": "CLIENT", "TweakClass": "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker", "TweakOrder": "0") enabled = false } sourceJar { enabled = false } shadowJar { archiveClassifier.set("") duplicatesStrategy = DuplicatesStrategy.EXCLUDE configurations = [project.configurations.include] exclude "LICENSE.md" exclude "pack.mcmeta" exclude "dummyThing" exclude "**/module-info.class" exclude "*.so" exclude "*.dylib" exclude "*.dll" exclude "*.jnilib" exclude "ibxm/**" exclude "com/jcraft/**" exclude "org/lwjgl/**" exclude "net/java/**" exclude "META-INF/proguard/**" exclude "META-INF/maven/**" exclude "META-INF/versions/**" exclude "META-INF/com.android.tools/**" exclude "fabric.mod.json" } tasks.reobfJar.dependsOn tasks.shadowJar reobf { shadowJar { classpath = sourceSets.main.compileClasspath } } processResources { inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version from(sourceSets.main.resources.srcDirs) { include "mcmod.info" expand "version": project.version, "mcversion": project.minecraft.version } from(sourceSets.main.resources.srcDirs) { exclude "mcmod.info" } } sourceSets { main { output.resourcesDir = java.outputDir } }