File tree 1 file changed +5
-6
lines changed
sonatype/src/main/kotlin/com/bakdata/gradle
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,10 @@ class SonatypePlugin : Plugin<Project> {
80
80
addParentPublishToNexusTasks()
81
81
82
82
disallowPublishTasks()
83
+
84
+ tasks.named(" closeRepository" ) {
85
+ mustRunAfter(" publishToNexus" )
86
+ }
83
87
}
84
88
}
85
89
@@ -91,12 +95,7 @@ class SonatypePlugin : Plugin<Project> {
91
95
val parent = project.parent
92
96
if (parent != null ) {
93
97
tasks.matching { it.name == " publishToNexus" }.configureEach {
94
- val parentProvider =
95
- try {
96
- parent.tasks.named(" publishToNexus" )
97
- } catch (e: UnknownTaskException ) {
98
- parent.tasks.register(" publishToNexus" )
99
- }
98
+ val parentProvider = parent.tasks.named(" publishToNexus" )
100
99
this .let { childTask ->
101
100
parentProvider.configure {
102
101
dependsOn(childTask)
You can’t perform that action at this time.
0 commit comments