From f6c12d93b88df12099883d600da7481af63fce53 Mon Sep 17 00:00:00 2001 From: MattiDragon Date: Sun, 2 Jul 2023 10:54:04 +0300 Subject: [PATCH] Apply mixin extras AP to client source set and redo buildscript some --- build.gradle | 36 +++++++++++++++++------------------- changelog/2.0.2+1.20.1.md | 1 + gradle.properties | 2 +- 3 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 changelog/2.0.2+1.20.1.md diff --git a/build.gradle b/build.gradle index 37754f7..64c0f3c 100644 --- a/build.gradle +++ b/build.gradle @@ -20,6 +20,9 @@ repositories { maven { url "https://jitpack.io" } } +// Has to run before dependencies so that we get access to proper dependency configurations +loom.splitEnvironmentSourceSets() + dependencies { // Fabric minecraft "com.mojang:minecraft:$minecraft_version" @@ -36,36 +39,31 @@ dependencies { modImplementation "com.terraformersmc:modmenu:$modmenu_version" // Mixin Extras - annotationProcessor(include(modImplementation("com.github.LlamaLad7.mixinextras:mixinextras-fabric:$mixinextras_version"))) + modImplementation include("com.github.LlamaLad7.mixinextras:mixinextras-fabric:$mixinextras_version") + annotationProcessor clientAnnotationProcessor("com.github.LlamaLad7.mixinextras:mixinextras-fabric:$mixinextras_version") // Add generated data to runtime classpath (slightly hacky) runtimeOnly files("src/main/generated") } loom { - splitEnvironmentSourceSets() - // Apply datagen at runtime - mods { - extended_drawers { - sourceSet sourceSets.main - sourceSet sourceSets.client - modFiles.from file("src/main/generated") - } + mods.register("extended_drawers") { + sourceSet sourceSets.main + sourceSet sourceSets.client + modFiles.from file("src/main/generated") } - runs { - datagen { - inherit server - name "Data Generation" - vmArg "-Dfabric-api.datagen" - vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}" - vmArg "-Dfabric-api.datagen.strict-validation" + runs.register("datagen") { + inherit runs.server + name "Data Generation" + vmArg "-Dfabric-api.datagen" + vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}" + vmArg "-Dfabric-api.datagen.strict-validation" - ideConfigGenerated = true + ideConfigGenerated = true - runDir "build/datagen/" - } + runDir "build/datagen/" } } diff --git a/changelog/2.0.2+1.20.1.md b/changelog/2.0.2+1.20.1.md new file mode 100644 index 0000000..7044967 --- /dev/null +++ b/changelog/2.0.2+1.20.1.md @@ -0,0 +1 @@ +* Fix major client breakage \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 2a577a0..4df61e5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ minecraft_version=1.20.1 yarn_mappings=1.20.1+build.8 loader_version=0.14.21 -mod_version=2.0.1 +mod_version=2.0.2 maven_group=io.github.mattidragon archives_base_name=ExtendedDrawers