From faefc30ab17ad80eef7141cd4b500a8e7813e271 Mon Sep 17 00:00:00 2001 From: Minecraftschurli Date: Sat, 17 Feb 2024 18:11:56 +0100 Subject: [PATCH] fix issue in helper plugin --- .../helperplugin/HelperExtension.kt | 13 +++++++------ .../minecraftschurlimods/helperplugin/ModsToml.kt | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/com/github/minecraftschurlimods/helperplugin/HelperExtension.kt b/src/main/kotlin/com/github/minecraftschurlimods/helperplugin/HelperExtension.kt index 8c78744..f4349df 100644 --- a/src/main/kotlin/com/github/minecraftschurlimods/helperplugin/HelperExtension.kt +++ b/src/main/kotlin/com/github/minecraftschurlimods/helperplugin/HelperExtension.kt @@ -229,9 +229,6 @@ open class HelperExtension @Inject constructor(private val project: Project) { project.runs { configureEach { workingDirectory.set(project.layout.projectDirectory.dir("run")) - if (name != "data") { - systemProperties.put("forge.enabledGameTestNamespaces", projectId) - } systemProperties.put("forge.logging.markers", "REGISTRIES") systemProperties.put("forge.logging.console.level", "debug") modSources.add(project.sourceSets.main) @@ -262,10 +259,14 @@ open class HelperExtension @Inject constructor(private val project: Project) { } fun withGameTestRuns() { - project.runs.create("gameTestServer") { - if (::testSourceSet.isInitialized) { - modSource(testSourceSet) + project.runs.configureEach { + if (name != "data") { + systemProperties.put("forge.enabledGameTestNamespaces", projectId) + if (::testSourceSet.isInitialized) { + modSource(testSourceSet) + } } } + project.runs.create("gameTestServer") } } diff --git a/src/main/kotlin/com/github/minecraftschurlimods/helperplugin/ModsToml.kt b/src/main/kotlin/com/github/minecraftschurlimods/helperplugin/ModsToml.kt index 62f6dd0..bca998f 100644 --- a/src/main/kotlin/com/github/minecraftschurlimods/helperplugin/ModsToml.kt +++ b/src/main/kotlin/com/github/minecraftschurlimods/helperplugin/ModsToml.kt @@ -1,6 +1,7 @@ package com.github.minecraftschurlimods.helperplugin import com.akuleshov7.ktoml.annotations.TomlMultiline +import kotlinx.serialization.Serializable import kotlinx.serialization.SerialName