Use createForProduction for running standalone execution

This commit is contained in:
Nikolay Krasko
2020-03-03 17:14:55 +03:00
parent 4ea0b4911a
commit a52ef71d48
@@ -52,7 +52,9 @@ fun buildConfiguration(environment: KotlinCoreEnvironment, moduleName: String):
return runtimeConfiguration
}
val environment = KotlinCoreEnvironment.createForTests(Disposable { }, CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
@Suppress("RedundantSamConstructor")
private val environment =
KotlinCoreEnvironment.createForProduction(Disposable { }, CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
fun createPsiFile(fileName: String): KtFile {
val psiManager = PsiManager.getInstance(environment.project)