diff --git a/build.gradle.kts b/build.gradle.kts index 0f7deda56..f801f24cd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ tasks { register("doc") { - dependsOn(project(":cds").tasks.named("dokkaHtmlMultiModule")) + dependsOn(project(":cds:full").tasks.named("dokkaGenerate")) } register("gen") { dependsOn(project("schema-generator").tasks.named("gen")) diff --git a/buildSrc/src/main/kotlin/live.library-conventions.gradle.kts b/buildSrc/src/main/kotlin/live.library-conventions.gradle.kts index 020790731..bc71134cc 100644 --- a/buildSrc/src/main/kotlin/live.library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/live.library-conventions.gradle.kts @@ -49,18 +49,16 @@ publishing { } } -tasks { - withType().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") } } } diff --git a/gradle.properties b/gradle.properties index 4e79173fb..4f1708177 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 278801720..0217ee36d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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/ diff --git a/src/cds/build.gradle.kts b/src/cds/build.gradle.kts deleted file mode 100644 index ea49dc367..000000000 --- a/src/cds/build.gradle.kts +++ /dev/null @@ -1,10 +0,0 @@ -plugins { - id("org.jetbrains.dokka") -} - -tasks { - dokkaHtmlMultiModule { - outputDirectory.set(rootProject.layout.projectDirectory.dir("_site").dir("cds")) - moduleName.set("ICPC-live contest data parser") - } -} diff --git a/src/cds/full/build.gradle.kts b/src/cds/full/build.gradle.kts index 182e1110c..8ac716354 100644 --- a/src/cds/full/build.gradle.kts +++ b/src/cds/full/build.gradle.kts @@ -1,3 +1,5 @@ +import org.gradle.api.internal.catalog.DelegatingProjectDependency + plugins { id("live.library-conventions") } @@ -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) } \ No newline at end of file