@@ -15,7 +15,11 @@ import java.nio.file.Path
1515 * Manages the class path (compiled JARs, etc), the Java source path
1616 * and the compiler. Note that Kotlin sources are stored in SourcePath.
1717 */
18- class CompilerClassPath (private val config : CompilerConfiguration , private val databaseService : DatabaseService ) : Closeable {
18+ class CompilerClassPath (
19+ private val config : CompilerConfiguration ,
20+ private val scriptsConfig : ScriptsConfiguration ,
21+ private val databaseService : DatabaseService
22+ ) : Closeable {
1923 val workspaceRoots = mutableSetOf<Path >()
2024
2125 private val javaSourcePath = mutableSetOf<Path >()
@@ -24,7 +28,13 @@ class CompilerClassPath(private val config: CompilerConfiguration, private val d
2428 val outputDirectory: File = Files .createTempDirectory(" klsBuildOutput" ).toFile()
2529 val javaHome: String? = System .getProperty(" java.home" , null )
2630
27- var compiler = Compiler (javaSourcePath, classPath.map { it.compiledJar }.toSet(), buildScriptClassPath, outputDirectory)
31+ var compiler = Compiler (
32+ javaSourcePath,
33+ classPath.map { it.compiledJar }.toSet(),
34+ buildScriptClassPath,
35+ scriptsConfig,
36+ outputDirectory
37+ )
2838 private set
2939
3040 private val async = AsyncExecutor ()
@@ -72,7 +82,13 @@ class CompilerClassPath(private val config: CompilerConfiguration, private val d
7282 if (refreshCompiler) {
7383 LOG .info(" Reinstantiating compiler" )
7484 compiler.close()
75- compiler = Compiler (javaSourcePath, classPath.map { it.compiledJar }.toSet(), buildScriptClassPath, outputDirectory)
85+ compiler = Compiler (
86+ javaSourcePath,
87+ classPath.map { it.compiledJar }.toSet(),
88+ buildScriptClassPath,
89+ scriptsConfig,
90+ outputDirectory
91+ )
7692 updateCompilerConfiguration()
7793 }
7894
0 commit comments