Skip to content

Fix: Gradle plugin tests failing with Java 23#23208

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
anna-megalou:fix/gradle-plugin-test-version-compatibility
Mar 12, 2026
Merged

Fix: Gradle plugin tests failing with Java 23#23208
wing328 merged 1 commit intoOpenAPITools:masterfrom
anna-megalou:fix/gradle-plugin-test-version-compatibility

Conversation

@anna-megalou
Copy link
Copy Markdown
Contributor

@anna-megalou anna-megalou commented Mar 11, 2026

Fix Gradle plugin tests failing with Java 23

While building the project, the module openapi-generator-gradle-plugin
failed with 26 test failures when running tests parameterized with
Gradle 8.5.

Error observed:
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript'
Unsupported class file major version 67

Root cause:
The tests were executed on Java 23. Gradle 8.5 does not support
running on Java 23, which causes Groovy compilation failures.
According to the Gradle compatibility matrix, Java 23 support
starts with Gradle 8.10.

Solution:
Update the Gradle version used in the test parameter providers
from 8.5 to 8.10 in the following files:

  • GenerateTaskUpToDateTest.kt
  • GenerateTaskFromCacheTest.kt
  • GenerateTaskConfigurationCacheTest.kt
  • ValidateTaskDslTest.kt

After the change all tests pass successfully.


Summary by cubic

Updated Gradle versions used in openapi-generator-gradle-plugin tests to 8.10 to fix failures on Java 23. Prevents Groovy compile errors seen with Gradle 8.5.

  • Bug Fixes
    • Switched test DataProviders from 8.5 to 8.10 in GenerateTaskUpToDateTest.kt, GenerateTaskFromCacheTest.kt, GenerateTaskConfigurationCacheTest.kt, and ValidateTaskDslTest.kt.
    • All tests now pass on Java 23.

Written for commit 1d7a995. Summary will update on new commits.

Copy link
Copy Markdown
Contributor

@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 4 files


Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

@wing328
Copy link
Copy Markdown
Member

wing328 commented Mar 12, 2026

lgtm. thanks for the PR

@wing328 wing328 merged commit f991373 into OpenAPITools:master Mar 12, 2026
17 of 19 checks passed
@wing328 wing328 added this to the 7.21.0 milestone Mar 16, 2026
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.

2 participants