Add javaDoc to release library

This commit is contained in:
Adrian Kuta 2022-12-16 22:22:29 +01:00
parent c306088ea3
commit e34a85ac39

View File

@ -1,8 +1,8 @@
import org.jetbrains.kotlin.cli.common.toBooleanLenient
import org.jetbrains.kotlin.konan.properties.Properties import org.jetbrains.kotlin.konan.properties.Properties
plugins { plugins {
kotlin("multiplatform") version "1.7.20" kotlin("multiplatform") version "1.7.20"
id("org.jetbrains.dokka") version "1.7.20"
id("maven-publish") id("maven-publish")
signing signing
} }
@ -34,10 +34,19 @@ val snapshot: String? by project
group = PUBLISH_GROUP_ID group = PUBLISH_GROUP_ID
version = if (snapshot.toBoolean()) "$PUBLISH_VERSION-SNAPSHOT" else PUBLISH_VERSION version = if (snapshot.toBoolean()) "$PUBLISH_VERSION-SNAPSHOT" else PUBLISH_VERSION
val dokkaHtml by tasks.getting(org.jetbrains.dokka.gradle.DokkaTask::class)
val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
dependsOn(dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaHtml.outputDirectory)
}
publishing { publishing {
publications { publications {
withType<MavenPublication> { withType<MavenPublication> {
artifact(javadocJar)
pom { pom {
name.set("Tree Data Structure") name.set("Tree Data Structure")
description.set("Simple implementation to store object in tree structure.") description.set("Simple implementation to store object in tree structure.")