Skip to content

Commit a3998bf

Browse files
authored
Update to Gradle 9 (#36)
2 parents 1bb1489 + d586d66 commit a3998bf

File tree

17 files changed

+186
-145
lines changed

17 files changed

+186
-145
lines changed

.github/workflows/publish-main.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Publish Main to https://maven.minecrafttas.com/main
2-
name: Publish Main
3-
4-
on:
5-
release:
6-
types: [published]
7-
8-
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
if: github.repository == 'MinecraftTAS/Discombobulator'
12-
steps:
13-
- uses: actions/checkout@v4
14-
- name: Set up JDK 23 for x64
15-
uses: actions/setup-java@v4
16-
with:
17-
java-version: '23'
18-
distribution: 'temurin'
19-
architecture: x64
20-
- name: Setup Gradle
21-
uses: gradle/actions/setup-gradle@v3
22-
with:
23-
gradle-version: 8.13
24-
- name: Publish
25-
run: gradle publishAllPublicationsToMinecrafttasMainRepository -Prelease=true -PminecrafttasMainUsername=${{ secrets.MAVEN_NAME }} -PminecrafttasMainPassword=${{ secrets.MAVEN_SECRET }}
1+
# Publish Main to https://maven.minecrafttas.com/main
2+
name: Publish Main
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
if: github.repository == 'MinecraftTAS/Discombobulator'
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up JDK 25 for x64
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: '25'
18+
distribution: 'temurin'
19+
architecture: x64
20+
- name: Setup Gradle
21+
uses: gradle/actions/setup-gradle@v3
22+
with:
23+
gradle-version: 9.2.1
24+
- name: Publish
25+
run: gradle publishAllPublicationsToMinecrafttasMainRepository -Prelease=true -PminecrafttasMainUsername=${{ secrets.MAVEN_NAME }} -PminecrafttasMainPassword=${{ secrets.MAVEN_SECRET }}

.github/workflows/publish-snapshot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ jobs:
99
if: github.repository == 'MinecraftTAS/Discombobulator'
1010
steps:
1111
- uses: actions/checkout@v4
12-
- name: Set up JDK 23 for x64
12+
- name: Set up JDK 25 for x64
1313
uses: actions/setup-java@v4
1414
with:
15-
java-version: '23'
15+
java-version: '25'
1616
distribution: 'temurin'
1717
architecture: x64
1818
- name: Setup Gradle
1919
uses: gradle/actions/setup-gradle@v3
2020
with:
21-
gradle-version: 8.13
21+
gradle-version: 9.2.1
2222
- name: Publish
2323
run: gradle publishAllPublicationsToMinecrafttasSnapshotsRepository -PminecrafttasSnapshotsUsername=${{ secrets.MAVEN_NAME }} -PminecrafttasSnapshotsPassword=${{ secrets.MAVEN_SECRET }}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Set up JDK 23 for x64
14+
- name: Set up JDK 25 for x64
1515
uses: actions/setup-java@v4
1616
with:
17-
java-version: '23'
17+
java-version: '25'
1818
distribution: 'temurin'
1919
architecture: x64
2020
- name: Setup Gradle
2121
uses: gradle/actions/setup-gradle@v4
2222
with:
23-
gradle-version: 8.13
23+
gradle-version: 9.2.1
2424
- name: Build
2525
run: gradle build
2626
- name: Upload Test Report

Test/Test1.12.2/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
2-
id 'fabric-loom' version '1.10-SNAPSHOT'
2+
id 'fabric-loom' version '1.14-SNAPSHOT'
3+
id "legacy-looming" version "1.14-SNAPSHOT"
34
}
45

56
java {
@@ -8,11 +9,11 @@ java {
89

910
repositories {
1011
//mavenLocal()
11-
maven { url 'https://raw.githubusercontent.com/BleachDev/cursed-mappings/main/' }
12+
maven { url = 'https://raw.githubusercontent.com/BleachDev/cursed-mappings/main/' }
1213
}
1314

1415
dependencies {
1516
minecraft "com.mojang:minecraft:1.12.2"
1617
mappings "net.legacyfabric:yarn:1.12.2+build.mcp"
17-
modImplementation "net.fabricmc:fabric-loader:0.16.9"
18+
modImplementation "net.fabricmc:fabric-loader:0.18.2"
1819
}

Test/Test1.14.4/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'fabric-loom' version '1.10-SNAPSHOT'
2+
id 'fabric-loom' version '1.14-SNAPSHOT'
33
}
44

55
java {
@@ -9,5 +9,5 @@ java {
99
dependencies {
1010
minecraft "com.mojang:minecraft:1.14.4"
1111
mappings loom.officialMojangMappings()
12-
modImplementation "net.fabricmc:fabric-loader:0.16.9"
12+
modImplementation "net.fabricmc:fabric-loader:0.18.2"
1313
}

Test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'discombobulator' version '1.3-SNAPSHOT'
2+
id 'discombobulator' version "1.4-SNAPSHOT"
33
}
44

55
discombobulator {

Test/gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
org.gradle.jvmargs=-Xmx6G
1+
org.gradle.jvmargs=-Xmx6G
2+
org.gradle.configuration-cache=true
3+
org.gradle.warning.mode=fail

Test/settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pluginManagement {
44
mavenCentral()
55
maven { url = "https://maven.minecrafttas.com/main" }
66
maven { url = "https://maven.fabricmc.net" }
7+
maven { url = "https://maven.legacyfabric.net/" }
78
gradlePluginPortal()
89
}
910
}

build.gradle

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
// Plugins used in the project
22
plugins {
3-
id 'java-gradle-plugin'
3+
id 'java-gradle-plugin'
44
id 'maven-publish'
55
}
66

7-
// Change java compatibility level to 23
8-
sourceCompatibility = targetCompatibility = 23
9-
107
def snapshot = project.release=="true" ? "" : "-SNAPSHOT"
118
version = project.version+snapshot
129
// Name, version and group for the project
1310
group = "com.minecrafttas"
14-
archivesBaseName = "discombobulator"
11+
base {
12+
archivesName = "discombobulator"
13+
}
1514

1615
// Configure the gradle plugin
1716
gradlePlugin {
18-
plugins {
19-
discombobulator {
20-
id = 'discombobulator'
21-
implementationClass = 'com.minecrafttas.discombobulator.Discombobulator'
22-
}
23-
}
17+
plugins {
18+
discombobulator {
19+
id = 'discombobulator'
20+
implementationClass = 'com.minecrafttas.discombobulator.Discombobulator'
21+
}
22+
}
2423
}
2524

2625
repositories {
2726
mavenCentral()
2827
}
2928

3029
dependencies {
31-
testImplementation(platform('org.junit:junit-bom:5.11.3'))
30+
testImplementation(platform('org.junit:junit-bom:6.0.1'))
3231
testImplementation('org.junit.jupiter:junit-jupiter')
33-
implementation 'commons-io:commons-io:2.17.0'
32+
testRuntimeOnly('org.junit.platform:junit-platform-launcher')
33+
implementation 'commons-io:commons-io:2.21.0'
3434
}
3535

3636
test {
@@ -41,8 +41,10 @@ test {
4141
}
4242

4343
java {
44-
withSourcesJar()
45-
withJavadocJar()
44+
sourceCompatibility = JavaVersion.VERSION_21
45+
targetCompatibility = JavaVersion.VERSION_21
46+
withSourcesJar()
47+
withJavadocJar()
4648
}
4749

4850
javadoc {

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
version=1.3.1
1+
version=1.4
22
release=false
3+
org.gradle.configuration-cache=true

0 commit comments

Comments
 (0)