I've got error when compiling against kotlin android library with top-level functions. The problem is that android-gradle-aspectj is not copying files, unprocessed by ajc, includingMETA-INF/*.kotlin_module, to transform's target directory. *.kotlin_module contains top-level function definitions, needed by kotlin compiler to successfully process kotlins-sources, that depend on them.
Simple project, that demonstrates problem - https://github.com/amelin/android-gradle-aspectj . It's compilation fails with current plugin version. With the supplied patch, it compiles successfully.
Supplied patch copies all files, unprocessed by ajc. If copying all files in a row is not desirable, for this specific problem it's ok to just copy META-INF/*.kotlin_module. Though I think, that by default all files must be copied either by ajc, or by plugin itself, since missing files can cause problems in other cases.
Hi!
I've got error when compiling against kotlin android library with top-level functions. The problem is that android-gradle-aspectj is not copying files, unprocessed by ajc, including
META-INF/*.kotlin_module
, to transform's target directory.*.kotlin_module
contains top-level function definitions, needed by kotlin compiler to successfully process kotlins-sources, that depend on them.Simple project, that demonstrates problem - https://github.com/amelin/android-gradle-aspectj . It's compilation fails with current plugin version. With the supplied patch, it compiles successfully.
Supplied patch copies all files, unprocessed by ajc. If copying all files in a row is not desirable, for this specific problem it's ok to just copy
META-INF/*.kotlin_module
. Though I think, that by default all files must be copied either by ajc, or by plugin itself, since missing files can cause problems in other cases.Error: