Hii Everyone, I am using Ktorfit for my KMM projec...
# multiplatform
v
Hii Everyone, I am using Ktorfit for my KMM project. Now I am working on a task where I am only running android task (no ios task) for android build and not even adding ios sourcesets based on a flag. But when I am running it I am getting compile time errors saying Ktrofit classes/methods not found. Seems like Ktrofit is using KSP to generate classes for both android and ios but since iOS sourceset is not there it is not able to create all files are having some issue.
Copy code
with("de.jensklingenberg.ktorfit:ktorfit-ksp:2.0.0") {
        add("kspCommonMainMetadata", this)
        add("kspAndroid", this)
        add("kspAndroidTest", this)
//        add("kspIosX64", this)
//        add("kspIosX64Test", this)
//        add("kspIosArm64", this)
//        add("kspIosArm64Test", this)
//        add("kspIosSimulatorArm64", this)
//        add("kspIosSimulatorArm64Test", this)
    }
This what I am trying. Has anyone tried this before. @Foso Can you help out here.
1
c
f
s
hi @Foso thanks for that But What if I have project in KMP (iOS+Android) and based on flag I want to compile one platform at a time, keeping the all kmp dependencies like ktorfit or koin in commonMain itself. how can I achieve
we used Ktorfit's deprecated ext
.create()
instead
.createxxxApi()
which helped to solve the problem