bintray中同一包下的两条路径

时间:2017-09-19 07:58:03

标签: android maven android-library bintray jcenter

我已成功将库上传到bintray,它正确显示了版本和依赖关系。但是当我要求将它链接到jcenter时,我收到了这个回复:

  

嗨,

     

我们可以看到同一个包下有两个路径,一个用于下面的 .aar / .jar / .apk和jar -sources.jar和* -javadoc.jar文件:   /com/androiddev/android-dev-core/1.0.0

     

和.pom文件的一个:   /com/androiddev/core/1.0.0

     

我们只能为单个包批准一条路径。   请合并这两条路径,并告诉我们您希望包含哪条路径前缀。

     

谢谢,   JFrog支持

我可以看到bintray中文件部分下的两个路径。知道如何解决这个问题吗?

2 个答案:

答案 0 :(得分:3)

要避免此问题,请确保您的库名称与您在bintray上创建的名称相似。如果它们不同,当您使用bintrayUpload命令从android studio终端将库上传到bintray时,它将创建两个单独的路径。

我在build.gradle中的bintray配置如下所示。

ext {
bintrayRepo = 'dev' //the maven repo name (created on bintray)
bintrayName = 'android-dev-core' //the name you want to give at your project on bintray
orgName = 'thisisjatinrana' //your user name

publishedGroupId = 'com.jatin' //aaaa : the librairy group
artifact = 'android-dev-core' //BBBB : the library name
libraryVersion = "1.0.0" //the librairy version

//the library will be : aaaa:BBBB:version

libraryName = 'android-dev-core'
libraryDescription = 'Android essential building blocks to speed up development process'

siteUrl = 'https://github.com/thisisjatinrana/AndroidDevCore'
gitUrl = 'https://github.com/thisisjatinrana/AndroidDevCore.git'

developerId = 'jatinrana'
developerName = 'Jatin Rana'
developerEmail = 'thisisjatinrana@gmail.com'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]

}

此处artifact和bintray项目名称应与android studio中的库名称相同。

答案 1 :(得分:0)

如果您的lib和工件的名称不同,您将在bintray的文件部分看到两个文件夹。 Pom文件和jar文件将位于不同的文件夹中。为了避免这种情况,您应该将工件和lib(module)重命名为相同的名称。

我认为Bintray项目名称可以不同。它是可选的。工件和模块名称相等就足够了。构建项目后,您将在同一文件夹中看到pom文件和jar文件。