github项目发布的jitpack
一,在github创建一个项目
二,android studio创建本地library(或者是modle)
三,给
library
配置jitpack环境
(或者是modle)
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // Add this line
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
In your library/build.gradle add:
apply plugin: 'com.github.dcendents.android-maven'//固定不变
group='com.github.itcastsh'//itcastsh:github账号
四,下面检查你的Project目录是否存在 如下两个文件
gradle/wrapper/gradle-wrapper.jar、
gradle-wrapper.properties
如果存在可跳过下面这步,如果不存在,请按下面的进行操作。打开当前项目的 Terminal,先后执行 gradle wrapper和 ./gradlew install 两个命令,如下图:
五,提交
library
到github
六,在github创建一个
releases版本
七,打开jitpack.io网站生成依赖
八,使用(在项目中添加如下配置)