Desugaring failure with bridge method when using default method interface in android project #15144
Labels
P2
We'll consider working on this in future. (Assignee optional)
team-Android
Issues for Android team
type: bug
Description of the problem / feature request:
Android binary project will fail to compile due to java desugaring issue, if project has a dependency on a library meeting the following criteria :
-Xjvm-default=all
. Note: this option is not available in bazel (kotlin) rules yet, so this is typically a library built with Gradle.In these conditions, compilation failure observed is :
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Please note this branch include a pre-compilted 'aar', since to repro the issue, (external) lib need to be compiled with Gradle (see above)
Current workaround
We found that reverting to using kotlin compiler option
-Xjvm-default=enable
+ tagging default method@JvmDefault
will work around the issue, and while preserve java callers compatibility.What operating system are you running Bazel on?
MacOsx 12.2
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
The text was updated successfully, but these errors were encountered: