Skip to content

Commit

Permalink
Migrate to dokka v2
Browse files Browse the repository at this point in the history
  • Loading branch information
kunyavskiy committed Oct 5, 2024
1 parent 6132517 commit 5067970
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 43 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tasks {
register<Task>("doc") {
dependsOn(project(":cds").tasks.named("dokkaHtmlMultiModule"))
dependsOn(project(":cds:full").tasks.named("dokkaGenerate"))
}
register<Task>("gen") {
dependsOn(project("schema-generator").tasks.named("gen"))
Expand Down
22 changes: 10 additions & 12 deletions buildSrc/src/main/kotlin/live.library-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,16 @@ publishing {
}
}

tasks {
withType<DokkaTaskPartial>().configureEach {
dokkaSourceSets.configureEach {
perPackageOption {
matchingRegex.set(".*")
reportUndocumented.set(true)
sourceLink {
val projectDir = "https://github.com/icpc/live-v3/tree/main/"
localDirectory.set(rootProject.projectDir)
remoteUrl.set(URI(projectDir).toURL())
remoteLineSuffix.set("#L")
}
dokka {
dokkaSourceSets.configureEach {
perPackageOption {
matchingRegex.set(".*")
reportUndocumented.set(true)
sourceLink {
val projectDir = "https://github.com/icpc/live-v3/tree/main/"
localDirectory.set(rootProject.projectDir)
remoteUrl.set(URI(projectDir))
remoteLineSuffix.set("#L")
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=-Xmx1500m,Xms500m

live.dev.embedFrontend=true
live.dev.embedSchema=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 @@ -18,7 +18,7 @@ protobuf-plugin = "0.9.4" # https://github.com/google/protobuf-gradle-p
protobuf = "4.27.1" # https://mvnrepository.com/artifact/com.google.protobuf/protobuf-kotlin
grpc = "1.65.0" # https://github.com/grpc/grpc
grpc-kotlin = "1.4.1" # https://github.com/grpc/grpc-kotlin
dokka = "1.9.20" # https://github.com/Kotlin/dokka
dokka = "2.0.0-Beta" # https://github.com/Kotlin/dokka
retrofit = "2.11.0" # https://mvnrepository.com/artifact/com.squareup.retrofit2/retrofit
kxs-ts-gen = "0.2.4" # https://github.com/adamko-dev/kotlinx-serialization-typescript-generator
apache-commons-csv = "1.11.0" # https://commons.apache.org/proper/commons-csv/
Expand Down
10 changes: 0 additions & 10 deletions src/cds/build.gradle.kts

This file was deleted.

50 changes: 31 additions & 19 deletions src/cds/full/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.gradle.api.internal.catalog.DelegatingProjectDependency

plugins {
id("live.library-conventions")
}
Expand All @@ -6,24 +8,34 @@ apiValidation {
validationDisabled = true
}

dokka {
dokkaPublicationDirectory.set(rootProject.layout.projectDirectory.dir("_site").dir("cds"))
moduleName.set("ICPC-live contest data parser")
}

dependencies {
api(projects.cds.plugins.allcups)
api(projects.cds.plugins.atcoder)
api(projects.cds.plugins.cats)
api(projects.cds.plugins.clics)
api(projects.cds.plugins.cms)
api(projects.cds.plugins.codedrills)
api(projects.cds.plugins.codeforces)
api(projects.cds.plugins.dmoj)
api(projects.cds.plugins.ejudge)
api(projects.cds.plugins.eolymp)
api(projects.cds.plugins.krsu)
api(projects.cds.plugins.noop)
api(projects.cds.plugins.nsu)
api(projects.cds.plugins.pcms)
api(projects.cds.plugins.testsys)
api(projects.cds.plugins.yandex)
api(projects.cds.ktor)
api(projects.cds.cli)
api(projects.cds.utils)
fun apiAndDokka(dep: DelegatingProjectDependency) {
api(dep)
dokka(dep)
}
apiAndDokka(projects.cds.plugins.allcups)
apiAndDokka(projects.cds.plugins.atcoder)
apiAndDokka(projects.cds.plugins.cats)
apiAndDokka(projects.cds.plugins.clics)
apiAndDokka(projects.cds.plugins.cms)
apiAndDokka(projects.cds.plugins.codedrills)
apiAndDokka(projects.cds.plugins.codeforces)
apiAndDokka(projects.cds.plugins.dmoj)
apiAndDokka(projects.cds.plugins.ejudge)
apiAndDokka(projects.cds.plugins.eolymp)
apiAndDokka(projects.cds.plugins.krsu)
apiAndDokka(projects.cds.plugins.noop)
apiAndDokka(projects.cds.plugins.nsu)
apiAndDokka(projects.cds.plugins.pcms)
apiAndDokka(projects.cds.plugins.testsys)
apiAndDokka(projects.cds.plugins.yandex)
apiAndDokka(projects.cds.ktor)
apiAndDokka(projects.cds.cli)
apiAndDokka(projects.cds.utils)
apiAndDokka(projects.cds.core)
}

0 comments on commit 5067970

Please sign in to comment.