Skip to content

Commit

Permalink
Fix task order when releasing to Nexus
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 14, 2024
1 parent 60b0e07 commit c0a08b6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,9 @@ class SonatypePlugin : Plugin<Project> {
}
}

if (tasks.findByName("publishToNexus") == null) {
tasks.register("publishToNexus")
}
val publishToNexus = tasks.findByName("publishToNexus") ?: tasks.create("publishToNexus")
tasks.named("closeRepository") {
mustRunAfter("publishToNexus")
mustRunAfter(publishToNexus)
}

addParentPublishToNexusTasks()
Expand Down

0 comments on commit c0a08b6

Please sign in to comment.