Skip to content

Commit e5ed007

Browse files
Update to Java 17
1 parent 83a79fe commit e5ed007

File tree

4 files changed

+24
-34
lines changed

4 files changed

+24
-34
lines changed

.github/FUNDING.yml

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
# These are supported funding model platforms
2-
3-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
41
patreon: xiaopangxie732
52
custom: ['https://afdian.net/@MPSCreation']

.github/workflows/maven.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# This workflow will build a Java project with Maven
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3-
41
name: Java CI with Maven
52

63
on:
74
push:
8-
branches: [ master ]
95
paths-ignore:
106
- README.md
117
- LICENSE
@@ -15,25 +11,29 @@ on:
1511
- src/test/resources
1612
- decompiler
1713

14+
permissions:
15+
packages: write
16+
1817
jobs:
1918
build:
2019
runs-on: ubuntu-latest
2120
steps:
22-
- uses: actions/checkout@v2.3.4
21+
- uses: actions/checkout@v2.4.0
2322
- name: Set up JDK
24-
uses: actions/setup-java@v1.4.3
23+
uses: actions/setup-java@v2.5.0
2524
with:
26-
java-version: 16
27-
architecture: x64
28-
server-id: github
29-
settings-path: ${{ github.workspace }}
30-
- name: Build with Maven and deploy to GitHub Packages
31-
run: mvn -B clean deploy --file pom.xml -s $GITHUB_WORKSPACE/settings.xml
32-
env:
33-
GITHUB_TOKEN: ${{ github.token }}
25+
java-version: 17.0.1
26+
distribution: temurin
27+
cache: 'maven'
28+
- name: Build with Maven
29+
run: mvn -B clean package
3430
- name: Upload target
3531
if: success()
3632
uses: actions/upload-artifact@v2
3733
with:
3834
name: MinecraftDecompiler
3935
path: MinecraftDecompiler.jar
36+
- name: Deploy to GitHub Packages
37+
run: mvn -B deploy
38+
env:
39+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/pr.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
# This workflow will build a Java project with Maven
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
1+
name: PR Check
32

4-
name: PR check
5-
6-
on:
7-
pull_request:
8-
branches: [ master ]
3+
on: pull_request
94

105
jobs:
116
build:
127
runs-on: ubuntu-latest
138
steps:
14-
- uses: actions/checkout@v2.3.4
9+
- uses: actions/checkout@v2.4.0
1510
- name: Set up JDK
16-
uses: actions/setup-java@v1.4.3
11+
uses: actions/setup-java@v2.5.0
1712
with:
18-
java-version: 16
19-
architecture: x64
13+
java-version: 17.0.1
14+
distribution: temurin
15+
cache: 'maven'
2016
- name: Build with Maven
21-
run: mvn -B clean package --file pom.xml
17+
run: mvn -B clean package

pom.xml

+2-5
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,15 @@
5151
<version>3.8.1</version>
5252
<configuration>
5353
<encoding>UTF-8</encoding>
54-
<source>16</source>
55-
<target>16</target>
54+
<source>17</source>
55+
<target>17</target>
5656
</configuration>
5757
</plugin>
5858
<plugin>
5959
<groupId>org.apache.maven.plugins</groupId>
6060
<artifactId>maven-shade-plugin</artifactId>
6161
<version>3.3.0-SNAPSHOT</version>
6262
<configuration>
63-
<!-- This config defaults to true, but it never generate a dependency reduced pom before. -->
64-
<!-- In recent days, I found dependency reduced pom is generated when building. -->
65-
<!-- After looking through the source of maven shade plugin, I found this config defaults to true. -->
6663
<createDependencyReducedPom>false</createDependencyReducedPom>
6764
<transformers>
6865
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">

0 commit comments

Comments
 (0)