Skip to content

openapi-generator-gradle-plugin: upgrade Gradle from v7 to v8#22863

Closed
dennisameling wants to merge 2 commits intoOpenAPITools:masterfrom
dennisameling:openapi-generator-gradle-plugin-v8
Closed

openapi-generator-gradle-plugin: upgrade Gradle from v7 to v8#22863
dennisameling wants to merge 2 commits intoOpenAPITools:masterfrom
dennisameling:openapi-generator-gradle-plugin-v8

Conversation

@dennisameling
Copy link
Contributor

@dennisameling dennisameling commented Jan 31, 2026

The openapi-generator-gradle-plugin is currently built for Gradle 7.6.4, which is no longer supported. It also doesn't support Java 21. The currently supported versions are 8.x and 9.x.

Looking at the compatibility matrix, Gradle 8.14.x is compatible with Java 8 through 24, meaning that this upgrade should be non-breaking for users of this plugin. 7.6.x supported up until Java 19, so this PR will add support for Java 20 through 24 as well.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR solves a reported issue, reference it using GitHub's linking syntax (e.g., having "fixes #123" present in the PR description)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Adding the Java and Kotlin technical committees: @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @martin-mfg (2023/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10)


Summary by cubic

Upgrade the openapi-generator-gradle-plugin to Gradle 8.14.4 and modernize the plugin to Gradle 8 APIs. This adds Java 21+ compatibility (up to 24) while keeping current behavior.

  • Dependencies

    • Gradle wrapper (plugin and sample) and pom to 8.14.4.
    • GitHub Actions: switch build JDK to 21.
    • com.gradle.plugin-publish and io.github.gradle-nexus.publish-plugin to 2.0.0.
    • Test matrix updated to Gradle 8.14.4 and 8.5; drop 7.6.4. Not testing Gradle 9 yet to preserve Java 11 support.
  • Refactors

    • Migrate to Java-typed Property APIs with convention() defaults; remove kotlin-dsl plugin id.
    • Set default outputDir via layout.buildDirectory; simplify task configuration.
    • Update wrapper scripts (SPDX, classpath handling, -jar usage) and enable validateDistributionUrl/networkTimeout.
    • Fix FileSystemOperations delete invocation.

Written for commit 0aa233b. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 24 files

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.

1 participant