Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ internal abstract class IpConfigModule {
companion object {
@Provides
@Singleton
internal fun provideHttpQuery(): IpConfigWanInfoRepository.HttpQuery =
fun provideHttpQuery(): IpConfigWanInfoRepository.HttpQuery =
IpConfigWanInfoRepository.KtorHttpQuery()
}

@Binds
internal abstract fun provideWanInfoRepository(repo: IpConfigWanInfoRepository): WanInfoRepository
abstract fun provideWanInfoRepository(repo: IpConfigWanInfoRepository): WanInfoRepository
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import javax.inject.Singleton

@InstallIn(SingletonComponent::class)
@Module
class ServicesModule {
internal class ServicesModule {

companion object {
@Provides
@Singleton
internal fun provideClipboardManager(
fun provideClipboardManager(
@ApplicationContext context: Context,
): ClipboardManager =
context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ internal abstract class AndroidNetworkConnectionModule {
companion object {
@Provides
@Singleton
internal fun provideConnectivityManager(@ApplicationContext appContext: Context): ConnectivityManager =
fun provideConnectivityManager(@ApplicationContext appContext: Context): ConnectivityManager =
getSystemService(appContext, ConnectivityManager::class.java) as ConnectivityManager

@Provides
internal fun providesGetNetworkInterfaceByNameUseCase(): GetNetworkInterfaceByNameUseCase =
fun providesGetNetworkInterfaceByNameUseCase(): GetNetworkInterfaceByNameUseCase =
object : GetNetworkInterfaceByNameUseCase {
override fun invoke(interfaceName: String): NetworkInterface? =
NetworkInterface.getByName(interfaceName)
}

@Provides
internal fun providesFindLocalIpAddressUseCase(
fun providesFindLocalIpAddressUseCase(
getNetworkInterfaceByName: GetNetworkInterfaceByNameUseCase,
): FindLocalIpAddressUseCase = FindLocalIpAddressUseCase(
getNetworkInterfaceByName = getNetworkInterfaceByName
)
}

@Binds
internal abstract fun provideConnectionRepository(repository: AndroidNetworkConnectionRepository): NetworkConnectionRepository
abstract fun provideConnectionRepository(repository: AndroidNetworkConnectionRepository): NetworkConnectionRepository
}
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ googleMaterial = "1.13.0"
javapoet = "1.13.0"
junit4 = "4.13.2"
junitJupiterBom = "6.0.0"
kotlin = "2.2.20"
kotlinCoroutines = "1.10.2"
kotlinSerialization = "1.9.0"
kotlin = "2.4.0"
kotlinCoroutines = "1.11.0"
kotlinSerialization = "1.11.0"
# KSP version must align with Kotlin version: https://github.com/google/ksp/releases
ksp = "2.3.0"
ksp = "2.3.9"
ktor = "3.3.1"
lottie = "6.6.10"
mockk = "1.14.6"
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
// See https://plugins.gradle.org/plugin/org.gradle.toolchains.foojay-resolver-convention
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
// See https://kotlin.github.io/kotlinx-kover/gradle-plugin/aggregated.html
id("org.jetbrains.kotlinx.kover.aggregation") version "0.9.3"
id("org.jetbrains.kotlinx.kover.aggregation") version "0.9.8"
}

kover {
Expand Down