注册并登陆
https://bintray.com/signup/oss
登入之后如图所示:
新建仓库
点击左边的Add New Repository
创建新的仓库
填写相关信息
新建Package
配置项目
- 打开工程目录中的build.gradle文件,添加插件。插件的最新版本可以在https://bintray.com/novoda/maven/bintray-release查看
1 | ... |
- 打开要上传的Module中的build.gradle文件,应用插件,并且设置上传信息
1 |
|
上传指令
1 | gradlew clean build bintrayUpload -PbintrayUser=你的用户名 -PbintrayKey=你的密钥 -PdryRun=false |
使用
上传完毕后,在需要使用该库工程中的build.gralde,添加maven地址1
2
3
4
5
6
7
8
9
10
11
12
...
allprojects {
repositories {
...
maven {
url "地址在仓库页面的右上角" // url 'https://dl.bintray.com/vendor-yu/maven'
}
...
}
}
...
在module中的build.gradle添加1
2implementation '${groupId}:${artifactId}:${version}'
implementation 'me.jiahuan.android.wheelview:wheel-view:0.3.5'