Skip to content

Commit 1abd543

Browse files
committed
upgrade gradle and switch to github actions release/PR strategy
1 parent 24c9f15 commit 1abd543

File tree

10 files changed

+298
-168
lines changed

10 files changed

+298
-168
lines changed

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
mc-version:
17+
- '1.19'
18+
- '1.19.4'
19+
- '1.20'
20+
- '1.20.1'
21+
- '1.20.6'
22+
- '1.21'
23+
- '1.21.3'
24+
steps:
25+
- name: Checkout source
26+
uses: actions/checkout@v4
27+
- name: Setup Java
28+
uses: actions/setup-java@v4
29+
with:
30+
distribution: 'corretto'
31+
java-version: 21
32+
- name: Setup Gradle
33+
uses: gradle/actions/setup-gradle@v4
34+
- name: Build JAR with Gradle
35+
run: |
36+
./gradlew -PpaperApiVersion=${{ matrix.mc-version }}-R0.1-SNAPSHOT assemble
37+
mv build/libs/reuse-it-*.jar .
38+
- name: Upload JAR as artifact
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: ${{ matrix.mc-version }}
42+
path: ./reuse-it-*.jar
43+
release:
44+
runs-on: ubuntu-latest
45+
needs:
46+
- build
47+
steps:
48+
- name: Download JAR from artifact
49+
uses: actions/download-artifact@v4
50+
with:
51+
merge-multiple: true
52+
- name: Create GitHub release
53+
uses: softprops/action-gh-release@v2
54+
with:
55+
files: ./reuse-it-*.jar

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
mc-version:
15+
- '1.19'
16+
- '1.19.4'
17+
- '1.20'
18+
- '1.20.1'
19+
- '1.20.6'
20+
- '1.21'
21+
- '1.21.3'
22+
steps:
23+
- name: Checkout source
24+
uses: actions/checkout@v4
25+
- name: Setup Java
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: 'corretto'
29+
java-version: 21
30+
- name: Setup Gradle
31+
uses: gradle/actions/setup-gradle@v4
32+
- name: Build JAR with Gradle
33+
run: ./gradlew -PpaperApiVersion=${{ matrix.mc-version }}-R0.1-SNAPSHOT assemble

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
## prerequisites
44

5-
* [Paper](https://papermc.io/downloads) 1.19
6-
* [Vault](https://github.com/MilkBowl/VaultAPI) 1.7
5+
* [Paper](https://papermc.io/downloads) 1.19 - 1.21
6+
* [Vault](https://github.com/MilkBowl/VaultAPI) 1.7.1
77
* A plugin that supports the Vault Permissions API
88

99
## usage

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repositories {
1313
}
1414

1515
dependencies {
16-
compileOnly 'io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT'
17-
compileOnly 'com.github.MilkBowl:VaultAPI:1.7.1'
18-
compileOnly 'com.comphenix.protocol:ProtocolLib:4.8.0'
16+
compileOnly "io.papermc.paper:paper-api:${paperApiVersion}"
17+
compileOnly "com.github.MilkBowl:VaultAPI:${vaultApiVersion}"
18+
compileOnly "com.comphenix.protocol:ProtocolLib:${protocolLibVersion}"
1919
}

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
paperApiVersion=1.19-R0.1-SNAPSHOT
2+
vaultApiVersion=1.7.1
3+
protocolLibVersion=4.8.0

gradle/wrapper/gradle-wrapper.jar

-15 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)