From 793567334c3c23556091217ccd89954433753f0b Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Fri, 25 Oct 2024 15:29:52 +0300 Subject: [PATCH] Update build.gradle to not include testing in normal run --- build.gradle | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index bcfd053d..fe8070cd 100644 --- a/build.gradle +++ b/build.gradle @@ -45,9 +45,20 @@ neoForge { addModdingDependenciesTo sourceSets.test + mods { + "${project.mod_id}" { + sourceSet sourceSets.main + } + "${project.mod_id}_test" { + sourceSet sourceSets.main + sourceSet sourceSets.test + } + } + runs { client { client() + loadedMods = [mods."${mod_id}"] programArguments.addAll '--username', 'Dev###' systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id @@ -55,6 +66,7 @@ neoForge { server { server() + loadedMods = [mods."${mod_id}"] programArgument '--nogui' systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id @@ -62,11 +74,15 @@ neoForge { gameTestServer { type = "gameTestServer" + sourceSet = sourceSets.test + loadedMods = [mods."${mod_id}_test"] + systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id } data { data() + loadedMods = [mods."${mod_id}_test"] programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath() } @@ -75,13 +91,6 @@ neoForge { logLevel = org.slf4j.event.Level.WARN } } - - mods { - "${project.mod_id}" { - sourceSet sourceSets.main - sourceSet sourceSets.test - } - } } configurations {