@@ -15,7 +15,11 @@ import java.nio.file.Path
15
15
* Manages the class path (compiled JARs, etc), the Java source path
16
16
* and the compiler. Note that Kotlin sources are stored in SourcePath.
17
17
*/
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 {
19
23
val workspaceRoots = mutableSetOf<Path >()
20
24
21
25
private val javaSourcePath = mutableSetOf<Path >()
@@ -24,7 +28,13 @@ class CompilerClassPath(private val config: CompilerConfiguration, private val d
24
28
val outputDirectory: File = Files .createTempDirectory(" klsBuildOutput" ).toFile()
25
29
val javaHome: String? = System .getProperty(" java.home" , null )
26
30
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
+ )
28
38
private set
29
39
30
40
private val async = AsyncExecutor ()
@@ -72,7 +82,13 @@ class CompilerClassPath(private val config: CompilerConfiguration, private val d
72
82
if (refreshCompiler) {
73
83
LOG .info(" Reinstantiating compiler" )
74
84
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
+ )
76
92
updateCompilerConfiguration()
77
93
}
78
94
0 commit comments