Skip to content

Commit

Permalink
MDG test framework fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Nov 25, 2024
1 parent e21e15e commit f3050c6
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ repositories {
}
}

sourceSets {
test
}
//sourceSets {
// test
//}

group = project.mod_group_id

Expand Down Expand Up @@ -80,6 +80,15 @@ neoForge {

validateAccessTransformers = true

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

runs {
// applies to all the run configs below
configureEach {
Expand All @@ -104,6 +113,7 @@ neoForge {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
loadedMods = [mods.modularrouters, mods.modularrouterstest]
sourceSet = sourceSets.test
}

server {
Expand All @@ -118,6 +128,8 @@ neoForge {
gameTestServer {
type = "gameTestServer"
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
loadedMods = [mods.modularrouters, mods.modularrouterstest]
sourceSet = sourceSets.test
}

data {
Expand All @@ -126,13 +138,6 @@ neoForge {
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}

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

// Include resources generated by data generators.
Expand All @@ -146,8 +151,6 @@ dependencies {
// implementation "net.neoforged:neoforge:${neo_version}"
localRuntime(testImplementation("net.neoforged:testframework:${neo_version}"))

// implementation sourceSets.test.output

compileOnly("mcjty.theoneprobe:theoneprobe:${top_version}") {
transitive = false
}
Expand Down

0 comments on commit f3050c6

Please sign in to comment.