bintray / gradle-bintray-plugin

Apache License 2.0
1.28k stars 197 forks source link

Cannot call Task.finalizedBy(Object...) on task 'bintrayUpload' after task has started execution. #264

Open florent37 opened 6 years ago

florent37 commented 6 years ago

I use bintrayUpload to publish all my libs to JCenter, but recently I'm facing this issue when I try to publish an artifact

For example on my repository : https://github.com/florent37/RuntimePermission Containing 3 artifacts :

I have this configuration :

Gradle Wrapper : gradle-4.6-all.zip

classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'

When I try to publish an artifact now, running this command :

./gradlew :runtime-permission-kotlin:install
./gradlew :runtime-permission-kotlin:bintrayUpload

I have this issue

* What went wrong:
Execution failed for task ':bintrayPublish'.
> A problem occurred configuring project ':runtime-permission-kotlin'.
   > Cannot call Task.finalizedBy(Object...) on task ':runtime-permission:bintrayUpload' after task has started execution.
florent37 commented 6 years ago

it only works when I launch a command like ./gradlew runtime-permission:bintrayUpload -x runtime-permission-kotlin:bintrayUpload -x runtime-permission-rx:bintrayUpload

florent37 commented 6 years ago

-x to exclude another command

Ayvytr commented 6 years ago

I have the same error for gradlew bintrayUpload

kimble commented 5 years ago

This seems to do the trick for me --no-configure-on-demand --no-parallel

datayes-dev commented 5 years ago

i have same error ./ gradlew module: bintrayUpload

Kolyall commented 5 years ago

@florent37 Resolved by: Comment lines at MyProject/gradle.properties file:

#org.gradle.parallel=true
#org.gradle.configureondemand=true

Or run the command at terminal with :

./gradlew :module:bintrayUpload --no-configure-on-demand --no-parallel
mockitoguy commented 3 years ago

Bintray folks, this ticket has been open for a couple years. Can you prioritize fixing this "paper-cut" issue?

anggrayudi commented 3 years ago

I stopped using Bintray because of this eternal bug. I decided to move to OSS Sonatype and use this Maven Gradle Plugin to publish the library. Another advantage of using OSS Sonatype is you can publish snapshot versions, which is good for testing before you publish the stable version.