3
我有一个Android图书馆,我想在bintray上发布。使用gradle-bintray-plugin发布于bintray
到目前为止好,我现在用的是gradle这个-bintray-插件1.2具有以下配置:
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "android" // thats how my maven repository is called on bintray
name = "mylibrary"
websiteUrl = "https://somewebsite" // replaced this, since the project should not matter
issueTrackerUrl = 'some issuetracker url'
vcsUrl = "some repository"
licenses = ["Apache-2.0"]
publish = true
version {
// the 2 functions here, are building the version number
name = versionNameBuild() // i.e. 1.0.0-SomeName
vcsTag = versionName() // 1.0.0
gpg {
// keys are uploaded
sign = true
}
}
}
}
我碰到了,是我上传的库后的版本号是“第一个问题未指定”。这意味着文件已成功上传,但它被称为smth。如“未指定的图书馆.aar”。我发现我必须在gradle中额外指定项目版本号。
这样的:
project.version = "1.0.1"
之后,这是工作的罚款。现在,我只有2个问题留给:
我希望我的文件上传这样的:
$BINTRAYUSERNAME/$REPONAME/$PACKAGENAME/$VERSION/*.aar
但它们实际上是上传到水木清华这样的:
$BINTRAYUSERNAME/$REPONAME/$PROJECT_FOLDERNAME_OF_ANDROID_STUDIO/$SUBDIRECTORY_OF_THE_LIBRARY/$VERSION/*.aar
我可以改变不知怎的,这个“路径”?有关系吗?
这导致我到我的下一个问题。 如何指定maven组类型?我的意思是这是一个Maven存储库吗?所以我应该能够设置它?这可能与我的第一个问题有关吗?