feat(client): publish GraalVM metadata files #534
Merged
+49
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for generating the GraalVM metadata when releasing the project, as mentioned in #522
The setup is a bit complex because:
So the way this is done here is:
At some point this will all need to migrate to Java 24: at that moment, please note that GraalVM will have a new file format, and will generate only one file instead of several (but always in the same directory, so this code should still work OK).
I'm keeping the full "publish to Sonatype" task, to have everything fully compiled and tested for the release. That means the tests will run twice - this could be fixed by adding
-x test
to that task.Another way to achieve this would be to use the GraalVM Gradle task instead of adding the agent library like we do here as a JVM argument: this seems more elegant, but that approach cannot work currently as it would require to import that task (the task only run when the "agent" profile is set up, but the import would always be there as they can't be conditionally imported). And as that task cannot run with Java 17, that would make the Kotlin build fail. This is something that could be improved later, when the project will work with Java 24.