Skip to content

Commit

Permalink
Generate javadoc artifacts with Dokka plugin to fix SonaType publication
Browse files Browse the repository at this point in the history
  • Loading branch information
saschpe committed Mar 23, 2024
1 parent aca6977 commit da55285
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Provide javadoc artifacts for Sonatype Maven Central

## [1.2.4] - 2024-03-23
### Changed
Expand Down
8 changes: 8 additions & 0 deletions log4k-slf4j/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
kotlin("multiplatform")
id("com.android.library")
id("org.jetbrains.dokka")
`maven-publish`
signing
}
Expand Down Expand Up @@ -43,6 +44,13 @@ version = "1.2.4"

publishing {
publications.withType<MavenPublication> {
artifact(project.tasks.register("${name}DokkaJar", Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin docs with Dokka into a Javadoc jar"
archiveClassifier.set("javadoc")
from(tasks.named("dokkaHtml"))
archiveBaseName.set("${archiveBaseName.get()}-$name")
})
pom {
name.set("Log4K-SLF4J")
description.set("Lightweight logging library for Kotlin/Multiplatform - SLF4J integration. Supports Android, iOS, JavaScript and plain JVM environments.")
Expand Down
8 changes: 8 additions & 0 deletions log4k/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
kotlin("multiplatform")
id("com.android.library")
id("org.jetbrains.dokka")
`maven-publish`
signing
}
Expand Down Expand Up @@ -54,6 +55,13 @@ version = "1.2.4"

publishing {
publications.withType<MavenPublication> {
artifact(project.tasks.register("${name}DokkaJar", Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin docs with Dokka into a Javadoc jar"
archiveClassifier.set("javadoc")
from(tasks.named("dokkaHtml"))
archiveBaseName.set("${archiveBaseName.get()}-$name")
})
pom {
name.set("Log4K")
description.set("Lightweight logging library for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments.")
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pluginManagement {
plugins {
kotlin("multiplatform") version "1.9.23"
id("com.android.library") version "8.2.2"
id("org.jetbrains.dokka") version "1.9.20"
}
}

Expand Down

0 comments on commit da55285

Please sign in to comment.