Skip to content

Commit

Permalink
Temporarily disabled multiplatform javadoc jar
Browse files Browse the repository at this point in the history
  • Loading branch information
LachlanMcKee committed Sep 1, 2023
1 parent 4b9f02d commit 33c9bb6
Showing 1 changed file with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 33c9bb6

Please sign in to comment.