mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Fix bug mixing R.java on Kotlin sources.
Fix https://github.com/cbeust/kobalt-android/issues/6
This commit is contained in:
parent
933b50c39c
commit
3bec28e8e0
4 changed files with 34 additions and 12 deletions
|
@ -44,7 +44,11 @@ class JavaCompiler @Inject constructor(val jvmCompiler: JvmCompiler) {
|
|||
allArgs.addAll(info.compilerArgs)
|
||||
|
||||
val fileManager = compiler.getStandardFileManager(null, null, null)
|
||||
val fileObjects = fileManager.getJavaFileObjectsFromFiles(info.sourceFiles.map { File(it) })
|
||||
val fileObjects = fileManager.getJavaFileObjectsFromFiles(info.sourceFiles.map {
|
||||
File(it)
|
||||
}.filter {
|
||||
it.isFile
|
||||
})
|
||||
val dc = DiagnosticCollector<JavaFileObject>()
|
||||
val classes = arrayListOf<String>()
|
||||
val writer = PrintWriter(System.out)
|
||||
|
|
|
@ -121,6 +121,9 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors, val depen
|
|||
|
||||
override val sourceDirectory = "kotlin"
|
||||
|
||||
/** kotlinc can be passed directories */
|
||||
override val canCompileDirectories = true
|
||||
|
||||
override fun compile(project: Project, context: KobaltContext, info: CompilerActionInfo): TaskResult {
|
||||
val result =
|
||||
if (info.sourceFiles.size > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue