Skip to content

Conversation

@melix
Copy link
Collaborator

@melix melix commented Aug 22, 2025

While investigating #760 , I added testing of Gradle 9 to our build. This caused a few cascading issues:

  1. we have to upgrade the Kotlin plugin version we use in tests to the latest 1.9.x branch
  2. doing so breaks the KotlinApplicationWithTestsFunctionalTest with a class initialized at build time error

This error only happens when testing with GraalVM 17, not with 23. The workaround I have found is to add:

kotlin.annotation.AnnotationTarget
kotlin.annotation.AnnotationRetention

to the list of classes initialized at build time, but I'm not completely sure this is the right thing to do. /cc @sbrannen @marcphilipp

In any case it seems that the original issue doesn't occur outside of the context of Spring.

@melix melix requested a review from dnestoro August 22, 2025 14:41
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 22, 2025
@marcphilipp
Copy link
Contributor

The workaround I have found is to add [...] to the list of classes initialized at build time

Which versions of JUnit did you test this with?

@melix
Copy link
Collaborator Author

melix commented Aug 29, 2025

We use these versions

@marcphilipp
Copy link
Contributor

Sounds ok to me

@melix
Copy link
Collaborator Author

melix commented Sep 1, 2025

@dnestoro can you review?

@dnestoro dnestoro merged commit 77b4cfb into master Sep 23, 2025
375 checks passed
@dnestoro dnestoro deleted the cc/gradle-9 branch September 23, 2025 08:14
mergify bot added a commit to robfrank/linklift that referenced this pull request Oct 7, 2025
…1.0 to 0.11.1 [skip ci]

Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 0.11.0 to 0.11.1.
Release notes

*Sourced from [org.graalvm.buildtools:native-maven-plugin's releases](https://github.com/graalvm/native-build-tools/releases).*

> 0.11.1
> ------
>
> What's Changed
> --------------
>
> * Create release 0.11.0 by [`@​brahimhaddou`](https://github.com/brahimhaddou) in [graalvm/native-build-tools#746](https://redirect.github.com/graalvm/native-build-tools/pull/746)
> * bump version to 0.11.1 SNAPSHOT by [`@​brahimhaddou`](https://github.com/brahimhaddou) in [graalvm/native-build-tools#749](https://redirect.github.com/graalvm/native-build-tools/pull/749)
> * [GR-68095] Change links in the Native Build Tools Gradle page by [`@​ban-mi`](https://github.com/ban-mi) in [graalvm/native-build-tools#753](https://redirect.github.com/graalvm/native-build-tools/pull/753)
> * Group annotations by dependency and print a warning if the dependency is missing by [`@​dnestoro`](https://github.com/dnestoro) in [graalvm/native-build-tools#752](https://redirect.github.com/graalvm/native-build-tools/pull/752)
> * Fix configuration cache compatibility in generating excluded args by [`@​bacecek`](https://github.com/bacecek) in [graalvm/native-build-tools#763](https://redirect.github.com/graalvm/native-build-tools/pull/763)
> * Remove the default Maven phase bound to the `metadata-copy` Maven goal to simplify the use of integration tests by [`@​linghengqian`](https://github.com/linghengqian) in [graalvm/native-build-tools#748](https://redirect.github.com/graalvm/native-build-tools/pull/748)
> * Prepare SBOM integration for GraalVM 25 by [`@​rudsberg`](https://github.com/rudsberg) in [graalvm/native-build-tools#759](https://redirect.github.com/graalvm/native-build-tools/pull/759)
> * Add testing of Gradle 9 by [`@​melix`](https://github.com/melix) in [graalvm/native-build-tools#766](https://redirect.github.com/graalvm/native-build-tools/pull/766)
> * supporting jdk toolchain configuration by [`@​SergeDemoulinGebit`](https://github.com/SergeDemoulinGebit) in [graalvm/native-build-tools#622](https://redirect.github.com/graalvm/native-build-tools/pull/622)
> * Move JUnit tests to get started by [`@​ban-mi`](https://github.com/ban-mi) in [graalvm/native-build-tools#767](https://redirect.github.com/graalvm/native-build-tools/pull/767)
> * Disable layered images test temporarily because of a problem on GralVM side by [`@​dnestoro`](https://github.com/dnestoro) in [graalvm/native-build-tools#772](https://redirect.github.com/graalvm/native-build-tools/pull/772)
> * Add new JUnit 5.14/6.0 types to initialize-at-build-time classes by [`@​marcphilipp`](https://github.com/marcphilipp) in [graalvm/native-build-tools#771](https://redirect.github.com/graalvm/native-build-tools/pull/771)
> * Prepare repository for release `0.11.1` by [`@​dnestoro`](https://github.com/dnestoro) in [graalvm/native-build-tools#770](https://redirect.github.com/graalvm/native-build-tools/pull/770)
>
> New Contributors
> ----------------
>
> * [`@​ban-mi`](https://github.com/ban-mi) made their first contribution in [graalvm/native-build-tools#753](https://redirect.github.com/graalvm/native-build-tools/pull/753)
> * [`@​bacecek`](https://github.com/bacecek) made their first contribution in [graalvm/native-build-tools#763](https://redirect.github.com/graalvm/native-build-tools/pull/763)
> * [`@​SergeDemoulinGebit`](https://github.com/SergeDemoulinGebit) made their first contribution in [graalvm/native-build-tools#622](https://redirect.github.com/graalvm/native-build-tools/pull/622)
>
> **Full Changelog**: <graalvm/native-build-tools@0.11.0...0.11.1>


Commits

* [`6545631`](graalvm/native-build-tools@6545631) Create release 0.11.1
* [`359acfb`](graalvm/native-build-tools@359acfb) Update licenses to pass style check
* [`7327427`](graalvm/native-build-tools@7327427) Add changelog entries
* [`73d17cc`](graalvm/native-build-tools@73d17cc) Update Reachability metadata version
* [`eb52764`](graalvm/native-build-tools@eb52764) Add new JUnit 5.14/6.0 types to initialize-at-build-time classes
* [`f94e6d6`](graalvm/native-build-tools@f94e6d6) Disable layered images test temporarily because of a problem on GraalVM side
* [`200e23c`](graalvm/native-build-tools@200e23c) Update docs/src/docs/asciidoc/end-to-end-gradle-guide.adoc
* [`079f06d`](graalvm/native-build-tools@079f06d) Move JUnit tests to get started
* [`50d8fbb`](graalvm/native-build-tools@50d8fbb) supporting jdk toolchain configuration
* [`77b4cfb`](graalvm/native-build-tools@77b4cfb) Add testing of Gradle 9
* Additional commits viewable in [compare view](graalvm/native-build-tools@0.11.0...0.11.1)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=org.graalvm.buildtools:native-maven-plugin&package-manager=maven&previous-version=0.11.0&new-version=0.11.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants