Recently I have been trying to figure out how to publish my ScaleNumberPicker Android library from GitHub.
I read articles about publishing to Jitpack, GitHub Packages and Maven Central, but I found it confusing.
What is the difference between these different package repositories, and which one is the best for Android Studio? And how do I publish? Do I need to create a release first on GitHub? And after publishing, can I modify the README.md
file on my GitHub repository to add the usage instructions?
CodePudding user response:
JitPack pulls the source from your GitHub repo and builds it (when the first user uses the lib). For Maven Central and GitHub Packages, you build and upload your own artifacts.
I'd say, the simplest way is JitPack.
Follow the docs to publish the lib. (Follow the Guide to Android)
After adding a release, you still can edit the README, and you can continue to work on the lib.
If you want to publish a new version, just create a new release and update the README.