Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin can't create package when custom license is used #315

Open
DzmitryFomchyn opened this issue Mar 10, 2020 · 0 comments
Open

Plugin can't create package when custom license is used #315

DzmitryFomchyn opened this issue Mar 10, 2020 · 0 comments

Comments

@DzmitryFomchyn
Copy link

Hey everyone,

I tried to upload an artifact to a package that doesn't exist and the plugin couldn't create a package automatically (whereas the plugin is supposed to auto-create packages).

The ./gradlew bintrayUpload task failed with the following error:

Could not create package 'my package name': HTTP/1.1 400 Bad Request [message:License 'Company Terms of Service' does not exist]

We provide custom license (let's say with name "Company Terms of Service")

licenses {
        ...
        license {
                name project.property('licenseName')
                url project.property('licenseUrl')
                distribution 'repo'
         }
        ...
}


pkg {
        ...
        licenses = [project.property('licenseName')]
        ...
}

and the properties are defined in the gradle properties file:

licenseName=Company Terms of Service
licenseUrl=<URL to the Terms of Service>

The license with the specified name is used as a default license in the repository settings.

I tried to use BSD license and the plugin works as expected. Also, this error doesn't happen when the package already exists.

cc @zugaldia

@DzmitryFomchyn DzmitryFomchyn changed the title The plugin can't create package when custom license is used Plugin can't create package when custom license is used Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant