Skip to content

Commit

Permalink
Update to Kotlin 1.9.21 (#9)
Browse files Browse the repository at this point in the history
Also update : 
- Ruby to 3.2.2
- AGP to 8.2.0
  • Loading branch information
marcantoinefortier authored Dec 6, 2023
1 parent 8691353 commit 2994456
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
java openjdk-17
ruby 3.2.1
ruby 3.2.2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="https://user-images.githubusercontent.com/5982196/205750835-4f657a00-1bca-4631-96d9-cc4acbfbd2eb.png" width="600" />
<p><br />A lightweight Kotlin Multiplatform library to monitor network state changes</p>
<a href="https://github.com/mirego/kmp-boilerplate/actions/workflows/ci.yml"><img src="https://github.com/mirego/kmp-boilerplate/actions/workflows/ci.yaml/badge.svg"/></a>
<a href="https://kotlinlang.org/"><img src="https://img.shields.io/badge/kotlin-1.9.10-blue.svg?logo=kotlin"/></a>
<a href="https://kotlinlang.org/"><img src="https://img.shields.io/badge/kotlin-1.9.21-blue.svg?logo=kotlin"/></a>
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/License-BSD_3--Clause-blue.svg"/></a>
</div>

Expand Down
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.2.0"
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

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

0 comments on commit 2994456

Please sign in to comment.