本地新建Android Studio项目
-
新建Module,选择Android library(我的名字是dialog)
image.png -
删除项目下的app Module,只留Android library
image.png 编写内容 项目中 无需 无需 无需 做任何特殊处理 例如这种
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.你的guihub的账户名字'
- 使用git上传到github
-
选择发布
image.png -
发布内容
image.png - 打开https://jitpack.io/
image.png -
集成进项目
image.png
我的测试项目
GIF.gif
https://github.com/Lrxc/lrxcdialog
添加依赖 参考步骤9
maven { url 'https://jitpack.io' }
compile 'com.github.Lrxc:lrxcdialog:1.2'