Closed LouisCAD closed 2 years ago
Once someone is at the point of needing the Android platform-specific code in this module, I would recommend they not use this library anymore. kmp4free
is a good mechanism for the testing/migration of KMP, but I think you'd want to just move to the kotlin("multiplatform")
plugin if you wanted more than commonMain
compatible code like this suggests.
I think the identification of these modules could be done as a feature of dependency-analysis-android-gradle-plugin
: https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/issues/751.
Good question. With this plugin, all your code gets resolved as
commonMain
. So, that being said, you wouldn't want platform specific code (Android only code) to be in this module.You can move from an
com.android.library
toorg.jetbrains.kotlin.jvm
if you:If you can make that move, then you can additionally make the move from
org.jetbrains.kotlin.jvm
tocom.handstandsam.kmp4free
So, my thought here is that someone using this library could migrate their Android library to use
kotlin("jvm")
akaorg.jetbrains.kotlin.jvm
, and then use this plugin after that.Maybe that's a blog post? It's what I was getting at with this slide:
Full Deck: https://speakerdeck.com/handstandsam/embracing-commonmain-for-android-development-droidcon-sf-2022
I'm sure this will be a common question though. What would you suggest based on what I've shared above?