Create A Gradle Dependency To Import From Git
This is how import dependencies in Android Studio. In this case okhttp: dependencies { compile 'com.squareup.okhttp:okhttp:2.5.0' } I would like to import a dependency create
Solution 1:
To achieve it you have some ways:
publish your library (artifact) in central maven or jcenter.
use a github repo and the jitpack plugin
publish the aar in a local maven repo (local o private)
The point 2. is very simple. Just push your codein github and modify the gradle script in the project where you want to use it.
Just add this repo tp your build.gradle
repositories {
// ...
maven { url "https://jitpack.io" }
}
and the dependency:
dependencies {
compile'com.github.User:Repo:Tag'
}
To publish a library in Central Maven or JCenter, it is very long to explain in an answer. Hovewer you can read these posts:
Publish on JCenter
Publish on Central Maven
Post a Comment for "Create A Gradle Dependency To Import From Git"