1

I am trying to publish the first release of the Overpass library to Bintray/jCenter using the gradle-bintray-plugin v.1.5. I prepared the configuration on this temporary branch:

I did not prepare anything on the Bintray website besides an account on which I published before. So I also have a bintrayUser and bintrayApiKey in place for Gradle. Please tell me if I need to manually setup something beforehand. - Then, I run the following command:

$ ./gradlew clean assemble bintrayUpload

This fails with this error:

Execution failed for task ':bintrayUpload'.
> Could not create package 'tbsprs/maven/Overpass': HTTP/1.1 400 Bad Request [message:License '[' does not exist]

Can you spot the mistake?

JJD
  • 50,076
  • 60
  • 203
  • 339

3 Answers3

2

I managed to release the library by temporarily replacing:

licenses = project.packageLicenses

with

licenses = ['Apache-2.0']

Note that I use gradle.properties to maintain these values in one place.
I already reported this behavior and hope the bug is fixed soon.


Here is the follow up issue for this case:

JJD
  • 50,076
  • 60
  • 203
  • 339
1

The gradle.properties file is a regular Java properties file and as such it cannot hold keys with multiple values.
A simple solution would be having a comma delimited string in the properties file, for example:

licenses=Apache-2.0,BSD

And splitting this value in build.gradle to create an array

licenses = project.property('licenses').split(',')
Community
  • 1
  • 1
Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57
  • You might want to suggest your solution [here](https://github.com/bintray/gradle-bintray-plugin/issues/98). – JJD Dec 14 '15 at 23:36
0

It will be easier if you shared your build.gradle, but my guess would be you don't have the mandatory license field in the pkg block.

JBaruch
  • 22,610
  • 5
  • 62
  • 90
  • It's right [there](https://github.com/johnjohndoe/Overpass/blob/release/build.gradle). – JJD Nov 30 '15 at 21:02
  • The field name is `licenses` and its right [there](https://github.com/johnjohndoe/Overpass/blob/release/gradle/deploy.gradle#L42). – JJD Nov 30 '15 at 21:08