1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 16:28:12 -07:00

Fix Java source directory.

This commit is contained in:
Cedric Beust 2016-04-11 11:49:40 -07:00
parent 3dc039e956
commit eae780308c

View file

@ -313,7 +313,7 @@ open class JvmCompilerPlugin @Inject constructor(
// Now that we have all the source directories, find all the source files in them // Now that we have all the source directories, find all the source files in them
val projectDirectory = File(project.directory) val projectDirectory = File(project.directory)
val sourceFiles = if (compiler.canCompileDirectories) { val sourceFiles = if (compiler.canCompileDirectories) {
allSourceDirectories.map { it.path } allSourceDirectories.map { File(projectDirectory, it.path).path }
} else { } else {
files.findRecursively(projectDirectory, allSourceDirectories, files.findRecursively(projectDirectory, allSourceDirectories,
{ file -> sourceSuffixes.any { file.endsWith(it) } }) { file -> sourceSuffixes.any { file.endsWith(it) } })
@ -341,9 +341,8 @@ open class JvmCompilerPlugin @Inject constructor(
} }
} }
val allSources = (sourceFiles + extraSourceFiles).distinct().filter { File(it).exists() }.map { val allSources = (sourceFiles + extraSourceFiles).distinct().filter { File(it).exists() }
File(projectDirectory, it).path
}
// Finally, alter the info with the compiler interceptors before returning it // Finally, alter the info with the compiler interceptors before returning it
val initialActionInfo = CompilerActionInfo(projectDirectory.path, classpath, allSources, val initialActionInfo = CompilerActionInfo(projectDirectory.path, classpath, allSources,
sourceSuffixes, buildDirectory, emptyList() /* the flags will be provided by flag contributors */) sourceSuffixes, buildDirectory, emptyList() /* the flags will be provided by flag contributors */)