Skip to content

Commit 07a9310

Browse files
authored
chore: promote dev to main (#90)
Release v1.5.0 from the validated dev integration branch.
2 parents 08c9669 + d5e6edd commit 07a9310

355 files changed

Lines changed: 62417 additions & 7924 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
* text=auto eol=lf
2+
3+
*.bat text eol=crlf
4+
*.cmd text eol=crlf
5+
6+
*.dat binary
7+
*.dll binary
8+
*.dylib binary
9+
*.jar binary
10+
*.png binary
11+
*.so binary
12+
*.zip binary

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Thanks for helping improve MahjongEngine.
3+
Thanks for helping improve MahjongPaper.
44

55
## Before You Start
66

@@ -11,7 +11,7 @@ Thanks for helping improve MahjongEngine.
1111
## Local Setup
1212

1313
1. Fork and clone the repository.
14-
2. Use JDK 21+ for the default build. The released jar is built with Java 17 bytecode and `api-version: 1.20`, so a single jar runs on Paper/Folia 1.20.1 through 26.2.
14+
2. Use JDK 21+ for the default build. The released jar is built with Java 21 bytecode and `api-version: 1.20`, so the server runtime must use Java 21 or newer while one jar continues to cover Paper/Folia 1.20.1 through 26.2.
1515
3. Build the project:
1616

1717
```powershell
@@ -24,7 +24,7 @@ To validate source/API compatibility against Paper 26.2:
2424
.\gradlew.bat test "-PmahjongPaperDevBundle=26.2-rc-2.build.9-alpha" -PmahjongJavaToolchain=25 -PmahjongJavaTarget=25
2525
```
2626

27-
This command is only a compatibility check. Release artifacts should use the default build so the distributed jar remains compatible with the whole supported server range.
27+
This command is only a high-version source/API compatibility check. Release artifacts use the Java 21 default target so the distributed jar remains compatible with the whole supported server range.
2828

2929
## Development Workflow
3030

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: 2
22
updates:
33
- package-ecosystem: "gradle"
44
directory: "/"
5+
target-branch: "dev"
56
schedule:
67
interval: "weekly"
78
day: "monday"
@@ -22,6 +23,7 @@ updates:
2223

2324
- package-ecosystem: "github-actions"
2425
directory: "/"
26+
target-branch: "dev"
2527
schedule:
2628
interval: "weekly"
2729
day: "monday"

.github/workflows/build.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ name: Build
33
on:
44
push:
55
branches:
6-
- main
76
- dev
87
pull_request:
8+
branches:
9+
- main
10+
- dev
911
workflow_dispatch:
1012

1113
jobs:
1214
wrapper-validation:
1315
runs-on: ubuntu-latest
1416
steps:
1517
- name: Checkout
16-
uses: actions/checkout@v6
18+
uses: actions/checkout@v7
1719
- name: Validate Gradle wrapper
1820
uses: gradle/actions/wrapper-validation@v6
1921

@@ -22,7 +24,7 @@ jobs:
2224
runs-on: ubuntu-latest
2325
steps:
2426
- name: Checkout
25-
uses: actions/checkout@v6
27+
uses: actions/checkout@v7
2628

2729
- name: Set up JDK 25
2830
uses: actions/setup-java@v5
@@ -46,7 +48,7 @@ jobs:
4648
# Gate the build on tests so a native-platform build never ships a jar
4749
# with broken Java/Kotlin. Native tasks are skipped here; they are
4850
# exercised in the build-platform matrix below.
49-
run: ./gradlew test "-PmahjongPaperDevBundle=1.20.1-R0.1-SNAPSHOT" "-PmahjongJavaToolchain=25" "-PmahjongJavaTarget=17" -x configureGbMahjongNative -x buildGbMahjongNative -x packageGbMahjongNative
51+
run: ./gradlew test "-PmahjongPaperDevBundle=1.20.1-R0.1-SNAPSHOT" "-PmahjongJavaToolchain=25" "-PmahjongJavaTarget=21" -x configureGbMahjongNative -x buildGbMahjongNative -x packageGbMahjongNative
5052

5153
build-platform:
5254
needs: test-gate
@@ -74,10 +76,10 @@ jobs:
7476

7577
steps:
7678
- name: Checkout
77-
uses: actions/checkout@v6
79+
uses: actions/checkout@v7
7880

7981
- name: Cache native build (CMake)
80-
uses: actions/cache@v4
82+
uses: actions/cache@v6
8183
with:
8284
path: |
8385
build/native/gbmahjong
@@ -126,7 +128,7 @@ jobs:
126128
# Pin to the lowest supported Paper baseline so the released jar stays runtime-compatible
127129
# with Paper/Folia 1.20.1 -> 26.2. PaperCompatibility handles newer APIs at runtime.
128130
# Quote each -P argument because PowerShell on Windows runners mis-parses `1.20.1-R0.1-SNAPSHOT`.
129-
run: ${{ matrix.gradle }} build -x test "-PmahjongPaperDevBundle=1.20.1-R0.1-SNAPSHOT" "-PmahjongJavaTarget=17" "-PmahjongJavaToolchain=25"
131+
run: ${{ matrix.gradle }} build "-PmahjongPaperDevBundle=1.20.1-R0.1-SNAPSHOT" "-PmahjongJavaTarget=21" "-PmahjongJavaToolchain=25" "-PmahjongRequireNative=true"
130132

131133
- name: Verify artifact compatibility (Linux only)
132134
if: runner.os == 'Linux'
@@ -147,7 +149,7 @@ jobs:
147149
python3 - "$JAR" <<'PY'
148150
import sys, zipfile, struct
149151
jar = sys.argv[1]
150-
allowed_max = 61 # Java 17
152+
allowed_max = 65 # Java 21
151153
bad = []
152154
with zipfile.ZipFile(jar) as z:
153155
for n in z.namelist():
@@ -161,11 +163,11 @@ jobs:
161163
if major > allowed_max:
162164
bad.append((n, major))
163165
if bad:
164-
print(f'::error::Found {len(bad)} class files compiled above Java 17:')
166+
print(f'::error::Found {len(bad)} class files compiled above Java 21:')
165167
for n, m in bad[:20]:
166168
print(f' {n}: major={m} (Java {m-44})')
167169
sys.exit(1)
168-
print('All classes compiled to Java 17 or lower.')
170+
print('All classes compiled to Java 21 or lower.')
169171
PY
170172
171173
- name: Upload platform jar
@@ -232,6 +234,18 @@ jobs:
232234
(cd extract/macos && jar xf "$GITHUB_WORKSPACE/$MACOS_JAR" native)
233235
jar uf "$UNIVERSAL_JAR" -C extract/windows native -C extract/macos native
234236
237+
jar tf "$UNIVERSAL_JAR" > universal-entries.txt
238+
for required in \
239+
native/linux-x86_64/mahjongpaper_gb.so \
240+
native/windows-x86_64/mahjongpaper_gb.dll \
241+
native/windows-x86_64/libwinpthread-1.dll \
242+
native/macos-x86_64/mahjongpaper_gb.dylib; do
243+
if ! grep -Fxq "$required" universal-entries.txt; then
244+
echo "::error::Universal jar is missing $required"
245+
exit 1
246+
fi
247+
done
248+
235249
- name: Upload universal jar
236250
uses: actions/upload-artifact@v7
237251
with:

.github/workflows/ensure-labels.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@ jobs:
2121
const labels = [
2222
{ name: "dependencies", color: "0366d6", description: "Dependency updates" },
2323
{ name: "gradle", color: "0e8a16", description: "Gradle build and dependency updates" },
24-
{ name: "github-actions", color: "5319e7", description: "GitHub Actions workflow updates" }
24+
{ name: "github-actions", color: "5319e7", description: "GitHub Actions workflow updates" },
25+
{ name: "performance-ab", color: "d4c5f9", description: "Run the base-owned paired performance gate" },
26+
{ name: "performance-snapshot", color: "bfdadc", description: "Use the viewer snapshot performance profile" },
27+
{ name: "performance-gb-bot", color: "bfdadc", description: "Use the GB bot decision performance profile" },
28+
{ name: "performance-region-fingerprint", color: "bfdadc", description: "Use the table region fingerprint performance profile" },
29+
{ name: "performance-display-spawn", color: "bfdadc", description: "Use the display entity spawn performance profile" },
30+
{ name: "performance-region-queue", color: "bfdadc", description: "Use the region update queue performance profile" },
31+
{ name: "performance-region-keys", color: "bfdadc", description: "Use the region key plan performance profile" },
32+
{ name: "performance-layout", color: "bfdadc", description: "Use the all-variant table layout performance profile" },
33+
{ name: "performance-scheduler-reflection", color: "bfdadc", description: "Use the scheduler reflection performance profile" },
34+
{ name: "performance-ray-proxy", color: "bfdadc", description: "Use the client ray-proxy performance profile" }
2535
];
2636
2737
for (const label of labels) {

0 commit comments

Comments
 (0)