android同步aar到jcenter,android上传aar到jcenter
一、jcenter配置
1、jcenter官網注冊賬號
官網地址:https://bintray.com
注冊頁面:
? ? 2、注冊成功記錄API Key
鼠標放在賬戶名上,點擊Edit Profile,選擇API Key,在這里是需要輸入登錄密碼的,然后就可以看到你的key
3、創建倉庫
點擊此處
進入創建倉庫頁面,根據你的需求來創建,填寫相關信息
二、gradle配置
1、在build.gradle中添加上傳所需的插件
classpath?classpath
版本號要確定好,版本過低會報錯
2、上傳配置
在model中的build.gradle中的根節點配置插件
apply?:?apply?:?apply?:?=?=?siteUrl?=?gitUrl?=
task?sourcesJar(:?Jar)?{
from?....=?}
task?javadoc(:?Javadoc)?{
=?....classpath?+=?.files(.().join(File.))
}
task?javadocJar(:?Jar,?:?javadoc)?{
=?from?javadoc.}
artifacts?{
archives?archives?}
install?{
.{
pom?{
{
packaging?url?siteUrl
licenses?{
license?{
url?}
}
developers?{
developer?{?id?email?}
}
scm?{
connection?gitUrl
developerConnection?gitUrl
url?siteUrl
}
}
}
}
}
Properties?properties?=?Properties()
properties.load(..file().newDataInputStream())
bintray?{
=?properties.getProperty()
=?properties.getProperty()
=?[]
pkg?{
=?=?=?siteUrl
=?gitUrl
=?[]
=?}
}
3、配置API KEY
打開local.properties添加api key
bintrayUser=namebintrayApiKey=apikey
4、執行命令
(1)生成maven庫所需要的POM文件:graedlew install
(2)執行命令graedlew bintrayUpload
在jcenter中可以看到我們的版本是1.0.3
在gradle中引用如下
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的android同步aar到jcenter,android上传aar到jcenter的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: C语言中的二级指针和二维数组问题
- 下一篇: win32程序启用控制台-- 调试输出
