Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Dokka 2.0.0. #2552

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assemble_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -e
rm -rf docs/api

# Build the docs.
./gradlew clean dokkaHtmlMultiModule
./gradlew clean dokkaGenerate
34 changes: 0 additions & 34 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import com.diffplug.gradle.spotless.SpotlessExtensionPredeclare
import dev.drewhamilton.poko.gradle.PokoPluginExtension
import kotlinx.validation.ApiValidationExtension
import kotlinx.validation.ExperimentalBCVApi
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeFeatureFlag
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
Expand Down Expand Up @@ -36,7 +34,6 @@ buildscript {
plugins {
alias(libs.plugins.baselineProfile) apply false
alias(libs.plugins.binaryCompatibility)
alias(libs.plugins.dokka)
alias(libs.plugins.poko) apply false
alias(libs.plugins.spotless)
}
Expand All @@ -52,10 +49,6 @@ extensions.configure<ApiValidationExtension> {
}
}

tasks.withType<DokkaMultiModuleTask>().configureEach {
outputDirectory = layout.projectDirectory.dir("docs/api")
}

allprojects {
repositories {
google()
Expand All @@ -76,33 +69,6 @@ allprojects {
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
}

tasks.withType<DokkaTaskPartial>().configureEach {
dokkaSourceSets.configureEach {
jdkVersion = 8
failOnWarning = true
skipDeprecated = true
suppressInheritedMembers = true

externalDocumentationLink(
url = "https://developer.android.com/reference/",
)
externalDocumentationLink(
url = "https://kotlinlang.org/api/kotlinx.coroutines/",
)
externalDocumentationLink(
url = "https://square.github.io/okio/3.x/okio/",
packageListUrl = "https://square.github.io/okio/3.x/okio/okio/package-list",
)
externalDocumentationLink(
url = "https://jetbrains.github.io/skiko/",
packageListUrl = "https://jetbrains.github.io/skiko/skiko/package-list",
)
externalDocumentationLink(
url = "https://api.ktor.io/",
)
}
}

dependencies {
modules {
module("org.jetbrains.kotlin:kotlin-stdlib-jdk7") {
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ plugins {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}

dependencies {
implementation(libs.gradlePlugin.android)
implementation(libs.gradlePlugin.dokka)
implementation(libs.gradlePlugin.jetbrainsCompose)
implementation(libs.gradlePlugin.composeCompiler)
implementation(libs.gradlePlugin.kotlin)
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/coil3/projects.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ fun Project.androidLibrary(
sourceSets["main"].resources {
srcDirs("src/commonMain/resources", "src/jvmCommonMain/resources")
}
if (project.name in publicModules) {
if (false && project.name in publicModules) {
colinrtwhite marked this conversation as resolved.
Show resolved Hide resolved
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "com.vanniktech.maven.publish.base")
setupPublishing {
val platform = if (project.plugins.hasPlugin("org.jetbrains.kotlin.multiplatform")) {
KotlinMultiplatform(Dokka("dokkaHtml"))
KotlinMultiplatform(Dokka("dokkaGenerate"))
} else {
AndroidSingleVariantLibrary()
}
Expand Down
1 change: 1 addition & 0 deletions coil-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
id("org.jetbrains.kotlinx.atomicfu")
id("dev.drewhamilton.poko")
id("androidx.baselineprofile")
id("org.jetbrains.dokka")
}

addAllMultiplatformTargets(libs.versions.skiko)
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx8g -Xms2g -XX:MaxMetaspaceSize=2g -XX:+UseParallelGC -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx16g -Xms2g -XX:MaxMetaspaceSize=2g -XX:+UseParallelGC -Dfile.encoding=UTF-8

# Android
android.experimental.enableScreenshotTest=true
Expand All @@ -20,6 +20,8 @@ org.jetbrains.compose.experimental.jscanvas.enabled=true
org.jetbrains.compose.experimental.macos.enabled=true
org.jetbrains.compose.experimental.uikit.enabled=true
org.jetbrains.compose.experimental.wasm.enabled=true
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

# Config
minSdk=21
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ skiko = "0.8.4"
[plugins]
baselineProfile = { id = "androidx.baselineprofile", version.ref = "androidx-benchmark" }
binaryCompatibility = "org.jetbrains.kotlinx.binary-compatibility-validator:0.16.3"
dokka = "org.jetbrains.dokka:1.9.20"
poko = "dev.drewhamilton.poko:0.17.1"
screenshot = "com.android.compose.screenshot:0.0.1-alpha07"
spotless = "com.diffplug.spotless:6.25.0"

[libraries]
gradlePlugin-android = "com.android.tools.build:gradle:8.7.1"
gradlePlugin-atomicFu = "org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.25.0"
gradlePlugin-jetbrainsCompose = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "jetbrains-compose" }
gradlePlugin-composeCompiler = { module = "org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin", version.ref = "kotlin" }
gradlePlugin-dokka = "org.jetbrains.dokka:dokka-gradle-plugin:2.0.0-Beta"
gradlePlugin-jetbrainsCompose = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "jetbrains-compose" }
gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.30.0"
gradlePlugin-paparazzi = { module = "app.cash.paparazzi:paparazzi-gradle-plugin", version.ref = "paparazzi" }
Expand Down