Do you know any example of multimodule project that uses any pod in the bottom layer module? I would like to achieve a following structure:
Copy code
- data - has pod dependency on any library, eg. AFNetworking and is using this
- shared - has dependency on data module and uses its code
- iosApp - has dependency on shared module and uses its code
I’m trying to connect the dots, but when I’m trying to build an app I’m getting following error:
Copy code
> Task :data:cinteropAFNetworkingIosX64 FAILED
Exception in thread "main" java.lang.Error: /var/folders/2q/gjhd6ng16j51tnmw772w02k40000gp/T/10252343052379226466.m:1:9: fatal error: module 'AFNetworking' not found
KamilH
10/18/2021, 12:50 PM
Currently, in the
shared
module I simply do:
Copy code
val commonMain by getting {
dependencies {
api(project(":data"))
}
}
KamilH
10/18/2021, 2:02 PM
It seems like adding pod dependency in both
data
and
shared
modules like that:
Copy code
pod("AFNetworking") {
version = "~> 4.0.0"
}
solves a problem. It seems like a workaround, but I haven’t found a better solution so far, so it’s good enough for me