Creating your own libraries for Android applications
Create a library available on Jitpack.io
Perform the following steps to create the library:
Create a GitHub account.
Create a Git repository containing your library project.
Modify your library project's
build.gradle file by adding the following code:
Make sure that you commit/push the above changes to GitHub.
Create a release from the current code on Github.
gradlew install on your code.
Your library is now available by the following dependency:
Creating library project
To create a libary , you should use
File -> New -> New Module -> Android Library. This will create a basic library project.
When that's done, you must have a project that is set up the following manner:
settings.gradle file must contain the following:
[library root directory] must contain the following:
build.gradle file must contain the following:
With that, your project should be working fine!
Using library in project as a module
To use the library, you must include it as a dependency with the following line:
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0