Skip to content

Commit

Permalink
Update to kotlin 1.9.21
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantoinefortier committed Dec 1, 2023
1 parent 8691353 commit 3f81bd8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 25 deletions.
6 changes: 2 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
[versions]
androidGradlePlugin = "8.1.1"
androidGradlePlugin = "8.1.4"
androidxStartup = "1.1.1"
kotlin = "1.9.10"
kotlin = "1.9.21"
kotlinxCoroutines = "1.7.3"

[libraries]
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }
androidx-startup-runtime = { module = "androidx.startup:startup-runtime", version.ref = "androidxStartup" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Aug 31 13:20:04 EDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
26 changes: 6 additions & 20 deletions konnectivity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ kotlin {
androidTarget {
publishAllLibraryVariants()
}
ios()
iosX64()
iosArm64()
iosSimulatorArm64()
js(IR) {
nodejs()
Expand All @@ -26,39 +27,24 @@ kotlin {
}

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(libs.kotlinx.coroutines.core)
}
}
val commonTest by getting {
commonTest {
dependencies {
implementation(kotlin("test"))
}
}

val androidMain by getting {
androidMain {
dependencies {
implementation(libs.androidx.startup.runtime)
}
}
val androidUnitTest by getting

val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by getting {
iosSimulatorArm64Main.dependsOn(this)
}
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by getting {
iosSimulatorArm64Test.dependsOn(this)
}

val jsMain by getting
val jsTest by getting {
jsTest {
dependencies {
implementation(kotlin("test-js"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import cocoapods.Reachability.NetworkStatus
import cocoapods.Reachability.Reachability
import cocoapods.Reachability.ReachableViaWWAN
import cocoapods.Reachability.ReachableViaWiFi
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.callbackFlow

@ExperimentalForeignApi
internal class IosKonnectivity : Konnectivity {

private val reachability: Reachability? by lazy {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
package com.mirego.konnectivity

import kotlinx.cinterop.ExperimentalForeignApi

@ExperimentalForeignApi
actual fun Konnectivity(): Konnectivity = IosKonnectivity()

0 comments on commit 3f81bd8

Please sign in to comment.