Skip to content

chore: raise minimum Java version to 25#3600

Closed
MattBDev wants to merge 1 commit into
mainfrom
chore/java-25-floor
Closed

chore: raise minimum Java version to 25#3600
MattBDev wants to merge 1 commit into
mainfrom
chore/java-25-floor

Conversation

@MattBDev

@MattBDev MattBDev commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Raises the minimum Java version required to run FAWE from 21 to 25.

Motivation

Java 25 aligns with the current stable LTS path and enables future optimizations:

  • Virtual threads are now safe for consideration (JEP 491 fixed synchronized pinning in Java 24)
  • Better long-term compatibility as the Java ecosystem moves forward

Changes

  • Bump sourceCompatibility and targetCompatibility from Java 21 to Java 25
  • Set options.release to 25 for consistent classfile targets
  • Update TargetJvmVersion attribute from 21 to 25 in library configurations
  • Conditionally disable javadoc/javadocJar tasks unless publishing or signing is requested, to reduce build overhead on regular build/assemble runs

Testing

Verified compilation across:

  • worldedit-core
  • worldedit-bukkit
  • worldedit-bukkit:adapters:adapter-1_21 (oldest)
  • worldedit-bukkit:adapters:adapter-26.2 (newest)

All pass with no errors on Java 25.

Copilot AI review requested due to automatic review settings July 16, 2026 04:09
@MattBDev
MattBDev requested a review from a team as a code owner July 16, 2026 04:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Gradle build logic to align FAWE’s Java compilation level with Java 25, and adjusts documentation task execution behavior during typical local builds.

Changes:

  • Bump sourceCompatibility from Java 21 to Java 25 for Java compilation tasks.
  • Conditionally disable javadoc/javadocJar tasks unless publishing (or equivalent) is requested, to reduce overhead on regular builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +79 to +81
val javadocRequested = gradle.startParameter.taskNames.any {
it.contains("publish", ignoreCase = true) || it.endsWith("javadoc") || it.endsWith("javadocJar")
}
Comment on lines +73 to +78
// Generating javadoc for every module is a large, pure overhead on a regular
// `build`/`assemble` (doclint is already off, so it validates almost nothing).
// Only run it when the javadoc jar is actually needed - i.e. when publishing, or
// when the javadoc/javadocJar task is requested explicitly. Published artifacts
// still contain full javadoc; only local build speed changes. `enabled` is set to
// a plain boolean (no captured script reference) so it stays configuration-cache safe.
Copilot AI review requested due to automatic review settings July 16, 2026 04:17
@MattBDev
MattBDev force-pushed the chore/java-25-floor branch from dd2a82f to 389095e Compare July 16, 2026 04:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

"processing", "path", "fallthrough", "serial", "overloads", "this-escape",
)
sourceCompatibility = "21"
sourceCompatibility = "25"
"processing", "path", "fallthrough", "serial", "overloads", "this-escape",
)
sourceCompatibility = "21"
sourceCompatibility = "25"
Comment on lines +73 to +80
// Generating javadoc for every module is a large, pure overhead on a regular
// `build`/`assemble` (doclint is already off, so it validates almost nothing).
// Only run it when the javadoc jar is actually needed - i.e. when publishing, signing,
// or when the javadoc/javadocJar task is requested explicitly. Published artifacts
// still contain full javadoc; only local build speed changes. `enabled` is set to
// a plain boolean (no captured script reference) so it stays configuration-cache safe.
val javadocRequested = gradle.startParameter.taskNames.any {
it.contains("publish", ignoreCase = true) || it.contains("sign", ignoreCase = true) || it.endsWith("javadoc") || it.endsWith("javadocJar")
@SirYwell

Copy link
Copy Markdown
Member

Not a fan of this as long as people are actively using Minecraft versions that don't support bytecode rewriting of Java 25 bytecode. Running the server with Java 25 is already supported and there is no immediate need for Java 25 features from our side.

@MattBDev

Copy link
Copy Markdown
Contributor Author

@SirYwell I proposed this because @dordsor21 was interested in possibly using virtual threads to address #3420. The only way this is feasible is if we update to Java 25.
Also, it we have typically raised required Java versions with Minecraft. This just continues our existing policy that wasn't enforced earlier in the year.

Sets sourceCompatibility to 25, dropping support for Java 21-24.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 16, 2026 04:50
@MattBDev
MattBDev force-pushed the chore/java-25-floor branch from 8a42d99 to b920c97 Compare July 16, 2026 04:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@SirYwell

Copy link
Copy Markdown
Member

@SirYwell I proposed this because @dordsor21 was interested in possibly using virtual threads to address #3420. The only way this is feasible is if we update to Java 25. Also, it we have typically raised required Java versions with Minecraft. This just continues our existing policy that wasn't enforced earlier in the year.

We're already actively using virtual threads.

The change in update frequency as well as our usage statistics basically mean we would cut off a large portion of servers from FAWE updates with little benefit.

@MattBDev

Copy link
Copy Markdown
Contributor Author

@SirYwell I proposed this because @dordsor21 was interested in possibly using virtual threads to address #3420. The only way this is feasible is if we update to Java 25. Also, it we have typically raised required Java versions with Minecraft. This just continues our existing policy that wasn't enforced earlier in the year.

We're already actively using virtual threads.

The change in update frequency as well as our usage statistics basically mean we would cut off a large portion of servers from FAWE updates with little benefit.

In order to use virtual threads to fix this issue specifically we need the fix from JEP 491 because FAWE's chunk-editing code is wrapped in synchronized blocks. Without JEP 491 we are just trading one issue for another (well, they both still deadlock).
We can close this if we want to go ahead with a different route.

@MattBDev MattBDev closed this Jul 16, 2026
@Zoriot

Zoriot commented Jul 16, 2026

Copy link
Copy Markdown

I wanted to verify: Should this issue be resolved or happen less often on Java 25? If so, maybe it would be useful to notify users when applicable. Most servers in the supported range should have the ability to upgrade Java.

@MattBDev

Copy link
Copy Markdown
Contributor Author

I wanted to verify: Should this issue be resolved or happen less often on Java 25? If so, maybe it would be useful to notify users when applicable. Most servers in the supported range should have the ability to upgrade Java.

I abandoned the PR after it seemed to be a non starter with the team.
It will probably be revisited by the end of the year. A solution for issue #3420 that doesn't use virtual threads is in the works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants