JavacWrapper: perform makeOutputDirectoryClasses hack only in non-APT mode
For some reason, working without APT requires this call in JavacWrapper. From the other hand, working without APT does not require Kotlin class files to be in javac classpath.
This commit is contained in:
@@ -102,6 +102,8 @@ class JavacWrapper(
|
||||
override fun parseFiles(files: Iterable<JavaFileObject>?) = compilationUnits
|
||||
}
|
||||
|
||||
private val aptOn = arguments == null || "-proc:none" !in arguments
|
||||
|
||||
private val fileManager = context[JavaFileManager::class.java] as JavacFileManager
|
||||
|
||||
init {
|
||||
@@ -168,7 +170,9 @@ class JavacWrapper(
|
||||
if (javaFilesNumber == 0) return true
|
||||
|
||||
setClassPathForCompilation(outDir)
|
||||
makeOutputDirectoryClassesVisible()
|
||||
if (!aptOn) {
|
||||
makeOutputDirectoryClassesVisible()
|
||||
}
|
||||
|
||||
val outputPath =
|
||||
// Includes a hack with 'takeIf' for CLI test, to have stable string here (independent from random test directory)
|
||||
|
||||
Reference in New Issue
Block a user