Skip to content

Commit

Permalink
Fix Dokka jar generation for release (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 authored Nov 19, 2024
1 parent 6ad89b3 commit 1c7df31
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ class PillarboxAndroidLibraryPublishingPlugin : Plugin<Project> {
pluginManager.apply("com.android.library")
pluginManager.apply("org.gradle.maven-publish")
pluginManager.apply("org.jetbrains.dokka")
pluginManager.apply("org.jetbrains.dokka-javadoc")

val dokkaHtmlJar = tasks.register<Jar>("dokkaHtmlJar") {
val dokkaHtmlTask = tasks.named("dokkaHtml")
val dokkaHtmlTask = tasks.named("dokkaGeneratePublicationHtml")

dependsOn(dokkaHtmlTask)
from(dokkaHtmlTask.map { it.outputs })
archiveClassifier.set("html-docs")
}

val dokkaJavadocJar = tasks.register<Jar>("dokkaJavadocJar") {
val dokkaJavadocTask = tasks.named("dokkaJavadoc")
val dokkaJavadocTask = tasks.named("dokkaGeneratePublicationJavadoc")

dependsOn(dokkaJavadocTask)
from(dokkaJavadocTask.map { it.outputs })
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ plugins {
alias(libs.plugins.detekt)
alias(libs.plugins.dependency.analysis.gradle.plugin)
alias(libs.plugins.dokka)
alias(libs.plugins.dokka.javadoc)
alias(libs.plugins.kotlinx.kover)
alias(libs.plugins.pillarbox.detekt)
}
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ android.useAndroidX=true
kotlin.code.style=official

org.gradle.caching=true
org.gradle.configuration-cache=true
# Disable configuration cache until Dokka supports it: https://github.com/Kotlin/dokka/issues/1217
org.gradle.configuration-cache=false

# Print dependency analysis report to the console
dependency.analysis.print.build.health=true
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ android-library = { id = "com.android.library", version.ref = "android-gradle-pl
dependency-analysis-gradle-plugin = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependency-analysis-gradle-plugin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
dokka-javadoc = { id = "org.jetbrains.dokka-javadoc", version.ref = "dokka" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
Expand Down

0 comments on commit 1c7df31

Please sign in to comment.