Skip to content

Commit

Permalink
Fix bug in changelog publish setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Jan 26, 2023
1 parent 5c3411d commit f71b286
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions gradle/java-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,12 @@ if (!version.endsWith('-SNAPSHOT')) {
}
// ensures that changelog bump and push only happens if the publish was successful
def thisProj = project
afterEvaluate {
changelogTasks.named('changelogBump').configure {
dependsOn thisProj.tasks.named('publishPluginMavenPublicationToSonatypeRepository')
dependsOn rootProject.tasks.named('closeAndReleaseSonatypeStagingRepository')
// if we have a gradle plugin, we need to push it up to the plugin portal too
if (thisProj.tasks.names.contains('publishPlugins')) {
dependsOn thisProj.tasks.named('publishPlugins')
}
changelogTasks.named('changelogBump').configure {
dependsOn ":${thisProj.path}:publishPluginMavenPublicationToSonatypeRepository"
dependsOn ":closeAndReleaseSonatypeStagingRepository"
// if we have a gradle plugin, we need to push it up to the plugin portal too
if (thisProj.tasks.names.contains('publishPlugins')) {
dependsOn thisProj.tasks.named('publishPlugins')
}
}
}
Expand Down

0 comments on commit f71b286

Please sign in to comment.