Ship the GraalVM metadata repository as an artifact alongside NBT#331
Merged
Ship the GraalVM metadata repository as an artifact alongside NBT#331
Conversation
This also moves the constant to the `libs.versions.toml` file so that it is both easier to upgrade *and* available in build scripts without having to parse source files. This is going to be useful for repackaging the repository.
This commit introduces a task which is responsible for downloading the
current metadata repository version and bundle it as a publishable artifact.
This means that the ZIP file of the metadata repository is going to be
downloaded from the GraalVM metadata repository, and published as a
_classified_ artifact on the `graalvm-reachability-metadata` module.
It is possible to check the result by calling:
./gradlew graalvm-reachability-metadata:pAPTCR
and checking the contents of the `build/common-repo` directory. A file
named `graalvm-reachability-metadata-<nbt version>-repository.zip` file
should be visible.
This will make it possible to consume the metadata repository as a Maven
artifact.
This commit makes it so that if the user doesn't specify any URL for the repository, nor any specific version, then we would use the repository artifact which is bundled with the NBT release on Maven Central (or any repository configured in the build). This makes it possible to use the Gradle native build tools exclusively with Maven repositories.
Similarly to the Gradle plugin, this commit makes it so that if the user doesn't specify any URL for the repository, nor any specific version, then we would use the repository artifact which is bundled with the NBT release on Maven Central.
alvarosanchez
approved these changes
Oct 11, 2022
sdeleuze
approved these changes
Oct 12, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR builds on top of #330 and fixes #328. At build time, we will now download the current version of the GraalVM metadata repository, and make it available as an artifact on the
org.graalvm.buildtools:graalvm-reachability-metadatacoordinates (as a zip file with classifierrepository). Please take a look at #328 for context.This basically allows having some releases of the metadata repository on Maven Central, the ones which are "shipped" with native build tools. It does not remove the ability to pick a different version, in which case we would still download it from the GraalVM reachability repository, or even a custom URL (or a local file).