Skip to content

chore: build Gradle plugin on JDK 25+ with Gradle 9.8.0 - #6410

Merged
ZheSun88 merged 2 commits into
mainfrom
chore/gradle-plugin-gradle-9.8
Sep 29, 2026
Merged

ZheSun88 merged 2 commits into
mainfrom
chore/gradle-plugin-gradle-9.8

Conversation

@mcollovati

Copy link
Copy Markdown
Contributor

The Hilla Gradle plugin module could not be built on JDK 25 and later, and its plugin marker module (pom-portal.xml) was silently skipped on JDK 23 and later. This applies to Hilla the same fix as vaadin/flow#25989. For users nothing changes: the plugin still needs Java 21 and Gradle 8.14 or later.

Risks:

  • ⚠️ Behaviour change: the gradle Maven profile is gone, so pom-portal.xml is now built on every JDK. A build that passes -P '!gradle' now builds the Gradle plugin; use -pl '!:hilla-gradle-plugin,!:com.vaadin.hilla.gradle.plugin' instead. No workflow in this repository uses it.
  • ⚠️ The plugin is compiled against the Gradle 9 API. Class files still target Java 21, and the functional tests pass with user projects on Gradle 8.14.
  • ✅ No public API change, no migration needed.

Changes:

  • Upgraded the Gradle wrapper of hilla-gradle-plugin from 8.14.3 to 9.8.0. It still uses the -bin distribution, and the wrapper block now says BIN to match.
  • Replaced Dokka 1.9.0 with dokka-javadoc 2.2.0, because Dokka 1.x fails on JDK 25 and later.
  • Added the Gradle API to the unit test classpath, which Gradle 9 no longer does.
  • Changed the optional mainClass input of EngineGenerateTask to Property<String>, because Gradle 9's JSpecify annotations reject Property<String?>. set(null) still works.
  • Added @DisableCachingByDefault to EngineGenerateTask and EngineConfigureTask, which validatePlugins now requires. Neither task was cached before.
  • Replaced the deprecated createTempDir in the functional tests.
  • Removed the JDK-activated gradle profile and made pom-portal.xml a regular module.

Tested locally:

  • mvn install -pl :hilla-gradle-plugin,:com.vaadin.hilla.gradle.plugin on JDK 25 and on JDK 21, including the Dokka javadoc jar
  • Functional tests (7/7) with user projects on Gradle 8.14 (the default) and, with the TestKit version set to 9.8.0, on Gradle 9.8
  • kotlin-gradle-test integration tests

Follow-up: CI only runs the functional tests on Gradle 8.14. A Gradle 9.x run like Flow's GradleVersionSupportTest would cover that 9.x keeps working.

The Gradle plugin module failed to build on JDK 25 and later, because
Dokka 1.x does not run there. The plugin marker module (pom-portal.xml)
was only part of the build on JDK 22 and earlier, and was skipped
without a message on newer JDKs. For users the plugin does not change:
it still needs Java 21 and Gradle 8.14 or later.

- Upgrade the Gradle wrapper of hilla-gradle-plugin from 8.14.3 to 9.8.0
- Replace Dokka 1.9.0 with dokka-javadoc 2.2.0
- Put the Gradle API on the unit test classpath, as Gradle 9 no longer
  does it
- Use Property<String> for the optional mainClass input, as Gradle 9
  API nullness annotations reject Property<String?>
- Add @DisableCachingByDefault to EngineGenerateTask and
  EngineConfigureTask, as validatePlugins now requires; neither task
  was cached before
- Replace the deprecated createTempDir in the functional tests
- Remove the JDK-activated gradle profile and build pom-portal.xml as a
  regular module

Mirrors vaadin/flow#25989.
@mcollovati

Copy link
Copy Markdown
Contributor Author

The build seems broken by recent changes in flow-components and platform (vaadin/platform#9413).

@mcollovati

Copy link
Copy Markdown
Contributor Author

Waiting for #6313

@ZheSun88
ZheSun88 enabled auto-merge (squash) September 29, 2026 09:03
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.31%. Comparing base (908f783) to head (6e5a7e1).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6410      +/-   ##
============================================
+ Coverage     81.29%   81.31%   +0.02%     
  Complexity     2018     2018              
============================================
  Files           343      343              
  Lines         14816    14816              
  Branches       2107     2107              
============================================
+ Hits          12044    12048       +4     
+ Misses         2479     2477       -2     
+ Partials        293      291       -2     
Flag Coverage Δ
unittests 81.31% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ZheSun88
ZheSun88 merged commit 0cbf499 into main Sep 29, 2026
15 checks passed
@ZheSun88
ZheSun88 deleted the chore/gradle-plugin-gradle-9.8 branch September 29, 2026 09:12
ZheSun88 pushed a commit to vaadin/platform that referenced this pull request Sep 29, 2026
Upgrade the Gradle wrapper of vaadin-gradle-plugin from 8.14 to 9.8.0,
as vaadin/flow#25989 and vaadin/hilla#6410 do for their plugins. Only
the plugin build changes: the classes still target Java 21, and user
projects still need Gradle 8.14 or later.

- Replace Dokka 1.9.20 with dokka-javadoc 2.2.0
- Configure the archive name and Java compatibility through the base
  and java extensions, as Gradle 9 removes the conventions
- Import groovy.xml.XmlSlurper, use assignment syntax, and move the
  Kotlin JVM target to compilerOptions
- Add the Gradle API to the unit test classpath
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.

3 participants