Bump Java baseline from 17 to 21 for Grails 8

The 8.0.x branch resolves grails-gradle-bom:8.0.0-SNAPSHOT, which now
pulls Gradle plugins (cloud.wondrify:asset-pipeline-gradle,
org.apache.grails:grails-gradle-plugins, org.apache.grails.gradle:grails-publish)
that require a JVM runtime of at least 21. Building under Java 17 fails
during ':buildSrc:compileGroovy' with:

    Could not resolve cloud.wondrify:asset-pipeline-gradle.
       > Dependency requires at least JVM runtime version 21.
         This build uses a Java 17 JVM.

This breaks the CI and RAT Report workflows on the 8.0.x branch (e.g. run
25003047902). Align the entire 8.0.x toolchain with the Grails 8 / Spring
Boot 4 / Spring Framework 7 Java 21 baseline:

- .github/workflows/gradle.yml: java-version 17 -> 21 (coreTests,
  functionalTests, publish jobs)
- .github/workflows/rat.yml: java-version 17 -> 21
- .github/workflows/release.yml: JAVA_VERSION 17.0.17 -> 21.0.10
- gradle.properties: javaVersion 17 -> 21 (drives compileJava.options.release
  via gradle/java-config.gradle, so produced bytecode now targets 21)
- .sdkmanrc: java=17.0.17-librca -> 21.0.10-librca (kept in sync with
  release.yml JAVA_VERSION per the comment in that file)
- etc/bin/Dockerfile: bellsoft/liberica-openjdk-debian:17.0.17 -> 21.0.10

The Liberica 21.0.10 pin is verified to exist on SDKMAN
(21.0.10-librca) and on Docker Hub
(bellsoft/liberica-openjdk-debian:21.0.10).

Assisted-by: claude-code:claude-opus-4
6 files changed
tree: ba41e0409c55631f08165f31cd246c9750e74545
  1. .github/
  2. buildSrc/
  3. docs/
  4. etc/
  5. gradle/
  6. gradle-bootstrap/
  7. licenses/
  8. plugin-acl/
  9. plugin-cas/
  10. plugin-core/
  11. plugin-ldap/
  12. plugin-oauth2/
  13. plugin-rest/
  14. plugin-ui/
  15. .asf.yaml
  16. .gitignore
  17. .sdkmanrc
  18. build.gradle
  19. CODE_OF_CONDUCT.md
  20. gradle.properties
  21. gradlew
  22. gradlew.bat
  23. HEADER
  24. ISSUE_TEMPLATE.md
  25. LICENSE
  26. NOTICE
  27. README.md
  28. settings.gradle
README.md

Java CI

Grails Spring Security

See documentation for detailed information.

Building

To build this project from source, first bootstrap gradle:

 cd gradle-bootstrap
 gradle
 cd -

After bootstrap the project, you can build it with the command:

 ./gradlew build

To run the build only, and skip the tests, run:

 ./gradlew build -PskipTests

Then publish the jar files to mavenLocal for usage:

./gradlew publishToMavenLocal

Branch structure

  • 7.0.x compatible with Grails 7
  • 6.0.x compatible with Grails 6
  • 5.0.x compatible with Grails 5
  • 4.0.x compatible with Grails 4
  • 3.3.x compatible with Grails 3.3.x
  • 3.2.x compatible with Grails 3.2.x

Spring Boot Auto-Configuration

The plugin automatically excludes 7 Spring Boot security auto-configuration classes that conflict with the Grails Spring Security plugin. No manual spring.autoconfigure.exclude entries are needed.

To disable this automatic exclusion (e.g. if you want to use Spring Boot's security auto-configuration directly), add the following to application.yml:

grails:
  plugin:
    springsecurity:
      excludeSpringSecurityAutoConfiguration: false

If you are on an older version of the plugin that does not support automatic exclusion, you can manually exclude the conflicting classes:

spring:
  autoconfigure:
    exclude:
      - org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration
      - org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration
      - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
      - org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration
      - org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientAutoConfiguration
      - org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration
      - org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration