Skip to content
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

Ship the GraalVM metadata repository as an artifact alongside NBT #331

Merged
merged 7 commits into from Oct 12, 2022

Conversation

melix
Copy link
Collaborator

@melix melix commented Oct 11, 2022

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-metadata coordinates (as a zip file with classifier repository). 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).

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.
@melix melix added the enhancement New feature or request label Oct 11, 2022
@melix melix added this to the 0.9.15 milestone Oct 11, 2022
@melix melix self-assigned this Oct 11, 2022
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 11, 2022
@melix melix merged commit a3b5f3f into master Oct 12, 2022
@melix melix deleted the cc/repackage-repo branch October 12, 2022 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ship repository metadata as a Maven artifact
3 participants