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

Merge pull request #55 from fboldog/fix-kotlinc-output-directory

add directory path if exists (like JavaCompiler)
This commit is contained in:
Cedric Beust 2015-11-25 18:56:42 -08:00
commit 821279858c

View file

@ -11,6 +11,7 @@ import com.beust.kobalt.maven.DepFactory
import com.beust.kobalt.maven.FileDependency import com.beust.kobalt.maven.FileDependency
import com.beust.kobalt.maven.IClasspathDependency import com.beust.kobalt.maven.IClasspathDependency
import com.beust.kobalt.maven.LocalRepo import com.beust.kobalt.maven.LocalRepo
import com.beust.kobalt.misc.KFiles
import com.beust.kobalt.misc.KobaltExecutors import com.beust.kobalt.misc.KobaltExecutors
import com.beust.kobalt.misc.log import com.beust.kobalt.misc.log
import com.beust.kobalt.wrapper.ParentLastClassLoader import com.beust.kobalt.wrapper.ParentLastClassLoader
@ -43,7 +44,7 @@ class KotlinCompiler @Inject constructor(val localRepo : LocalRepo,
} }
val cp = compilerFirst(info.dependencies.map {it.jarFile.get()}) val cp = compilerFirst(info.dependencies.map {it.jarFile.get()})
val allArgs : Array<String> = arrayOf( val allArgs : Array<String> = arrayOf(
"-d", info.outputDir.path, "-d", KFiles.makeDir(info.directory!!, info.outputDir.path).path,
"-classpath", cp.joinToString(File.pathSeparator), "-classpath", cp.joinToString(File.pathSeparator),
*(info.compilerArgs.toTypedArray()), *(info.compilerArgs.toTypedArray()),
*(info.sourceFiles.toTypedArray()) *(info.sourceFiles.toTypedArray())