1.首先你需要在项目中创建一个library
2.添加
apply plugin: 'com.novoda.bintray-release'
publish { userOrg = 'hongfuchang1' groupId = 'hongfuchang' artifactId = 'media' publishVersion = '0.3.4' }到library的gradle文件中classpath 'com.novoda:bintray-release:0.4.0'
到项目的gradle文件中3.运行命令$ ./gradlew clean build bintrayUpload -PbintrayUser=BINTRAY_USERNAME -PbintrayKey=BINTRAY_KEY -PdryRun=false备注username是你的bintray账号名字 api则是账户的apiuserOrg 是pakage的名字novoda:bintray默认设置名字maven的文件夹groupId 是以后compile里面的文字artifactId 是bintray的最后的文件夹名字publishVersion 是版本号注相关文档:https://github.com/novoda/bintray-release http://www.jianshu.com/p/0ba8960f80a9注册 http://www.jianshu.com/p/0ba8960f80a9注:注释最好是英文不然容易出错具体方法网上有未深入研究