Create core environment in test mode properly
This commit is contained in:
+5
-1
@@ -61,7 +61,11 @@ internal fun createSharedCompilationContext(
|
|||||||
createInitialConfigurations(
|
createInitialConfigurations(
|
||||||
scriptCompilationConfiguration, hostConfiguration, scriptCompilationState, messageCollector, ignoredOptionsReportingState
|
scriptCompilationConfiguration, hostConfiguration, scriptCompilationState, messageCollector, ignoredOptionsReportingState
|
||||||
)
|
)
|
||||||
val environment = KotlinCoreEnvironment.createForProduction(
|
val environment =
|
||||||
|
if (System.getProperty("idea.is.unit.test") == "true") KotlinCoreEnvironment.createForTests(
|
||||||
|
disposable, kotlinCompilerConfiguration, EnvironmentConfigFiles.JVM_CONFIG_FILES
|
||||||
|
)
|
||||||
|
else KotlinCoreEnvironment.createForProduction(
|
||||||
disposable, kotlinCompilerConfiguration, EnvironmentConfigFiles.JVM_CONFIG_FILES
|
disposable, kotlinCompilerConfiguration, EnvironmentConfigFiles.JVM_CONFIG_FILES
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user