upgrade kotlin version to 1.9.22

This commit is contained in:
Simplxs 2024-02-24 16:25:13 +08:00
parent 9a85e4d537
commit 4f1d19fcbd
No known key found for this signature in database
GPG Key ID: E23537FF14DD6507
4 changed files with 11 additions and 18 deletions

View File

@ -92,7 +92,7 @@ android {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.4"
kotlinCompilerExtensionVersion = "1.5.10"
}
packaging {
jniLibs {
@ -127,11 +127,6 @@ android {
}
configureAppSigningConfigsForRelease(project)
packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}
}
fun configureAppSigningConfigsForRelease(project: Project) {

View File

@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.2.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.20" apply false
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
id("com.android.library") version "8.2.0" apply false
}

View File

@ -26,7 +26,7 @@ buildscript {
}
}
dependencies {
classpath("com.android.tools:r8:8.2.26")
classpath("com.android.tools:r8:8.2.47")
}
}

View File

@ -46,16 +46,14 @@ val Collection<Any>.json: JsonArray
get() {
val arrayList = arrayListOf<JsonElement>()
forEach {
if (it != null) {
when (it) {
is JsonElement -> arrayList.add(it)
is Number -> arrayList.add(it.json)
is String -> arrayList.add(it.json)
is Boolean -> arrayList.add(it.json)
is Map<*, *> -> arrayList.add((it as Map<String, Any>).json)
is Collection<*> -> arrayList.add((it as Collection<Any>).json)
else -> error("unknown array type: ${it::class.java}")
}
when (it) {
is JsonElement -> arrayList.add(it)
is Number -> arrayList.add(it.json)
is String -> arrayList.add(it.json)
is Boolean -> arrayList.add(it.json)
is Map<*, *> -> arrayList.add((it as Map<String, Any>).json)
is Collection<*> -> arrayList.add((it as Collection<Any>).json)
else -> error("unknown array type: ${it::class.java}")
}
}
return arrayList.jsonArray