1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 00:38:11 -07:00

Fix the build path.

This commit is contained in:
Cedric Beust 2016-06-09 05:37:24 -08:00
parent 58ad7179d5
commit db15c8ef5b

View file

@ -75,12 +75,16 @@ class CompilerUtils @Inject constructor(val files: KFiles,
else File(project.classesDir(context)) else File(project.classesDir(context))
File(project.directory, buildDirectory.path).mkdirs() File(project.directory, buildDirectory.path).mkdirs()
// Remove all the excluded dependencies from the classpath
var classpath = fullClasspath.filter {
! isDependencyExcluded(it, project.excludedDependencies)
}
// The classpath needs to contain $buildDirectory/classes as well so that projects that contain // The classpath needs to contain $buildDirectory/classes as well so that projects that contain
// multiple languages can use classes compiled by the compiler run before them. // multiple languages can use classes compiled by the compiler run before them.
// We also need to remove all the excluded dependencies from the classpath if (buildDirectory.exists()) {
val classpath = fullClasspath.filter { classpath += FileDependency(buildDirectory.path)
! isDependencyExcluded(it, project.excludedDependencies) }
} + FileDependency(buildDirectory.path)
val initialSourceDirectories = ArrayList<File>(sourceDirectories) val initialSourceDirectories = ArrayList<File>(sourceDirectories)
// Source directories from the contributors // Source directories from the contributors