iqueqiorio
iqueqiorio

Reputation: 1187

Compile GitHub Project to be used in Android Studio

How can I take a github project, that I have forked and edited, and the compile it so that is can be used like this

dependencies {
    compile 'com.github.name:project:1.0'

How can I turn a fork into something that can be used like this?

Thanks

Upvotes: 3

Views: 433

Answers (1)

Deividi Cavarzan
Deividi Cavarzan

Reputation: 10110

To install some lib locally, you need to declare the project in gradle:

In settings.gradle file, change the configuration to:

include ':app', ':your-lib'
project(':your-lib').projectDir = new File('Path/To/The/Lib/library')

After this include in your build.gradle the dependency:

dependencies {
    compile project(":your-lib")
}

This will import in you IDE the module of the library, and compiles to your APK.

Upvotes: 2

Related Questions