Sabeeh
12/18/2025, 11:35 AMjoffrey
12/18/2025, 11:45 AMandroid/app product type, and a regular JAR for the lib product type. Do you need an AAR because you want to bundle Android resources?joffrey
12/18/2025, 11:46 AMandroid/lib product type would help here, or if there is a need as well for KMP `lib`s)Sabeeh
12/18/2025, 12:06 PMSabeeh
12/18/2025, 12:11 PMjoffrey
12/18/2025, 1:11 PMandroid/lib product type is hypothetical - something we could add. It's not there yetAnton Prokhorov
12/18/2025, 1:13 PMIf I use product.type: android/lib, will that allow me to create an Android JAR or AAR file? I can try that.it probably will when is supported, however, now there is no
android/lib product type yet
This is a KMP library, and I want to build it for Android. A JAR could also work, but as far as I understand, that would target the JVM (desktop).When we get to the kmp library publication, we'll deal with packaging for KMP libraries as well, for now product type
lib is only intended to be consumed by Amper itself
I may be wrong, but AFAIK the difference between jar and android jar lays in Gradle module metadata (special json that you put in maven repository alongside with your jar), as far as you can desugar this jar with D8, so if you have no android-specific resources, it's not necessary to produce AAR
just in case if you want to publish your library before we come up with some meaningful way how to publish KMP libs by built-in support
in case if you actually need android-specific resources anyway, it's still not a goal for KMP library to provide a way to generate AAR for Android part, I guess it's still done through having separate modules (in Gradle now, for instance) for KMP library and android library separately and KMP library depends on Android lib, which contains android resources