Sim*_*mon 3 android version gradle bintray
我的版本有什么问题?
bintray.gradle
apply plugin: 'com.jfrog.bintray'
version = '0.1'
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
bintray{
user = 'user_name'
key = 'apikey'
configurations = ['archives']
pkg {
repo = 'maven'
name = 'notification-handler'
desc = 'first initiate'
websiteUrl = 'myWebsiteUrl'
vcsUrl = 'MyVcsUrl'
licenses = ["Apache-2.0"]
publish = true
publicDownloadNumbers = true
}
}
Run Code Online (Sandbox Code Playgroud)
错误
信息:Gradle任务[bintrayUpload]
错误:任务':parham-notification-handler:bintrayUpload'的执行失败.
无法创建版本'0.1':HTTP/1.1 401 Unauthorized [消息:此资源需要身份验证]
信息:建筑失败
谢谢.
Niv*_*pel 10
尝试将bintray.user和bintray.key更改为以下行:
user = property('user')
key = property('key')
Run Code Online (Sandbox Code Playgroud)
运行以下命令后:
gradle -Puser=YOUR_BINTRAY_USERNAME -Pkey=YOUR_BINTRAY_API_KEY bintrayUpload --info
Run Code Online (Sandbox Code Playgroud)
您可以通过"API密钥"选项卡下的编辑bintray配置文件页面获取Bintray API_KEY
| 归档时间: |
|
| 查看次数: |
655 次 |
| 最近记录: |