GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove support for Java 11 · Issue #2375 · diffplug/spotless

Remove support for Java 11 #2375

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove support for Java 11#2375
Copy link
Labels
breaking

Description

@nedtwigg
nedtwigg
opened on Jan 1, 2025
Issue body actions

Some 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...

  • would make this issue trivial: Remove toLines( and use toContent(""" instead #1533

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
    • Remove support for Java 11 #2375 (comment)
  • update documented requirements for gradle and maven
Reacted by jochenberger, Olli, Simon Gamma, Andrés Alcarraz and Sylwester Lachiewicz

Activity

  1. nedtwigg
    added a commit that references this issue on Jan 1, 2025

    Remove the Eclipse CDT stuff from the build and tests on Java 11. We …

    aab831c
  2. nedtwigg commented on Jan 6, 2025

    @nedtwigg
    nedtwigg
    on Jan 6, 2025
    MemberAuthor
    More actions

    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...

  3. nedtwigg
    added
    breaking
    on Jan 6, 2025
  4. nedtwigg commented on Jan 7, 2025

    @nedtwigg
    nedtwigg
    on Jan 7, 2025
    MemberAuthor
    More actions

    Another benefit to bumping to Java 17 is that we could use the latest JGit, which adds worktree support.

  5. nedtwigg commented on Jan 7, 2025

    @nedtwigg
    nedtwigg
    on Jan 7, 2025
    MemberAuthor
    More actions

    It would also bump our required version of Gradle to 7.3, which would allow some minor simplifications here:

    • spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessPlugin.java

      Lines 30 to 31 in f22eda9

      static final String VER_GRADLE_min = "6.1.1";
      static final String VER_GRADLE_javaPluginExtension = "7.1";
    • spotless/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/GradleIntegrationHarness.java

      Lines 46 to 50 in f22eda9

      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");
  6. nedtwigg commented on Jul 16, 2025

    @nedtwigg
    nedtwigg
    on Jul 16, 2025
    MemberAuthor
    More actions

    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!

    Reacted by Mike Scamell
  7. Goooler commented on Jul 17, 2025

    @Goooler
    Goooler
    on Jul 17, 2025
    Member
    More actions

    I don't.

  8. nedtwigg commented on Jul 18, 2025

    @nedtwigg
    nedtwigg
    on Jul 18, 2025
    MemberAuthor
    More actions

    My plan is:

    • merge add git pre push hook #2553 when it is ready
    • push a release, it will be the last supporting pre-17
    • merge Remove support for Java 11 #2375
    • then we can hopefully resolve all the checkboxes at the top of this issue
    Reacted by Zongle Wang, Alex Danylenko, Mike Scamell and Sylwester Lachiewicz
  9. nedtwigg
    added a commit that references this issue on Jul 20, 2025

    Bump the min Gradle and Java requirements to 7.3 and 17 (#2540, first…

    b64ab47
  10. nedtwigg
    pinned this issue on Jul 21, 2025
  11. nedtwigg
    unpinned this issue on Jul 21, 2025
  12. nedtwigg commented on Jul 21, 2025

    @nedtwigg
    nedtwigg
    on Jul 21, 2025
    MemberAuthor
    More actions

    Complete! Huge thanks @Goooler, you did the hard part!

  13. nedtwigg
    closed this as completedon Jul 21, 2025
  14. nedtwigg commented on Sep 24, 2025

    @nedtwigg
    nedtwigg
    on Sep 24, 2025
    MemberAuthor
    More actions

    Published in plugin-gradle 8.0.0 and plugin-maven 3.0.0.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.