KaCompilerFacilityModuleActualizer¶
fun interface KaCompilerFacilityModuleActualizer
The type has been moved to a new package. Use <strong>org.jetbrains.kotlin.analysis.api.compilation.KaCompilerFacilityModuleActualizer</strong> instead.
Actualizer for common source modules.
The Kotlin compiler cannot directly compile classes from common modules, as it needs dependencies and language settings from the target platform. Such as, even if the compiled class only uses 'kotlin-stdlib', the JVM compiler still needs the library bytecode to understand JVM facade names and to be able to inline functions (the JVM inliner uses Java bytecode instead of the serialized IR).
KaCompilerFacility attempts to find the platform module with an appropriate target by itself and substitutes it instead of the original common module – that way, it can pass all the required information to the compiler. However, there might be multiple platform modules (e.g., Android and JVM); in that case, the facility chooses the first matching one. KaCompilerFacilityModuleActualizer is a way to override the default behavior by offering a closer match – e.g., a module with an Android target.
Functions¶
actualize¶
abstract fun actualize(module: KaModule, target: KaCompilationTarget): KaModule?