Refactor scripting compiler plugin - move cli dependent parts out of the -impl jar

The kotlin-scripting-compiler-impl jar is used in the idea plugin and
therefore should not depend on the cli parts of the compiler to avoid
dependency from the plugin to the kotlin-compiler.jar.
Therefore the cli-dependent parts were moved to the scripting plugin
jar, which is used only in cli compiler based environments.
Also implement required abstractions to allow this movement and
drop some redundant dependencies to the cli parts in other projects.
This commit is contained in:
Ilya Chernikov
2019-07-08 16:52:19 +02:00
parent 9ae0ff03fa
commit 9c004c3a52
55 changed files with 185 additions and 185 deletions
@@ -7,8 +7,6 @@ plugins {
}
dependencies {
compileOnly(project(":kotlin-scripting-compiler"))
compile(project(":kotlin-scripting-compiler-impl"))
compile(project(":kotlin-scripting-intellij"))
compileOnly(project(":idea:idea-gradle"))
compileOnly(project(":idea:idea-core"))
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.scripting.idea.plugin
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
import org.jetbrains.kotlin.idea.configuration.GradleProjectImportHandler
import org.jetbrains.kotlin.idea.facet.KotlinFacet
import org.jetbrains.kotlin.scripting.configuration.KOTLIN_SCRIPTING_PLUGIN_ID
import org.jetbrains.kotlin.scripting.KOTLIN_SCRIPTING_PLUGIN_ID
import org.jetbrains.plugins.gradle.model.data.GradleSourceSetData
import java.io.File