Add mode to run kapt with JVM IR, use in tests

Currently JVM IR is not supported in kapt, so almost all tests are
failing, and thus are muted with IGNORE_BACKEND.

 #KT-49682
This commit is contained in:
Alexander Udalov
2021-12-08 23:05:43 +01:00
parent d089d27bef
commit ebb9659e03
107 changed files with 251 additions and 98 deletions
@@ -185,9 +185,9 @@ object GenerationUtils {
analysisResult: AnalysisResult,
configureGenerationState: GenerationState.Builder.() -> Unit = {},
): GenerationState {
/* Currently Kapt3 only works with the old JVM backend, so disable IR for everything except actual bytecode generation. */
val isIrBackend =
classBuilderFactory.classBuilderMode == ClassBuilderMode.FULL && configuration.getBoolean(JVMConfigurationKeys.IR)
(classBuilderFactory.classBuilderMode == ClassBuilderMode.FULL && configuration.getBoolean(JVMConfigurationKeys.IR)) ||
configuration.getBoolean(JVMConfigurationKeys.USE_KAPT_WITH_JVM_IR)
val generationState = GenerationState.Builder(
project, classBuilderFactory, analysisResult.moduleDescriptor, analysisResult.bindingContext,
files, configuration