From 900fbccf3da483946227d99ce52b71afe0e62007 Mon Sep 17 00:00:00 2001 From: vmishenev Date: Mon, 24 Jul 2023 20:34:36 +0300 Subject: Introduce system property to ignore common builtIns for stdlib --- .../descriptors/compiler/configuration/KotlinAnalysis.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org') diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt index b4a1b8f7..b7a5afd6 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt @@ -56,8 +56,14 @@ internal class DokkaAnalysisConfiguration( * Only for common platform ignore BuiltIns for StdLib since it can cause a conflict * between BuiltIns from a compiler and ones from source code. */ - val ignoreCommonBuiltIns: Boolean = false -) + val ignoreCommonBuiltIns: Boolean = shouldIgnoreCommonBuiltIns() +) { + companion object { + private const val SHOULD_IGNORE_COMMON_BUILT_INS_SYS_PROP = "dokka.shouldIgnoreCommonBuiltIns" + internal fun shouldIgnoreCommonBuiltIns() = + System.getProperty(SHOULD_IGNORE_COMMON_BUILT_INS_SYS_PROP) in listOf("true", "1") + } +} /** * First child delegation. It does not close [parent]. -- cgit