Skip to content

Commit 0ab215f

Browse files
committed
kotlin 2.2.10, minSdk 21, jdk 17
1 parent 5f98b65 commit 0ab215f

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.classpath
55
.vscode
66
.idea
7+
.kotlin
78
build
89
*.iml
910
Pods

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[versions]
2-
kotlinTestVersion = "1.9.25"
2+
kotlinTestVersion = "2.2.10"
33
androidAppCompatVersion = "1.7.1"
44
materialDesignVersion = "1.13.0"
55
androidLifecycleVersion = "2.2.0"
66
androidCoreTestingVersion = "1.7.0"
77
testJUnitExtVersion = "1.3.0"
8-
coroutinesVersion = "1.8.1"
9-
kotlinxSerializationVersion = "1.6.3"
8+
coroutinesVersion = "1.10.2"
9+
kotlinxSerializationVersion = "1.9.0"
1010
mokoTestVersion = "0.6.1"
1111
mokoJavascriptVersion = "0.4.0"
1212
ziplineVersion = "1.23.0"

javascript-build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repositories {
1111

1212
dependencies {
1313
api("dev.icerock:mobile-multiplatform:0.14.1")
14-
api("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
14+
api("org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.10")
1515
api("com.android.tools.build:gradle:8.12.3")
1616
api("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.15.0")
1717
}

javascript-build-logic/src/main/kotlin/android-base-convention.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ configure<BaseExtension> {
88
compileSdkVersion(36)
99

1010
defaultConfig {
11-
minSdk = 18
11+
minSdk = 21
1212
targetSdk = 36
1313
}
14+
15+
compileOptions {
16+
sourceCompatibility = JavaVersion.VERSION_17
17+
targetCompatibility = JavaVersion.VERSION_17
18+
}
1419
}

javascript/src/iosMain/kotlin/dev/icerock/moko/javascript/JavaScriptEngine.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ actual class JavaScriptEngine actual constructor() {
4545
)
4646
}
4747

48+
@OptIn(BetaInteropApi::class)
4849
actual fun setContextObjects(vararg context: Pair<String, JsType>) {
4950
context.forEach { (key, value) ->
5051
val contextObject: Any? = prepareValueForJsContext(value)
@@ -55,6 +56,7 @@ actual class JavaScriptEngine actual constructor() {
5556
}
5657
}
5758

59+
@OptIn(BetaInteropApi::class)
5860
actual fun evaluate(context: Map<String, JsType>, script: String): JsType {
5961
context.forEach { (key, value) ->
6062
jsContext.setObject(
@@ -132,9 +134,9 @@ private fun JSValue.toMokoJSType(): JsType {
132134
val jsonElement: JsonElement = json.parseToJsonElement(toString_().orEmpty())
133135
if (jsonElement is JsonObject || jsonElement is JsonArray) JsType.Json(jsonElement)
134136
else JsType.Str(toString_().orEmpty())
135-
} catch (ex: SerializationException) {
137+
} catch (_: SerializationException) {
136138
JsType.Str(toString_().orEmpty())
137-
} catch (ex: IllegalStateException) {
139+
} catch (_: IllegalStateException) {
138140
JsType.Str(toString_().orEmpty())
139141
}
140142
isNumber -> JsType.DoubleNum(toDouble())

0 commit comments

Comments
 (0)