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

chore(deps): update dependency org.jetbrains.dokka to v2 #301

Merged
merged 6 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
28 changes: 15 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import java.net.URI

Expand All @@ -11,7 +10,6 @@ buildscript {
}
}

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
kotlin("jvm") version libs.versions.kotlin.get()
id("kris-collect-sarif")
Expand Down Expand Up @@ -56,6 +54,21 @@ nexusPublishing {

val kotlinSrcSet = "/src/main/kotlin"

dokka {
dokkaSourceSets.main {
sourceLink {
localDirectory.set(file("$projectDir/$kotlinSrcSet"))
remoteUrl.set(URI.create(projectRelativeSourceLink()).toURL().toURI())
remoteLineSuffix.set("#L")
}
}
}

dependencies {
dokka(project(":kris-core:"))
dokka(project(":kris-io"))
}

tasks {
val deleteOutFolderTask by registering(Delete::class) {
delete("out")
Expand All @@ -64,17 +77,6 @@ tasks {
delete(rootProject.layout.buildDirectory.get())
dependsOn(deleteOutFolderTask)
}
val dokkaHtml by getting(DokkaTask::class) {
dokkaSourceSets {
configureEach {
sourceLink {
localDirectory.set(file("$projectDir/$kotlinSrcSet"))
remoteUrl.set(URI.create(projectRelativeSourceLink()).toURL())
remoteLineSuffix.set("#L")
}
}
}
}
}

subprojects.forEach { subProject ->
Expand Down
3 changes: 1 addition & 2 deletions docs/guide/guide.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ tasks {
from(project.tasks.asciidoctor.get().outputDir)
destinationDir = builtGuideDir
dependsOn(asciidoctor)
dependsOn(rootProject.tasks.named("dokkaHtmlMultiModule"))
dependsOn(rootProject.tasks.named("dokkaJavadocCollector"))
dependsOn(rootProject.tasks.named("dokkaGenerate"))
}
withType<GitPublishCommit> {
dependsOn(createGuide)
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ org.gradle.configuration-cache.parallel=true
org.gradle.kotlin.dsl.allWarningsAsErrors=true

systemProp.sonar.gradle.skipCompile=true

org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ assertj = "3.27.2"
binaryCompaValidator = "0.17.0"
coroutines = "1.10.1"
detekt = "1.23.7"
dokka = "1.9.20"
dokka = "2.0.0"
gitPublish = "5.1.0"
jacoco = "0.8.8"
java = "17"
Expand Down
12 changes: 10 additions & 2 deletions subprojects/kris-core/kris-core.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id("kris-detekt")
id("kris-collect-sarif")
Expand All @@ -22,12 +21,21 @@ kotlin {
explicitApi()
}


dokka {
dokkaSourceSets {
named("main") {
includes.from("module.md")
}
}
}

tasks {
val javadocJar by existing(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembled Javadoc JAR"
archiveClassifier.set("javadoc")
from(named("dokkaHtml"))
from(named("dokkaGenerate"))
}
named("sourcesJar") {
dependsOn(javadocJar)
Expand Down
12 changes: 10 additions & 2 deletions subprojects/kris-io/kris-io.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@file:Suppress("UnstableApiUsage")

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id("kris-detekt")
id("kris-collect-sarif")
Expand All @@ -15,11 +14,20 @@ kotlin {
explicitApi()
}

dokka {
dokkaSourceSets {
named("main") {
includes.from("module.md")
}
}
}

testing {
suites {
val test by getting(JvmTestSuite::class) {
useJUnitJupiter()
}
@Suppress("unused")
val integrationTest by registering(JvmTestSuite::class) {
testType.set(TestSuiteType.INTEGRATION_TEST)
dependencies {
Expand Down Expand Up @@ -48,7 +56,7 @@ tasks {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembled Javadoc JAR"
archiveClassifier.set("javadoc")
from(named("dokkaHtml"))
from(named("dokkaGenerate"))
}
named("sourcesJar") {
dependsOn(javadocJar)
Expand Down
Loading