所以我有一个Bintray存储库,但是我很难从gradle上传到它。好的,我的意思是版本管理没有按我所希望的方式工作,目前,对于我上传的每一个.jar,我必须在配置和依赖项中增加版本。我知道这不是该怎么做的。我的问题是,我如何自动化/实现VCS标记与Bintray。现在,我的上传配置如下所示(使用bin托盘插件):
bintray {
user = "$bintrayUser"
key = "$bintrayKey"
publications = ['maven']
dryRun = false
publish = true
pkg {
repo = "$targetBintrayRepo"
name = "$targetBintrayPackage"
desc = ''
websiteUrl = "$programWebsiteUrl"
issueTrackerUrl = "$programIssueUrl"
vcsUrl = "$programVcsUrl"
licenses = ["$programLicense"]
labels = []
publicDownloadNumbers = true
version {
name = "$programVersion"
released = new java.util.Date()
vcsTag = "$programVcsTag"
}
}
}我的变量是:
def programVersion = '0'
def programVcsTag = '0.0.0'
def programGroup = 'com.gmail.socraticphoenix'
def targetBintrayRepo = 'Main'
def targetBintrayPackage = 'java-api'
def programLicense = 'MIT'
def programWebsiteUrl = 'https://github.com/meguy26/PlasmaAPI'
def programIssueUrl = 'https://github.com/meguy26/PlasmaAPI/issues'
def programVcsUrl = 'https://github.com/meguy26/PlasmaAPI.git'然而,这里没有出现标记,并且再次运行发布(即使使用不同的vcs标记)会导致版本已经存在错误。(Could not upload to 'https://api.bintray.com/content/meguy26/Main/java-api/0/com/gmail/socraticphoenix/PlasmaAPI/0/PlasmaAPI-0.jar': HTTP/1.1 409 Conflict [message:Unable to upload files: An artifact with the path 'com/gmail/socraticphoenix/PlasmaAPI/0/PlasmaAPI-0.jar' already exists])
对不起,如果我是个无名氏,但我不明白为什么它不工作,我填写了所有适当的变量(我想)
发布于 2015-11-23 17:48:47
每个版本不支持多个标签。版本是唯一的字符串。如果您想用不同的标记从同一版本中发布某些内容,请使用您的程序版本和标记(例如,"$programVersion-$programVcsTag" )组成一个Bintray版本字符串。
https://stackoverflow.com/questions/33875817
复制相似问题