To get a Git project into your build:
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
compile 'com.github.User:Repo:Tag'
}
<dependency>
<groupId>com.github.User</groupId>
<artifactId>Repo</artifactId>
<version>Tag</version>
</dependency>
libraryDependencies += "com.github.User" % "Repo" % "Tag"
:dependencies [[com.github.User/Repo "Tag"]]
That's it! The first time you request a project JitPack checks out the code, builds it and serves the build artifacts.
If the project doesn't have any GitHub Releases you can use the short commit hash or 'anyBranch-SNAPSHOT' as the version.
See also
Track your downloads
Weekly and monthly stats available to maintainers
Artifacts are served via a global CDN
Fast downloads for you and your users