美文网首页Android 进击
Android studio 发布到bintray

Android studio 发布到bintray

作者: 小程序猿一枚 | 来源:发表于2020-04-14 16:38 被阅读0次

账号准备

1.前往bintray注册个人账号 https://bintray.com/signup/oss
2、创建代码仓库,类型选择 maven

image.png
3、获取apikey:右上角你的头像->Edit Profile->API Key

配置

https://github.com/novoda/bintray-release
项目根目录下 build.gradle

 dependencies {
        ....
        classpath 'com.novoda:bintray-release:0.9.2'
    }

所上传module 目录下 build.gradle

apply plugin: 'com.novoda.bintray-release'

// 新增
publish {
    userOrg = 'lqos'        //bintray.com用户名
    groupId = 'com.zxn.parcel'    //jcenter上的路径
    artifactId = 'auto_parcel'   //项目名称
    publishVersion = '0.1.0'//版本号
    desc = '自动实现序列化'//描述,自由填写
    website = 'https://github.com/bug2048/auto_parcel' // 网址,自由填写
}

发布命令

./gradlew clean build bintrayUpload -PbintrayUser={BINTRAY_USERNAME} -PbintrayKey={BINTRAY_KEY} -PdryRun=false

BINTRAY_USERNAME :bintray注册名称
BINTRAY_KEY :bintray api key(右上角你的头像->Edit Profile->API Key)

上传到Jcenter

发布成功后 进入https://bintray.com/beta/#/{用户名}/maven/项目名称
按照如下操作上传到Jcenter

image.png

大概几个小时后就上传成功了

相关文章

网友评论

    本文标题:Android studio 发布到bintray

    本文链接:https://www.haomeiwen.com/subject/poetvhtx.html