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

Build directory fix.

This commit is contained in:
Cedric Beust 2015-11-27 00:24:47 -08:00
parent 63a9c1f159
commit 647b103fd2

View file

@ -11,6 +11,7 @@ import com.beust.kobalt.maven.DepFactory
import com.beust.kobalt.maven.FileDependency
import com.beust.kobalt.maven.IClasspathDependency
import com.beust.kobalt.maven.LocalRepo
import com.beust.kobalt.misc.KFiles
import com.beust.kobalt.misc.KobaltExecutors
import com.beust.kobalt.misc.log
import com.beust.kobalt.wrapper.ParentLastClassLoader
@ -42,7 +43,11 @@ class KotlinCompiler @Inject constructor(val localRepo : LocalRepo,
log(1, " Compiling ${info.sourceFiles.size} files")
}
val cp = compilerFirst(info.dependencies.map {it.jarFile.get()})
val outputDir = (info.directory ?: "") + info.outputDir
val outputDir = if (info.directory != null) {
KFiles.joinDir(info.directory, info.outputDir.path)
} else {
info.outputDir.path
}
// kotlinc can accept a jar file as -d (which is super convenient) so only
// create a directory if the output is not a jar file
if (! outputDir.endsWith(".jar")) {