Android项目在上传Jcenter时出现错误

PaulYung 2016-11-01 09:50:28
写了个小项目,想做成Gradle直接依赖那种方式,在网上查了,说是要上传到https://bintray.com/上。我按照步骤,创建了Maven库,在本地Gradle上也配置好了。可是一执行 gradle bintrayUpload 就出现说找不到我创建的Maven


我的Gradle文件如下:
[apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'

android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
resourcePrefix "aaa"
defaultConfig {
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty('bintray.user')
key = properties.getProperty('bintray.apikey')

configurations = ['published', 'archives']

dryRun = false
publish = true

pkg {
repo = 'maven'
name = 'ActionAnimatorSet'

desc = 'An animator operation set on Android'

websiteUrl = 'https://github.com/paulyung541/ActionAnimatorSet'
issueTrackerUrl = 'https://github.com/paulyung541/ActionAnimatorSet/issues'
vcsUrl = 'https://github.com/paulyung541/ActionAnimatorSet.git'

licenses = ['GNU GENERAL PUBLIC LICENSE, Version 3.0']
labels = ['Android', 'ObjectAnimator', 'AnimatorSet']
publicDownloadNumbers = true

version {
name = '1.0.0'
desc = 'first version'
vcsTag = '1.0'
}
}
}

publishing {
publications {
Publication(MavenPublication) {
groupId 'com.paulyung'
artifactId 'actionanimset'
version '1.0.0'
}
}
}][/code]
...全文
207 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
幻影宇寰 2016-11-04
  • 打赏
  • 举报
回复
你这段配置我没法验证是否正确,但我可以提供一个经过实际验证的配置给你,其配置文件链接如下https://github.com/xiaoyaoyou1212/BLE/blob/master/jCenter.gradle,接着像我这个项目中这样给定自己的描述信息https://github.com/xiaoyaoyou1212/BLE/blob/master/gradle.properties,再在module的build.gradle文件中添加如下配置
apply from: '../jCenter.gradle'
,最后在命令窗口的工程目录下使用
gradlew bintrayUpload
命令就OK了,如果是Mac系统,命令就改为
./gradlew bintrayUpload
,希望对你有所帮助!

80,337

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧