Minor: move GradleCompilerEnvironment to separate file

This commit is contained in:
Alexey Tsvetkov
2016-11-28 23:36:02 +03:00
parent 145608ec0f
commit 3f91df4c84
2 changed files with 15 additions and 10 deletions
@@ -0,0 +1,15 @@
package org.jetbrains.kotlin.compilerRunner
import org.jetbrains.kotlin.config.Services
import java.io.File
import java.net.URL
internal class GradleCompilerEnvironment(
val compilerJar: File
) : CompilerEnvironment(Services.EMPTY) {
val compilerClasspath: List<File>
get() = listOf(compilerJar).filterNotNull()
val compilerClasspathURLs: List<URL>
get() = compilerClasspath.map { it.toURI().toURL() }
}
@@ -32,7 +32,6 @@ import org.jetbrains.kotlin.incremental.makeModuleFile
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.PrintStream
import java.net.URL
import kotlin.concurrent.thread
internal const val KOTLIN_COMPILER_EXECUTION_STRATEGY_PROPERTY = "kotlin.compiler.execution.strategy"
@@ -200,12 +199,3 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
}
}
internal class GradleCompilerEnvironment(
val compilerJar: File
) : CompilerEnvironment(Services.EMPTY) {
val compilerClasspath: List<File>
get() = listOf(compilerJar).filterNotNull()
val compilerClasspathURLs: List<URL>
get() = compilerClasspath.map { it.toURI().toURL() }
}