Key steps I was missing:
- Ensure that the repository root has a
settings.gradle
file with a line referring to the library:
include ':customcomponents'
- Add
apply plugin: 'com.android.library'
at the top of the library’sbuild.gradle
file. - Add group, version and base name to library’s
build.gradle
file:
group = "com.github.adityabhaskar"
version = android.defaultConfig.versionName
archivesBaseName = 'customcomponents' - Push to Github. Preferably, give it a version tag.
- Open jitpack.io. Connect to Github. Select library
- If using a free account, the github repository needs to be public/OSS.
- Select a commit, or a branch snapshot and click on ‘Get it’. Build process will start in the background. If all goes well, the library will be available to use in projects.