zduny
zduny

Reputation: 2541

How to make my library project on GitHub importable via Gradle?

Is there a way to make my library project I host on GitHub to be linked in Android Studio in my new project, so I can easily update linked version to the remote version?

Basically I have project A - stored on GitHub. I want to link project A in project B, so every time project A changes it will be updated in project B also.

Upvotes: 3

Views: 836

Answers (1)

John Shelley
John Shelley

Reputation: 2655

The best way I know how to do this is to host it on your own Maven reposiotory - this might help- (http://www.mkyong.com/maven/how-to-include-library-manully-into-maven-local-repository/), or Maven Central. Then in your build.gradle file reference it:

compile 'com.example.app:library:+'

Where the '+' is always checking for the newest version (My syntax might be off as well)

The only issue then is running a git pull too often, but you could always create a bash script that gets called every so often, then that should do the trick as well.

Upvotes: 4

Related Questions