77 *
88 * See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
99 */
10+
1011plugins {
11- alias(libs.plugins.mifos.android .library)
12- alias(libs.plugins.mifos.android.hilt )
12+ alias(libs.plugins.mifos.kmp .library)
13+ alias(libs.plugins.ktorfit )
1314 id(" kotlinx-serialization" )
15+ id(" com.google.devtools.ksp" )
1416}
1517
1618android {
1719 namespace = " org.mifos.mobile.core.network"
1820 defaultConfig {
1921 consumerProguardFiles(" consumer-rules.pro" )
2022 }
23+ testOptions {
24+ unitTests {
25+ isReturnDefaultValues = true
26+ isIncludeAndroidResources = true
27+ }
28+ }
2129}
2230
23- dependencies {
24- api(projects.core.common)
25- api(projects.core.model)
26- api(projects.core.datastore)
31+ kotlin {
32+ sourceSets {
33+ commonMain.dependencies {
34+ // api(projects.core.common)
35+ implementation(projects.core.model)
36+ // implementation(projects.core.datastore)
37+ implementation(libs.kotlinx.serialization.json)
38+ implementation(libs.ktor.client.core)
39+ implementation(libs.ktor.client.json)
40+ implementation(libs.ktor.client.logging)
41+ implementation(libs.ktor.client.serialization)
42+ implementation(libs.ktor.client.content.negotiation)
43+ implementation(libs.ktor.client.auth)
44+ implementation(libs.ktor.serialization.kotlinx.json)
45+ implementation(libs.ktorfit.lib)
46+ implementation(libs.squareup.okio)
47+ // TODO remove this dependency from here after common module successfully migrated to
48+ // KMP
49+ api(libs.kermit.logging)
50+ }
51+ androidMain.dependencies {
52+ implementation(libs.ktor.client.okhttp)
53+ implementation(libs.koin.android)
54+ }
2755
28- // Square dependencies
29- implementation(libs.squareup.retrofit2) {
30- // exclude Retrofit’s OkHttp peer-dependency module and define your own module import
31- exclude(module = " okhttp" )
32- }
33- implementation(libs.squareup.retrofit.adapter.rxjava)
34- implementation(libs.squareup.retrofit.converter.gson)
35- implementation(libs.squareup.logging.interceptor)
36- implementation(libs.squareup.okhttp)
56+ nativeMain.dependencies {
57+ implementation(libs.ktor.client.darwin)
58+ }
3759
38- implementation(libs.jetbrains.kotlin.jdk7)
60+ val desktopMain by getting {
61+ dependencies {
62+ implementation(libs.ktor.client.okhttp)
63+ }
64+ }
65+ jsMain.dependencies {
66+ implementation(libs.ktor.client.js)
67+ }
68+ wasmJsMain.dependencies {
69+ implementation(libs.ktor.client.js)
70+ }
71+ }
72+ }
3973
40- testImplementation(libs.junit)
41- testImplementation(libs.mockito.core)
42- implementation(libs.mockito.core)
43- }
74+ dependencies {
75+ add(" kspCommonMainMetadata" , libs.ktorfit.ksp)
76+ add(" kspAndroid" , libs.ktorfit.ksp)
77+ add(" kspJs" , libs.ktorfit.ksp)
78+ add(" kspWasmJs" , libs.ktorfit.ksp)
79+ add(" kspDesktop" , libs.ktorfit.ksp)
80+ add(" kspIosX64" , libs.ktorfit.ksp)
81+ add(" kspIosArm64" , libs.ktorfit.ksp)
82+ add(" kspIosSimulatorArm64" , libs.ktorfit.ksp)
83+ }
0 commit comments