I am attempting to create a KMP around some native...
# multiplatform
t
I am attempting to create a KMP around some native SDKs that come as .aar on android and .xcframework on iOS. I quickly ran into this error when trying to import the aar into my library priject:
Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :evercommercepayments project caused this error:
My question then is how can I build the library to simply wrap the API. I don't mind linking the dependencies into the app, since I need to do that on iOS anyway. I tried the api() in the gradle file, but same error. Any examples around of this wrapping procedure, if possible.
Never mind. compileOnly seems to work so far, even though in some docs I found it says it is not compatible with aar files.