Status Update
Comments
hm...@google.com <hm...@google.com> #2
Just checking if you meant to try packaging.resources.excludes.remove("**/*.kotlin_module")
instead of packaging.resources.excludes.remove("**/*.kotlin_metadata")
althought I do not think we purposefully exclude any .kotlin_module files so I would be surprised if that works
fs...@google.com <fs...@google.com> #3
A little embarrassed how long it took me to notice the difference just now.
It looks like only metadata
is in the excludes, so I just misread it. I imagine there is some other reason the module file isn't being included, sorry for the red herring!
hm...@google.com <hm...@google.com>
hm...@google.com <hm...@google.com>
an...@google.com <an...@google.com> #4
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug | 2024.1.3 Canary 2
- Android Gradle Plugin 8.7.0-alpha02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
AARs generated by the Android Multiplatform Plugin do not contain a
.kotlin_module
file in theclasses.jar
, which causes a failure to resolve extension functions in consuming libraries.I can see there is an exclusion in
packaging.resources.exclude
that seems to match.kotlin_module
files but removing the exclusion doesn't seem to work around the issue.I was able to reproduce the issue by attempting to use an extension function from the simple project below.
When used as a project dependency the resolution succeeds, but when published to maven local and consumed from an AAR the extension function doesn't resolve. It works both ways when using the commented out android library plugin version.
AGP Version: 8.6.0-beta01