Skip to content

Commit afb80fd

Browse files
authored
Merge pull request #316 from Kichura/architectury-1.21
Replace Java 16/17 -> 21, Upgrade workflow system
2 parents 1aa449b + 35ab81f commit afb80fd

File tree

8 files changed

+48
-71
lines changed

8 files changed

+48
-71
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build with Gradle
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-24.04
8+
steps:
9+
- name: Checkout Repository
10+
uses: actions/checkout@v4
11+
- name: Validate Gradle Wrapper
12+
uses: gradle/actions/wrapper-validation@v3
13+
- name: Set up JDK 21
14+
uses: actions/setup-java@v4
15+
with:
16+
distribution: 'temurin'
17+
java-version: 21
18+
check-latest: true
19+
- name: Build with Gradle
20+
run: ./gradlew build
21+
- name: Upload artifacts to GitHub
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: MidnightControls-Artifacts
25+
path: /build/libs/

.github/workflows/gradlebuild.yml

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

.github/workflows/modrinth_update.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
1-
name: Gradle Package
1+
name: Publish to Modrinth
22

33
on:
4-
push:
5-
tags:
6-
- '*'
4+
release:
5+
types:
6+
- published
77

88
jobs:
9-
build:
10-
runs-on: ubuntu-latest
9+
publish:
10+
runs-on: ubuntu-24.04
1111
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up JDK 16
14-
uses: actions/setup-java@v1
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
- name: Validate Gradle Wrapper
15+
uses: gradle/actions/wrapper-validation@v3
16+
- name: Set up JDK 21
17+
uses: actions/setup-java@v4
1518
with:
16-
java-version: 16
17-
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
18-
settings-path: ${{ github.workspace }} # location for the settings.xml file
19-
20-
- name: Build with Gradle
21-
run: ./gradlew build
22-
23-
- uses: actions/upload-artifact@v2
24-
with:
25-
name: Artifacts
26-
path: ./build/libs/
27-
19+
distribution: 'temurin'
20+
java-version: 21
21+
check-latest: true
2822
# The USERNAME and PASSWORD need to correspond to the credentials environment variables used in
2923
# the publishing section of your build.gradle
3024
- name: Publish to GitHub Packages and other Mavens
@@ -38,3 +32,7 @@ jobs:
3832
midnightcontrols_MAVEN: ${{ secrets.MAVEN_URL }}
3933
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
4034
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
35+
- name: Publish to Modrinth
36+
env:
37+
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
38+
run: ./gradlew publishModrinth

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Version](https://img.shields.io/github/v/tag/TeamMidnightDust/MidnightControls?label=version&style=round)](https://github.com/TeamMidnightDust/MidnightControls/releases)
99
![Environment: Client](https://img.shields.io/badge/environment-client-1976d2?style=round)
1010
[![Mod loader: Quilt/Fabric]][Quilt]
11-
[![Java 17](https://img.shields.io/badge/language-Java%2017-9B599A.svg?style=round)](https://www.oracle.com/java/technologies/downloads/#java17)
11+
[![Java 21](https://img.shields.io/badge/language-Java%2021-9B599A.svg?style=round)](https://www.oracle.com/java/technologies/downloads/#java21)
1212
[![GitHub license](https://img.shields.io/github/license/TeamMidnightDust/MidnightControls?style=round)](LICENSE)
1313

1414
A Fabric Minecraft mod which adds better controls, reach-around and controller support.

common/src/main/resources/midnightcontrols.mixins.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"required": true,
33
"package": "eu.midnightdust.midnightcontrols.client.mixin",
4-
"compatibilityLevel": "JAVA_16",
4+
"compatibilityLevel": "JAVA_21",
55
"client": [
66
"ClickableWidgetAccessor",
77
"AdvancementsScreenAccessor",

common/src/main/resources/midnightcontrols_compat.mixins.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"required": true,
33
"package": "eu.midnightdust.midnightcontrols.client.compat.mixin",
44
"plugin": "eu.midnightdust.midnightcontrols.client.compat.MidnightControlsMixinPlugin",
5-
"compatibilityLevel": "JAVA_16",
5+
"compatibilityLevel": "JAVA_21",
66
"client": [
77
"sodium.SodiumOptionsGUIAccessor"
88
],

fabric/src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"fabric": ">=0.71.0",
5555
"minecraft": ">=1.20.5",
5656
"obsidianui": ">=0.2.5",
57-
"java": ">=17"
57+
"java": ">=21"
5858
},
5959
"suggests": {
6060
"kontrolo": "*"

0 commit comments

Comments
 (0)