aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2023-05-14 16:46:47 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2023-05-14 16:46:47 +0300
commit089f424d264839664d5d2e89a71e2ae9e8a46250 (patch)
tree8bfcb1f5d848b6684d11acea616b37e8801f6e98 /build.gradle
parent82f3beff9a3cc9e1cd9534e772e8a91a54b49cab (diff)
downloadLibGui-089f424d264839664d5d2e89a71e2ae9e8a46250.tar.gz
LibGui-089f424d264839664d5d2e89a71e2ae9e8a46250.tar.bz2
LibGui-089f424d264839664d5d2e89a71e2ae9e8a46250.zip
Move test mod to root project
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle42
1 files changed, 34 insertions, 8 deletions
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) {