[FIR] Extract FirPluginKey into :core:compiler.common and rename it to GeneratedDeclarationKey
This is needed to avoid dependency on :compiler:fir:fir2ir module in backend parts of compiler plugins. It will allow to publish those parts into jars for IDE, where they are needed for working of debugger and bytecode toolwindow
This commit is contained in:
committed by
teamcity
parent
a84ece7233
commit
83d0a3e7a3
@@ -15,7 +15,6 @@ dependencies {
|
||||
compileOnly(project(":compiler:backend.jvm"))
|
||||
compileOnly(project(":compiler:ir.tree.impl"))
|
||||
compileOnly(project(":compiler:fir:tree"))
|
||||
compileOnly(project(":compiler:fir:fir2ir"))
|
||||
compileOnly(intellijCore())
|
||||
compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all"))
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,9 +7,9 @@ package org.jetbrains.kotlin.parcelize.ir
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.fir.backend.IrPluginDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
import org.jetbrains.kotlin.ir.declarations.IrClass
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin.GeneratedByPlugin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrModuleFragment
|
||||
import org.jetbrains.kotlin.ir.util.companionObject
|
||||
import org.jetbrains.kotlin.ir.util.functions
|
||||
@@ -47,7 +47,7 @@ class ParcelizeFirIrTransformer(
|
||||
|
||||
for (function in declaration.functions) {
|
||||
val origin = function.origin
|
||||
if (origin !is IrPluginDeclarationOrigin || origin.pluginKey != FirParcelizePluginKey) continue
|
||||
if (origin !is GeneratedByPlugin || origin.pluginKey != FirParcelizePluginKey) continue
|
||||
when (function.name.identifier) {
|
||||
ParcelizeSyntheticComponent.ComponentKind.DESCRIBE_CONTENTS.methodName -> {
|
||||
function.generateDescribeContentsBody(parcelableProperties)
|
||||
|
||||
Reference in New Issue
Block a user