From 2e52e34c635b5d3d72c8fc2a0fb83dc2c52f81a0 Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Wed, 8 Jan 2020 11:24:06 -0800 Subject: [PATCH] Rollback task configuration avoidance for nebula-bintray hooks --- .../groovy/nebula/plugin/release/ReleasePlugin.groovy | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/groovy/nebula/plugin/release/ReleasePlugin.groovy b/src/main/groovy/nebula/plugin/release/ReleasePlugin.groovy index 664467a..f03bb67 100644 --- a/src/main/groovy/nebula/plugin/release/ReleasePlugin.groovy +++ b/src/main/groovy/nebula/plugin/release/ReleasePlugin.groovy @@ -321,17 +321,15 @@ class ReleasePlugin implements Plugin { @CompileDynamic void configureBintrayTasksIfPresent() { project.plugins.withId('nebula.nebula-bintray') { - TaskCollection mavenPublishTasks = project.tasks.withType(PublishToMavenRepository) - mavenPublishTasks.configureEach { task -> + project.tasks.withType(PublishToMavenRepository) { Task task -> project.plugins.withType(JavaPlugin) { - task.dependsOn(project.tasks.named('build')) + task.dependsOn(project.tasks.build) } - } - project.rootProject.tasks.named('postRelease').configure { - it.dependsOn(mavenPublishTasks) + project.rootProject.tasks.getByName('postRelease').dependsOn(task) } } + project.plugins.withId('com.jfrog.bintray') { TaskCollection bintrayUploadTasks = project.tasks.withType(Class.forName('com.jfrog.bintray.gradle.tasks.BintrayUploadTask')) bintrayUploadTasks.configureEach { Task task ->