Hey everyone,
Has anyone tried generating a
Fat AAR from a Kotlin Multiplatform (KMP) library?
Here’s my case:
•
Project1:
◦
shared
module – depends on
libJava
and
libKmp
.
•
Project2:
◦
androidLib
module – depends on
Project1:shared
.
•
Project3:
◦ Consumes the AAR from
Project2:androidLib
.
I know the best approach would be to use a
monorepo, but unfortunately, that's not an option so, I have to upload artifacts to Maven.
The problem starts with
Project1.
From what I see,
Grease doesn’t support KMP at the moment.
I tried this code (without any plugins) with a plain Android project like this:
sourceSets {
getByName("main").java.srcDirs(
project(":child-module-1").projectDir.resolve("src/main/java"),
project(":child-module-2").projectDir.resolve("src/main/java"),
)
}
It worked for a regular Android setup, but with KMP, it seems way more challenging.
Does anyone have experience with this or suggestions on how to tackle it?
Thanks in advance!