I found a nice open library on GitHub, I imported it into my Android Studio project using Gradle dependencies, but then I realized I need to make little modifications on it.
I know that this is an old post, but for someone with similar problem, if you simply want a way to change a lib and use it in your project, you can download the lib code, change it and import into your project as a module:
You need to add your own git respository as remote
. You can't however do this within Android Studio, according to this thread. Use the command line instead:
git remote add remoteName remoteUrl
git fetch remoteName
Then you can go to Android Studio, VCS > Git > Pull
and select your added remote repository.
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.yourgithubusername'
and open the root gradle file and add:
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
implementation 'com.github.username:repo:tag'
This is how you should do it:
I think the accepted answer is outdated. There is actually a really easy way to do this nowadays: jitpack.io
All you need to do is.
add in your root build.gradle
at the end of allprojects repositories:
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
Add the dependency in your app build.gradle:
dependencies { implementation 'com.github.User:Repo:Tag' }
If you don't have any releases/tags, you can also just do com.github.User:Repo:branchname-SNAPSHOT
to build from the latest commit on that branch.