@@ -51,9 +51,9 @@ signing {
51
51
setRequired({
52
52
signingKeysPresent
53
53
||
54
- gradle.taskGraph.allTasks.filterIsInstance< PublishToMavenRepository >().any {
55
- it.repository.name == " SonatypeRelease "
56
- }
54
+ gradle.taskGraph.allTasks
55
+ .filterIsInstance< PublishToMavenRepository >()
56
+ .any { it.repository.name == " SonatypeRelease " }
57
57
})
58
58
}
59
59
@@ -64,6 +64,7 @@ afterEvaluate {
64
64
}
65
65
// endregion
66
66
67
+
67
68
// region Javadoc JAR stub
68
69
// use creating, not registering, because the signing plugin doesn't accept task providers
69
70
val javadocJarStub by tasks.creating(Jar ::class ) {
@@ -120,7 +121,7 @@ publishing {
120
121
121
122
plugins.withType<KotlinMultiplatformPlugin >().configureEach {
122
123
publishing.publications.withType<MavenPublication >().configureEach {
123
- // artifact(javadocJarStub)
124
+ // artifact(javadocJarStub)
124
125
}
125
126
}
126
127
@@ -141,7 +142,7 @@ plugins.withType<JavaPlatformPlugin>().configureEach {
141
142
// val javadocJarStub = javadocStubTask()
142
143
publishing.publications.create<MavenPublication >(" mavenJavaPlatform" ) {
143
144
from(components[" javaPlatform" ])
144
- // artifact(javadocJarStub)
145
+ // artifact(javadocJarStub)
145
146
}
146
147
}
147
148
@@ -158,7 +159,8 @@ tasks.withType<AbstractPublishToMaven>().configureEach {
158
159
// region publishing logging
159
160
tasks.withType<AbstractPublishToMaven >().configureEach {
160
161
val publicationGAV = provider { publication?.run { " $group :$artifactId :$version " } }
161
- doLast(" log publication GAV" ) {
162
+ inputs.property(" publicationGAV" , publicationGAV).optional(true )
163
+ doFirst(" log publication GAV" ) {
162
164
if (publicationGAV.isPresent) {
163
165
logger.lifecycle(" [task: ${path} ] ${publicationGAV.get()} " )
164
166
}
0 commit comments