CompilerConfiguration ( @NotNull ConfigurationKind configurationKind, @NotNull TestJdkKind jdkKind, @NotNull List<File> classpath, @NotNull List<File> javaSource ) { CompilerConfiguration configuration = newConfiguration(); JvmContentRootsKt.addJavaSourceRoots(configuration, javaSource); if (jdkKind == TestJdkKind.MOCK_JDK) { JvmContentRootsKt.addJvmClasspathRoot(configuration, findMockJdkRtJar()); configuration.put(JVMConfigurationKeys.NO_JDK, true); } else { configuration.put(JVMConfigurationKeys.JDK_HOME, getCurrentProcessJdkHome()); } if (configurationKind.getKotlinStdlib()) { JvmContentRootsKt.addJvmClasspathRoot(configuration, TestKotlinArtifacts.getKotlinStdlib()); JvmContentRootsKt.addJvmClasspathRoot(configuration, TestKotlinArtifacts.getKotlinScriptRuntime()); JvmContentRootsKt.addJvmClasspathRoot(configuration, TestKotlinArtifacts.getKotlinTest()); configuration.put(CLIConfigurationKeys.PATH_TO_KOTLIN_COMPILER_JAR, TestKotlinArtifacts.getKotlinCompiler()); } if (configurationKind.getKotlinReflect()) { JvmContentRootsKt.addJvmClasspathRoot(configuration, TestKotlinArtifacts.getKotlinReflect()); } JvmContentRootsKt.addJvmClasspathRoots(configuration, classpath); configuration.put( CLIConfigurationKeys.INTELLIJ_PLUGIN_ROOT, TestKotlinArtifacts.getKotlinCompiler().getAbsolutePath() ); setupIdeaStandaloneExecution(); return configuration; }