Skip to content

Commit 4861468

Browse files
committed
Update to 26.1
1 parent ed6045b commit 4861468

File tree

50 files changed

+390
-452
lines changed

Some content is hidden

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

50 files changed

+390
-452
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ on:
2828
- v19
2929
- v20
3030
- v21.11
31+
- v26.1
3132

3233
jobs:
3334
build:
3435
runs-on: ubuntu-latest
3536
steps:
3637
- uses: actions/checkout@v1
37-
- name: Set up JDK 21
38+
- name: Set up JDK 25
3839
uses: actions/setup-java@v2
3940
with:
40-
java-version: 21
41+
java-version: 25
4142
distribution: 'temurin'
4243
- name: Upload to Maven
4344
run: ./gradlew publish modPublish --stacktrace

build.gradle

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id "architectury-plugin" version "3.4-SNAPSHOT"
3-
id "dev.architectury.loom" version "1.13-SNAPSHOT" apply false
2+
id "architectury-plugin" version "3.5-SNAPSHOT"
3+
id "dev.architectury.loom-no-remap" version "1.14-SNAPSHOT" apply false
44
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
55
id "maven-publish"
66
id "org.cadixdev.licenser" version "0.6.1" apply false
@@ -12,11 +12,8 @@ architectury {
1212

1313
subprojects {
1414
if (it.name != "neoforge_coremods") {
15-
apply plugin: "dev.architectury.loom"
16-
17-
loom {
18-
silentMojangMappingsLicense()
19-
}}
15+
apply plugin: "dev.architectury.loom-no-remap"
16+
}
2017

2118
repositories {
2219
maven { url "https://maven.neoforged.net/releases/" }
@@ -33,7 +30,7 @@ subprojects {
3330

3431
allprojects {
3532
apply plugin: 'java'
36-
apply plugin: 'org.cadixdev.licenser'
33+
// apply plugin: 'org.cadixdev.licenser' // Fails in Gradle 9
3734

3835
def runNumber = (System.getenv("GITHUB_RUN_NUMBER") == null ? "9999" : System.getenv("GITHUB_RUN_NUMBER"))
3936

@@ -46,30 +43,31 @@ allprojects {
4643
group = rootProject.maven_group
4744

4845
if (it.name != "neoforge_coremods") {
49-
apply plugin: 'architectury-plugin'
46+
apply plugin: 'architectury-plugin'
47+
}
5048

5149
tasks.withType(JavaCompile).configureEach {
5250
options.encoding = "UTF-8"
5351

5452
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
5553
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
5654
// We'll use that if it's available, but otherwise we'll use the older option.
57-
options.release = 21
58-
}}
55+
options.release = 25
56+
}
5957

60-
license {
58+
/*license {
6159
header = rootProject.file("HEADER")
6260
6361
ext {
6462
name = "shedaniel"
6563
year = "2020 - 2021"
6664
}
6765
68-
include "**/*.java"
69-
exclude "**/ScrollingContainer.java"
66+
include "**/ /**.java"
67+
exclude "**/ /*ScrollingContainer.java"
7068
7169
ignoreFailures = true
72-
}
70+
}*/
7371
}
7472

7573
task licenseFormatAll

common/build.gradle

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ configurations {
1313

1414
dependencies {
1515
minecraft "com.mojang:minecraft:${rootProject.architectury.minecraft}"
16-
mappings loom.officialMojangMappings()
1716
// We depend on fabric loader here to use the fabric @Environment annotations
1817
// Do NOT use other classes from fabric loader
19-
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
18+
implementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
2019

21-
modApi("me.shedaniel.cloth:basic-math:0.6.1")
20+
api("me.shedaniel.cloth:basic-math:0.6.1")
2221

2322
compileOnly("blue.endless:jankson:${rootProject.jankson_version}")
2423
compileOnly("com.moandjiezana.toml:toml4j:${rootProject.toml4j_version}")
@@ -34,28 +33,38 @@ architectury {
3433
common("fabric", /*"forge", */"neoforge")
3534
}
3635

37-
task sourcesJar(type: Jar, dependsOn: classes) {
38-
archiveClassifier = "sources"
39-
from sourceSets.main.allSource
36+
jar {
37+
archiveClassifier = "raw"
38+
}
39+
40+
java {
41+
withSourcesJar()
4042
}
4143

4244
shadowJar {
45+
dependsOn(jar)
46+
mainSpec.sourcePaths.clear()
47+
from(zipTree(jar.archiveFile))
4348
relocate "blue.endless.jankson", "${rootProject.maven_group}.clothconfig.shadowed.blue.endless.jankson"
4449
relocate "com.moandjiezana.toml", "${rootProject.maven_group}.clothconfig.shadowed.com.moandjiezana.toml"
4550
relocate "org.yaml.snakeyaml", "${rootProject.maven_group}.clothconfig.shadowed.org.yaml.snakeyaml"
4651

4752
configurations = [project.configurations.shadowCommon]
48-
archiveClassifier = "shadow"
49-
}
50-
51-
remapJar {
52-
dependsOn(shadowJar)
53-
input.set(shadowJar.archiveFile)
5453
archiveClassifier = null
55-
5654
from rootProject.file("LICENSE.md")
5755
}
5856

57+
configurations {
58+
apiElements {
59+
outgoing.artifacts.clear()
60+
outgoing.artifact(shadowJar)
61+
}
62+
runtimeElements {
63+
outgoing.artifacts.clear()
64+
outgoing.artifact(shadowJar)
65+
}
66+
}
67+
5968
publishing {
6069
publications {
6170
mavenCommon(MavenPublication) {

common/src/main/java/me/shedaniel/autoconfig/AutoConfig.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,12 @@
1919

2020
package me.shedaniel.autoconfig;
2121

22-
import dev.architectury.injectables.annotations.PlatformOnly;
2322
import me.shedaniel.autoconfig.annotation.Config;
24-
import me.shedaniel.autoconfig.gui.registry.GuiRegistry;
2523
import me.shedaniel.autoconfig.serializer.ConfigSerializer;
26-
import net.fabricmc.api.EnvType;
27-
import net.fabricmc.api.Environment;
28-
import net.minecraft.client.gui.screens.Screen;
2924

3025
import java.util.HashMap;
3126
import java.util.Map;
3227
import java.util.Objects;
33-
import java.util.function.Supplier;
3428

3529
/**
3630
* @see AutoConfigClient
@@ -75,18 +69,4 @@ public static <T extends ConfigData> ConfigHolder<T> getConfigHolder(Class<T> co
7569
throw new RuntimeException(String.format("Config '%s' has not been registered", configClass));
7670
}
7771
}
78-
79-
@Environment(EnvType.CLIENT)
80-
@PlatformOnly(PlatformOnly.FABRIC)
81-
@Deprecated(forRemoval = true)
82-
public static <T extends ConfigData> GuiRegistry getGuiRegistry(Class<T> configClass) {
83-
return AutoConfigClient.getGuiRegistry(configClass);
84-
}
85-
86-
@Environment(EnvType.CLIENT)
87-
@PlatformOnly(PlatformOnly.FABRIC)
88-
@Deprecated(forRemoval = true)
89-
public static <T extends ConfigData> Supplier<Screen> getConfigScreen(Class<T> configClass, Screen parent) {
90-
return AutoConfigClient.getConfigScreen(configClass, parent);
91-
}
9272
}

0 commit comments

Comments
 (0)