Skip to content

Commit

Permalink
MDG and gametests now work!
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Nov 25, 2024
1 parent f3050c6 commit c44b802
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ext.isAlpha = ext.releaseTag.contains("alpha")
ext.isBeta = ext.releaseTag.contains("beta")
def relType = ext.isAlpha ? "alpha" : (ext.isBeta ? "beta" : "release")

version = mod_version
def gametest_mod_id = mod_id + "test"

repositories {
mavenLocal()
Expand Down Expand Up @@ -48,10 +48,7 @@ repositories {
}
}

//sourceSets {
// test
//}

version = mod_version
group = project.mod_group_id

base {
Expand Down Expand Up @@ -84,7 +81,7 @@ neoForge {
"${mod_id}" {
sourceSet sourceSets.main
}
"modularrouterstest" {
"${gametest_mod_id}" {
sourceSet sourceSets.test
}
}
Expand All @@ -111,14 +108,13 @@ neoForge {
client()
systemProperty 'neoforge.enableGameTest', 'true'
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
loadedMods = [mods.modularrouters, mods.modularrouterstest]
systemProperty 'neoforge.enabledGameTestNamespaces', "${project.mod_id},${gametest_mod_id}"
sourceSet = sourceSets.test
}

server {
server()
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
systemProperty 'neoforge.enabledGameTestNamespaces', "${project.mod_id}"
programArgument '--nogui'
}

Expand All @@ -127,8 +123,7 @@ neoForge {
// The gametest system is also enabled by default for other run configs under the /test command.
gameTestServer {
type = "gameTestServer"
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
loadedMods = [mods.modularrouters, mods.modularrouterstest]
systemProperty 'neoforge.enabledGameTestNamespaces', "${project.mod_id},${gametest_mod_id}"
sourceSet = sourceSets.test
}

Expand All @@ -144,19 +139,20 @@ neoForge {
sourceSets.main.resources { srcDir 'src/generated/resources' }

configurations {
compileClasspath.extendsFrom localImplementation
runtimeClasspath.extendsFrom localImplementation
runtimeClasspath.extendsFrom localRuntime
}

dependencies {
// implementation "net.neoforged:neoforge:${neo_version}"
localRuntime(testImplementation("net.neoforged:testframework:${neo_version}"))

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

compileOnly "curse.maven:jade-324717:${jade_curse_id}"
//
localImplementation "curse.maven:jade-324717:${jade_curse_id}"

compileOnly "vazkii.patchouli:Patchouli:${patchouli_version}:api"
// runtimeOnly "vazkii.patchouli:Patchouli:${patchouli_version}"
//
Expand Down

0 comments on commit c44b802

Please sign in to comment.