From c065412fdc7ee94c0be64b48eedb9819965df307 Mon Sep 17 00:00:00 2001 From: Vadim Mishenev Date: Thu, 13 Oct 2022 18:35:25 +0300 Subject: Ignore BuiltIns for StdLib (#2658) --- .../dokka-stdlib-configuration-plugin/build.gradle | 20 ++++++++++++++++++++ .../dokka/kotlinlang/StdLibConfigurationPlugin.kt | 22 ++++++++++++++++++++++ .../org.jetbrains.dokka.plugability.DokkaPlugin | 1 + 3 files changed, 43 insertions(+) create mode 100644 integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/build.gradle create mode 100644 integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/src/main/kotlin/org/jetbrains/dokka/kotlinlang/StdLibConfigurationPlugin.kt create mode 100644 integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin (limited to 'integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin') diff --git a/integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/build.gradle b/integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/build.gradle new file mode 100644 index 00000000..ddf84a2f --- /dev/null +++ b/integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/build.gradle @@ -0,0 +1,20 @@ +plugins { + id 'org.jetbrains.kotlin.jvm' +} +description "Dokka Plugin to configure Dokka for stdlib" + +repositories { + mavenLocal() + mavenCentral() +} + +dependencies { + implementation "org.jetbrains.dokka:dokka-base:${dokka_it_version}" + compileOnly "org.jetbrains.dokka:dokka-core:${dokka_it_version}" + compileOnly "org.jetbrains.dokka:dokka-analysis:${dokka_it_version}" +} + +tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) { + kotlinOptions.jvmTarget = "1.8" +} + diff --git a/integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/src/main/kotlin/org/jetbrains/dokka/kotlinlang/StdLibConfigurationPlugin.kt b/integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/src/main/kotlin/org/jetbrains/dokka/kotlinlang/StdLibConfigurationPlugin.kt new file mode 100644 index 00000000..9f450b64 --- /dev/null +++ b/integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/src/main/kotlin/org/jetbrains/dokka/kotlinlang/StdLibConfigurationPlugin.kt @@ -0,0 +1,22 @@ +package org.jetbrains.dokka.kotlinlang + +import org.jetbrains.dokka.base.DokkaBase +import org.jetbrains.dokka.plugability.DokkaPlugin +//import org.jetbrains.dokka.analysis.DokkaAnalysisConfiguration +import org.jetbrains.dokka.analysis.KotlinAnalysis + +class StdLibConfigurationPlugin : DokkaPlugin() { + private val dokkaBase by lazy { plugin() } + /** + * Uncomment after updating of StdLib in tests + */ + /*val stdLibKotlinAnalysis by extending { + dokkaBase.kotlinAnalysis providing { ctx -> + KotlinAnalysis( + sourceSets = ctx.configuration.sourceSets, + logger = ctx.logger, + analysisConfiguration = DokkaAnalysisConfiguration(ignoreCommonBuiltIns = true) + ) + } override dokkaBase.defaultKotlinAnalysis + }*/ +} \ No newline at end of file diff --git a/integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin new file mode 100644 index 00000000..98793eca --- /dev/null +++ b/integration-tests/gradle/projects/stdlib/plugins/dokka-stdlib-configuration-plugin/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin @@ -0,0 +1 @@ +org.jetbrains.dokka.kotlinlang.StdLibConfigurationPlugin \ No newline at end of file -- cgit