Github Package Registry Gradle

Example repo showing how to use GPR with a gradle based project.

Creating a package

See the complete example.

export GPR_USER=<your_github_user>
export GPR_API_KEY=<your_github_access_token>
  • Run publish task:
./gradlew publish
  • Your package will be available at https://github.com/<your_github_user>/<your_github_repo>/packages

Installing a package

  • Unfortunately its not as simple as specfiying something like mavenCentral() in repositories
  • You need to authenticate with the GPR (in your build.gradle) after defining the dependencies
  • IMO this feature is useless until they let you download without authenticating

TODO

  • Create a pipeline which automates the publish step
    • E.g. on pull request merge
    • BLOCKED because I don't have access to github actions beta