Skip to content

Commit f71b286

Browse files
committed
Fix bug in changelog publish setup.
1 parent 5c3411d commit f71b286

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

gradle/java-publish.gradle

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,12 @@ if (!version.endsWith('-SNAPSHOT')) {
186186
}
187187
// ensures that changelog bump and push only happens if the publish was successful
188188
def thisProj = project
189-
afterEvaluate {
190-
changelogTasks.named('changelogBump').configure {
191-
dependsOn thisProj.tasks.named('publishPluginMavenPublicationToSonatypeRepository')
192-
dependsOn rootProject.tasks.named('closeAndReleaseSonatypeStagingRepository')
193-
// if we have a gradle plugin, we need to push it up to the plugin portal too
194-
if (thisProj.tasks.names.contains('publishPlugins')) {
195-
dependsOn thisProj.tasks.named('publishPlugins')
196-
}
189+
changelogTasks.named('changelogBump').configure {
190+
dependsOn ":${thisProj.path}:publishPluginMavenPublicationToSonatypeRepository"
191+
dependsOn ":closeAndReleaseSonatypeStagingRepository"
192+
// if we have a gradle plugin, we need to push it up to the plugin portal too
193+
if (thisProj.tasks.names.contains('publishPlugins')) {
194+
dependsOn thisProj.tasks.named('publishPlugins')
197195
}
198196
}
199197
}

0 commit comments

Comments
 (0)