rokevin
移动
前端
语言
  • 基础

    • Linux
    • 实施
    • 版本构建
  • 应用

    • WEB服务器
    • 数据库
  • 资讯

    • 工具
    • 部署
开放平台
产品设计
  • 人工智能
  • 云计算
计算机
其它
GitHub
移动
前端
语言
  • 基础

    • Linux
    • 实施
    • 版本构建
  • 应用

    • WEB服务器
    • 数据库
  • 资讯

    • 工具
    • 部署
开放平台
产品设计
  • 人工智能
  • 云计算
计算机
其它
GitHub
  • jcenter

jcenter

https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

上传jar或者aar到JCenter

说明

开发过程中难免有重复的功能需要集成到项目中,如果使用moudle的方式集成那么项目结构会变得复杂,不便于统一维护,我们把独立完整的功能做成单独的项目,然后传到jcenter上,只要使用的时候添加引用就可以了,方便快速的增删和更新功能。

操作步骤

注册JFrog Bintray
  1. 打开官网:https://bintray.com/
  2. 注册时分为企业用户和个人用户,尽量选择个人用户注册,如果你选择了start your free trial注册后,上面会显示一个类似下面这种标识,你说烦不烦。
  3. 个人用户注册地址:https://bintray.com/signup/oss
  4. 注册的时候需要填写邮箱,国内的邮箱是不行的,需要申请一个国际邮箱,比如谷歌邮箱。看到网上也有人说可以用github账号进行注册,这个我没有尝试,你可以试试。
  5. 填写完必要的信息就可以完成注册,这个时候他会向你的邮箱发送一条激活邮件,激活一下就可以了。

老的方式

http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0623/3097.html http://www.jianshu.com/p/0ba8960f80a9 https://github.com/bintray/bintray-examples/blob/master/gradle-aar-example/build.gradle

在终端执行 ./gradlew install ./gradlew bintrayUpload 有可能不通的原因没有配置好Java环境变量

上传到bingray上后在主module中的build中添加

apply plugin: 'com.android.application'

repositories { maven { url 'https://dl.bintray.com/ro54fish/maven/' } }

android { compileSdkVersion 23 buildToolsVersion "24.0.0" defaultConfig { applicationId "com.wyl346.jj" minSdkVersion 14 targetSdkVersion 23 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'me.rokevin.photopicker:lib_photo_picker:0.0.1' }

最近更新:: 2025/10/22 15:36
Contributors: luokaiwen