Skip to content

Commit 2b755f9

Browse files
committed
Fixed a bug in base/changelog which required every project to have a bintrayUpload task, although we often don't upload the root project.
1 parent 1eb8bd6 commit 2b755f9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/main/resources/base/changelog.gradle

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ if (tasks.names.contains('changelogCheck')) {
1919
}
2020
// ensures that changelog bump and push only happens if the publish was successful
2121
tasks.named('changelogBump').configure {
22-
dependsOn tasks.named('bintrayUpload')
23-
// only the root project has bintrayPublish, and it finalizes all bintrayUpload tasks
24-
// https://github.com/bintray/gradle-bintray-plugin/blob/3fe02dfdae3e807afba57e0140a0d4c2424674e1/src/main/groovy/com/jfrog/bintray/gradle/ProjectsEvaluatedBuildListener.groovy#L37-L41
25-
dependsOn rootProject.tasks.named('bintrayPublish')
22+
if (tasks.names.contains('bintrayUpload')) {
23+
dependsOn tasks.named('bintrayUpload')
24+
// only the root project has bintrayPublish, and it finalizes all bintrayUpload tasks
25+
// https://github.com/bintray/gradle-bintray-plugin/blob/3fe02dfdae3e807afba57e0140a0d4c2424674e1/src/main/groovy/com/jfrog/bintray/gradle/ProjectsEvaluatedBuildListener.groovy#L37-L41
26+
dependsOn rootProject.tasks.named('bintrayPublish')
27+
}
2628
// if we have a gradle plugin, we need to push it up to the plugin portal too
2729
if (tasks.names.contains('publishPlugins')) {
2830
dependsOn tasks.named('publishPlugins')
@@ -42,8 +44,10 @@ if (tasks.names.contains('changelogCheck')) {
4244
}
4345
}
4446
parent.tasks.named('changelogBump').configure {
45-
dependsOn tasks.named('bintrayUpload')
46-
dependsOn rootProject.tasks.named('bintrayPublish')
47+
if (tasks.names.contains('bintrayUpload')) {
48+
dependsOn tasks.named('bintrayUpload')
49+
dependsOn rootProject.tasks.named('bintrayPublish')
50+
}
4751
if (tasks.names.contains('publishPlugins')) {
4852
dependsOn tasks.named('publishPlugins')
4953
}

0 commit comments

Comments
 (0)