aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/projects/runconfigs
diff options
context:
space:
mode:
authormodmuss50 <modmuss50@gmail.com>2021-03-06 23:31:09 +0000
committermodmuss50 <modmuss50@gmail.com>2021-03-06 23:31:09 +0000
commite9c7c21ede178875e8ea86f7d6f06a53965785f4 (patch)
treefeb86c6ab35dc69c3fe713fd6f8a7bfb7b18cb73 /src/test/resources/projects/runconfigs
parentd1c40827612e1b309f03ba8ef84cb634fa7a7b9a (diff)
downloadarchitectury-loom-e9c7c21ede178875e8ea86f7d6f06a53965785f4.tar.gz
architectury-loom-e9c7c21ede178875e8ea86f7d6f06a53965785f4.tar.bz2
architectury-loom-e9c7c21ede178875e8ea86f7d6f06a53965785f4.zip
Add basic MultiProjectTest and a basic RunConfigTest
This should cover most of the main things now.
Diffstat (limited to 'src/test/resources/projects/runconfigs')
-rw-r--r--src/test/resources/projects/runconfigs/build.gradle33
-rw-r--r--src/test/resources/projects/runconfigs/gradle.properties1
-rw-r--r--src/test/resources/projects/runconfigs/settings.gradle2
-rw-r--r--src/test/resources/projects/runconfigs/src/main/java/net/fabricmc/example/ExampleMod.java13
-rw-r--r--src/test/resources/projects/runconfigs/src/main/resources/fabric.mod.json11
5 files changed, 60 insertions, 0 deletions
diff --git a/src/test/resources/projects/runconfigs/build.gradle b/src/test/resources/projects/runconfigs/build.gradle
new file mode 100644
index 00000000..dbdd21e5
--- /dev/null
+++ b/src/test/resources/projects/runconfigs/build.gradle
@@ -0,0 +1,33 @@
+plugins {
+ id 'fabric-loom'
+}
+
+loom {
+ runs {
+ testmodClient {
+ client()
+ ideConfigGenerated project.rootProject == project
+ name = "Testmod Client"
+ source sourceSets.main
+ }
+ testmodServer {
+ server()
+ ideConfigGenerated project.rootProject == project
+ name = "Testmod Server"
+ source sourceSets.main
+ }
+ autoTestServer {
+ inherit testmodServer
+ vmArg "-Dfabric.autoTest"
+ }
+ }
+}
+
+archivesBaseName = "fabric-example-mod"
+version = "1.0.0"
+
+dependencies {
+ minecraft "com.mojang:minecraft:1.16.5"
+ mappings "net.fabricmc:yarn:1.16.5+build.5:v2"
+ modImplementation "net.fabricmc:fabric-loader:0.11.2"
+} \ No newline at end of file
diff --git a/src/test/resources/projects/runconfigs/gradle.properties b/src/test/resources/projects/runconfigs/gradle.properties
new file mode 100644
index 00000000..7d28631b
--- /dev/null
+++ b/src/test/resources/projects/runconfigs/gradle.properties
@@ -0,0 +1 @@
+org.gradle.jvmargs=-Xmx1G \ No newline at end of file
diff --git a/src/test/resources/projects/runconfigs/settings.gradle b/src/test/resources/projects/runconfigs/settings.gradle
new file mode 100644
index 00000000..c162c363
--- /dev/null
+++ b/src/test/resources/projects/runconfigs/settings.gradle
@@ -0,0 +1,2 @@
+rootProject.name = "fabric-example-mod"
+
diff --git a/src/test/resources/projects/runconfigs/src/main/java/net/fabricmc/example/ExampleMod.java b/src/test/resources/projects/runconfigs/src/main/java/net/fabricmc/example/ExampleMod.java
new file mode 100644
index 00000000..21928e56
--- /dev/null
+++ b/src/test/resources/projects/runconfigs/src/main/java/net/fabricmc/example/ExampleMod.java
@@ -0,0 +1,13 @@
+package net.fabricmc.example;
+
+import net.fabricmc.api.ModInitializer;
+
+public class ExampleMod implements ModInitializer {
+ @Override
+ public void onInitialize() {
+ System.out.println("Hello Fabric world!");
+
+ // Quit now, we dont need to load the whole game to know the run configs are works
+ System.exit(0);
+ }
+}
diff --git a/src/test/resources/projects/runconfigs/src/main/resources/fabric.mod.json b/src/test/resources/projects/runconfigs/src/main/resources/fabric.mod.json
new file mode 100644
index 00000000..58bdf984
--- /dev/null
+++ b/src/test/resources/projects/runconfigs/src/main/resources/fabric.mod.json
@@ -0,0 +1,11 @@
+{
+ "schemaVersion": 1,
+ "id": "modid",
+ "version": "1.0.0",
+ "environment": "*",
+ "entrypoints": {
+ "main": [
+ "net.fabricmc.example.ExampleMod"
+ ]
+ }
+}