您好,欢迎来到伴沃教育。
搜索
您的当前位置:首页Android Studio 发布开源项目到Jcenter重要

Android Studio 发布开源项目到Jcenter重要

来源:伴沃教育

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

  1. 中注册账号,建议直接github登录。
  2. 创建Package
  3. 把项目分离成Module
  4. 在项目根目录的build.gradle中添加bintray插件
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认证
bintray.user=solvebugs// 
 Api Key
  1. Module中的build.gradle中的配置
ext {   
 bintrayRepo = 'maven'    
bintrayName = 'CustomRatingBar'    //在Maven上创建的Package的名字
publishedGroupId = 'com.zq.customratingbarmoudle'    
libraryName = 'customratingbarmoudle'    //moudle名字
artifact = 'customratingbarmoudle'    //
libraryDescription = ' '    
siteUrl =     
gitUrl =     
libraryVersion = '1.0.0'   
 developerId = 'zq'    
developerName = 'qiang zhen'    
developerEmail =     
licenseName = 'The Apache Software License, Version 2.0'    
licenseUrl =     
allLicenses = ["Apache-2.0"]}
apply from: 
apply from: 
  1. 在Android Studio终端使用两条命令上传到Jcenter
1. gradlew install
2. gradlew bintrayUpload
Add to JCenter

Copyright © 2019- bangwoyixia.com 版权所有 湘ICP备2023022004号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务