Fixed Throable cast error and changed gradle version in one more place
This commit is contained in:
parent
504e8db46b
commit
c6946c90b4
@ -28,7 +28,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23")
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21")
|
||||
implementation("com.android.tools.build:gradle:7.2.2")
|
||||
implementation ("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20")
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
|
||||
|
||||
plugins {
|
||||
|
@ -18,8 +18,8 @@
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
|
||||
|
@ -32,11 +32,11 @@ object JsSodiumLoader {
|
||||
continuation.resumeWith(Result.success(Unit))
|
||||
null
|
||||
}.catch { e ->
|
||||
val throwable = e as? Throwable
|
||||
val throwable = e.toThrowableOrNull()
|
||||
if (throwable != null) {
|
||||
continuation.resumeWith(Result.failure(throwable))
|
||||
} else {
|
||||
continuation.resumeWith(Result.failure(Exception("Error: $e")))
|
||||
continuation.resumeWith(Result.failure(Throwable("Unknown error", throwable)))
|
||||
}
|
||||
null
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
|
||||
import org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user