Build javadocs for plugin sdk

This commit is contained in:
MM20 2024-02-04 02:28:00 +01:00
parent ec5908f9de
commit 2de3ca552b
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
4 changed files with 30 additions and 4 deletions

View File

@ -5,6 +5,7 @@ plugins {
alias(libs.plugins.protobuf) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.dokka) apply false
}
apply(from = "docs/deps-graph.gradle")

View File

@ -44,6 +44,15 @@ android {
}
}
tasks.dokkaHtml {
outputDirectory.set(layout.buildDirectory.dir("dokka"))
}
val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
from(tasks.dokkaHtml)
}
publishing {
publications {
register<MavenPublication>("release") {
@ -51,8 +60,11 @@ publishing {
artifactId = "shared"
version = "1.0.0-SNAPSHOT"
artifact(javadocJar)
pom {
name = "Kvaesitso SDK"
name = "Kvaesitso shared library"
description = "Contains shared code between the launcher and its plugin SDK"
licenses {
license {
name = "The Apache License, Version 2.0"

View File

@ -144,4 +144,5 @@ android-library = { id = "com.android.library", version.ref = "android-gradle-pl
protobuf = { id = "com.google.protobuf", version.ref = "protobuf-gradle-plugin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp-gradle-plugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
dokka = { id = "org.jetbrains.dokka", version = "1.9.10" }

View File

@ -2,6 +2,7 @@ plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.plugin.serialization)
alias(libs.plugins.dokka)
`maven-publish`
}
@ -56,6 +57,15 @@ dependencies {
implementation(libs.bundles.kotlin)
}
tasks.dokkaHtml {
outputDirectory.set(layout.buildDirectory.dir("dokka"))
}
val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
from(tasks.dokkaHtml)
}
publishing {
publications {
register<MavenPublication>("release") {
@ -63,9 +73,11 @@ publishing {
artifactId = "plugin-sdk"
version = "1.0.0-SNAPSHOT"
artifact(javadocJar)
pom {
name = "Kvaesitso shared library"
description = "Contains shared code between the launcher and its plugin SDK"
name = "Kvaesitso SDK"
description = "Plugin SDK for the Kvaesitso launcher"
licenses {
license {
name = "The Apache License, Version 2.0"