1,新建项目和library(libiary即为要发布的依赖)

2,在项目级别的gradle文件中添加如下代码
classpath'com.github.dcendents:android-maven-gradle-plugin:1.5'

3,在要进行发布的库的gradle文件添加以下代码
applyplugin:'com.github.dcendents.android-maven'
group='com.github.keluokeda'
其中keluokeda是你的github名称

4,分享项目到github上
5,在github上发布一个release版本
6,在 https://jitpack.io 网站输入框中输入项目的github地址,点击lookup

7,选择 版本。git it
8,按照提示把依赖加入到你的项目中

网友评论