javac-wrapper: -Xuse-javac -> -Xuse-javac and -Xcompile-java

This commit is contained in:
baratynskiy
2017-06-26 15:21:48 +03:00
committed by Alexander Baratynskiy
parent 2224720a90
commit 8494e54608
8 changed files with 22 additions and 5 deletions
@@ -67,6 +67,7 @@ class JavacWrapper(
kotlinFiles: Collection<KtFile>,
arguments: Array<String>?,
jvmClasspathRoots: List<File>,
private val compileJava: Boolean,
private val outputDirectory: File?,
private val context: Context
) : Closeable {
@@ -154,6 +155,7 @@ class JavacWrapper(
private val symbolBasedPackagesCache = hashMapOf<String, SymbolBasedPackage?>()
fun compile(outDir: File? = null): Boolean = with(javac) {
if (!compileJava) return true
if (errorCount() > 0) return false
val javaFilesNumber = fileObjects.length()