File tree 1 file changed +3
-5
lines changed
sonatype/src/main/kotlin/com/bakdata/gradle
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -220,15 +220,13 @@ class SonatypePlugin : Plugin<Project> {
220
220
from(tasks.findByName(" javadoc" ) ? : tasks.findByName(" dokka" ))
221
221
}
222
222
223
- val sourcesJar by tasks.creating(Jar ::class ) {
224
- archiveClassifier.set(" sources" )
225
- from(project.the<SourceSetContainer >()[" main" ].allSource)
223
+ configure<JavaPluginExtension > {
224
+ withSourcesJar()
226
225
}
227
226
228
227
configure<PublishingExtension > {
229
228
publications.create<MavenPublication >(" sonatype" ) {
230
229
from(components[" java" ])
231
- artifact(sourcesJar)
232
230
artifact(javadocJar)
233
231
}
234
232
}
@@ -238,7 +236,7 @@ class SonatypePlugin : Plugin<Project> {
238
236
}
239
237
240
238
tasks.withType<InitializeNexusStagingRepository > {
241
- shouldRunAfter (tasks.withType<Sign >())
239
+ mustRunAfter (tasks.withType<Sign >())
242
240
}
243
241
}
244
242
}
You can’t perform that action at this time.
0 commit comments