Skip to content

Commit

Permalink
updated Firebase SDKs, fixed one missing -ktx dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
suntrix committed Nov 15, 2021
1 parent 9ce9222 commit a92106b
Show file tree
Hide file tree
Showing 21 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ 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")
}
}
Expand Down Expand Up @@ -197,7 +197,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")
Expand Down
2 changes: 1 addition & 1 deletion firebase-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-common": "1.4.3",
"firebase": "8.10.0",
"firebase": "9.4.1",
"kotlin": "1.5.31",
"kotlinx-coroutines-core": "1.5.2"
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-app/src/nativeInterop/cinterop/Cartfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion firebase-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.4.3",
"firebase": "8.10.0",
"firebase": "9.4.1",
"kotlin": "1.5.31",
"kotlinx-coroutines-core": "1.5.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope
.promise {
try {
test()
} catch (e: dynamic) {
(e as? Throwable)?.log()
} catch (e: Throwable) {
e.log()
throw e
}
}.asDynamic()
Expand Down
2 changes: 1 addition & 1 deletion firebase-auth/src/nativeInterop/cinterop/Cartfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion firebase-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ kotlin {

val jsMain by getting {
dependencies {
api(npm("firebase", "8.7.1"))
api(npm("firebase", "9.4.1"))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-multiplatform-sdk",
"dependencies": {
"firebase": "8.10.0",
"firebase": "9.4.1",
"kotlin": "1.5.31",
"kotlinx-coroutines-core": "1.5.2",
"kotlinx-serialization-kotlinx-serialization-runtime": "1.3.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
*/

@file:JsModule("firebase/app")

@file:JsModule("firebase/compat/app")
package dev.gitlive.firebase

import kotlin.js.Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ package dev.gitlive.firebase

import kotlin.js.Promise

@JsModule("firebase/functions")
@JsModule("firebase/compat/functions")
external object functions

@JsModule("firebase/auth")
@JsModule("firebase/compat/auth")
external object auth

@JsModule("firebase/database")
@JsModule("firebase/compat/database")
external object database

@JsModule("firebase/firestore")
@JsModule("firebase/compat/firestore")
external object firestore

@JsModule("firebase/remote-config")
@JsModule("firebase/compat/remote-config")
external object remoteConfig

typealias SnapshotCallback = (data: firebase.database.DataSnapshot, b: String?) -> Unit
Expand Down
2 changes: 1 addition & 1 deletion firebase-config/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ kotlin {

val androidMain by getting {
dependencies {
api("com.google.firebase:firebase-config")
api("com.google.firebase:firebase-config-ktx")
}
}

Expand Down
2 changes: 1 addition & 1 deletion firebase-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.4.3",
"firebase": "8.10.0",
"firebase": "9.4.1",
"kotlin": "1.5.31",
"kotlinx-coroutines-core": "1.5.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ package dev.gitlive.firebase.remoteconfig
import androidx.test.platform.app.InstrumentationRegistry
import kotlinx.coroutines.runBlocking

actual val emulatorHost: String = "10.0.2.2"

actual val context: Any = InstrumentationRegistry.getInstrumentation().targetContext

actual fun runTest(test: suspend () -> Unit) = runBlocking { test() }
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope
.promise {
try {
test()
} catch (e: dynamic) {
(e as? Throwable)?.log()
} catch (e: Throwable) {
e.log()
throw e
}
}.asDynamic()
Expand Down
2 changes: 1 addition & 1 deletion firebase-config/src/nativeInterop/cinterop/Cartfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion firebase-database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.4.3",
"firebase": "8.10.0",
"firebase": "9.4.1",
"kotlin": "1.5.31",
"kotlinx-coroutines-core": "1.5.2"
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-database/src/nativeInterop/cinterop/Cartfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion firebase-firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.4.3",
"firebase": "8.10.0",
"firebase": "9.4.1",
"kotlin": "1.5.31",
"kotlinx-coroutines-core": "1.5.2"
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-firestore/src/nativeInterop/cinterop/Cartfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion firebase-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.4.3",
"firebase": "8.10.0",
"firebase": "9.4.1",
"kotlin": "1.5.31",
"kotlinx-coroutines-core": "1.5.2"
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-functions/src/nativeInterop/cinterop/Cartfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a92106b

Please sign in to comment.