![Release](https://img.shields.io/github/release/jitpack/android-example.svg?label=maven version)
Example Android library project that works with jitpack.io. The See also the guide for building Android projects
https://jitpack.io/#jitpack/android-example/1.0.2
Add it to your build.gradle with:
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
and:
dependencies {
compile 'com.github.jitpack:android-example:1.0.2'
}
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 android-maven plugin:
- Add
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
to root build.gradle underbuildscript { dependencies {
- Add
com.github.dcendents.android-maven
to the library/build.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')
}