Reputation: 317
I developed an android library. I have repository in Github and pushed my code, even I made Readme.md for my codes. The only thing I have problem with, is I do not know what to put in below parts so that users have access to codes without downloading library and just add to dependencies, what should I place instead of dots?
repositories {
...
}
dependencies {
compile('...')
}
Upvotes: 1
Views: 669
Reputation: 27677
If you've pushed your code to GitHub then sharing your Android library (aar) is easy with JitPack.
Your users will just need to add the repository to their build.gradle:
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
and then your GitHub repository as dependency:
dependencies {
// ...
compile 'com.github.YourUsername:Repo:Release'
}
JitPack acts as a maven repository and can be used like Maven Central. The nice thing is that you don't have to upload your library. Behind the scenes JitPack will check out the code from GitHub and compile it. As you publish a new release on GitHub it becomes available for others to use.
There is also a guide on how to prepare an Android project.
Upvotes: 2
Reputation: 1180
I had the same problem. Check this two links. These are the best tutorials I found.
Upvotes: 0
Reputation: 1381
you need to register an account in https://bintray.com ,and config your local file gradle.properties
with your BINTRAY_KEY
and BINTRAY_USER
.for detail info ,please refers this post 。 Good luck !
Upvotes: 0