Skip to content

Commit 29a83d7

Browse files
authored
Enable Dokka to generate HTML docs (#194)
* Enable Dokka to generate HTML docs * Added KDoc badge
1 parent ad1bea6 commit 29a83d7

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

Module.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Module binary-compatibility-validator
2+
3+
Binary compatibility validator allows dumping Kotlin library ABI (both for JVM libraries and KLibs)
4+
that is public in the sense of Kotlin visibilities and ensures that the public ABI
5+
wasn't changed in a way that makes this change binary incompatible.
6+
7+
# Package kotlinx.validation
8+
9+
Provides common declarations, Gradle plugin tasks and extensions.
10+
11+
# Package kotlinx.validation.api
12+
13+
Provides an API for dumping Kotlin Java libraries public ABI.
14+
15+
# Package kotlinx.validation.api.klib
16+
17+
Provides an API for dumping Kotlin libraries (KLibs) public ABI and managing resulting dumps.
18+
19+
**This package is experimental, both API and behaviour may change in the future. There are also no guarantees on preserving the behavior of the API until its
20+
stabilization.**

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![JetBrains official project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
33
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/binary-compatibility-validator)](https://central.sonatype.com/search?q=org.jetbrains.kotlinx.binary-compatibility-validator)
44
[![License](https://img.shields.io/github/license/Kotlin/binary-compatibility-validator)](LICENSE.TXT)
5+
[![KDoc link](https://img.shields.io/badge/API_reference-KDoc-blue)](https://kotlin.github.io/binary-compatibility-validator/)
56

67
# Binary compatibility validator
78

build.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import kotlinx.validation.build.mavenCentralMetadata
33
import kotlinx.validation.build.mavenRepositoryPublishing
44
import kotlinx.validation.build.signPublicationIfKeyPresent
55
import org.gradle.api.attributes.TestSuiteType.FUNCTIONAL_TEST
6+
import org.jetbrains.dokka.gradle.DokkaTask
7+
import org.jetbrains.dokka.gradle.DokkaTaskPartial
68
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
79
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
10+
import java.net.URL
811

912
plugins {
1013
kotlin("jvm")
@@ -16,6 +19,7 @@ plugins {
1619
`jvm-test-suite`
1720
id("org.jetbrains.kotlinx.binary-compatibility-validator")
1821
alias(libs.plugins.kover)
22+
alias(libs.plugins.dokka)
1923
}
2024

2125
group = "org.jetbrains.kotlinx"
@@ -223,3 +227,17 @@ kover {
223227
disable()
224228
}
225229
}
230+
231+
232+
tasks.withType<DokkaTask>().configureEach {
233+
dokkaSourceSets.configureEach {
234+
includes.from("Module.md")
235+
236+
sourceLink {
237+
localDirectory.set(rootDir)
238+
remoteUrl.set(URL("https://github.com/Kotlin/binary-compatibility-validator/tree/master"))
239+
remoteLineSuffix.set("#L")
240+
}
241+
samples.from("src/test/kotlin/samples/KlibDumpSamples.kt")
242+
}
243+
}

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ junit = "5.9.2"
77
kotest = "5.5.5"
88
kotlinx-bcv = "0.13.1"
99
ow2Asm = "9.6"
10+
dokka = "1.9.20"
1011

1112
gradlePluginPublishPlugin = "1.1.0"
1213
androidGradlePlugin = "7.2.2"
@@ -44,3 +45,4 @@ gradlePlugin-android = { module = "com.android.tools.build:gradle", version.ref
4445
[plugins]
4546

4647
kover = { id = "org.jetbrains.kotlinx.kover", version = "0.7.5" }
48+
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }

0 commit comments

Comments
 (0)