User: rednesto Date: 03 Feb 24 14:31 Revision: ca2d85fc98d60d8ad33c3815d877b7bc1e5fff27 Summary: Fix missing client run config for Forge <= 1.20.2 TeamCity URL: https://ci.mcdev.io/viewModification.html?tab=vcsModificationFiles&modId=9099&personal=false Index: src/main/kotlin/platform/forge/creator/gradle-steps.kt =================================================================== --- src/main/kotlin/platform/forge/creator/gradle-steps.kt (revision b4fefab42ea477c1c73434b587ff42df2e2b3fea) +++ src/main/kotlin/platform/forge/creator/gradle-steps.kt (revision ca2d85fc98d60d8ad33c3815d877b7bc1e5fff27) @@ -41,6 +41,7 @@ import com.demonwav.mcdev.creator.step.NewProjectWizardChainStep.Companion.nextStep import com.demonwav.mcdev.creator.step.UseMixinsStep import com.demonwav.mcdev.util.MinecraftTemplates +import com.demonwav.mcdev.util.MinecraftVersions import com.demonwav.mcdev.util.SemanticVersion import com.intellij.ide.wizard.NewProjectWizardStep import com.intellij.openapi.application.WriteAction @@ -102,6 +103,7 @@ "AUTHOR_LIST" to authors.joinToString(", "), "LICENSE" to license.id, "HAS_DATA" to "true", + "MERGE_RESOURCES_AND_CLASSES" to (mcVersion >= MinecraftVersions.MC1_20_3), ) if (javaVersion != null) { Index: src/main/resources/fileTemplates/j2ee/forge/Forge (1.13+) build.gradle.ft =================================================================== --- src/main/resources/fileTemplates/j2ee/forge/Forge (1.13+) build.gradle.ft (revision b4fefab42ea477c1c73434b587ff42df2e2b3fea) +++ src/main/resources/fileTemplates/j2ee/forge/Forge (1.13+) build.gradle.ft (revision ca2d85fc98d60d8ad33c3815d877b7bc1e5fff27) @@ -90,7 +90,15 @@ // You can set various levels here. // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' +#if (!${MERGE_RESOURCES_AND_CLASSES}) + + mods { + "${mod_id}" { + source sourceSets.main - } + } + } +#end + } client { #if (${GAME_TEST_FRAMEWORK}) @@ -217,6 +225,7 @@ tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation } +#if (${MERGE_RESOURCES_AND_CLASSES}) // Merge the resources and classes into the same directory. // This is done because java expects modules to be in a single directory. @@ -227,3 +236,4 @@ it.output.resourcesDir = dir it.java.destinationDirectory = dir } +#end