Skip to content

Commit 3704898

Browse files
committed
Fixes after merge and bump NFRT to run with Java 25 for Minecraft 26.1
1 parent 5739696 commit 3704898

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/main/java/net/neoforged/nfrtgradle/CreateMinecraftArtifacts.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,10 @@ public void createArtifacts() {
327327
requestedResults.add(new RequestedResult("clientResources", getResourcesArtifact().get().getAsFile()));
328328
}
329329

330+
boolean includeNeoForgeInGameJar = getIncludeNeoForgeInMainArtifact().get();
330331
if (getDisableRecompilation().get()) {
331332
if (getGameJarArtifact().isPresent()) {
332-
if (getNeoForgeArtifact().isPresent()) {
333+
if (getNeoForgeArtifact().isPresent() && includeNeoForgeInGameJar) {
333334
requestedResults.add(new RequestedResult("gameJarNoRecompWithNeoForge", getGameJarArtifact().get().getAsFile()));
334335
} else {
335336
requestedResults.add(new RequestedResult("gameJarNoRecomp", getGameJarArtifact().get().getAsFile()));
@@ -341,7 +342,7 @@ public void createArtifacts() {
341342
if (getGameJarWithSourcesArtifact().isPresent()) {
342343
throw new IllegalArgumentException("Cannot request game jar with sources if recompilation is disabled.");
343344
}
344-
} else if (getNeoForgeArtifact().isPresent()) {
345+
} else if (getNeoForgeArtifact().isPresent() && includeNeoForgeInGameJar) {
345346
if (getGameJarArtifact().isPresent()) {
346347
requestedResults.add(new RequestedResult("gameJarWithNeoForge", getGameJarArtifact().get().getAsFile()));
347348
}

src/main/java/net/neoforged/nfrtgradle/NeoFormRuntimeTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ public NeoFormRuntimeTask() {
111111
// Store temporary working directories in this projects build directory such that gradle clean removes them
112112
getWorkDirectory().convention(project.getLayout().getBuildDirectory().dir("tmp/neoformruntime"));
113113

114-
// Run NFRT itself with Java 21
114+
// Run NFRT itself with Java 25
115115
getJavaExecutable().convention(getJavaToolchainService()
116-
.launcherFor(spec -> spec.getLanguageVersion().set(JavaLanguageVersion.of(21)))
116+
.launcherFor(spec -> spec.getLanguageVersion().set(JavaLanguageVersion.of(25)))
117117
.map(javaLauncher -> javaLauncher.getExecutablePath().getAsFile().getAbsolutePath()));
118118

119119
// We construct this here to keep them private from subclasses

0 commit comments

Comments
 (0)