From e0462f11ead618108012de3b4e2dddb679664143 Mon Sep 17 00:00:00 2001 From: FalsePattern Date: Mon, 27 Nov 2023 10:51:40 +0100 Subject: [PATCH] update buildscript --- build.gradle | 53 ++++++++++++++++++++------------------------- dependencies.gradle | 5 ++--- 2 files changed, 25 insertions(+), 33 deletions(-) diff --git a/build.gradle b/build.gradle index d9e1003..9c354fe 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1656003793falsepattern70 +//version: 1656003793falsepattern72 /* DO NOT CHANGE THIS FILE! @@ -325,31 +325,36 @@ repositories { } } +def unimixinsVersion = "0.1.14" + dependencies { if(usesMixins.toBoolean()) { - annotationProcessor("org.ow2.asm:asm-debug-all:5.0.3") - annotationProcessor("com.google.guava:guava:24.1.1-jre") - annotationProcessor("com.google.code.gson:gson:2.8.6") - annotationProcessor("com.llamalad7:MixinExtras:0.1.1-gasstation") - annotationProcessor("org.spongepowered:mixin:0.8.5-gasstation_7") - compile("org.spongepowered:mixin:0.8.5-gasstation_7") - compile("com.llamalad7:MixinExtras:0.1.1-gasstation") - compile("com.falsepattern:00gasstation-mc1.7.10:0.5.1:dev") - runtimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16') - testRuntimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16') + annotationProcessor("com.github.LegacyModdingMC.UniMixins:unimixins-all-1.7.10:$unimixinsVersion:dev") + implementation("com.github.LegacyModdingMC.UniMixins:unimixins-all-1.7.10:$unimixinsVersion:dev") + runtimeOnly('org.jetbrains:intellij-fernflower:1.2.1.16') } else if(hasMixinDeps.toBoolean()) { - runtime("com.llamalad7:MixinExtras:0.1.1-gasstation") - runtime("org.spongepowered:mixin:0.8.5-gasstation_7") - runtime("com.falsepattern:00gasstation-mc1.7.10:0.5.1:dev") + runtimeOnly("com.github.LegacyModdingMC.UniMixins:unimixins-all-1.7.10:$unimixinsVersion:dev") } // Latest LWJGL - compile "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209" - compile "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209" + implementation "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209" + implementation "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209" minecraftNatives "org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209" minecraftDeps "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209" minecraftDeps "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209" } + +if(usesMixins.toBoolean()) { + configurations.implementation.dependencies.each { + if (it instanceof ExternalModuleDependency) { + it.exclude module: "SpongeMixins" + it.exclude module: "SpongePoweredMixin" + it.exclude module: "00gasstation-mc1.7.10" + it.exclude module: "gtnhmixins" + } + } +} + apply from: 'dependencies.gradle' if(file('dependencies_override.gradle').exists()) { @@ -446,12 +451,6 @@ runClient { def arguments = [] def jvmArguments = [] - if (usesMixins.toBoolean()) { - arguments += [ - "--mods=" + Paths.get("$projectDir").resolve(minecraft.runDir).normalize().relativize(Paths.get("$projectDir/build/libs/$archivesBaseName-${version}.jar")) - ] - } - if(usesMixins.toBoolean() || hasMixinDeps.toBoolean()) { arguments += [ "--tweakClass", "org.spongepowered.asm.launch.MixinTweaker" @@ -476,12 +475,6 @@ runServer { def arguments = [] def jvmArguments = [] - if (usesMixins.toBoolean()) { - arguments += [ - "--mods=" + Paths.get("$projectDir").resolve(minecraft.runDir).normalize().relativize(Paths.get("$projectDir/build/libs/$archivesBaseName-${version}.jar")) - ] - } - if (usesMixins.toBoolean() || hasMixinDeps.toBoolean()) { arguments += [ "--tweakClass", "org.spongepowered.asm.launch.MixinTweaker" @@ -816,7 +809,7 @@ if (curseForgeProjectId != "" && System.getenv("CURSEFORGE_TOKEN") != null) { } if (usesMixins.toBoolean()) { - addCurseForgeRelation("requiredDependency", "gasstation") + addCurseForgeRelation("requiredDependency", "unimixins") } tasks.curseforge.dependsOn(build) tasks.publish.dependsOn(tasks.curseforge) @@ -849,7 +842,7 @@ if (modrinthProjectId != "" && System.getenv("MODRINTH_TOKEN") != null) { } } if (usesMixins.toBoolean()) { - addModrinthDep("required", "project", "cdeAhgfp") + addModrinthDep("required", "project", "ghjoiQAl") } tasks.modrinth.dependsOn(build) tasks.publish.dependsOn(tasks.modrinth) diff --git a/dependencies.gradle b/dependencies.gradle index 21ca3da..429fdef 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -8,7 +8,6 @@ dependencies { compileOnly("org.jetbrains:annotations:24.0.1") //Mod deps - compileOnly("org.spongepowered:mixin:0.8.5-gasstation_7") - compileOnly("com.llamalad7:MixinExtras:0.1.1-gasstation") - compileOnly("com.falsepattern:00gasstation-mc1.7.10:0.5.1:dev") + def unimixinsVersion = "0.1.14" + compileOnly("com.github.LegacyModdingMC.UniMixins:unimixins-all-1.7.10:$unimixinsVersion:dev") }