Skip to content

Commit

Permalink
Update build.gradle to not include testing in normal run
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Oct 25, 2024
1 parent b1fc9a0 commit 7935673
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,44 @@ 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
}

server {
server()
loadedMods = [mods."${mod_id}"]

programArgument '--nogui'
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
}

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()
}
Expand All @@ -75,13 +91,6 @@ neoForge {
logLevel = org.slf4j.event.Level.WARN
}
}

mods {
"${project.mod_id}" {
sourceSet sourceSets.main
sourceSet sourceSets.test
}
}
}

configurations {
Expand Down

0 comments on commit 7935673

Please sign in to comment.