GeezerVison is showing github.com — Remove support for Java 11 · Issue #2375 · diffplug/spotless
Remove support for Java 11 #2375DescriptionSome of our formatters can't compile on Java 11 anymore, so supporting Java 11 at all is getting harder. We'll support it a while longer, but its days are numbered...
Running checklist of todo items to make this happen (please don't send PRs for these at this time, we aren't pulling the plug on Java 11 yet)
- remove CDT build complexity added in aab831c
- bump to latest JGit, which has worktree support
-
can remove JGit system config workaround in 0c66cb0 nope still need it
- we'll need to bump minimum Gradle to 7.3, which lets us remove some compat stuff
- update documented requirements for gradle and maven
Reacted by jochenberger, Olli, Simon Gamma, Andrés Alcarraz and Sylwester Lachiewicz Activitynedtwigg commented on Jan 6, 2025 Not sure why, but on Java 11, JGit was causing this to happen.
- Class `org.eclipse.jgit.util.FS`: external process started '/usr/bin/git --version'
See https://docs.gradle.org/8.4/userguide/configuration_cache.html#config_cache:requirements:external_processes
- Class `org.eclipse.jgit.util.FS`: external process started '/usr/bin/git config --system --show-origin --list -z'
See https://docs.gradle.org/8.4/userguide/configuration_cache.html#config_cache:requirements:external_processes
We don't have the problem on Java 17 or later. This hack fixes it
0c66cb0
But it would probably be good to remove it when we bump the minimum Java from 11 to 17.
EDIT: after removing it, we get the error Java 17 only, but not 21 and 24. Hrm... I wonder if it is some kind of global build cache thing - first build to run hits the problem, subsequent works around thanks to reusing a result from the remote build cache... nedtwigg commented on Jan 7, 2025 Another benefit to bumping to Java 17 is that we could use the latest JGit, which adds worktree support. nedtwigg commented on Jan 7, 2025 It would also bump our required version of Gradle to 7.3, which would allow some minor simplifications here:
|
static final String VER_GRADLE_min = "6.1.1"; |
|
static final String VER_GRADLE_javaPluginExtension = "7.1"; |
|
JRE_11("5.0"), MINIMUM(SpotlessPlugin.VER_GRADLE_min), CUSTOM_STEPS(SpotlessPlugin.VER_GRADLE_minVersionForCustom), |
|
// technically, this API exists in 6.5, but the flags for it change in 6.6, so we build to that |
|
CONFIGURATION_CACHE("6.6"), |
|
// https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:stable |
|
STABLE_CONFIGURATION_CACHE("7.5"); |
nedtwigg commented on Jul 16, 2025 With the pending release of Gradle 9, I think this is the right time for us to bump minimums, thanks to the linked PR by @Goooler above. If you need/want us to stay compatible with old stuff for a bit longer, speak up now! Goooler commented on Jul 17, 2025 nedtwigg commented on Jul 18, 2025 Reacted by Zongle Wang, Alex Danylenko, Mike Scamell and Sylwester Lachiewicz nedtwigg commented on Jul 21, 2025 Complete! Huge thanks @Goooler, you did the hard part! nedtwigg commented on Sep 24, 2025 Published in plugin-gradle 8.0.0 and plugin-maven 3.0.0.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|