From f218473fc55682dc54dd6351f1f743ebb4bf25e2 Mon Sep 17 00:00:00 2001 From: Pavle012 Date: Sun, 20 Sep 2026 14:01:27 +0200 Subject: [PATCH] =?UTF-8?q?[=E2=9C=A8]=20Added=20GitHub=20Actions=20workfl?= =?UTF-8?q?ow=20for=20building=20plugin=20(#12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add GitHub Actions workflow for building plugin * Fix Spigot API dependency and repository configuration for Gradle builds * Correct Spigot API repository and use the valid 26.2 snapshot in the v2_22_0 module * Correct Spigot API repository and use the valid 26.2 snapshot in the v2_21_2 module * [🐛] Fixed build issues with gradle * [⚡] Updated repositories --------- Co-authored-by: Sniper_TVmc --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++++++++++++ base/build.gradle.kts | 7 +++++-- v2_21_2/build.gradle.kts | 3 ++- v2_22_0/build.gradle.kts | 3 ++- 4 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c2d3474 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: Build plugin + +on: + push: + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + name: Build EssentialsX-GUI + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Java 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + cache: gradle + + - name: Make Gradle wrapper executable + run: chmod +x ./gradlew + + - name: Build plugin + run: ./gradlew build --no-daemon + + - name: Upload plugin artifacts + uses: actions/upload-artifact@v4 + with: + name: EssentialsX-GUI + path: build/libs/*.jar + if-no-files-found: error + retention-days: 14 diff --git a/base/build.gradle.kts b/base/build.gradle.kts index d60c1b8..6f8ab0e 100644 --- a/base/build.gradle.kts +++ b/base/build.gradle.kts @@ -60,12 +60,15 @@ dependencies { runtimeOnly(project(":v2_22_0")) compileOnly("org.spigotmc:spigot-api:26.2-R0.1-SNAPSHOT") - compileOnly("net.essentialsx:EssentialsX:2.21.2-SNAPSHOT") + compileOnly("net.essentialsx:EssentialsX:2.22.0-SNAPSHOT") { + exclude(group = "io.papermc.paper", module = "paper-api") + } compileOnly("com.squareup.moshi:moshi:1.15.2") compileOnly("com.zaxxer:HikariCP:7.0.2") compileOnly("com.github.InstantlyMoist:privatebin-java-api:master") compileOnly("me.clip:placeholderapi:2.12.2") compileOnly("com.github.cryptomorin:XSeries:13.7.1") + compileOnly("net.kyori:adventure-text-minimessage:4.26.1") compileOnly("net.kyori:adventure-platform-bukkit:4.4.1") compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.17") @@ -136,4 +139,4 @@ tasks.processResources { filesMatching("plugin.yml") { expand(props) } -} \ No newline at end of file +} diff --git a/v2_21_2/build.gradle.kts b/v2_21_2/build.gradle.kts index d5cdc07..125eab4 100644 --- a/v2_21_2/build.gradle.kts +++ b/v2_21_2/build.gradle.kts @@ -5,6 +5,7 @@ plugins { java.sourceCompatibility = JavaVersion.VERSION_21 repositories { + // SpigotAPI maven { url = uri("https://repo.papermc.io/repository/maven-public/") @@ -23,4 +24,4 @@ dependencies { compileOnly("net.essentialsx:EssentialsX:2.21.2-SNAPSHOT") { exclude(group = "io.papermc.paper", module = "paper-api") } -} \ No newline at end of file +} diff --git a/v2_22_0/build.gradle.kts b/v2_22_0/build.gradle.kts index a32a3b8..c80f3fb 100644 --- a/v2_22_0/build.gradle.kts +++ b/v2_22_0/build.gradle.kts @@ -5,6 +5,7 @@ plugins { java.sourceCompatibility = JavaVersion.VERSION_21 repositories { + // SpigotAPI maven { url = uri("https://repo.papermc.io/repository/maven-public/") @@ -23,4 +24,4 @@ dependencies { compileOnly("net.essentialsx:EssentialsX:2.22.0-SNAPSHOT") { exclude(group = "io.papermc.paper", module = "paper-api") } -} \ No newline at end of file +}