From 4a1ba945fbe829435e669b8fca292dc76c7acb68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Owodzi=C5=84?= Date: Mon, 13 Dec 2021 10:02:16 +0000 Subject: [PATCH] updated Firebase SDKs (#252) * updated Firebase SDKs, fixed one missing -ktx dependency, fixed wrong version of firebase npm dependency in gradle * updated minSdkVersion * adjusting try-catch blocks in jsTest * removed -ktx dependencies --- build.gradle.kts | 6 +++--- firebase-app/build.gradle.kts | 2 +- .../src/jsTest/kotlin/dev/gitlive/firebase/firebase.kt | 2 +- firebase-app/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-auth/build.gradle.kts | 2 +- firebase-auth/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-common/build.gradle.kts | 2 +- firebase-config/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-database/build.gradle.kts | 2 +- firebase-database/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-firestore/build.gradle.kts | 2 +- .../kotlin/dev/gitlive/firebase/firestore/firestore.kt | 4 ++-- firebase-firestore/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-functions/build.gradle.kts | 2 +- firebase-functions/src/nativeInterop/cinterop/Cartfile | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1bf79cd0b..4c5d38a08 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,13 +17,13 @@ buildscript { } } dependencies { - classpath("com.android.tools.build:gradle:7.0.1") + classpath("com.android.tools.build:gradle:7.0.3") classpath("com.adarshr:gradle-test-logger-plugin:2.1.1") } } val targetSdkVersion by extra(30) -val minSdkVersion by extra(16) +val minSdkVersion by extra(19) tasks { val updateVersions by registering { @@ -196,7 +196,7 @@ subprojects { dependencies { "commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2") "androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.2") - "androidMainImplementation"(platform("com.google.firebase:firebase-bom:28.4.1")) + "androidMainImplementation"(platform("com.google.firebase:firebase-bom:29.0.0")) "commonTestImplementation"(kotlin("test-common")) "commonTestImplementation"(kotlin("test-annotations-common")) "commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2") diff --git a/firebase-app/build.gradle.kts b/firebase-app/build.gradle.kts index 530e4ba3e..594414052 100644 --- a/firebase-app/build.gradle.kts +++ b/firebase-app/build.gradle.kts @@ -134,7 +134,7 @@ kotlin { val androidMain by getting { dependencies { - api("com.google.firebase:firebase-common-ktx") + api("com.google.firebase:firebase-common") } } diff --git a/firebase-app/src/jsTest/kotlin/dev/gitlive/firebase/firebase.kt b/firebase-app/src/jsTest/kotlin/dev/gitlive/firebase/firebase.kt index 0a732735e..0e8a91771 100644 --- a/firebase-app/src/jsTest/kotlin/dev/gitlive/firebase/firebase.kt +++ b/firebase-app/src/jsTest/kotlin/dev/gitlive/firebase/firebase.kt @@ -14,7 +14,7 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope try { test() } catch (e: dynamic) { - e.log() + (e as? Throwable)?.log() throw e } }.asDynamic() diff --git a/firebase-app/src/nativeInterop/cinterop/Cartfile b/firebase-app/src/nativeInterop/cinterop/Cartfile index 8d78efb90..8d7d98311 100644 --- a/firebase-app/src/nativeInterop/cinterop/Cartfile +++ b/firebase-app/src/nativeInterop/cinterop/Cartfile @@ -1 +1 @@ -binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.8.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.9.1 diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index 1402f4358..eef472fbe 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -165,7 +165,7 @@ kotlin { val androidMain by getting { dependencies { - api("com.google.firebase:firebase-auth-ktx") + api("com.google.firebase:firebase-auth") } } diff --git a/firebase-auth/src/nativeInterop/cinterop/Cartfile b/firebase-auth/src/nativeInterop/cinterop/Cartfile index c9d68bb30..cd89fe4b6 100644 --- a/firebase-auth/src/nativeInterop/cinterop/Cartfile +++ b/firebase-auth/src/nativeInterop/cinterop/Cartfile @@ -1 +1 @@ -binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" == 8.8.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" == 8.9.1 diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index 2496f3c15..44f7521e5 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -92,7 +92,7 @@ kotlin { val androidMain by getting { dependencies { - api("com.google.firebase:firebase-common-ktx") + api("com.google.firebase:firebase-common") } } diff --git a/firebase-config/src/nativeInterop/cinterop/Cartfile b/firebase-config/src/nativeInterop/cinterop/Cartfile index a944bdb12..031cc8495 100644 --- a/firebase-config/src/nativeInterop/cinterop/Cartfile +++ b/firebase-config/src/nativeInterop/cinterop/Cartfile @@ -1 +1 @@ -binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" == 8.8.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" == 8.9.1 diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index ab68f72d1..d19199249 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -143,7 +143,7 @@ kotlin { val androidMain by getting { dependencies { - api("com.google.firebase:firebase-database-ktx") + api("com.google.firebase:firebase-database") } } diff --git a/firebase-database/src/nativeInterop/cinterop/Cartfile b/firebase-database/src/nativeInterop/cinterop/Cartfile index 48e590b2d..47d3f6e64 100644 --- a/firebase-database/src/nativeInterop/cinterop/Cartfile +++ b/firebase-database/src/nativeInterop/cinterop/Cartfile @@ -1 +1 @@ -binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json" == 8.8.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json" == 8.9.1 diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index 243bf2cd1..dbd1d798f 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -149,7 +149,7 @@ kotlin { val androidMain by getting { dependencies { - api("com.google.firebase:firebase-firestore-ktx") + api("com.google.firebase:firebase-firestore") } } diff --git a/firebase-firestore/src/jsTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/jsTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 2f4951baa..c4b272bb8 100644 --- a/firebase-firestore/src/jsTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/jsTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -16,8 +16,8 @@ actual fun runTest(test: suspend CoroutineScope.() -> Unit) = GlobalScope .promise { try { test() - } catch (e: Throwable) { - e.log() + } catch (e: dynamic) { + (e as? Throwable)?.log() throw e } }.asDynamic() diff --git a/firebase-firestore/src/nativeInterop/cinterop/Cartfile b/firebase-firestore/src/nativeInterop/cinterop/Cartfile index d8580d2e9..3db33c26e 100644 --- a/firebase-firestore/src/nativeInterop/cinterop/Cartfile +++ b/firebase-firestore/src/nativeInterop/cinterop/Cartfile @@ -1 +1 @@ -binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFirestoreBinary.json" == 8.8.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFirestoreBinary.json" == 8.9.1 diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index 6174f47d0..5a644cfb2 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -137,7 +137,7 @@ kotlin { val androidMain by getting { dependencies { - api("com.google.firebase:firebase-functions-ktx") + api("com.google.firebase:firebase-functions") } } diff --git a/firebase-functions/src/nativeInterop/cinterop/Cartfile b/firebase-functions/src/nativeInterop/cinterop/Cartfile index 04b616b81..c03a8d5ed 100644 --- a/firebase-functions/src/nativeInterop/cinterop/Cartfile +++ b/firebase-functions/src/nativeInterop/cinterop/Cartfile @@ -1 +1 @@ -binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFunctionsBinary.json" == 8.8.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFunctionsBinary.json" == 8.9.1