From 089f424d264839664d5d2e89a71e2ae9e8a46250 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Sun, 14 May 2023 16:46:47 +0300 Subject: Move test mod to root project --- build.gradle | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 3ebd1fe..3c6c313 100644 --- a/build.gradle +++ b/build.gradle @@ -16,6 +16,29 @@ group = project.maven_group sourceSets { javadoc { } + + testMod { + compileClasspath += main.compileClasspath + runtimeClasspath += main.runtimeClasspath + } +} + +loom { + createRemapConfigurations(sourceSets.testMod) + + runs { + testModClient { + client() + name = 'Test Mod Client' + source sourceSets.testMod + } + + testModServer { + server() + name = 'Test Mod Server' + source sourceSets.testMod + } + } } repositories { @@ -63,6 +86,13 @@ dependencies { modCompileOnly("com.terraformersmc:modmenu:$project.modmenu_version") { exclude group: 'net.fabricmc.fabric-api' } + + // Test mod dependencies + testModImplementation sourceSets.main.output + modTestModImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + modTestModRuntimeOnly("com.terraformersmc:modmenu:$project.modmenu_version") { + exclude group: 'net.fabricmc.fabric-api' + } } processResources { @@ -106,14 +136,10 @@ jar { from "CREDITS.txt", "LICENSE" } -allprojects { - apply plugin: 'checkstyle' - - checkstyle { - configFile = rootProject.file('checkstyle.xml') - configProperties = [suppressions: rootProject.file('checkstyle.suppressions.xml').absolutePath] - toolVersion = '10.9.2' - } +checkstyle { + configFile = rootProject.file('checkstyle.xml') + configProperties = [suppressions: rootProject.file('checkstyle.suppressions.xml').absolutePath] + toolVersion = '10.9.2' } def javadocBuildJar = tasks.register('javadocBuildJar', Jar) { -- cgit