Skip to content

Commit f3050c6

Browse files
committed
MDG test framework fixes
1 parent e21e15e commit f3050c6

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

build.gradle

+15-12
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ repositories {
4848
}
4949
}
5050

51-
sourceSets {
52-
test
53-
}
51+
//sourceSets {
52+
// test
53+
//}
5454

5555
group = project.mod_group_id
5656

@@ -80,6 +80,15 @@ neoForge {
8080

8181
validateAccessTransformers = true
8282

83+
mods {
84+
"${mod_id}" {
85+
sourceSet sourceSets.main
86+
}
87+
"modularrouterstest" {
88+
sourceSet sourceSets.test
89+
}
90+
}
91+
8392
runs {
8493
// applies to all the run configs below
8594
configureEach {
@@ -104,6 +113,7 @@ neoForge {
104113
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
105114
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
106115
loadedMods = [mods.modularrouters, mods.modularrouterstest]
116+
sourceSet = sourceSets.test
107117
}
108118

109119
server {
@@ -118,6 +128,8 @@ neoForge {
118128
gameTestServer {
119129
type = "gameTestServer"
120130
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
131+
loadedMods = [mods.modularrouters, mods.modularrouterstest]
132+
sourceSet = sourceSets.test
121133
}
122134

123135
data {
@@ -126,13 +138,6 @@ neoForge {
126138
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
127139
}
128140
}
129-
130-
mods {
131-
"${mod_id}" {
132-
sourceSet sourceSets.main
133-
sourceSet sourceSets.test
134-
}
135-
}
136141
}
137142

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

149-
// implementation sourceSets.test.output
150-
151154
compileOnly("mcjty.theoneprobe:theoneprobe:${top_version}") {
152155
transitive = false
153156
}

0 commit comments

Comments
 (0)