Skip to content

Commit

Permalink
Enable Dokka to generate HTML docs (#194)
Browse files Browse the repository at this point in the history
* Enable Dokka to generate HTML docs
* Added KDoc badge
  • Loading branch information
fzhinkin committed Mar 20, 2024
1 parent ad1bea6 commit 29a83d7
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Module binary-compatibility-validator

Binary compatibility validator allows dumping Kotlin library ABI (both for JVM libraries and KLibs)
that is public in the sense of Kotlin visibilities and ensures that the public ABI
wasn't changed in a way that makes this change binary incompatible.

# Package kotlinx.validation

Provides common declarations, Gradle plugin tasks and extensions.

# Package kotlinx.validation.api

Provides an API for dumping Kotlin Java libraries public ABI.

# Package kotlinx.validation.api.klib

Provides an API for dumping Kotlin libraries (KLibs) public ABI and managing resulting dumps.

**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
stabilization.**
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![JetBrains official project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[![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)
[![License](https://img.shields.io/github/license/Kotlin/binary-compatibility-validator)](LICENSE.TXT)
[![KDoc link](https://img.shields.io/badge/API_reference-KDoc-blue)](https://kotlin.github.io/binary-compatibility-validator/)

# Binary compatibility validator

Expand Down
18 changes: 18 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import kotlinx.validation.build.mavenCentralMetadata
import kotlinx.validation.build.mavenRepositoryPublishing
import kotlinx.validation.build.signPublicationIfKeyPresent
import org.gradle.api.attributes.TestSuiteType.FUNCTIONAL_TEST
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import java.net.URL

plugins {
kotlin("jvm")
Expand All @@ -16,6 +19,7 @@ plugins {
`jvm-test-suite`
id("org.jetbrains.kotlinx.binary-compatibility-validator")
alias(libs.plugins.kover)
alias(libs.plugins.dokka)
}

group = "org.jetbrains.kotlinx"
Expand Down Expand Up @@ -223,3 +227,17 @@ kover {
disable()
}
}


tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
includes.from("Module.md")

sourceLink {
localDirectory.set(rootDir)
remoteUrl.set(URL("https://github.com/Kotlin/binary-compatibility-validator/tree/master"))
remoteLineSuffix.set("#L")
}
samples.from("src/test/kotlin/samples/KlibDumpSamples.kt")
}
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ junit = "5.9.2"
kotest = "5.5.5"
kotlinx-bcv = "0.13.1"
ow2Asm = "9.6"
dokka = "1.9.20"

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

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

0 comments on commit 29a83d7

Please sign in to comment.