@@ -51,9 +51,9 @@ signing {
5151 setRequired({
5252 signingKeysPresent
5353 ||
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 " }
5757 })
5858}
5959
@@ -64,6 +64,7 @@ afterEvaluate {
6464}
6565// endregion
6666
67+
6768// region Javadoc JAR stub
6869// use creating, not registering, because the signing plugin doesn't accept task providers
6970val javadocJarStub by tasks.creating(Jar ::class ) {
@@ -120,7 +121,7 @@ publishing {
120121
121122plugins.withType<KotlinMultiplatformPlugin >().configureEach {
122123 publishing.publications.withType<MavenPublication >().configureEach {
123- // artifact(javadocJarStub)
124+ // artifact(javadocJarStub)
124125 }
125126}
126127
@@ -141,7 +142,7 @@ plugins.withType<JavaPlatformPlugin>().configureEach {
141142// val javadocJarStub = javadocStubTask()
142143 publishing.publications.create<MavenPublication >(" mavenJavaPlatform" ) {
143144 from(components[" javaPlatform" ])
144- // artifact(javadocJarStub)
145+ // artifact(javadocJarStub)
145146 }
146147}
147148
@@ -158,7 +159,8 @@ tasks.withType<AbstractPublishToMaven>().configureEach {
158159// region publishing logging
159160tasks.withType<AbstractPublishToMaven >().configureEach {
160161 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" ) {
162164 if (publicationGAV.isPresent) {
163165 logger.lifecycle(" [task: ${path} ] ${publicationGAV.get()} " )
164166 }
0 commit comments