-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tests with Java 21 #1362
Run tests with Java 21 #1362
Conversation
Update the matrix to run PRs and the SNAPSHOT tests on Java 17 AND 21 Leave publishing on Java 17
We need this as we need to pick up Kapt add-opens. If we use the daemon, then these are not picked up and kapt compilations will fail
import jakarta.inject.Singleton; | ||
|
||
@Singleton | ||
public class MockServerClient implements Feature { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this not used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It collides with the one in v4.2.0 of Micronaut Starter
I assume this was added as a stop-gap until we got to use the one in 4.2.0?
# Conflicts: # buildSrc/src/main/resources/pom.xml # version.txt
@sdelamo should we switch to just testing 21 on a nightly basis? |
yup. great job making the java 21 transition |
* Run tests with Java 21 Update the matrix to run PRs and the SNAPSHOT tests on Java 17 AND 21 Leave publishing on Java 17 * Gradle 8.4 * WIP * Limit Guides to 17 where sensible * Fix micronaut-graalvm-reflection validation * If running on Java 21, don't use the Gradle daemon We need this as we need to pick up Kapt add-opens. If we use the daemon, then these are not picked up and kapt compilations will fail * Limit google-function guide to java 17 * Kill the kotlin compilation daemon before and after kapt tests * Few more Java 21 exclusions for Lambda * Remove non-required changes * Add debug * Remove debug, use a loop * Re-enable conditional * Another 21 exclusion * Stop downgrading Kotlin to Java 17 for Spring/Kotlin apps --------- Co-authored-by: sdelamo <sergio.delamo@softamo.com>
Once starter is released for 4.2.0 and we can generate Java 21 projects, this can be merged
Currently it is set up to use 4.2.0-SNAPSHOT as the version target.
Excluded lambda and function guides which only work on 17.
There is one odd change that was required. When running Kapt projects, we needed to kill the Kotlin Compile Daemon as it holds on to the old properties it was started with, and doesn't notice that it needs to update to include the
--add-opens
for Kapt to work.--stop
the gradle daemons (as this would kill the build itself)--no-daemon
for all the builds as it takes AGES to run all the tests--no-daemon
on just the kapt builds, as the Gradle daemon finds the old Kotlin daemon.So I went with
find the kotlin daemon and kill it
before and after Kapt builds