diff --git a/build.gradle.kts b/build.gradle.kts index 843e941..59c9f9e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,15 +2,24 @@ plugins { id("com.android.application") version "8.2.2" apply false id("org.jetbrains.kotlin.android") version "1.9.0" apply false - // id("com.android.library") version "8.2.2" apply false - id("org.jetbrains.kotlin.plugin.serialization") version "1.8.10" apply false + id("org.jetbrains.dokka") version "1.9.20" kotlin("jvm") version "1.9.0" - // id("org.jetbrains.kotlin.jvm") version "1.9.23" apply false } dependencies { + // Is applied universally + dokkaPlugin("org.jetbrains.dokka:mathjax-plugin:1.9.20") + // Is applied for the single-module dokkaHtml task only + dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.20") + implementation("androidx.compose.runtime:runtime:1.6.3") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3") } +buildscript { + dependencies { + classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10") + } +} diff --git a/playback-sdk-android/build.gradle.kts b/playback-sdk-android/build.gradle.kts index d57fbaa..64ea5d8 100644 --- a/playback-sdk-android/build.gradle.kts +++ b/playback-sdk-android/build.gradle.kts @@ -1,7 +1,15 @@ +import org.jetbrains.dokka.gradle.DokkaTask +import java.net.URL + plugins { id("com.android.library") id("org.jetbrains.kotlin.android") kotlin("plugin.serialization") + id("org.jetbrains.dokka") version "1.9.20" apply true +} + +subprojects { + apply(plugin = "org.jetbrains.dokka") } android { @@ -44,6 +52,30 @@ android { jvmTarget = "1.8" } } +tasks.dokkaGfm { + outputDirectory.set(layout.projectDirectory.dir("docs/")) +} +tasks.dokkaHtmlPartial { + outputDirectory.set(layout.projectDirectory.dir("docs/")) +} + +tasks.withType().configureEach { + moduleName.set(project.name) + moduleVersion.set(project.version.toString()) + outputDirectory.set(layout.buildDirectory.dir("dokka/$name")) + failOnWarning.set(false) + suppressObviousFunctions.set(true) + suppressInheritedMembers.set(false) + offlineMode.set(false) + dokkaSourceSets.configureEach { + externalDocumentationLink { + url.set(URL("https://www.streamamg.com/")) + packageListUrl.set( + rootProject.projectDir.resolve("serialization.package.list").toURL() + ) + } + } +} dependencies { implementation("androidx.compose.runtime:runtime:1.6.2")