From 73d7019f2e56211efd81d3d4f9c156cce75887f3 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Wed, 25 Jan 2023 19:55:10 -0800 Subject: [PATCH] GitHub workflow for building samples. --- .github/workflows/{build.yml => plugin.yml} | 2 +- .github/workflows/samples.yml | 25 +++++++++++++++++++ samples/mixed/bukkit-plugins/build.gradle.kts | 2 +- samples/shared/build.gradle.kts | 2 +- samples/simple/build.gradle.kts | 2 +- .../foundation/concrete/ConcreteExtension.kt | 2 +- .../foundation/concrete/SetupPaperServer.kt | 2 +- 7 files changed, 31 insertions(+), 6 deletions(-) rename .github/workflows/{build.yml => plugin.yml} (96%) create mode 100644 .github/workflows/samples.yml diff --git a/.github/workflows/build.yml b/.github/workflows/plugin.yml similarity index 96% rename from .github/workflows/build.yml rename to .github/workflows/plugin.yml index 1d39407..319666a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/plugin.yml @@ -1,4 +1,4 @@ -name: Build +name: Plugin on: [push] jobs: build: diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml new file mode 100644 index 0000000..6fd734d --- /dev/null +++ b/.github/workflows/samples.yml @@ -0,0 +1,25 @@ +name: Samples +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Build mixed sample with Gradle + uses: gradle/gradle-build-action@v2 + with: + arguments: -P samples/mixed build + - name: Build shared sample with Gradle + uses: gradle/gradle-build-action@v2 + with: + arguments: -P samples/shared build + - name: Build simple sample with Gradle + uses: gradle/gradle-build-action@v2 + with: + arguments: -P samples/simple build diff --git a/samples/mixed/bukkit-plugins/build.gradle.kts b/samples/mixed/bukkit-plugins/build.gradle.kts index 4dae438..eaad8b9 100644 --- a/samples/mixed/bukkit-plugins/build.gradle.kts +++ b/samples/mixed/bukkit-plugins/build.gradle.kts @@ -4,7 +4,7 @@ plugins { concrete { minecraftServerPath.set("server") - paperVersionGroup.set("1.19") + paperServerVersionGroup.set("1.19") paperApiVersion.set("1.19.3-R0.1-SNAPSHOT") acceptServerEula.set(true) } diff --git a/samples/shared/build.gradle.kts b/samples/shared/build.gradle.kts index e61728c..7b53612 100644 --- a/samples/shared/build.gradle.kts +++ b/samples/shared/build.gradle.kts @@ -5,7 +5,7 @@ plugins { concrete { minecraftServerPath.set("server") - paperVersionGroup.set("1.19") + paperServerVersionGroup.set("1.19") paperApiVersion.set("1.19.3-R0.1-SNAPSHOT") acceptServerEula.set(true) } diff --git a/samples/simple/build.gradle.kts b/samples/simple/build.gradle.kts index 4dae438..eaad8b9 100644 --- a/samples/simple/build.gradle.kts +++ b/samples/simple/build.gradle.kts @@ -4,7 +4,7 @@ plugins { concrete { minecraftServerPath.set("server") - paperVersionGroup.set("1.19") + paperServerVersionGroup.set("1.19") paperApiVersion.set("1.19.3-R0.1-SNAPSHOT") acceptServerEula.set(true) } diff --git a/src/main/kotlin/gay/pizza/foundation/concrete/ConcreteExtension.kt b/src/main/kotlin/gay/pizza/foundation/concrete/ConcreteExtension.kt index 929a517..20b1c8d 100644 --- a/src/main/kotlin/gay/pizza/foundation/concrete/ConcreteExtension.kt +++ b/src/main/kotlin/gay/pizza/foundation/concrete/ConcreteExtension.kt @@ -3,7 +3,7 @@ package gay.pizza.foundation.concrete import org.gradle.api.provider.Property interface ConcreteExtension { - val paperVersionGroup: Property + val paperServerVersionGroup: Property val paperApiVersion: Property val minecraftServerPath: Property val acceptServerEula: Property diff --git a/src/main/kotlin/gay/pizza/foundation/concrete/SetupPaperServer.kt b/src/main/kotlin/gay/pizza/foundation/concrete/SetupPaperServer.kt index 09176db..e6fc394 100644 --- a/src/main/kotlin/gay/pizza/foundation/concrete/SetupPaperServer.kt +++ b/src/main/kotlin/gay/pizza/foundation/concrete/SetupPaperServer.kt @@ -31,7 +31,7 @@ open class SetupPaperServer : DefaultTask() { val paperJarFile = project.file("${concrete.minecraftServerPath.get()}/paper.jar") if (!paperJarFile.exists() || shouldUpdatePaperServer) { - downloadLatestBuild(concrete.paperVersionGroup.get(), paperJarFile) + downloadLatestBuild(concrete.paperServerVersionGroup.get(), paperJarFile) } val paperPluginsDirectory = minecraftServerDirectory.resolve("plugins")