前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Android Studio 发布开源项目到Jcenter重要步骤记录

Android Studio 发布开源项目到Jcenter重要步骤记录

作者头像
coderZhen
发布2018-06-28 16:27:45
2950
发布2018-06-28 16:27:45
举报
文章被收录于专栏:Android开发经验Android开发经验

连续在Jcenter发布了两个项目,记录下其中的主要操作步骤。

  1. https://bintray.com 中注册账号,建议直接github登录。
  2. 创建Package
  3. 把项目分离成Module
  4. 在项目根目录的build.gradle中添加bintray插件
代码语言:javascript
复制
dependencies {   
...
// NOTE: Do not place your application dependencies here; they belong    
// in the individual module build.gradle files    
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'    
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1"    
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
  1. 在local.properties中添加bintray认证
代码语言:javascript
复制
bintray.user=solvebugs// https://bintray.com/的用户名
bintray.apikey=xxxx//https://bintray.com/ Api Key
  1. Module中的build.gradle中的配置
代码语言:javascript
复制
ext {   
 bintrayRepo = 'maven'    
bintrayName = 'CustomRatingBar'    //在Maven上创建的Package的名字
publishedGroupId = 'com.zq.customratingbarmoudle'    
libraryName = 'customratingbarmoudle'    //moudle名字
artifact = 'customratingbarmoudle'    //
libraryDescription = ' '    
siteUrl = 'https://github.com/SolveBugs/CustomRatingBar'    
gitUrl = 'https://github.com/SolveBugs/CustomRatingBar.git'    
libraryVersion = '1.0.0'   
 developerId = 'zq'    
developerName = 'qiang zhen'    
developerEmail = '18317857586@163.com'    
licenseName = 'The Apache Software License, Version 2.0'    
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'    
allLicenses = ["Apache-2.0"]}
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
  1. 在Android Studio终端使用两条命令上传到Jcenter
代码语言:javascript
复制
1. gradlew install
2. gradlew bintrayUpload

8.在https://bintray.com将项目添加到Jcenter

代码语言:javascript
复制
Add to JCenter
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2016.09.02 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档