From 7bf9b92cbb60ca37262f8efd2d089a686a531273 Mon Sep 17 00:00:00 2001 From: Konicai <71294714+Konicai@users.noreply.github.com> Date: Sun, 16 Oct 2022 20:21:29 -0400 Subject: [PATCH] Cleanup buildscript, add github actions --- .github/workflows/pullrequest.yml | 7 +++++++ bootstrap/fabric/build.gradle.kts | 20 ------------------- .../fabric/src/main/resources/fabric.mod.json | 8 ++++---- .../kotlin/geyser.base-conventions.gradle.kts | 3 ++- 4 files changed, 13 insertions(+), 25 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index cb55c2675..39e9fe188 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -19,6 +19,13 @@ jobs: uses: snickerbockers/submodules-init@v4 - name: Build with Gradle run: ./gradlew build + + - name: Archive artifacts (Geyser Fabric) + uses: actions/upload-artifact@v2 + if: success() + with: + name: Geyser Fabric + path: bootstrap/fabric/build/libs/Geyser-Fabric.jar - name: Archive artifacts (Geyser Standalone) uses: actions/upload-artifact@v2 if: success() diff --git a/bootstrap/fabric/build.gradle.kts b/bootstrap/fabric/build.gradle.kts index 5c2409be8..7e767afe0 100644 --- a/bootstrap/fabric/build.gradle.kts +++ b/bootstrap/fabric/build.gradle.kts @@ -51,21 +51,6 @@ repositories { } tasks { - processResources { -// inputs.property "version", project.version -// -// filesMatching("fabric.mod.json") { -// expand "version": project.version -// } - } - - // 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 - compileJava { - options.encoding = "UTF-8" - } - // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // if it is present. // If you remove this task, sources will not be generated. @@ -79,11 +64,6 @@ tasks { relocate("org.yaml", "org.geysermc.relocate.yaml") // https://github.com/CardboardPowered/cardboard/issues/139 relocate("com.fasterxml.jackson", "org.geysermc.relocate.jackson") relocate("net.kyori", "org.geysermc.relocate.kyori") - archiveClassifier.set("unshaded") // We don't want it included in the archived artifacts - } - - jar { - from("LICENSE") } remapJar { diff --git a/bootstrap/fabric/src/main/resources/fabric.mod.json b/bootstrap/fabric/src/main/resources/fabric.mod.json index 9d66ca08c..4460e277b 100644 --- a/bootstrap/fabric/src/main/resources/fabric.mod.json +++ b/bootstrap/fabric/src/main/resources/fabric.mod.json @@ -1,14 +1,14 @@ { "schemaVersion": 1, - "id": "geyser-fabric", + "id": "${id}-fabric", "version": "${version}", - "name": "Geyser-Fabric", + "name": "${name}-Fabric", "description": "A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition. ", "authors": [ - "GeyserMC" + "${author}" ], "contact": { - "website": "https://geysermc.org", + "website": "${url}", "repo": "https://github.com/GeyserMC/Geyser-Fabric" }, "license": "MIT", diff --git a/build-logic/src/main/kotlin/geyser.base-conventions.gradle.kts b/build-logic/src/main/kotlin/geyser.base-conventions.gradle.kts index bd50c6ea0..44a74db3d 100644 --- a/build-logic/src/main/kotlin/geyser.base-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/geyser.base-conventions.gradle.kts @@ -9,7 +9,8 @@ dependencies { tasks { processResources { - filesMatching(listOf("plugin.yml", "bungee.yml", "velocity-plugin.json", "META-INF/sponge_plugins.json")) { + // Spigot, BungeeCord, Velocity, Sponge, Fabric + filesMatching(listOf("plugin.yml", "bungee.yml", "velocity-plugin.json", "META-INF/sponge_plugins.json", "fabric.mod.json")) { expand( "id" to "geyser", "name" to "Geyser",