Example Android library project published via jitpack.io.
See this Tutorial on how to publish an Android Library with JitPack.
NB: This sample uses the newer maven-publish plugin documented here.
jitpack.io is defined here.
To deploy this example, add the following to your (project) build.gradle with:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
and the following to your (app) build.gradle:
dependencies {
implementation 'com.github.MPArnold:jitpublAS:4.?@aar'
}
If your library uses multiple flavours then see this example: https://github.com/jitpack-io/android-jitpack-library-example
To enable installing into local maven repository and JitPack you need to add the maven-publish plugin:
Add apply plugin: 'maven-publish'
to library publish.gradle.
After these changes you should be able to run:
./gradlew install
from the root of your project. If install works and you have added a GitHub release it should work on jitpack.io
If you add a sample app to the same repo then your app needs to have a dependency on the library. To do this in your app/build.gradle add:
dependencies {
compile project(':library')
}