Hi Everyone,
Currently, I am facing an issue with the generation of the.aar file in the KMP project. The project architecture is like we have a root project, and inside that there are multiple modules (based on the functionality).
I am able to create .aar for the modules successfully. But here the requirement is to generate a root-level.aar file, which must contain all modules.
p
Pablichjenkov
10/11/2024, 2:18 PM
By default the Android Gradle plugin does not support fat aars or multiple modules embedded in one aar. You can try this plugin:
https://github.com/deepmedia/Grease
f
frank-vu
10/12/2024, 2:02 AM
When you build an AAR file for root module, by default Gradle will not include the source code of its dependencies. There is a simple solution is to include all source code of its dependencies by adding it in build.gradle.kts of root module. Please note that : just enable it when you generate AAR file, comment it when you build the app to avoid duplicate code.