我有一个根项目和一些子项目,它们都会产生工件。我在顶层构建脚本(gradle)中配置bintray的方式与我对artifactory所做的类似(相同的发布/配置)。当使用"artifactoryPublish“将工件上传到artifactory时,所有工件(来自根项目和子项目)都会正确上传。然而,当运行"bintrayUpload“时,只有来自根项目的工件才会被上传,并且我在子项目中收到这样的错误:
> Task :sub1:bintrayUpload
Putting task artifact state for task ':sub1:bintrayUpload' into context took 0.0 secs.
Executing task ':sub1:bintrayUpload' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Gradle Bintray Plugin version: 1.8.0
Skipping task 'sub1:bintrayUpload' because user or apiKey is null.看起来根项目中定义的配置还没有传递给子项目。我怎样才能做到这一点呢?一些子项目代码是自动生成的,因此,我不想修改子项目构建脚本,而是希望所有逻辑都放在顶层脚本中。这个是可能的吗?
发布于 2018-07-12 16:47:17
您未指定二进制托盘凭据。在你的项目中提供下面这样的详细信息。
build.gradle(库模块)
ext {
bintrayRepo = "Awesome Library"
bintrayName = "com.example.awesome-library"
libraryName = "awesome-library"
publishedGroupId = 'com.example.awesome-library'
artifact = 'awesome_library'
libraryVersion = '1.0'
libraryDescription = "Description...."
siteUrl = 'https://www.example.com/'
gitUrl = 'https://github.com/me/awesome-library.git'
developerId = '....'
developerName = '....'
developerEmail = '.....'
licenseName = 'The Apache Software LIcense, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}local.properties
bintray.user=username
bintray.apikey=*****************https://stackoverflow.com/questions/47789887
复制相似问题