diff options
-rw-r--r-- | GuiTest/build.gradle | 67 | ||||
-rw-r--r-- | GuiTest/src/main/resources/fabric.mod.json | 29 | ||||
-rw-r--r-- | build.gradle | 42 | ||||
-rw-r--r-- | gradle.properties | 1 | ||||
-rw-r--r-- | settings.gradle | 2 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/GuiBlock.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/GuiBlock.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/GuiBlockEntity.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/GuiBlockEntity.java) | 3 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/GuiItem.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/ImplementedInventory.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/ImplementedInventory.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/LibGuiTest.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/LibGuiTest.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/NoBlockInventoryBlock.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/NoBlockInventoryBlock.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/ReallySimpleDescription.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/ReallySimpleDescription.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/TestDescription.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/TestItemDescription.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/TestItemDescription.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/InsetsTestGui.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/InsetsTestGui.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/Issue182TestGui.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/Issue182TestGui.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/Issue196TestGui.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/Issue196TestGui.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/LibGuiTestClient.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/PaddingTestGui.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/PaddingTestGui.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/ScrollingTestGui.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/ScrollingTestGui.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/TabTestGui.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/TabTestGui.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/TestClientGui.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/TestClientGui.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/TextFieldTestGui.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/TextFieldTestGui.java) | 0 | ||||
-rw-r--r-- | src/testMod/java/io/github/cottonmc/test/client/WHudTest.java (renamed from GuiTest/src/main/java/io/github/cottonmc/test/client/WHudTest.java) | 0 | ||||
-rw-r--r-- | src/testMod/resources/assets/libgui-test/icon.png (renamed from GuiTest/src/main/resources/assets/libgui-test/icon.png) | bin | 5016 -> 5016 bytes | |||
-rw-r--r-- | src/testMod/resources/assets/libgui-test/portal.png (renamed from GuiTest/src/main/resources/assets/libgui-test/portal.png) | bin | 399 -> 399 bytes | |||
-rw-r--r-- | src/testMod/resources/assets/libgui-test/portal2.png (renamed from GuiTest/src/main/resources/assets/libgui-test/portal2.png) | bin | 441 -> 441 bytes | |||
-rw-r--r-- | src/testMod/resources/assets/libgui-test/saddle.png (renamed from GuiTest/src/main/resources/assets/libgui-test/saddle.png) | bin | 179 -> 179 bytes | |||
-rw-r--r-- | src/testMod/resources/fabric.mod.json | 30 |
29 files changed, 64 insertions, 110 deletions
diff --git a/GuiTest/build.gradle b/GuiTest/build.gradle deleted file mode 100644 index 48a5d57..0000000 --- a/GuiTest/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -plugins { - id 'fabric-loom' -} - -if(rootProject.file('private.gradle').exists()) { //Publishing details - apply from: rootProject.file('private.gradle') -} - -archivesBaseName = "LibGuiTest" -version = rootProject.version -group = rootProject.group - -loom { - runConfigs.configureEach { - ideConfigGenerated = true - } -} - -repositories { - maven { url "https://server.bbkr.space/artifactory/libs-release" } - maven { - url = "https://maven.terraformersmc.com/releases" - content { - includeGroup "com.terraformersmc" - } - } -} - -dependencies { - minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" - mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}:v2" - modApi "net.fabricmc:fabric-loader:${rootProject.loader_version}" - modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}" - - compileOnly ("com.google.code.findbugs:jsr305:3.0.2") { transitive = false } - - implementation project(path: ':', configuration: 'namedElements') - // TODO: Fix this in Loom (namedElements should expose remapped mod* dependencies) - modImplementation "io.github.cottonmc:Jankson-Fabric:${rootProject.jankson_version}" - modLocalRuntime("com.terraformersmc:modmenu:$rootProject.modmenu_version") { - exclude group: 'net.fabricmc.fabric-api' - } -} - -processResources { - inputs.property "version", project.version - - filesMatching("fabric.mod.json") { - expand "version": project.version - } -} - -tasks.withType(JavaCompile) { - // ensure that the encoding is set to UTF-8, no matter what the system default is - // this fixes some edge cases with special characters not displaying correctly - // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html - options.encoding = "UTF-8" - options.release.set 16 -} - -java { - withSourcesJar() -} - -jar { - from "LICENSE" -} diff --git a/GuiTest/src/main/resources/fabric.mod.json b/GuiTest/src/main/resources/fabric.mod.json deleted file mode 100644 index 1528093..0000000 --- a/GuiTest/src/main/resources/fabric.mod.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "schemaVersion": 1, - "id": "libgui-test", - "version": "${version}", - - "name": "LibGui Test", - "description": "Some example Guis to shake out errors", - "authors": [ - "Falkreon" - ], - "contact": { - "sources": "https://github.com/CottonMC/LibGUI" - }, - - "license": "MIT", - "icon": "assets/libgui-test/icon.png", - - "environment": "*", - "entrypoints": { - "main": [ "io.github.cottonmc.test.LibGuiTest"], - "client": [ "io.github.cottonmc.test.client.LibGuiTestClient" ] - }, - "depends": { - "fabricloader": ">=0.4.0", - "libgui": "*", - "jankson": "*", - "fabric": "*" - } -} 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) { diff --git a/gradle.properties b/gradle.properties index d408d3c..75677e4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,5 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx1G -fabric.loom.multiProjectOptimisation = true # Fabric Properties # check these on https://fabricmc.net/use diff --git a/settings.gradle b/settings.gradle index ecd1298..aa24284 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,5 +9,3 @@ pluginManagement { } rootProject.name = 'LibGui' - -include ':GuiTest' diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/GuiBlock.java b/src/testMod/java/io/github/cottonmc/test/GuiBlock.java index 1b1666f..1b1666f 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/GuiBlock.java +++ b/src/testMod/java/io/github/cottonmc/test/GuiBlock.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/GuiBlockEntity.java b/src/testMod/java/io/github/cottonmc/test/GuiBlockEntity.java index 2739d51..16e7e3f 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/GuiBlockEntity.java +++ b/src/testMod/java/io/github/cottonmc/test/GuiBlockEntity.java @@ -12,8 +12,6 @@ import net.minecraft.text.Text; import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.math.BlockPos; -import javax.annotation.Nullable; - public class GuiBlockEntity extends BlockEntity implements ImplementedInventory, NamedScreenHandlerFactory { static final int INVENTORY_SIZE = 8; @@ -38,7 +36,6 @@ public class GuiBlockEntity extends BlockEntity implements ImplementedInventory, return Text.literal("test title"); } - @Nullable @Override public ScreenHandler createMenu(int syncId, PlayerInventory inv, PlayerEntity player) { return new TestDescription(LibGuiTest.GUI_SCREEN_HANDLER_TYPE, syncId, inv, ScreenHandlerContext.create(world, pos)); diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java b/src/testMod/java/io/github/cottonmc/test/GuiItem.java index 27c8d5f..27c8d5f 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java +++ b/src/testMod/java/io/github/cottonmc/test/GuiItem.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/ImplementedInventory.java b/src/testMod/java/io/github/cottonmc/test/ImplementedInventory.java index a1d3911..a1d3911 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/ImplementedInventory.java +++ b/src/testMod/java/io/github/cottonmc/test/ImplementedInventory.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/LibGuiTest.java b/src/testMod/java/io/github/cottonmc/test/LibGuiTest.java index 1d48daa..1d48daa 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/LibGuiTest.java +++ b/src/testMod/java/io/github/cottonmc/test/LibGuiTest.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/NoBlockInventoryBlock.java b/src/testMod/java/io/github/cottonmc/test/NoBlockInventoryBlock.java index 2b784a6..2b784a6 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/NoBlockInventoryBlock.java +++ b/src/testMod/java/io/github/cottonmc/test/NoBlockInventoryBlock.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/ReallySimpleDescription.java b/src/testMod/java/io/github/cottonmc/test/ReallySimpleDescription.java index bcb9213..bcb9213 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/ReallySimpleDescription.java +++ b/src/testMod/java/io/github/cottonmc/test/ReallySimpleDescription.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java b/src/testMod/java/io/github/cottonmc/test/TestDescription.java index 39b09d6..39b09d6 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java +++ b/src/testMod/java/io/github/cottonmc/test/TestDescription.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/TestItemDescription.java b/src/testMod/java/io/github/cottonmc/test/TestItemDescription.java index 4c9c1f0..4c9c1f0 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/TestItemDescription.java +++ b/src/testMod/java/io/github/cottonmc/test/TestItemDescription.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/InsetsTestGui.java b/src/testMod/java/io/github/cottonmc/test/client/InsetsTestGui.java index f89de7a..f89de7a 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/InsetsTestGui.java +++ b/src/testMod/java/io/github/cottonmc/test/client/InsetsTestGui.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/Issue182TestGui.java b/src/testMod/java/io/github/cottonmc/test/client/Issue182TestGui.java index 5d4a739..5d4a739 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/Issue182TestGui.java +++ b/src/testMod/java/io/github/cottonmc/test/client/Issue182TestGui.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/Issue196TestGui.java b/src/testMod/java/io/github/cottonmc/test/client/Issue196TestGui.java index 6de8181..6de8181 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/Issue196TestGui.java +++ b/src/testMod/java/io/github/cottonmc/test/client/Issue196TestGui.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java b/src/testMod/java/io/github/cottonmc/test/client/LibGuiTestClient.java index 635040f..635040f 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java +++ b/src/testMod/java/io/github/cottonmc/test/client/LibGuiTestClient.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/PaddingTestGui.java b/src/testMod/java/io/github/cottonmc/test/client/PaddingTestGui.java index 9f5d790..9f5d790 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/PaddingTestGui.java +++ b/src/testMod/java/io/github/cottonmc/test/client/PaddingTestGui.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/ScrollingTestGui.java b/src/testMod/java/io/github/cottonmc/test/client/ScrollingTestGui.java index bfc25c4..bfc25c4 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/ScrollingTestGui.java +++ b/src/testMod/java/io/github/cottonmc/test/client/ScrollingTestGui.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/TabTestGui.java b/src/testMod/java/io/github/cottonmc/test/client/TabTestGui.java index 8ed93f9..8ed93f9 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/TabTestGui.java +++ b/src/testMod/java/io/github/cottonmc/test/client/TabTestGui.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/TestClientGui.java b/src/testMod/java/io/github/cottonmc/test/client/TestClientGui.java index 839072e..839072e 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/TestClientGui.java +++ b/src/testMod/java/io/github/cottonmc/test/client/TestClientGui.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/TextFieldTestGui.java b/src/testMod/java/io/github/cottonmc/test/client/TextFieldTestGui.java index ce2a7b6..ce2a7b6 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/TextFieldTestGui.java +++ b/src/testMod/java/io/github/cottonmc/test/client/TextFieldTestGui.java diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/WHudTest.java b/src/testMod/java/io/github/cottonmc/test/client/WHudTest.java index 98f4d0f..98f4d0f 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/WHudTest.java +++ b/src/testMod/java/io/github/cottonmc/test/client/WHudTest.java diff --git a/GuiTest/src/main/resources/assets/libgui-test/icon.png b/src/testMod/resources/assets/libgui-test/icon.png Binary files differindex 4286522..4286522 100644 --- a/GuiTest/src/main/resources/assets/libgui-test/icon.png +++ b/src/testMod/resources/assets/libgui-test/icon.png diff --git a/GuiTest/src/main/resources/assets/libgui-test/portal.png b/src/testMod/resources/assets/libgui-test/portal.png Binary files differindex cf64bcc..cf64bcc 100644 --- a/GuiTest/src/main/resources/assets/libgui-test/portal.png +++ b/src/testMod/resources/assets/libgui-test/portal.png diff --git a/GuiTest/src/main/resources/assets/libgui-test/portal2.png b/src/testMod/resources/assets/libgui-test/portal2.png Binary files differindex 3a1c211..3a1c211 100644 --- a/GuiTest/src/main/resources/assets/libgui-test/portal2.png +++ b/src/testMod/resources/assets/libgui-test/portal2.png diff --git a/GuiTest/src/main/resources/assets/libgui-test/saddle.png b/src/testMod/resources/assets/libgui-test/saddle.png Binary files differindex 84394b9..84394b9 100644 --- a/GuiTest/src/main/resources/assets/libgui-test/saddle.png +++ b/src/testMod/resources/assets/libgui-test/saddle.png diff --git a/src/testMod/resources/fabric.mod.json b/src/testMod/resources/fabric.mod.json new file mode 100644 index 0000000..2b6adc8 --- /dev/null +++ b/src/testMod/resources/fabric.mod.json @@ -0,0 +1,30 @@ +{ + "schemaVersion": 1, + "id": "libgui-test", + "version": "1", + "name": "LibGui Test", + "description": "Some example Guis to shake out errors", + "authors": [ + "Falkreon" + ], + "contact": { + "sources": "https://github.com/CottonMC/LibGUI" + }, + "license": "MIT", + "icon": "assets/libgui-test/icon.png", + "environment": "*", + "entrypoints": { + "main": [ + "io.github.cottonmc.test.LibGuiTest" + ], + "client": [ + "io.github.cottonmc.test.client.LibGuiTestClient" + ] + }, + "depends": { + "fabricloader": ">=0.4.0", + "libgui": "*", + "jankson": "*", + "fabric": "*" + } +} |