Search code examples
androidandroid-studiogithubgradlejitpack

How to create a library on Github and use it through gradle dependencies in Android Studio


I want to create the library and have access to it through the Internet. In Android Studio (via Gradle) dependency may be added in this way:

In build.gradle (Module app):

dependencies {
    ...
    compile 'com.android.support:design:23.1.0'
    compile 'com.squareup:otto:1.3.8'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile 'com.j256.ormlite:ormlite-android:4.48'
    ...
}

How can I add my own library in this way from github?


Solution

  • Refer Jitpack is best to import your project or libs from Github to gradle

    For more information refer Gabriele Mariotti answer