Skip to content

Commit

Permalink
Update to 24w14a
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Apr 9, 2024
1 parent da76be5 commit ae59ec0
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: 17
java-version: 21
- name: Upload to Maven
run: ./gradlew publish modPublish --stacktrace
if: |
Expand Down
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
id "maven-publish"
id "org.cadixdev.licenser" version "0.6.1" apply false
Expand All @@ -19,6 +19,14 @@ subprojects {

repositories {
maven { url "https://maven.neoforged.net/releases/" }
if (rootProject.neoforge_pr != "") {
maven {
url "https://prmaven.neoforged.net/NeoForge/pr$rootProject.neoforge_pr"
content {
includeModule("net.neoforged", "neoforge")
}
}
}
}
}

Expand All @@ -40,7 +48,7 @@ allprojects {
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
// We'll use that if it's available, but otherwise we'll use the older option.
options.release = 17
options.release = 21
}

license {
Expand Down
4 changes: 2 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.0.0"
id "com.github.johnrengelman.shadow" version "8.1.1"
id "maven-publish"
}

Expand Down Expand Up @@ -31,7 +31,7 @@ dependencies {
}

architectury {
common("fabric")
common("fabric", "neoforge")
}

task sourcesJar(type: Jar, dependsOn: classes) {
Expand Down
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.0.0"
id "com.github.johnrengelman.shadow" version "8.1.1"
id "me.shedaniel.unified-publishing"
id "maven-publish"
}
Expand Down
2 changes: 1 addition & 1 deletion forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.0.0"
id "com.github.johnrengelman.shadow" version "8.1.1"
id "me.shedaniel.unified-publishing"
id "maven-publish"
}
Expand Down
9 changes: 5 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

minecraft_version=24w14potato
supported_version=24w14potato April Fools
minecraft_version=24w14a
supported_version=1.20.5 (24w14a)

archives_base_name=cloth-config
archives_base_name_snapshot=cloth-config-snapshot
Expand All @@ -14,11 +14,12 @@ toml4j_version=0.7.2
snakeyaml_version=1.27

fabric_loader_version=0.15.9
fabric_api_version=0.96.14+24w14potato
fabric_api_version=0.96.14+1.20.5
mod_menu_version=10.0.0-alpha.1

forge_version=49.0.3
neoforge_version=20.4.3-beta
neoforge_version=20.5.0-alpha.24w14a.20240408.221956
neoforge_pr=787

curseforge_id=348521
modrinth_id=9s6osm5g
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
7 changes: 4 additions & 3 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.0.0"
id "com.github.johnrengelman.shadow" version "8.1.1"
id "me.shedaniel.unified-publishing"
id "maven-publish"
}
Expand Down Expand Up @@ -49,10 +49,10 @@ dependencies {
}

processResources {
filesMatching("META-INF/mods.toml") {
filesMatching("META-INF/neoforge.mods.toml") {
expand "version": project.version
}
inputs.property "META-INF/mods.toml", project.version
inputs.property "META-INF/neoforge.mods.toml", project.version
}

shadowJar {
Expand Down Expand Up @@ -96,6 +96,7 @@ publishing {
}

unifiedPublishing {
if (rootProject.neoforge_pr != "") return
project {
displayName = "[NeoForge $rootProject.supported_version] v$project.version"
releaseType = "release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@
import me.shedaniel.clothconfig2.ClothConfigInitializer;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.fml.DistExecutor;
import net.neoforged.fml.IExtensionPoint;
import net.neoforged.fml.ModLoadingContext;
import net.neoforged.fml.common.Mod;

@Mod(ClothConfigInitializer.MOD_ID)
public class ClothConfigForge {
public ClothConfigForge() {
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> IExtensionPoint.DisplayTest.IGNORESERVERONLY, (a, b) -> true));
DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> ClothConfigForgeDemo::registerModsPage);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@

import me.shedaniel.clothconfig2.ClothConfigDemo;
import net.neoforged.fml.ModLoadingContext;
import net.neoforged.neoforge.client.ConfigScreenHandler;
import net.neoforged.neoforge.client.gui.IConfigScreenFactory;

public class ClothConfigForgeDemo {
public static void registerModsPage() {
ModLoadingContext.get().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class, () -> new ConfigScreenHandler.ConfigScreenFactory((client, parent) -> {
ModLoadingContext.get().registerExtensionPoint(IConfigScreenFactory.class, () -> (client, parent) -> {
return ClothConfigDemo.getConfigBuilderWithDemo().setParentScreen(parent).build();
}));
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ An API for config screens.
[[dependencies.cloth_config]]
modId = "neoforge"
type = "required"
versionRange = "[20.5,)"
versionRange = "[20.5.0-alpha.24w14a,)"
ordering = "NONE"
side = "BOTH"
6 changes: 5 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ pluginManagement {
}
}

if (JavaVersion.current().ordinal() + 1 < 21) {
throw new IllegalStateException("Please run gradle with Java 21+!")
}

include("common")
include("fabric")
//include("forge")
//include("neoforge")
include("neoforge")

rootProject.name = 'cloth-config'

0 comments on commit ae59ec0

Please sign in to comment.