Skip to content

Commit

Permalink
feat: added DOKKA plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
francodriansetti committed Mar 20, 2024
1 parent 8e2693e commit 2712da2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
15 changes: 12 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
32 changes: 32 additions & 0 deletions playback-sdk-android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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<DokkaTask>().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")
Expand Down

0 comments on commit 2712da2

Please sign in to comment.