要实现它,您可以通过以下几种方法:
在中央Maven或Jcenter中发布您的库(工件)。
使用github repo和 jitpack 插件
在本地Maven存储库中发布aar(本地或私人)
要点2. 很简单。只需在github中推送您的代码,然后在要使用它的项目中修改gradle脚本即可。
只需将此回购添加到您的
build.gradle
repositories { // ... maven { url "https://jitpack.io" } }和依赖性:
dependencies { compile 'com.github.User:Repo:Tag' }要 在Central Maven或JCenter中 发布 库,答案中的解释很长。您可以阅读以下文章:
在JCenter上发布
在Central Maven上发布



