Skip to content

Easily resolve GitHub release assets as dependencies in Gradle

License

Notifications You must be signed in to change notification settings

m2ci-msp/gradle-github-ivy-repo-plugin

Repository files navigation

Build Status

Gradle GitHub Ivy Repo Plugin

Easily resolve GitHub release assets as dependencies in Gradle

Usage

See here how to apply this plugin.

GitHub release assets can be resolved and cached as dependencies by adding an Ivy repository with a custom pattern layout. This plugin adds a new github(USER) method to a Gradle project's repositories block so that this can work with minimal overhead.

Example

If GitHub user foo has a repository bar with a release tagged v1.0, and that release has assets (e.g., bar-1.0.zip) that include an Ivy descriptor (i.e., ivy-1.0.xml), then those assets can be resolved from the URLs

In your Gradle build script, you can apply this plugin and then add a repository like this:

repositories {
    github('foo')
}

Then, you can declare a dependency on bar (for some configuration, e.g., data) like this:

dependencies {
    data group: 'io.github.foo', name: 'bar', version: '1.0'
}

The group must match the organisation in the Ivy descriptor.

About

Easily resolve GitHub release assets as dependencies in Gradle

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages