From f96740af880939b180e7157701a711a803c481c5 Mon Sep 17 00:00:00 2001 From: Till Krullmann Date: Sun, 11 Feb 2018 19:57:37 +0100 Subject: [PATCH] Allow Bintray and plugins.gradle.org to be published separately --- publishing.gradle | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/publishing.gradle b/publishing.gradle index bf322ff..c6d0659 100644 --- a/publishing.gradle +++ b/publishing.gradle @@ -1,4 +1,4 @@ -if (!gradle.startParameter.taskNames.contains('release')) { +if (!gradle.startParameter.taskNames.intersect(['release', 'releaseBintray'])) { println "Not a release build, setting version to ${project.version}-SNAPSHOT" project.version += '-SNAPSHOT' } @@ -10,6 +10,8 @@ tasks.create('release') { } } +tasks.create('releaseBintray') + project.plugins.withId('maven-publish') { @@ -80,7 +82,8 @@ project.plugins.withId('com.jfrog.bintray') { } } - tasks['release'].dependsOn tasks.bintrayUpload + tasks.releaseBintray.dependsOn tasks.bintrayUpload + tasks.release.dependsOn tasks.releaseBintray } @@ -99,5 +102,5 @@ project.plugins.withId('com.gradle.plugin-publish') { } } - tasks['release'].dependsOn tasks.publishPlugins + tasks.release.dependsOn tasks.publishPlugins }