From b2c1861135e9e2d1e6931cf2647a7cb6246266e5 Mon Sep 17 00:00:00 2001 From: Leclowndu93150 Date: Wed, 11 Dec 2024 20:11:45 +0100 Subject: [PATCH] yyy --- build.gradle | 57 +++++++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/build.gradle b/build.gradle index 482fcab..7787eef 100644 --- a/build.gradle +++ b/build.gradle @@ -24,6 +24,23 @@ base { archivesName = mod_id } +sourceSets { + /* + main { + java { + // Include the default `src/main/java` and the additional `src/doom` folder + srcDirs = ['src/main/java'] + } + } + */ + doom { + java { + srcDirs = ['src/doom'] + } + } +} + + // Mojang ships Java 21 to end users starting in 1.20.5, so mods should target Java 21. java.toolchain.languageVersion = JavaLanguageVersion.of(21) @@ -89,13 +106,12 @@ neoForge { } } + addModdingDependenciesTo sourceSets.doom + mods { - // define mod <-> source bindings - // these are used to tell the game which sources are for which mod - // mostly optional in a single mod project - // but multi mod projects should define one per mod "${mod_id}" { - sourceSet(sourceSets.main) + sourceSet sourceSets.main + sourceSet sourceSets.doom } } } @@ -167,34 +183,3 @@ idea { downloadJavadoc = true } } - -sourceSets { - main { - java { - // Include the default `src/main/java` and the additional `src/doom` folder - srcDirs = ['src/main/java'] - } - } -} - -sourceSets { - doom { - java { - srcDirs = ['src/doom'] - } - resources { - srcDirs = ['src/doom/resources'] - } - } -} - -neoForge { - addModdingDependenciesTo sourceSets.doom - - mods { - "${mod_id}" { - sourceSet sourceSets.main - sourceSet sourceSets.doom - } - } -} \ No newline at end of file