根目錄build添加
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.novoda:bintray-release:0.3.4'
}
需要上傳Library的build添加
apply plugin: 'com.novoda.bintray-release'
publish {
userOrg = '' //bintray注冊的用戶名
groupId = '' //compile引用時的第1部分groupId
artifactId = '' //compile引用時的第2部分項目名
publishVersion = '1.0.0' //compile引用時的第3部分版本號
desc = ''
website = ''
}
最后打開Termainal執(zhí)行命令
發(fā)布到bintary 命令
./gradlew clean build bintrayUpload -PbintrayUser=用戶名 -PbintrayKey=自己KEY -PdryRun=false