From 43b801220d9d73abec464f02b6468eaf85cca514 Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:40:24 -0800 Subject: [PATCH] Update to ModDevGradle 2 --- build.gradle | 9 ++++++--- coremod/build.gradle | 5 ++++- coremod/src/main/resources/META-INF/MANIFEST.MF | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 coremod/src/main/resources/META-INF/MANIFEST.MF diff --git a/build.gradle b/build.gradle index 2a4f5dae..e6eb669d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java-library' id 'idea' - id 'net.neoforged.moddev' version '1.0.17' + id 'net.neoforged.moddev' version '2.0.71' id("com.modrinth.minotaur") version '2.+' id("com.matthewprenger.cursegradle") version '1.4.0' } @@ -16,6 +16,8 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(21) java.toolchain.vendor = JvmVendorSpec.JETBRAINS java.withSourcesJar() +evaluationDependsOn(":coremod") + neoForge { version = neo_version @@ -55,7 +57,7 @@ neoForge { sourceSet(sourceSets.main) } coremod { - dependency project(':coremod') + sourceSet project(':coremod').sourceSets.main } } } @@ -150,7 +152,8 @@ dependencies { implementation('com.github.thedarkcolour:ModKit:81a0889b26') // Core mod - implementation(jarJar(project(':coremod'))) + implementation(project(':coremod')) + jarJar(project(':coremod')) // Oculus + Embeddium OPTIONAL compileOnly('maven.modrinth:oculus:1.20.1-1.6.9') diff --git a/coremod/build.gradle b/coremod/build.gradle index 52ee773d..8c68115b 100644 --- a/coremod/build.gradle +++ b/coremod/build.gradle @@ -7,7 +7,10 @@ java.toolchain.vendor = JvmVendorSpec.JETBRAINS jar { manifest { - attributes(["FMLModType": "LIBRARY"]) + attributes([ + "FMLModType": "LIBRARY", + "Automatic-Module-Name": "thedarkcolour.exdeorum.coremod" + ]) } } diff --git a/coremod/src/main/resources/META-INF/MANIFEST.MF b/coremod/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..0dbe7136 --- /dev/null +++ b/coremod/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Automatic-Module-Name: thedarkcolour.exdeorum.coremod +FMLModType: LIBRARY