Skip to content

Commit 3f91df4

Browse files
Minor: move GradleCompilerEnvironment to separate file
1 parent 145608e commit 3f91df4

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.jetbrains.kotlin.compilerRunner
2+
3+
import org.jetbrains.kotlin.config.Services
4+
import java.io.File
5+
import java.net.URL
6+
7+
internal class GradleCompilerEnvironment(
8+
val compilerJar: File
9+
) : CompilerEnvironment(Services.EMPTY) {
10+
val compilerClasspath: List<File>
11+
get() = listOf(compilerJar).filterNotNull()
12+
13+
val compilerClasspathURLs: List<URL>
14+
get() = compilerClasspath.map { it.toURI().toURL() }
15+
}

libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import org.jetbrains.kotlin.incremental.makeModuleFile
3232
import java.io.ByteArrayOutputStream
3333
import java.io.File
3434
import java.io.PrintStream
35-
import java.net.URL
3635
import kotlin.concurrent.thread
3736

3837
internal const val KOTLIN_COMPILER_EXECUTION_STRATEGY_PROPERTY = "kotlin.compiler.execution.strategy"
@@ -200,12 +199,3 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
200199
}
201200
}
202201

203-
internal class GradleCompilerEnvironment(
204-
val compilerJar: File
205-
) : CompilerEnvironment(Services.EMPTY) {
206-
val compilerClasspath: List<File>
207-
get() = listOf(compilerJar).filterNotNull()
208-
209-
val compilerClasspathURLs: List<URL>
210-
get() = compilerClasspath.map { it.toURI().toURL() }
211-
}

0 commit comments

Comments
 (0)