File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
dokka-subprojects/analysis-kotlin-symbols
src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 22 * Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33 */
44
5- import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
65import dokkabuild.overridePublicationArtifactId
76
87plugins {
@@ -61,6 +60,9 @@ dependencies {
6160
6261 // TODO [beresnev] get rid of it
6362 compileOnly(libs.kotlinx.coroutines.core)
63+
64+ // to gain access to com.intellij.diagnostic.LoadingState in the compile time
65+ compileOnly(libs.intellij.util.base)
6466}
6567
6668tasks.shadowJar {
Original file line number Diff line number Diff line change 44
55package org.jetbrains.dokka.analysis.kotlin.symbols.plugin
66
7+ import com.intellij.diagnostic.LoadingState
78import com.intellij.openapi.Disposable
89import com.intellij.openapi.util.Disposer
910import org.jetbrains.dokka.DokkaConfiguration
@@ -249,13 +250,7 @@ private fun Path.hasSuitableExtensionToAnalyse(): Boolean {
249250
250251private fun enableExperimentalKDocResolution () {
251252 // Enable experimental KDoc resolution in Kotlin Analysis API (K2)
252- runCatching {
253- Class .forName(" com.intellij.diagnostic.LoadingState" ).let { klass ->
254- klass.getMethod(" setCurrentState" , klass).invoke(
255- null ,
256- klass.getMethod(" valueOf" , String ::class .java).invoke(null , " COMPONENTS_LOADED" )
257- )
258- }
259- }
253+ @Suppress(" UnstableApiUsage" )
254+ LoadingState .setCurrentState(LoadingState .COMPONENTS_LOADED )
260255 System .setProperty(" kotlin.analysis.experimentalKDocResolution" , " true" )
261256}
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ kotlin-symbol-light-classes = { module = "org.jetbrains.kotlin:symbol-light-clas
122122intellij-java-psi-api = { module = " com.jetbrains.intellij.java:java-psi" , version.ref = " intellij-platform" }
123123intellij-java-psi-impl = { module = " com.jetbrains.intellij.java:java-psi-impl" , version.ref = " intellij-platform" }
124124intellij-util = { module = " com.jetbrains.intellij.platform:util" , version.ref = " intellij-platform" }
125+ intellij-util-base = { module = " com.jetbrains.intellij.platform:util-base" , version.ref = " intellij-platform" }
125126
126127# ### HTML ####
127128jsoup = { module = " org.jsoup:jsoup" , version.ref = " jsoup" }
You can’t perform that action at this time.
0 commit comments