Skip to content

Commit

Permalink
Add dokkaHtml jar file to publications (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefMa committed Nov 22, 2023
1 parent d7aa1b5 commit 59af988
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.kotlinDokka)
`maven-publish`
}

Expand Down Expand Up @@ -51,11 +52,18 @@ kotlin {
}
}

val dokkaJar = tasks.register<Jar>("dokkaJar") {
dependsOn(tasks.dokkaHtml)
from(tasks.dokkaHtml.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}

group = "com.ioki"
version = "0.0.2-SNAPSHOT"
publishing {
publications {
publications.withType<MavenPublication> {
artifact(dokkaJar)
artifactId = artifactId.replace("kmp-", "")
pom {
url.set("https://github.com/ioki-mobility/kmp-lokalise-api")
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ mingw-ktor-client = { module = "io.ktor:ktor-client-winhttp", version.ref = "kto

[plugins]
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlinDokka = "org.jetbrains.dokka:1.9.10"

0 comments on commit 59af988

Please sign in to comment.