Is this issue with Kotlin, kotlin-maven-plugin, or android-maven-plugin?


I understand that Android is not yet explicitly supported, but I'm trying it anyhow in conjunction with android-maven-plugin and I'm hitting a problem and I'm not sure if the Kotlin compiler's behaviour is correct.

The android-maven-plugin adds a directory that may not exist to the class-path when extracting dependency, line 151

This in turn causes the Kotlin compiler to choke.
Maven build output and stack trace here

The problem is here:   

[INFO] Compiling Kotlin sources from [C:UsersLiamdevelopmentmavenAndroidmavenAndroidsrcmainkotlin, C:UsersLiamdevelopmentmavenAndroidmavenAndroidtargetgenerated-sourcesextracted-dependenciessrcmainjava,  C:UsersLiamdevelopmentmavenAndroidmavenAndroidtargetgenerated-sourcesr, C:UsersLiamdevelopmentmavenAndroidmavenAndroidtargetgenerated-sourcesaidl]

The directory targetgenerated-sourcesextracted-dependenciessrcmainjava wasn’t created, and so the Kotlin compiler dies. So, I need to determine what the correct behaviour should be and where I should submit a bug/patch. Should the Kotlin compiler survive such things or is dying correct? Should the Kotlin maven plugin be catching such non-existent source directories? Or should the android maven plugin not be adding that path to the sources unless it exists?

Message was edited by: Liam Clarke, for formatting


I wonder if we should patch the maven plugin so it doesn't barf if the source directory doesn't exist (or doesn't contain any files) but just logs a warning instead? Might be worth raising an issue