Skip to content

Commit

Permalink
Retrofit to Ktor (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel authored Mar 27, 2024
1 parent 37d2c4d commit b838612
Show file tree
Hide file tree
Showing 26 changed files with 120 additions and 334 deletions.
4 changes: 2 additions & 2 deletions core/network-kmp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ kotlin {
sourceSets {
commonMain.dependencies {
implementation(libs.kotlinx.serialization.json)
implementation(libs.bundles.ktor.common)
implementation(libs.bundles.koin.common)
}
androidMain.dependencies {
implementation(libs.bundles.ktor.android)
implementation(libs.androidx.startup.runtime)
implementation(libs.okhttp.logging.interceptor)
implementation(libs.bundles.retrofit)
implementation(libs.bundles.ktor)
implementation(libs.flaker.android.okhttp)
implementation(libs.koin.android)
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ import org.michaelbel.movies.network.AccountNetworkService
import org.michaelbel.movies.network.AuthenticationNetworkService
import org.michaelbel.movies.network.MovieNetworkService
import org.michaelbel.movies.network.SearchNetworkService
import org.michaelbel.movies.network.ktor.di.ktorNetworkKoinModule
import org.michaelbel.movies.network.retrofit.di.retrofitNetworkKoinModule
import org.michaelbel.movies.network.ktor.ktorNetworkKoinModule

val networkKoinModule = module {
includes(
ktorNetworkKoinModule,
retrofitNetworkKoinModule
ktorNetworkKoinModule
)
single { AccountNetworkService(get(), get()) }
single { AuthenticationNetworkService(get(), get()) }
single { MovieNetworkService(get(), get()) }
single { SearchNetworkService(get(), get()) }
single { AccountNetworkService(get()) }
single { AuthenticationNetworkService(get()) }
single { MovieNetworkService(get()) }
single { SearchNetworkService(get()) }
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.michaelbel.movies.network.ktor.di
package org.michaelbel.movies.network.ktor

import com.chuckerteam.chucker.api.ChuckerInterceptor
import io.github.rotbolt.flakerokhttpcore.FlakerInterceptor
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.michaelbel.movies.network.ktor

import org.koin.dsl.module

val ktorNetworkKoinModule = module {
includes(
ktorKoinModule
)
single { KtorAccountService(get()) }
single { KtorAuthenticationService(get()) }
single { KtorMovieService(get()) }
single { KtorSearchService(get()) }
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit b838612

Please sign in to comment.