[TEST] Add implementation of new infrastructure services for compiler tests
All of new classes lays in lays in :compiler:tests-common-new module which includes classes for FE 1.0 and FIR diagnostics tests and JVM black boxtests
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.script
|
||||
|
||||
import org.jetbrains.kotlin.cli.jvm.plugins.PluginCliParser
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.utils.PathUtil
|
||||
import java.io.File
|
||||
|
||||
fun loadScriptingPlugin(configuration: CompilerConfiguration) {
|
||||
val libPath = PathUtil.kotlinPathsForCompiler.libPath
|
||||
val pluginClasspath = with (PathUtil) {
|
||||
listOf(
|
||||
KOTLIN_SCRIPTING_COMPILER_PLUGIN_JAR,
|
||||
KOTLIN_SCRIPTING_COMPILER_IMPL_JAR,
|
||||
KOTLIN_SCRIPTING_COMMON_JAR,
|
||||
KOTLIN_SCRIPTING_JVM_JAR
|
||||
).map { File(libPath, it).path }
|
||||
}
|
||||
PluginCliParser.loadPluginsSafe(pluginClasspath, null, configuration)
|
||||
}
|
||||
Reference in New Issue
Block a user