From 33c9bb6d02dacde75409484896a866283fbbd85b Mon Sep 17 00:00:00 2001 From: Lachlan McKee Date: Fri, 1 Sep 2023 17:51:03 +0100 Subject: [PATCH] Temporarily disabled multiplatform javadoc jar --- .../kotlin/MultiplatformAppyxPublishPlugin.kt | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/plugins/publish-plugin/src/main/kotlin/MultiplatformAppyxPublishPlugin.kt b/plugins/publish-plugin/src/main/kotlin/MultiplatformAppyxPublishPlugin.kt index 0a80208a25..7c50bd0993 100644 --- a/plugins/publish-plugin/src/main/kotlin/MultiplatformAppyxPublishPlugin.kt +++ b/plugins/publish-plugin/src/main/kotlin/MultiplatformAppyxPublishPlugin.kt @@ -3,21 +3,33 @@ import org.gradle.api.Project import org.gradle.api.publish.PublicationContainer import org.gradle.api.publish.PublishingExtension import org.gradle.api.publish.maven.MavenPublication -import org.gradle.api.tasks.bundling.Jar -import org.gradle.kotlin.dsl.getValue -import org.gradle.kotlin.dsl.provideDelegate -import org.gradle.kotlin.dsl.registering internal class MultiplatformAppyxPublishPlugin : ProjectPlugin() { override fun PublicationContainer.createPublications(project: Project) = Unit override fun PublishingExtension.configurePublications(project: Project) { - val javadocJar by project.tasks.registering(Jar::class) { - archiveClassifier.set("javadoc") - } + /** + * The 'javadocJar' configuration is currently not working with Gradle 8.1.1 + * + * "Reason: Task ':appyx-interactions:appyx-interactions:publishAndroidReleasePublicationToMavenLocal' + * uses this output of task ':appyx-interactions:appyx-interactions:signDesktopPublication' + * without declaring an explicit or implicit dependency. + * This can lead to incorrect results being produced, depending on what order the tasks are executed" + * + * This is caused by the Javadoc JAR being produced by the first multiplatform target, + * then used by the next one without adding a 'dependsOn'. + * + * I don't believe add 'dependsOn' is the answer, there should be a mechanism to + * produce a javadoc JAR per target. + * + * Googling it hasn't yielded an obvious fix for this just yet. + */ +// val javadocJar by project.tasks.registering(Jar::class) { +// archiveClassifier.set("javadoc") +// } publications.withType(MavenPublication::class.java).configureEach { - artifact(javadocJar.get()) +// artifact(javadocJar.get()) configurePublication(project) } }