From 4a434a5f3ae7e5b6ee7d87e65be298d7f6d1d684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Owodzin=CC=81?= Date: Tue, 17 Aug 2021 11:12:43 +0100 Subject: [PATCH 01/42] added DocumentSnapshot.dataMap() (fixes #186) --- .../gitlive/firebase/firestore/firestore.kt | 2 ++ .../gitlive/firebase/firestore/firestore.kt | 2 ++ .../gitlive/firebase/firestore/firestore.kt | 18 +++++++++++++++++- .../gitlive/firebase/firestore/firestore.kt | 2 ++ .../gitlive/firebase/firestore/firestore.kt | 12 ++++++++++++ .../gitlive/firebase/firestore/firestore.kt | 2 +- 6 files changed, 36 insertions(+), 2 deletions(-) diff --git a/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index cffad477a..4311e522d 100644 --- a/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -413,6 +413,8 @@ actual class DocumentSnapshot(val android: com.google.firebase.firestore.Documen actual fun data(strategy: DeserializationStrategy) = decode(strategy, android.data) + actual fun dataMap(): Map = android.data ?: mapOf() + actual inline fun get(field: String) = decode(value = android.get(field)) actual fun get(field: String, strategy: DeserializationStrategy) = diff --git a/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 2e5409070..11c34996b 100644 --- a/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -196,6 +196,8 @@ expect class DocumentSnapshot { inline fun data(): T fun data(strategy: DeserializationStrategy): T + fun dataMap(): Map + val exists: Boolean val id: String val reference: DocumentReference diff --git a/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 7c6e64e23..8655373cc 100644 --- a/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -124,7 +124,6 @@ class FirebaseFirestoreTest { } - @Test fun testDocumentAutoId() = runTest { val doc = Firebase.firestore @@ -142,6 +141,23 @@ class FirebaseFirestoreTest { assertEquals("AutoId", resultDoc.get("prop1")) } + @Test + fun testDataMap() = runTest { + val doc = Firebase.firestore + .collection("testDataMap") + .document + + doc.set(FirestoreTest.serializer(), FirestoreTest("dataMap", 123.45)) + + val resultDoc = Firebase.firestore + .collection("testDataMap") + .document(doc.id) + .get() + + assertEquals(true, resultDoc.exists) + assertEquals(mapOf("prop1" to "dataMap", "time" to 123.45), resultDoc.dataMap()) + } + private suspend fun setupFirestoreData() { Firebase.firestore.collection("FirebaseFirestoreTest") .document("one") diff --git a/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 015777452..876bda031 100644 --- a/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -381,6 +381,8 @@ actual class DocumentSnapshot(val ios: FIRDocumentSnapshot) { actual fun data(strategy: DeserializationStrategy) = decode(strategy, ios.data()) + actual fun dataMap(): Map = ios.data()?.map { it.key.toString() to it.value }?.toMap() ?: mapOf() + actual inline fun get(field: String) = decode(value = ios.valueForField(field)) actual fun get(field: String, strategy: DeserializationStrategy) = diff --git a/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index b72393afd..526f1acb9 100644 --- a/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -393,6 +393,8 @@ actual class DocumentSnapshot(val js: firebase.firestore.DocumentSnapshot) { actual fun data(strategy: DeserializationStrategy): T = rethrow { decode(strategy, js.data()) } + actual fun dataMap(): Map = rethrow { mapOf(js.data().asDynamic()) } + actual inline fun get(field: String) = rethrow { decode(value = js.get(field)) } @@ -503,3 +505,13 @@ fun errorToException(e: dynamic) = (e?.code ?: e?.message ?: "") } } } + +// from: https://discuss.kotlinlang.org/t/how-to-access-native-js-object-as-a-map-string-any/509/8 +fun entriesOf(jsObject: dynamic): List> = + (js("Object.entries") as (dynamic) -> Array>) + .invoke(jsObject) + .map { entry -> entry[0] as String to entry[1] } + +// from: https://discuss.kotlinlang.org/t/how-to-access-native-js-object-as-a-map-string-any/509/8 +fun mapOf(jsObject: dynamic): Map = + entriesOf(jsObject).toMap() 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 0987555ca..b3ed41815 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 @@ -15,7 +15,7 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope .promise { try { test() - } catch (e: dynamic) { + } catch (e: Throwable) { e.log() throw e } From f490224f46d9edb1ee3d5a5979c988330c932bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Owodzin=CC=81?= Date: Sat, 28 Aug 2021 15:41:54 +0100 Subject: [PATCH 02/42] updated AGP plugin & Firebase SDKs --- build.gradle.kts | 4 ++-- firebase-app/package.json | 2 +- firebase-app/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-auth/package.json | 2 +- firebase-auth/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-common/package.json | 2 +- firebase-config/package.json | 2 +- firebase-config/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-database/package.json | 2 +- firebase-database/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-firestore/package.json | 2 +- firebase-firestore/src/nativeInterop/cinterop/Cartfile | 2 +- firebase-functions/package.json | 2 +- firebase-functions/src/nativeInterop/cinterop/Cartfile | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index bf5a782b3..a0f7c0f9c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,7 +18,7 @@ buildscript { } } dependencies { - classpath("com.android.tools.build:gradle:7.0.0") + classpath("com.android.tools.build:gradle:7.0.1") classpath("com.adarshr:gradle-test-logger-plugin:2.1.1") } } @@ -209,7 +209,7 @@ subprojects { dependencies { "commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1") "androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.1") - "androidMainImplementation"(platform("com.google.firebase:firebase-bom:28.3.1")) + "androidMainImplementation"(platform("com.google.firebase:firebase-bom:28.4.0")) "commonTestImplementation"(kotlin("test-common")) "commonTestImplementation"(kotlin("test-annotations-common")) "commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1") diff --git a/firebase-app/package.json b/firebase-app/package.json index cd1916bca..e434eac21 100644 --- a/firebase-app/package.json +++ b/firebase-app/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { "@gitlive/firebase-common": "1.4.1", - "firebase": "8.8.1", + "firebase": "8.10.0", "kotlin": "1.5.21", "kotlinx-coroutines-core": "1.5.1" } diff --git a/firebase-app/src/nativeInterop/cinterop/Cartfile b/firebase-app/src/nativeInterop/cinterop/Cartfile index e0f994544..766237c1a 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.5.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.6.0 diff --git a/firebase-auth/package.json b/firebase-auth/package.json index 393cdbfbb..d91be2f65 100644 --- a/firebase-auth/package.json +++ b/firebase-auth/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { "@gitlive/firebase-app": "1.4.1", - "firebase": "8.8.1", + "firebase": "8.10.0", "kotlin": "1.5.21", "kotlinx-coroutines-core": "1.5.1" } diff --git a/firebase-auth/src/nativeInterop/cinterop/Cartfile b/firebase-auth/src/nativeInterop/cinterop/Cartfile index c87f8aa12..245d5135f 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.5.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" == 8.6.0 diff --git a/firebase-common/package.json b/firebase-common/package.json index 885ace498..0f5b83575 100644 --- a/firebase-common/package.json +++ b/firebase-common/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-multiplatform-sdk", "dependencies": { - "firebase": "8.8.1", + "firebase": "8.10.0", "kotlin": "1.5.21", "kotlinx-coroutines-core": "1.5.1", "kotlinx-serialization-kotlinx-serialization-runtime": "1.2.2" diff --git a/firebase-config/package.json b/firebase-config/package.json index ed179cfcb..3d217efa2 100644 --- a/firebase-config/package.json +++ b/firebase-config/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { "@gitlive/firebase-app": "1.4.1", - "firebase": "8.8.1", + "firebase": "8.10.0", "kotlin": "1.5.21", "kotlinx-coroutines-core": "1.5.1" } diff --git a/firebase-config/src/nativeInterop/cinterop/Cartfile b/firebase-config/src/nativeInterop/cinterop/Cartfile index 525ebedd6..2e485003c 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.5.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" == 8.6.0 diff --git a/firebase-database/package.json b/firebase-database/package.json index c2eedf3cd..8ed86a02d 100644 --- a/firebase-database/package.json +++ b/firebase-database/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { "@gitlive/firebase-app": "1.4.1", - "firebase": "8.8.1", + "firebase": "8.10.0", "kotlin": "1.5.21", "kotlinx-coroutines-core": "1.5.1" } diff --git a/firebase-database/src/nativeInterop/cinterop/Cartfile b/firebase-database/src/nativeInterop/cinterop/Cartfile index 3391e187f..05b39ac4d 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.5.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json" == 8.6.0 diff --git a/firebase-firestore/package.json b/firebase-firestore/package.json index b06b89a2b..6c4d3a84f 100644 --- a/firebase-firestore/package.json +++ b/firebase-firestore/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { "@gitlive/firebase-app": "1.4.1", - "firebase": "8.8.1", + "firebase": "8.10.0", "kotlin": "1.5.21", "kotlinx-coroutines-core": "1.5.1" } diff --git a/firebase-firestore/src/nativeInterop/cinterop/Cartfile b/firebase-firestore/src/nativeInterop/cinterop/Cartfile index f8ef0e3ab..aaf8803f4 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.5.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFirestoreBinary.json" == 8.6.0 diff --git a/firebase-functions/package.json b/firebase-functions/package.json index a2e96aec7..6ea89f89d 100644 --- a/firebase-functions/package.json +++ b/firebase-functions/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { "@gitlive/firebase-app": "1.4.1", - "firebase": "8.8.1", + "firebase": "8.10.0", "kotlin": "1.5.21", "kotlinx-coroutines-core": "1.5.1" } diff --git a/firebase-functions/src/nativeInterop/cinterop/Cartfile b/firebase-functions/src/nativeInterop/cinterop/Cartfile index 75898582b..1bd88ed9d 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.5.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFunctionsBinary.json" == 8.6.0 From fba539d48355dd87411a6cec0d3a78391cfde737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Owodzin=CC=81?= Date: Sat, 28 Aug 2021 16:04:06 +0100 Subject: [PATCH 03/42] updated Kotlin to 1.5.30 --- build.gradle.kts | 2 +- firebase-app/package.json | 2 +- firebase-auth/build.gradle.kts | 2 +- firebase-auth/package.json | 2 +- firebase-common/build.gradle.kts | 10 +++++----- firebase-common/package.json | 2 +- .../kotlin/dev/gitlive/firebase/serializers.kt | 2 -- firebase-config/build.gradle.kts | 2 +- firebase-config/package.json | 2 +- firebase-database/build.gradle.kts | 6 +++--- firebase-database/package.json | 2 +- firebase-firestore/build.gradle.kts | 6 +++--- firebase-firestore/package.json | 2 +- firebase-functions/build.gradle.kts | 4 ++-- firebase-functions/package.json | 2 +- 15 files changed, 23 insertions(+), 25 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a0f7c0f9c..a456986f2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { - kotlin("multiplatform") version "1.5.21" apply false + kotlin("multiplatform") version "1.5.30" apply false id("base") } diff --git a/firebase-app/package.json b/firebase-app/package.json index e434eac21..78f59672f 100644 --- a/firebase-app/package.json +++ b/firebase-app/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-common": "1.4.1", "firebase": "8.10.0", - "kotlin": "1.5.21", + "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" } } diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index 51bff83d9..2c3e7df74 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -148,7 +148,7 @@ kotlin { apiVersion = "1.5" languageVersion = "1.5" progressiveMode = true - useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi") + optIn("kotlinx.coroutines.ExperimentalCoroutinesApi") } } diff --git a/firebase-auth/package.json b/firebase-auth/package.json index d91be2f65..d801f5cbf 100644 --- a/firebase-auth/package.json +++ b/firebase-auth/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.1", "firebase": "8.10.0", - "kotlin": "1.5.21", + "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" } } diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index 3a2f2282d..041a0e065 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -9,7 +9,7 @@ version = project.property("firebase-common.version") as String plugins { id("com.android.library") kotlin("multiplatform") - kotlin("plugin.serialization") version "1.5.21" + kotlin("plugin.serialization") version "1.5.30" } android { @@ -80,10 +80,10 @@ kotlin { apiVersion = "1.5" languageVersion = "1.5" progressiveMode = true - useExperimentalAnnotation("kotlin.Experimental") - useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi") - useExperimentalAnnotation("kotlinx.serialization.ExperimentalSerializationApi") - useExperimentalAnnotation("kotlinx.serialization.InternalSerializationApi") + optIn("kotlin.Experimental") + optIn("kotlinx.coroutines.ExperimentalCoroutinesApi") + optIn("kotlinx.serialization.ExperimentalSerializationApi") + optIn("kotlinx.serialization.InternalSerializationApi") } } diff --git a/firebase-common/package.json b/firebase-common/package.json index 0f5b83575..7fca97b3d 100644 --- a/firebase-common/package.json +++ b/firebase-common/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/GitLiveApp/firebase-kotlin-multiplatform-sdk", "dependencies": { "firebase": "8.10.0", - "kotlin": "1.5.21", + "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1", "kotlinx-serialization-kotlinx-serialization-runtime": "1.2.2" } diff --git a/firebase-common/src/commonMain/kotlin/dev/gitlive/firebase/serializers.kt b/firebase-common/src/commonMain/kotlin/dev/gitlive/firebase/serializers.kt index 32ca42c38..43461fa15 100644 --- a/firebase-common/src/commonMain/kotlin/dev/gitlive/firebase/serializers.kt +++ b/firebase-common/src/commonMain/kotlin/dev/gitlive/firebase/serializers.kt @@ -36,7 +36,6 @@ class FirebaseMapSerializer : KSerializer> { override fun isElementOptional(index: Int) = false } - @InternalSerializationApi @Suppress("UNCHECKED_CAST") override fun serialize(encoder: Encoder, value: Map) { map = value @@ -81,7 +80,6 @@ class FirebaseListSerializer : KSerializer> { override fun isElementOptional(index: Int) = false } - @InternalSerializationApi @Suppress("UNCHECKED_CAST") override fun serialize(encoder: Encoder, value: Iterable) { list = value.toList() diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index 117069ab5..e35024c74 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -125,7 +125,7 @@ kotlin { apiVersion = "1.5" languageVersion = "1.5" progressiveMode = true - useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi") + optIn("kotlinx.coroutines.ExperimentalCoroutinesApi") } } diff --git a/firebase-config/package.json b/firebase-config/package.json index 3d217efa2..47b05ea3a 100644 --- a/firebase-config/package.json +++ b/firebase-config/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.1", "firebase": "8.10.0", - "kotlin": "1.5.21", + "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" } } diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index bc10120a3..3fc78b104 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -124,9 +124,9 @@ kotlin { apiVersion = "1.5" languageVersion = "1.5" progressiveMode = true - useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi") - useExperimentalAnnotation("kotlinx.coroutines.FlowPreview") - useExperimentalAnnotation("kotlinx.serialization.InternalSerializationApi") + optIn("kotlinx.coroutines.ExperimentalCoroutinesApi") + optIn("kotlinx.coroutines.FlowPreview") + optIn("kotlinx.serialization.InternalSerializationApi") } } diff --git a/firebase-database/package.json b/firebase-database/package.json index 8ed86a02d..d836c1f61 100644 --- a/firebase-database/package.json +++ b/firebase-database/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.1", "firebase": "8.10.0", - "kotlin": "1.5.21", + "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" } } diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index bafa41f76..5aac4fda9 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -10,7 +10,7 @@ version = project.property("firebase-firestore.version") as String plugins { id("com.android.library") kotlin("multiplatform") - kotlin("plugin.serialization") version "1.5.21" + kotlin("plugin.serialization") version "1.5.30" } android { @@ -131,8 +131,8 @@ kotlin { apiVersion = "1.5" languageVersion = "1.5" progressiveMode = true - useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi") - useExperimentalAnnotation("kotlinx.serialization.InternalSerializationApi") + optIn("kotlinx.coroutines.ExperimentalCoroutinesApi") + optIn("kotlinx.serialization.InternalSerializationApi") } } diff --git a/firebase-firestore/package.json b/firebase-firestore/package.json index 6c4d3a84f..86dc54ab2 100644 --- a/firebase-firestore/package.json +++ b/firebase-firestore/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.1", "firebase": "8.10.0", - "kotlin": "1.5.21", + "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" } } diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index 5d4f7454a..065542772 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -119,8 +119,8 @@ kotlin { apiVersion = "1.5" languageVersion = "1.5" progressiveMode = true - useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi") - useExperimentalAnnotation("kotlinx.serialization.InternalSerializationApi") + optIn("kotlinx.coroutines.ExperimentalCoroutinesApi") + optIn("kotlinx.serialization.InternalSerializationApi") } } diff --git a/firebase-functions/package.json b/firebase-functions/package.json index 6ea89f89d..dab55aa87 100644 --- a/firebase-functions/package.json +++ b/firebase-functions/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.1", "firebase": "8.10.0", - "kotlin": "1.5.21", + "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" } } From 700858b49ee70c3b7b37a690db96246f7bdeae87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Owodzin=CC=81?= Date: Wed, 1 Sep 2021 10:41:17 +0100 Subject: [PATCH 04/42] PR feedback --- .../kotlin/dev/gitlive/firebase/firestore/firestore.kt | 2 +- .../iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 4311e522d..67fb451d8 100644 --- a/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -413,7 +413,7 @@ actual class DocumentSnapshot(val android: com.google.firebase.firestore.Documen actual fun data(strategy: DeserializationStrategy) = decode(strategy, android.data) - actual fun dataMap(): Map = android.data ?: mapOf() + actual fun dataMap(): Map = android.data ?: emptyMap() actual inline fun get(field: String) = decode(value = android.get(field)) diff --git a/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 876bda031..c59e9f148 100644 --- a/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -381,7 +381,7 @@ actual class DocumentSnapshot(val ios: FIRDocumentSnapshot) { actual fun data(strategy: DeserializationStrategy) = decode(strategy, ios.data()) - actual fun dataMap(): Map = ios.data()?.map { it.key.toString() to it.value }?.toMap() ?: mapOf() + actual fun dataMap(): Map = ios.data()?.map { it.key.toString() to it.value }?.toMap() ?: emptyMap() actual inline fun get(field: String) = decode(value = ios.valueForField(field)) From 178827003bace863a6ed0ad5ea3197669423afb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Owodzin=CC=81?= Date: Wed, 1 Sep 2021 10:51:28 +0100 Subject: [PATCH 05/42] Gradle update --- gradle.properties | 6 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index a0ae5bd10..b95709a69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,14 +8,14 @@ kotlin.js.experimental.generateKotlinExternals=false #kotlin.mpp.enableCompatibilityMetadataVariant=true #kotlin.mpp.enableGranularSourceSetsMetadata=true kotlin.mpp.stability.nowarn=true -#kotlin.native.cacheKind=none +kotlin.native.cacheKind.iosX64=none #kotlin.native.enableDependencyPropagation=false kotlin.native.enableParallelExecutionCheck=false kotlin.setJvmTargetFromAndroidCompileOptions=true org.gradle.jvmargs=-Xmx2048m org.gradle.parallel=true -testOptions.unitTests.isIncludeAndroidResources = true -kotlin.native.cacheKind.iosX64=none +#systemProp.org.gradle.internal.publish.checksums.insecure=true enable if https://github.com/gradle/gradle/issues/11308 happens during publishing +testOptions.unitTests.isIncludeAndroidResources=true # Versions: firebase-app.version=1.4.1 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 469b8ac11..760721ee7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip From e126af8b249d681521ef62b9ac720f68f1982fbe Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 7 Sep 2021 14:14:25 +0100 Subject: [PATCH 06/42] Bumped version and updated readme --- README.md | 30 +++++++++++++++--------------- firebase-app/package.json | 2 +- firebase-auth/package.json | 2 +- firebase-config/package.json | 2 +- firebase-database/package.json | 2 +- firebase-firestore/package.json | 2 +- firebase-functions/package.json | 2 +- gradle.properties | 16 ++++++++-------- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index cee392130..06a18d02b 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ The following libraries are available for the various Firebase products. | Service or Product | Gradle Dependency | API Coverage | | ------------------------------------------------------------------------------------ | :-----------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Authentication](https://firebase.google.com/docs/auth#kotlin-android) | [`dev.gitlive:firebase-auth:1.4.1`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.4.1/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt) | -| [Realtime Database](https://firebase.google.com/docs/database#kotlin-android) | [`dev.gitlive:firebase-database:1.4.1`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.4.1/pom) | [![70%](https://img.shields.io/badge/-70%25-orange?style=flat-square)](/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt) | -| [Cloud Firestore](https://firebase.google.com/docs/firestore#kotlin-android) | [`dev.gitlive:firebase-firestore:1.4.1`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.4.1/pom) | [![60%](https://img.shields.io/badge/-60%25-orange?style=flat-square)](/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt) | -| [Cloud Functions](https://firebase.google.com/docs/functions/callable#kotlin-android)| [`dev.gitlive:firebase-functions:1.4.1`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.4.1/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-functions/src/commonMain/kotlin/dev/gitlive/firebase/functions/functions.kt) | -| [Cloud Messaging](https://firebase.google.com/docs/messaging#kotlin-android) | [`dev.gitlive:firebase-messaging:1.4.1`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.4.1/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) | -| [Cloud Storage](https://firebase.google.com/docs/storage#kotlin-android) | [`dev.gitlive:firebase-storage:1.4.1`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.4.1/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) | -| [Remote Config](https://firebase.google.com/docs/remote-config/get-started?platform=android) | [`dev.gitlive:firebase-config:1.4.1`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.4.1/pom) | ![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square) | +| [Authentication](https://firebase.google.com/docs/auth#kotlin-android) | [`dev.gitlive:firebase-auth:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.4.2/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt) | +| [Realtime Database](https://firebase.google.com/docs/database#kotlin-android) | [`dev.gitlive:firebase-database:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.4.2/pom) | [![70%](https://img.shields.io/badge/-70%25-orange?style=flat-square)](/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt) | +| [Cloud Firestore](https://firebase.google.com/docs/firestore#kotlin-android) | [`dev.gitlive:firebase-firestore:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.4.2/pom) | [![60%](https://img.shields.io/badge/-60%25-orange?style=flat-square)](/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt) | +| [Cloud Functions](https://firebase.google.com/docs/functions/callable#kotlin-android)| [`dev.gitlive:firebase-functions:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.4.2/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-functions/src/commonMain/kotlin/dev/gitlive/firebase/functions/functions.kt) | +| [Cloud Messaging](https://firebase.google.com/docs/messaging#kotlin-android) | [`dev.gitlive:firebase-messaging:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.4.2/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) | +| [Cloud Storage](https://firebase.google.com/docs/storage#kotlin-android) | [`dev.gitlive:firebase-storage:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.4.2/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) | +| [Remote Config](https://firebase.google.com/docs/remote-config/get-started?platform=android) | [`dev.gitlive:firebase-config:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.4.2/pom) | ![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square) | @@ -66,7 +66,7 @@ The Firebase Kotlin SDK uses Kotlin serialization to read and write custom class ```groovy plugins { kotlin("multiplatform") // or kotlin("jvm") or any other kotlin plugin - kotlin("plugin.serialization") version "1.5.10" + kotlin("plugin.serialization") version "1.5.30" } ``` @@ -166,13 +166,13 @@ If you are building a Kotlin multiplatform library which will be consumed from J ```json "dependencies": { - "@gitlive/firebase-auth": "1.4.1", - "@gitlive/firebase-database": "1.4.1", - "@gitlive/firebase-firestore": "1.4.1", - "@gitlive/firebase-functions": "1.4.1", - "@gitlive/firebase-storage": "1.4.1", - "@gitlive/firebase-messaging": "1.4.1", - "@gitlive/firebase-config": "1.4.1" + "@gitlive/firebase-auth": "1.4.2", + "@gitlive/firebase-database": "1.4.2", + "@gitlive/firebase-firestore": "1.4.2", + "@gitlive/firebase-functions": "1.4.2", + "@gitlive/firebase-storage": "1.4.2", + "@gitlive/firebase-messaging": "1.4.2", + "@gitlive/firebase-config": "1.4.2" } ``` diff --git a/firebase-app/package.json b/firebase-app/package.json index 78f59672f..e08ef9038 100644 --- a/firebase-app/package.json +++ b/firebase-app/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-common": "1.4.1", + "@gitlive/firebase-common": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" diff --git a/firebase-auth/package.json b/firebase-auth/package.json index d801f5cbf..32fe865f5 100644 --- a/firebase-auth/package.json +++ b/firebase-auth/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.1", + "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" diff --git a/firebase-config/package.json b/firebase-config/package.json index 47b05ea3a..069c1ba7d 100644 --- a/firebase-config/package.json +++ b/firebase-config/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.1", + "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" diff --git a/firebase-database/package.json b/firebase-database/package.json index d836c1f61..c9de57e2d 100644 --- a/firebase-database/package.json +++ b/firebase-database/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.1", + "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" diff --git a/firebase-firestore/package.json b/firebase-firestore/package.json index 86dc54ab2..9f71c6cf5 100644 --- a/firebase-firestore/package.json +++ b/firebase-firestore/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.1", + "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" diff --git a/firebase-functions/package.json b/firebase-functions/package.json index dab55aa87..2c254a2a0 100644 --- a/firebase-functions/package.json +++ b/firebase-functions/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.1", + "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.1" diff --git a/gradle.properties b/gradle.properties index b95709a69..4d4351bea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,14 +14,14 @@ kotlin.native.enableParallelExecutionCheck=false kotlin.setJvmTargetFromAndroidCompileOptions=true org.gradle.jvmargs=-Xmx2048m org.gradle.parallel=true -#systemProp.org.gradle.internal.publish.checksums.insecure=true enable if https://github.com/gradle/gradle/issues/11308 happens during publishing +systemProp.org.gradle.internal.publish.checksums.insecure=true testOptions.unitTests.isIncludeAndroidResources=true # Versions: -firebase-app.version=1.4.1 -firebase-auth.version=1.4.1 -firebase-common.version=1.4.1 -firebase-database.version=1.4.1 -firebase-firestore.version=1.4.1 -firebase-functions.version=1.4.1 -firebase-config.version=1.4.1 +firebase-app.version=1.4.2 +firebase-auth.version=1.4.2 +firebase-common.version=1.4.2 +firebase-database.version=1.4.2 +firebase-firestore.version=1.4.2 +firebase-functions.version=1.4.2 +firebase-config.version=1.4.2 From b66b77f746866d662a7518896bbe61c2fa693667 Mon Sep 17 00:00:00 2001 From: pauldavies83 Date: Fri, 17 Sep 2021 14:02:02 +0100 Subject: [PATCH 07/42] =?UTF-8?q?=E2=9E=95=20Add=20iosSimulatorArm64=20tar?= =?UTF-8?q?get,=20introduced=20in=20KMM=201.5.30=20=E2=AC=86=EF=B8=8F=20Bu?= =?UTF-8?q?mp=20kotlinx-coroutines=20to=201.5.2=20(which=20adds=20the=20sa?= =?UTF-8?q?me=20targets)=20=E2=AC=86=EF=B8=8F=20Bump=20kotlinx-serializati?= =?UTF-8?q?on=20to=201.3.0-RC=20(which=20adds=20the=20same=20targets)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 6 +++--- firebase-app/package.json | 2 +- firebase-auth/package.json | 2 +- firebase-common/build.gradle.kts | 19 +++++++++---------- firebase-common/package.json | 2 +- firebase-config/package.json | 2 +- firebase-database/package.json | 2 +- firebase-firestore/package.json | 2 +- firebase-functions/package.json | 2 +- 9 files changed, 19 insertions(+), 20 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a456986f2..2160dab88 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -207,12 +207,12 @@ subprojects { } dependencies { - "commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1") - "androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.1") + "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.0")) "commonTestImplementation"(kotlin("test-common")) "commonTestImplementation"(kotlin("test-annotations-common")) - "commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1") + "commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2") "jsTestImplementation"(kotlin("test-js")) "androidAndroidTestImplementation"(kotlin("test-junit")) "androidAndroidTestImplementation"("junit:junit:4.13.2") diff --git a/firebase-app/package.json b/firebase-app/package.json index e08ef9038..569347617 100644 --- a/firebase-app/package.json +++ b/firebase-app/package.json @@ -26,6 +26,6 @@ "@gitlive/firebase-common": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", - "kotlinx-coroutines-core": "1.5.1" + "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-auth/package.json b/firebase-auth/package.json index 32fe865f5..ca07d0f26 100644 --- a/firebase-auth/package.json +++ b/firebase-auth/package.json @@ -26,6 +26,6 @@ "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", - "kotlinx-coroutines-core": "1.5.1" + "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index 041a0e065..ee32e66bb 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -46,15 +46,8 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - - } - - if (project.extra["ideaActive"] as Boolean) { - iosX64("ios", nativeTargetConfig()) - } else { - ios(configure = nativeTargetConfig()) - } + ios() + iosSimulatorArm64() js { useCommonJs() @@ -89,7 +82,7 @@ kotlin { val commonMain by getting { dependencies { - api("org.jetbrains.kotlinx:kotlinx-serialization-core:1.2.2") + api("org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.0-RC") } } @@ -100,6 +93,12 @@ kotlin { } val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) + + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) val jsMain by getting { dependencies { diff --git a/firebase-common/package.json b/firebase-common/package.json index 7fca97b3d..aa15bf6fa 100644 --- a/firebase-common/package.json +++ b/firebase-common/package.json @@ -25,7 +25,7 @@ "dependencies": { "firebase": "8.10.0", "kotlin": "1.5.30", - "kotlinx-coroutines-core": "1.5.1", + "kotlinx-coroutines-core": "1.5.2", "kotlinx-serialization-kotlinx-serialization-runtime": "1.2.2" } } diff --git a/firebase-config/package.json b/firebase-config/package.json index 069c1ba7d..bf92a5db6 100644 --- a/firebase-config/package.json +++ b/firebase-config/package.json @@ -26,6 +26,6 @@ "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", - "kotlinx-coroutines-core": "1.5.1" + "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-database/package.json b/firebase-database/package.json index c9de57e2d..5ced5cf67 100644 --- a/firebase-database/package.json +++ b/firebase-database/package.json @@ -26,6 +26,6 @@ "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", - "kotlinx-coroutines-core": "1.5.1" + "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-firestore/package.json b/firebase-firestore/package.json index 9f71c6cf5..5e888d979 100644 --- a/firebase-firestore/package.json +++ b/firebase-firestore/package.json @@ -26,6 +26,6 @@ "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", - "kotlinx-coroutines-core": "1.5.1" + "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-functions/package.json b/firebase-functions/package.json index 2c254a2a0..52318978d 100644 --- a/firebase-functions/package.json +++ b/firebase-functions/package.json @@ -26,6 +26,6 @@ "@gitlive/firebase-app": "1.4.2", "firebase": "8.10.0", "kotlin": "1.5.30", - "kotlinx-coroutines-core": "1.5.1" + "kotlinx-coroutines-core": "1.5.2" } } From fa7a11897af010e9153e1200645a6f9a5e735f04 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Wed, 22 Sep 2021 19:59:43 +0100 Subject: [PATCH 08/42] =?UTF-8?q?Removed=20direct=20reference=20of=20ktx?= =?UTF-8?q?=20to=20be=20in-line=20with=20the=20other=20android=20=E2=80=A6?= =?UTF-8?q?=20(#224)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removed direct reference of ktx to be in-line with the other android targets and firebase projects. * use library without ktx reference --- firebase-config/build.gradle.kts | 2 +- .../firebase/remoteconfig/FirebaseRemoteConfig.kt | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index e35024c74..e480822b4 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -138,7 +138,7 @@ kotlin { val androidMain by getting { dependencies { - api("com.google.firebase:firebase-config-ktx") + api("com.google.firebase:firebase-config") } } diff --git a/firebase-config/src/androidMain/kotlin/dev/gitlive/firebase/remoteconfig/FirebaseRemoteConfig.kt b/firebase-config/src/androidMain/kotlin/dev/gitlive/firebase/remoteconfig/FirebaseRemoteConfig.kt index 59b9108b7..2e43b9a10 100644 --- a/firebase-config/src/androidMain/kotlin/dev/gitlive/firebase/remoteconfig/FirebaseRemoteConfig.kt +++ b/firebase-config/src/androidMain/kotlin/dev/gitlive/firebase/remoteconfig/FirebaseRemoteConfig.kt @@ -4,21 +4,18 @@ package dev.gitlive.firebase.remoteconfig import com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException import com.google.firebase.remoteconfig.FirebaseRemoteConfigFetchThrottledException import com.google.firebase.remoteconfig.FirebaseRemoteConfigServerException -import com.google.firebase.remoteconfig.ktx.remoteConfig -import com.google.firebase.remoteconfig.ktx.remoteConfigSettings import dev.gitlive.firebase.Firebase import dev.gitlive.firebase.FirebaseApp import kotlinx.coroutines.tasks.await -import com.google.firebase.ktx.Firebase as AndroidFirebase import com.google.firebase.remoteconfig.FirebaseRemoteConfig as AndroidFirebaseRemoteConfig import com.google.firebase.remoteconfig.FirebaseRemoteConfigInfo as AndroidFirebaseRemoteConfigInfo import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings as AndroidFirebaseRemoteConfigSettings actual val Firebase.remoteConfig: FirebaseRemoteConfig - get() = FirebaseRemoteConfig(AndroidFirebase.remoteConfig) + get() = FirebaseRemoteConfig(com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance()) actual fun Firebase.remoteConfig(app: FirebaseApp): FirebaseRemoteConfig = - FirebaseRemoteConfig(AndroidFirebase.remoteConfig) + FirebaseRemoteConfig(com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(app.android)) actual class FirebaseRemoteConfig internal constructor(val android: AndroidFirebaseRemoteConfig) { actual val all: Map @@ -29,10 +26,10 @@ actual class FirebaseRemoteConfig internal constructor(val android: AndroidFireb actual suspend fun settings(init: FirebaseRemoteConfigSettings.() -> Unit) { val settings = FirebaseRemoteConfigSettings().apply(init) - val androidSettings = remoteConfigSettings { - minimumFetchIntervalInSeconds = settings.minimumFetchIntervalInSeconds - fetchTimeoutInSeconds = settings.fetchTimeoutInSeconds - } + val androidSettings = com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings.Builder() + .setMinimumFetchIntervalInSeconds(settings.minimumFetchIntervalInSeconds) + .setFetchTimeoutInSeconds(settings.fetchTimeoutInSeconds) + .build() android.setConfigSettingsAsync(androidSettings).await() } From 2c207d1297f8cc9e372cf3a459141c8d1e7f3734 Mon Sep 17 00:00:00 2001 From: pauldavies83 Date: Thu, 23 Sep 2021 17:01:05 +0100 Subject: [PATCH 09/42] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20replicate=20config?= =?UTF-8?q?=20to=20other=20modules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 12 ------------ firebase-app/build.gradle.kts | 24 ++++++++++++++++-------- firebase-auth/build.gradle.kts | 28 +++++++++++++++++----------- firebase-config/build.gradle.kts | 29 ++++++++++++++++++----------- firebase-database/build.gradle.kts | 28 +++++++++++++++++----------- firebase-firestore/build.gradle.kts | 28 +++++++++++++++++----------- firebase-functions/build.gradle.kts | 28 +++++++++++++++++----------- 7 files changed, 102 insertions(+), 75 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2160dab88..9ab1f39bc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,3 @@ -import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties import org.apache.tools.ant.taskdefs.condition.Os import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent @@ -26,15 +25,6 @@ buildscript { val targetSdkVersion by extra(30) val minSdkVersion by extra(16) -// TODO: Hierarchical project structures are not fully supported in IDEA, enable only for a regular built (https://youtrack.jetbrains.com/issue/KT-35011) -// add idea.active=true for local development -val _ideaActive = gradleLocalProperties(rootDir)["idea.active"] == "true" - -//if (!_ideaActive) { -// ext["kotlin.mpp.enableGranularSourceSetsMetadata"] = "true" -// ext["kotlin.native.enableDependencyPropagation"] = "false" -//} - tasks { val updateVersions by registering { dependsOn( @@ -51,8 +41,6 @@ tasks { subprojects { - val ideaActive by extra(_ideaActive) - group = "dev.gitlive" apply(plugin="com.adarshr.test-logger") diff --git a/firebase-app/build.gradle.kts b/firebase-app/build.gradle.kts index b9bbd9f7c..a45a18ca9 100644 --- a/firebase-app/build.gradle.kts +++ b/firebase-app/build.gradle.kts @@ -44,6 +44,13 @@ android { } } +val KonanTarget.archVariant: String + get() = if (this is KonanTarget.IOS_X64 || this is KonanTarget.IOS_SIMULATOR_ARM64) { + "ios-arm64_i386_x86_64-simulator" + } else { + "ios-arm64_armv7" + } + kotlin { android { @@ -65,9 +72,7 @@ kotlin { "nanopb", "PromisesObjC" ).map { - val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ) @@ -86,11 +91,8 @@ kotlin { } } - if (project.extra["ideaActive"] as Boolean) { - iosX64("ios", nativeTargetConfig()) - } else { - ios(configure = nativeTargetConfig()) - } + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) js { useCommonJs() @@ -132,6 +134,12 @@ kotlin { } val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) + + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) val jsMain by getting } diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index 2c3e7df74..b6aa9fb82 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -67,6 +67,13 @@ android { // logEmulatorOutput(false) //} +val KonanTarget.archVariant: String + get() = if (this is KonanTarget.IOS_X64 || this is KonanTarget.IOS_SIMULATOR_ARM64) { + "ios-arm64_i386_x86_64-simulator" + } else { + "ios-arm64_armv7" + } + kotlin { android { @@ -88,18 +95,14 @@ kotlin { "nanopb", "PromisesObjC" ).map { - val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$${konanTarget.archVariant}") } ).plus( listOf( "FirebaseAuth", "GTMSessionFetcher" ).map { - val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ) @@ -118,11 +121,8 @@ kotlin { } } - if (project.extra["ideaActive"] as Boolean) { - iosX64("ios", nativeTargetConfig()) - } else { - ios(configure = nativeTargetConfig()) - } + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) js { useCommonJs() @@ -166,6 +166,12 @@ kotlin { } val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) + + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) val jsMain by getting } diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index e35024c74..92bf1b375 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -3,6 +3,7 @@ */ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget +import org.jetbrains.kotlin.konan.target.KonanTarget version = project.property("firebase-config.version") as String @@ -55,6 +56,13 @@ android { // logEmulatorOutput(false) //} +val KonanTarget.archVariant: String + get() = if (this is KonanTarget.IOS_X64 || this is KonanTarget.IOS_SIMULATOR_ARM64) { + "ios-arm64_i386_x86_64-simulator" + } else { + "ios-arm64_armv7" + } + kotlin { android { @@ -73,17 +81,13 @@ kotlin { "PromisesObjC", "nanopb" ).map { - val archVariant = - if (konanTarget is org.jetbrains.kotlin.konan.target.KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") }.plus( listOf( "FirebaseABTesting", "FirebaseRemoteConfig" ).map { - val archVariant = - if (konanTarget is org.jetbrains.kotlin.konan.target.KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ) @@ -102,11 +106,8 @@ kotlin { } } - if (project.extra["ideaActive"] as Boolean) { - iosX64("ios", nativeTargetConfig()) - } else { - ios(configure = nativeTargetConfig()) - } + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) js { useCommonJs() @@ -143,6 +144,12 @@ kotlin { } val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) + + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) val jsMain by getting } diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index 3fc78b104..352c3b304 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -43,6 +43,13 @@ android { } } +val KonanTarget.archVariant: String + get() = if (this is KonanTarget.IOS_X64 || this is KonanTarget.IOS_SIMULATOR_ARM64) { + "ios-arm64_i386_x86_64-simulator" + } else { + "ios-arm64_armv7" + } + kotlin { android { @@ -64,18 +71,14 @@ kotlin { "nanopb", "PromisesObjC" ).map { - val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ).plus( listOf( "FirebaseDatabase", "leveldb-library" ).map { - val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ) @@ -94,11 +97,8 @@ kotlin { } } - if (project.extra["ideaActive"] as Boolean) { - iosX64("ios", nativeTargetConfig()) - } else { - ios(configure = nativeTargetConfig()) - } + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) js { useCommonJs() @@ -144,6 +144,12 @@ kotlin { } val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) + + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) val jsMain by getting } diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index 5aac4fda9..b3a2e30f2 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -46,6 +46,13 @@ android { } } +val KonanTarget.archVariant: String + get() = if (this is KonanTarget.IOS_X64 || this is KonanTarget.IOS_SIMULATOR_ARM64) { + "ios-arm64_i386_x86_64-simulator" + } else { + "ios-arm64_armv7" + } + kotlin { android { @@ -67,9 +74,7 @@ kotlin { "nanopb", "PromisesObjC" ).map { - val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ).plus( listOf( @@ -80,9 +85,7 @@ kotlin { "gRPC-C++", "leveldb-library" ).map { - val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ) @@ -101,11 +104,8 @@ kotlin { } } - if (project.extra["ideaActive"] as Boolean) { - iosX64("ios", nativeTargetConfig()) - } else { - ios(configure = nativeTargetConfig()) - } + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) js { useCommonJs() @@ -150,6 +150,12 @@ kotlin { } val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) + + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) val jsMain by getting } diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index 065542772..efcb5016d 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -38,6 +38,13 @@ android { } } +val KonanTarget.archVariant: String + get() = if (this is KonanTarget.IOS_X64 || this is KonanTarget.IOS_SIMULATOR_ARM64) { + "ios-arm64_i386_x86_64-simulator" + } else { + "ios-arm64_armv7" + } + kotlin { android { @@ -59,18 +66,14 @@ kotlin { "nanopb", "PromisesObjC" ).map { - val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ).plus( listOf( "FirebaseFunctions", "GTMSessionFetcher" ).map { - val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7" - - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant") + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ) @@ -89,11 +92,8 @@ kotlin { } } - if (project.extra["ideaActive"] as Boolean) { - iosX64("ios", nativeTargetConfig()) - } else { - ios(configure = nativeTargetConfig()) - } + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) js { useCommonJs() @@ -138,6 +138,12 @@ kotlin { } val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) + + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) val jsMain by getting } From f340a86f90ad27ca095a4b807e57faaa9cf6d0a4 Mon Sep 17 00:00:00 2001 From: pauldavies83 Date: Thu, 23 Sep 2021 19:31:30 +0100 Subject: [PATCH 10/42] =?UTF-8?q?=F0=9F=A4=A6=20remove=20erroneous=20`$`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firebase-auth/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index b6aa9fb82..54cb61fc2 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -95,7 +95,7 @@ kotlin { "nanopb", "PromisesObjC" ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$${konanTarget.archVariant}") + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ).plus( listOf( From 6ac7a831e06fb1d6e8d3b98ac3ac280265d5e313 Mon Sep 17 00:00:00 2001 From: Alex Shepeliev Date: Mon, 4 Oct 2021 13:27:35 +0300 Subject: [PATCH 11/42] Add FirebaseAuth.signInWithEmailLink() API (#212) * Implement siginInByEmailLink * Add JS ktor engine * Fix Firebase Auth tests * Upgrade serialization plugin * Cleanup * Remove Ktor * Make idToken and accessToken nullable * Add args assertion --- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 5 +++++ .../kotlin/dev/gitlive/firebase/auth/credentials.kt | 7 ++++++- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 8 +++++++- .../kotlin/dev/gitlive/firebase/auth/credentials.kt | 2 +- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 8 ++++++++ .../iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt | 5 +++++ .../kotlin/dev/gitlive/firebase/auth/credentials.kt | 8 ++++++-- .../jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt | 6 ++++++ .../kotlin/dev/gitlive/firebase/auth/credentials.kt | 10 +++++++--- .../jsMain/kotlin/dev/gitlive/firebase/externals.kt | 2 ++ 10 files changed, 53 insertions(+), 8 deletions(-) diff --git a/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt index d23af170b..6f7c09ab2 100644 --- a/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -66,6 +66,8 @@ actual class FirebaseAuth internal constructor(val android: com.google.firebase. actual suspend fun sendSignInLinkToEmail(email: String, actionCodeSettings: ActionCodeSettings) = android.sendSignInLinkToEmail(email, actionCodeSettings.toAndroid()).await().run { Unit } + actual fun isSignInWithEmailLink(link: String) = android.isSignInWithEmailLink(link) + actual suspend fun signInWithEmailAndPassword(email: String, password: String) = AuthResult(android.signInWithEmailAndPassword(email, password).await()) @@ -77,6 +79,9 @@ actual class FirebaseAuth internal constructor(val android: com.google.firebase. actual suspend fun signInWithCredential(authCredential: AuthCredential) = AuthResult(android.signInWithCredential(authCredential.android).await()) + actual suspend fun signInWithEmailLink(email: String, link: String) = + AuthResult(android.signInWithEmailLink(email, link).await()) + actual suspend fun signOut() = android.signOut() actual suspend fun updateCurrentUser(user: FirebaseUser) = android.updateCurrentUser(user.android).await().run { Unit } diff --git a/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/credentials.kt b/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/credentials.kt index 02fcc5d9b..4e0653ab2 100644 --- a/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/credentials.kt +++ b/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/credentials.kt @@ -39,7 +39,12 @@ actual object GithubAuthProvider { } actual object GoogleAuthProvider { - actual fun credential(idToken: String, accessToken: String): AuthCredential = AuthCredential(com.google.firebase.auth.GoogleAuthProvider.getCredential(idToken, accessToken)) + actual fun credential(idToken: String?, accessToken: String?): AuthCredential { + require(idToken != null || accessToken != null) { + "Both parameters are optional but at least one must be present." + } + return AuthCredential(com.google.firebase.auth.GoogleAuthProvider.getCredential(idToken, accessToken)) + } } actual class OAuthProvider(val android: com.google.firebase.auth.OAuthProvider) { diff --git a/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt index ea9981b40..c27b137ac 100644 --- a/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -27,10 +27,12 @@ expect class FirebaseAuth { suspend fun fetchSignInMethodsForEmail(email: String): List suspend fun sendPasswordResetEmail(email: String, actionCodeSettings: ActionCodeSettings? = null) suspend fun sendSignInLinkToEmail(email: String, actionCodeSettings: ActionCodeSettings) + fun isSignInWithEmailLink(link: String): Boolean suspend fun signInWithEmailAndPassword(email: String, password: String): AuthResult suspend fun signInWithCustomToken(token: String): AuthResult suspend fun signInAnonymously(): AuthResult suspend fun signInWithCredential(authCredential: AuthCredential): AuthResult + suspend fun signInWithEmailLink(email: String, link: String): AuthResult suspend fun signOut() suspend fun updateCurrentUser(user: FirebaseUser) suspend fun verifyPasswordResetCode(code: String): String @@ -67,7 +69,11 @@ data class ActionCodeSettings( val iOSBundleId: String? = null ) -data class AndroidPackageName(val packageName: String, val installIfNotAvailable: Boolean, val minimumVersion: String?) +data class AndroidPackageName( + val packageName: String, + val installIfNotAvailable: Boolean = true, + val minimumVersion: String? = null +) expect open class FirebaseAuthException : FirebaseException expect class FirebaseAuthActionCodeException : FirebaseAuthException diff --git a/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/credentials.kt b/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/credentials.kt index d0fcf08f0..ae23f85ab 100644 --- a/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/credentials.kt +++ b/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/credentials.kt @@ -26,7 +26,7 @@ expect object GithubAuthProvider { } expect object GoogleAuthProvider { - fun credential(idToken: String, accessToken: String): AuthCredential + fun credential(idToken: String?, accessToken: String?): AuthCredential } expect class OAuthProvider constructor( diff --git a/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt index 9a94d09e9..2fe59c4c6 100644 --- a/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -103,6 +103,14 @@ class FirebaseAuthTest { assertEquals(uid, result.user!!.uid) } + @Test + fun testIsSignInWithEmailLink() { + val validLink = "http://localhost:9099/emulator/action?mode=signIn&lang=en&oobCode=_vr0QcFcxcVeLZbrcU-GpTaZiuxlHquqdC8MSy0YM_vzWCTAQgV9Jq&apiKey=fake-api-key&continueUrl=https%3A%2F%2Fexample.com%2Fsignin" + val invalidLink = "http://localhost:9099/emulator/action?mode=signIn&lang=en&&apiKey=fake-api-key&continueUrl=https%3A%2F%2Fexample.com%2Fsignin" + assertTrue(Firebase.auth.isSignInWithEmailLink(validLink)) + assertFalse(Firebase.auth.isSignInWithEmailLink(invalidLink)) + } + private suspend fun getTestUid(email: String, password: String): String { val uid = Firebase.auth.let { val user = try { diff --git a/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt index 9c83e881e..96e5a152e 100644 --- a/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -58,6 +58,8 @@ actual class FirebaseAuth internal constructor(val ios: FIRAuth) { actual suspend fun sendSignInLinkToEmail(email: String, actionCodeSettings: ActionCodeSettings) = ios.await { sendSignInLinkToEmail(email, actionCodeSettings.toIos(), it) }.run { Unit } + actual fun isSignInWithEmailLink(link: String) = ios.isSignInWithEmailLink(link) + actual suspend fun signInWithEmailAndPassword(email: String, password: String) = AuthResult(ios.awaitResult { signInWithEmail(email = email, password = password, completion = it) }) @@ -70,6 +72,9 @@ actual class FirebaseAuth internal constructor(val ios: FIRAuth) { actual suspend fun signInWithCredential(authCredential: AuthCredential) = AuthResult(ios.awaitResult { signInWithCredential(authCredential.ios, it) }) + actual suspend fun signInWithEmailLink(email: String, link: String) = + AuthResult(ios.awaitResult { signInWithEmail(email = email, link = link, completion = it) }) + actual suspend fun signOut() = ios.throwError { signOut(it) }.run { Unit } actual suspend fun updateCurrentUser(user: FirebaseUser) = ios.await { updateCurrentUser(user.ios, it) }.run { Unit } diff --git a/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/credentials.kt b/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/credentials.kt index 7702b0118..f20b884e1 100644 --- a/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/credentials.kt +++ b/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/credentials.kt @@ -31,7 +31,11 @@ actual object GithubAuthProvider { } actual object GoogleAuthProvider { - actual fun credential(idToken: String, accessToken: String): AuthCredential = AuthCredential(FIRGoogleAuthProvider.credentialWithIDToken(idToken, accessToken)) + actual fun credential(idToken: String?, accessToken: String?): AuthCredential { + requireNotNull(idToken) { "idToken must not be null" } + requireNotNull(accessToken) { "accessToken must not be null" } + return AuthCredential(FIRGoogleAuthProvider.credentialWithIDToken(idToken, accessToken)) + } } actual class OAuthProvider(val ios: FIROAuthProvider) { @@ -80,4 +84,4 @@ actual interface PhoneVerificationProvider { actual object TwitterAuthProvider { actual fun credential(token: String, secret: String): AuthCredential = AuthCredential(FIRTwitterAuthProvider.credentialWithToken(token, secret)) -} \ No newline at end of file +} diff --git a/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt index 50f97e2c4..70d3ea304 100644 --- a/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -53,6 +53,8 @@ actual class FirebaseAuth internal constructor(val js: firebase.auth.Auth) { actual suspend fun sendSignInLinkToEmail(email: String, actionCodeSettings: ActionCodeSettings) = rethrow { js.sendSignInLinkToEmail(email, actionCodeSettings.toJson()).await() } + actual fun isSignInWithEmailLink(link: String) = rethrow { js.isSignInWithEmailLink(link) } + actual suspend fun signInWithEmailAndPassword(email: String, password: String) = rethrow { AuthResult(js.signInWithEmailAndPassword(email, password).await()) } @@ -65,6 +67,9 @@ actual class FirebaseAuth internal constructor(val js: firebase.auth.Auth) { actual suspend fun signInWithCredential(authCredential: AuthCredential) = rethrow { AuthResult(js.signInWithCredential(authCredential.js).await()) } + actual suspend fun signInWithEmailLink(email: String, link: String) = + rethrow { AuthResult(js.signInWithEmailLink(email, link).await()) } + actual suspend fun signOut() = rethrow { js.signOut().await() } actual suspend fun updateCurrentUser(user: FirebaseUser) = @@ -119,6 +124,7 @@ actual class AuthTokenResult(val js: firebase.auth.IdTokenResult) { } internal fun ActionCodeSettings.toJson() = json( + "url" to url, "android" to (androidPackageName?.run { json("installApp" to installIfNotAvailable, "minimumVersion" to minimumVersion, "packageName" to packageName) } ?: undefined), "dynamicLinkDomain" to (dynamicLinkDomain ?: undefined), "handleCodeInApp" to canHandleCodeInApp, diff --git a/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/credentials.kt b/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/credentials.kt index 0074b5704..f5f911cc1 100644 --- a/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/credentials.kt +++ b/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/credentials.kt @@ -29,8 +29,12 @@ actual object GithubAuthProvider { } actual object GoogleAuthProvider { - actual fun credential(idToken: String, accessToken: String): AuthCredential = - AuthCredential(firebase.auth.GoogleAuthProvider.credential(idToken, accessToken)) + actual fun credential(idToken: String?, accessToken: String?): AuthCredential { + require(idToken != null || accessToken != null) { + "Both parameters are optional but at least one must be present." + } + return AuthCredential(firebase.auth.GoogleAuthProvider.credential(idToken, accessToken)) + } } actual class OAuthProvider(val js: firebase.auth.OAuthProvider) { @@ -81,4 +85,4 @@ actual interface PhoneVerificationProvider { actual object TwitterAuthProvider { actual fun credential(token: String, secret: String): AuthCredential = AuthCredential(firebase.auth.TwitterAuthProvider.credential(token, secret)) -} \ No newline at end of file +} diff --git a/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt b/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt index 980de9219..3485345b0 100644 --- a/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt +++ b/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt @@ -56,12 +56,14 @@ external object firebase { fun fetchSignInMethodsForEmail(email: String): Promise> fun sendPasswordResetEmail(email: String, actionCodeSettings: Any?): Promise fun sendSignInLinkToEmail(email: String, actionCodeSettings: Any?): Promise + fun isSignInWithEmailLink(link: String): Boolean fun signInWithEmailAndPassword(email: String, password: String): Promise fun signInWithCustomToken(token: String): Promise fun signInAnonymously(): Promise fun signInWithCredential(authCredential: AuthCredential): Promise fun signInWithPopup(provider: AuthProvider): Promise fun signInWithRedirect(provider: AuthProvider): Promise + fun signInWithEmailLink(email: String, link: String): Promise fun getRedirectResult(): Promise fun signOut(): Promise fun updateCurrentUser(user: user.User?): Promise From f76978b738633361cbaca211a9f4bdc02e629225 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 4 Oct 2021 16:15:11 +0100 Subject: [PATCH 12/42] Added properties to skip iostarget and skip ios tests. --- firebase-app/build.gradle.kts | 82 ++++++++++++---------- firebase-auth/build.gradle.kts | 96 ++++++++++++++------------ firebase-common/build.gradle.kts | 25 ++++--- firebase-config/build.gradle.kts | 85 +++++++++++++---------- firebase-database/build.gradle.kts | 95 +++++++++++++------------ firebase-firestore/build.gradle.kts | 103 +++++++++++++++------------- firebase-functions/build.gradle.kts | 95 +++++++++++++------------ gradle.properties | 3 + 8 files changed, 326 insertions(+), 258 deletions(-) diff --git a/firebase-app/build.gradle.kts b/firebase-app/build.gradle.kts index a45a18ca9..45cafc56a 100644 --- a/firebase-app/build.gradle.kts +++ b/firebase-app/build.gradle.kts @@ -57,42 +57,48 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + val supportIosTarget = project.property("skipIosTarget") != "true" + val runIosTests = project.property("skipIosTests") != "true" + + if (supportIosTarget) { + + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseCore") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseCore") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -133,13 +139,17 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + if (runIosTests) { + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } + } val jsMain by getting } diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index 54cb61fc2..84bd030e2 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -80,49 +80,55 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ).plus( - listOf( - "FirebaseAuth", - "GTMSessionFetcher" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + val supportIosTarget = project.property("skipIosTarget") != "true" + val runIosTests = project.property("skipIosTests") != "true" + + if (supportIosTarget) { + + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ).plus( + listOf( + "FirebaseAuth", + "GTMSessionFetcher" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseAuth") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseAuth") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -165,13 +171,17 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + if (runIosTests) { + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } + } val jsMain by getting } diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index ee32e66bb..2a397f07e 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -46,8 +46,13 @@ kotlin { publishAllLibraryVariants() } - ios() - iosSimulatorArm64() + val supportIosTarget = project.property("skipIosTarget") != "true" + val runIosTests = project.property("skipIosTests") != "true" + + if (supportIosTarget) { + ios() + iosSimulatorArm64() + } js { useCommonJs() @@ -92,13 +97,17 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + if (runIosTests) { + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } + } val jsMain by getting { dependencies { diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index fe19b5aa3..5fdae7342 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -69,45 +69,50 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseAnalytics", - "GoogleAppMeasurement", - "FirebaseInstallations", - "GoogleDataTransport", - "GoogleUtilities", - "PromisesObjC", - "nanopb" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - }.plus( - listOf( - "FirebaseABTesting", - "FirebaseRemoteConfig" + val supportIosTarget = project.property("skipIosTarget") != "true" + val runIosTests = project.property("skipIosTests") != "true" + + if (supportIosTarget) { + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseAnalytics", + "GoogleAppMeasurement", + "FirebaseInstallations", + "GoogleDataTransport", + "GoogleUtilities", + "PromisesObjC", + "nanopb" ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + }.plus( + listOf( + "FirebaseABTesting", + "FirebaseRemoteConfig" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseRemoteConfig") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseRemoteConfig") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -143,13 +148,17 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + if (runIosTests) { + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } + } val jsMain by getting } diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index 352c3b304..ab1c2ecdc 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -56,49 +56,54 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ).plus( - listOf( - "FirebaseDatabase", - "leveldb-library" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + val supportIosTarget = project.property("skipIosTarget") != "true" + val runIosTests = project.property("skipIosTests") != "true" + + if (supportIosTarget) { + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ).plus( + listOf( + "FirebaseDatabase", + "leveldb-library" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseDatabase") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseDatabase") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -143,13 +148,17 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + if (runIosTests) { + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } + } val jsMain by getting } diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index b3a2e30f2..60821fe64 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -59,53 +59,58 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ).plus( - listOf( - "abseil", - "BoringSSL-GRPC", - "FirebaseFirestore", - "gRPC-Core", - "gRPC-C++", - "leveldb-library" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + val supportIosTarget = project.property("skipIosTarget") != "true" + val runIosTests = project.property("skipIosTests") != "true" + + if (supportIosTarget) { + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ).plus( + listOf( + "abseil", + "BoringSSL-GRPC", + "FirebaseFirestore", + "gRPC-Core", + "gRPC-C++", + "leveldb-library" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseFirestore") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseFirestore") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -149,13 +154,17 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + if (runIosTests) { + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } + } val jsMain by getting } diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index efcb5016d..de83b889f 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -51,49 +51,54 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ).plus( - listOf( - "FirebaseFunctions", - "GTMSessionFetcher" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + val supportIosTarget = project.property("skipIosTarget") != "true" + val runIosTests = project.property("skipIosTests") != "true" + + if (supportIosTarget) { + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ).plus( + listOf( + "FirebaseFunctions", + "GTMSessionFetcher" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseFunctions") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseFunctions") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -137,13 +142,17 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + if (runIosTests) { + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } + } val jsMain by getting } diff --git a/gradle.properties b/gradle.properties index 4d4351bea..4bde6e53c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,6 +17,9 @@ org.gradle.parallel=true systemProp.org.gradle.internal.publish.checksums.insecure=true testOptions.unitTests.isIncludeAndroidResources=true +skipIosTarget=false +skipIosTests=false + # Versions: firebase-app.version=1.4.2 firebase-auth.version=1.4.2 From 54284f9d78dc8bfac64fee49d039a574b135aa95 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 4 Oct 2021 16:52:52 +0100 Subject: [PATCH 13/42] Adjusted tests to not use skip variable. Added granular ios test skip --- firebase-app/build.gradle.kts | 2 +- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 20 +++++++------------ .../kotlin/dev/gitlive/firebase/auth/auth.kt | 9 +-------- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 9 +-------- firebase-common/build.gradle.kts | 2 +- firebase-config/build.gradle.kts | 2 +- firebase-database/build.gradle.kts | 2 +- firebase-firestore/build.gradle.kts | 2 +- firebase-functions/build.gradle.kts | 2 +- gradle.properties | 10 +++++++++- 10 files changed, 24 insertions(+), 36 deletions(-) diff --git a/firebase-app/build.gradle.kts b/firebase-app/build.gradle.kts index 45cafc56a..b541b318c 100644 --- a/firebase-app/build.gradle.kts +++ b/firebase-app/build.gradle.kts @@ -58,7 +58,7 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("skipIosTests") != "true" + val runIosTests = project.property("firebase-app.skipIosTests") != "true" if (supportIosTarget) { diff --git a/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt index 2fe59c4c6..d4accec09 100644 --- a/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -10,16 +10,10 @@ import kotlin.test.* expect val emulatorHost: String expect val context: Any -expect fun runTest(skip: Boolean = false, test: suspend () -> Unit) -expect val currentPlatform: Platform - -enum class Platform { Android, IOS, JS } +expect fun runTest(test: suspend () -> Unit) class FirebaseAuthTest { - // Skip the tests on iOS simulator due keychain exceptions - private val skip = currentPlatform == Platform.IOS - @BeforeTest fun initializeFirebase() { Firebase @@ -41,14 +35,14 @@ class FirebaseAuthTest { } @Test - fun testSignInWithUsernameAndPassword() = runTest(skip) { + fun testSignInWithUsernameAndPassword() = runTest { val uid = getTestUid("test@test.com", "test123") val result = Firebase.auth.signInWithEmailAndPassword("test@test.com", "test123") assertEquals(uid, result.user!!.uid) } @Test - fun testCreateUserWithEmailAndPassword() = runTest(skip) { + fun testCreateUserWithEmailAndPassword() = runTest { val email = "test+${Random.nextInt(100000)}@test.com" val createResult = Firebase.auth.createUserWithEmailAndPassword(email, "test123") assertNotEquals(null, createResult.user?.uid) @@ -63,7 +57,7 @@ class FirebaseAuthTest { } @Test - fun testFetchSignInMethods() = runTest(skip) { + fun testFetchSignInMethods() = runTest { val email = "test+${Random.nextInt(100000)}@test.com" var signInMethodResult = Firebase.auth.fetchSignInMethodsForEmail(email) assertEquals(emptyList(), signInMethodResult) @@ -75,7 +69,7 @@ class FirebaseAuthTest { } @Test - fun testSendEmailVerification() = runTest(skip) { + fun testSendEmailVerification() = runTest { val email = "test+${Random.nextInt(100000)}@test.com" val createResult = Firebase.auth.createUserWithEmailAndPassword(email, "test123") assertNotEquals(null, createResult.user?.uid) @@ -85,7 +79,7 @@ class FirebaseAuthTest { } @Test - fun sendPasswordResetEmail() = runTest(skip) { + fun sendPasswordResetEmail() = runTest { val email = "test+${Random.nextInt(100000)}@test.com" val createResult = Firebase.auth.createUserWithEmailAndPassword(email, "test123") assertNotEquals(null, createResult.user?.uid) @@ -96,7 +90,7 @@ class FirebaseAuthTest { } @Test - fun testSignInWithCredential() = runTest(skip) { + fun testSignInWithCredential() = runTest { val uid = getTestUid("test@test.com", "test123") val credential = EmailAuthProvider.credential("test@test.com", "test123") val result = Firebase.auth.signInWithCredential(credential) diff --git a/firebase-auth/src/iosTest/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/iosTest/kotlin/dev/gitlive/firebase/auth/auth.kt index bd72b1dbe..540531237 100644 --- a/firebase-auth/src/iosTest/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/iosTest/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -11,14 +11,7 @@ actual val emulatorHost: String = "localhost" actual val context: Any = Unit -actual val currentPlatform: Platform = Platform.IOS - -actual fun runTest(skip: Boolean, test: suspend () -> Unit) = runBlocking { - if (skip) { - NSLog("Skip the test.") - return@runBlocking - } - +actual fun runTest(test: suspend () -> Unit) = runBlocking { val testRun = MainScope().async { test() } while (testRun.isActive) { NSRunLoop.mainRunLoop.runMode( diff --git a/firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth/auth.kt index 93fb3effa..340f1fa6c 100644 --- a/firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -11,15 +11,8 @@ actual val emulatorHost: String = "localhost" actual val context: Any = Unit -actual val currentPlatform: Platform = Platform.JS - -actual fun runTest(skip: Boolean, test: suspend () -> Unit) = GlobalScope +actual fun runTest(test: suspend () -> Unit) = GlobalScope .promise { - if (skip) { - console.log("Skip the test.") - return@promise - } - try { test() } catch (e: dynamic) { diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index 2a397f07e..32a85cda8 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -47,7 +47,7 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("skipIosTests") != "true" + val runIosTests = project.property("firebase-common.skipIosTests") != "true" if (supportIosTarget) { ios() diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index 5fdae7342..a74f87f27 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -70,7 +70,7 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("skipIosTests") != "true" + val runIosTests = project.property("firebase-config.skipIosTests") != "true" if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index ab1c2ecdc..ba9968494 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -57,7 +57,7 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("skipIosTests") != "true" + val runIosTests = project.property("firebase-database.skipIosTests") != "true" if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index 60821fe64..adb84e344 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -60,7 +60,7 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("skipIosTests") != "true" + val runIosTests = project.property("firebase-firestore.skipIosTests") != "true" if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index de83b889f..f442527e2 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -52,7 +52,7 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("skipIosTests") != "true" + val runIosTests = project.property("firebase-functions.skipIosTests") != "true" if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { diff --git a/gradle.properties b/gradle.properties index 4bde6e53c..b0f312e4f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,8 +17,16 @@ org.gradle.parallel=true systemProp.org.gradle.internal.publish.checksums.insecure=true testOptions.unitTests.isIncludeAndroidResources=true +# Set to true to skip tests and even compilation of the iOS target. skipIosTarget=false -skipIosTests=false +# Skip iOS Tests +firebase-app.skipIosTests=false +firebase-auth.skipIosTests=false +firebase-common.skipIosTests=false +firebase-database.skipIosTests=false +firebase-firestore.skipIosTests=false +firebase-functions.skipIosTests=false +firebase-config.skipIosTests=false # Versions: firebase-app.version=1.4.2 From 2aa9f0d2383b68eca5fbe5872671174a1ef50d82 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 4 Oct 2021 17:00:59 +0100 Subject: [PATCH 14/42] Added missing property. Added skip for ios tests in auth target. --- firebase-auth/build.gradle.kts | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index 84bd030e2..834d2154d 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -81,7 +81,7 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("skipIosTests") != "true" + val runIosTests = project.property("firebase-auth.skipIosTests") != "true" if (supportIosTarget) { diff --git a/gradle.properties b/gradle.properties index b0f312e4f..94533b4d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,7 +21,7 @@ testOptions.unitTests.isIncludeAndroidResources=true skipIosTarget=false # Skip iOS Tests firebase-app.skipIosTests=false -firebase-auth.skipIosTests=false +firebase-auth.skipIosTests=true firebase-common.skipIosTests=false firebase-database.skipIosTests=false firebase-firestore.skipIosTests=false From 3a17171acd68368a8bc6a7a9a86fbc70fc233a76 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 4 Oct 2021 17:35:45 +0100 Subject: [PATCH 15/42] added logging --- firebase-auth/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index 834d2154d..dfc0123ec 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -83,6 +83,7 @@ kotlin { val supportIosTarget = project.property("skipIosTarget") != "true" val runIosTests = project.property("firebase-auth.skipIosTests") != "true" + println("supportIosTarget: $supportIosTarget runIosTests $runIosTests") if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { From 2d603e771020f0651b85876645e61eb1afd4ed6d Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 4 Oct 2021 18:40:53 +0100 Subject: [PATCH 16/42] Added different approach to cancel ios tests --- firebase-auth/build.gradle.kts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index dfc0123ec..ec7123aec 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -111,7 +111,6 @@ kotlin { projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") } ) - binaries { getTest("DEBUG").apply { linkerOpts(nativeFrameworkPaths.map { "-F$it" }) @@ -186,6 +185,14 @@ kotlin { val jsMain by getting } + + if (!runIosTests) { + tasks.forEach { + if (it.name.contains("ios") && it.name.contains("test")) { + it.onlyIf { false } + } + } + } } signing { From 161289707004e58c90f292080be43b6d47a72c98 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 08:04:21 +0100 Subject: [PATCH 17/42] Disable test tasks in gradle to skip ios tests --- firebase-auth/build.gradle.kts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index ec7123aec..3f1a6a6e6 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -176,11 +176,9 @@ kotlin { val iosSimulatorArm64Main by getting iosSimulatorArm64Main.dependsOn(iosMain) - if (runIosTests) { - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) - } + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) } val jsMain by getting @@ -188,9 +186,7 @@ kotlin { if (!runIosTests) { tasks.forEach { - if (it.name.contains("ios") && it.name.contains("test")) { - it.onlyIf { false } - } + if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } } } } From f05089638667aa5e524cb15ef929ce7eacf55cc5 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 08:25:14 +0100 Subject: [PATCH 18/42] Disable test tasks in gradle to skip ios tests --- firebase-auth/build.gradle.kts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index 3f1a6a6e6..dca9edf73 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -81,9 +81,6 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("firebase-auth.skipIosTests") != "true" - - println("supportIosTarget: $supportIosTarget runIosTests $runIosTests") if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { @@ -183,10 +180,13 @@ kotlin { val jsMain by getting } +} - if (!runIosTests) { - tasks.forEach { - if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } +if (project.property("firebase-auth.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios") && it.name.contains("test")) { + println("Skipping ${it.name}") + it.enabled = false } } } From 81a3c2bed36416a42c52e2475a30354c4bddeab9 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 08:47:46 +0100 Subject: [PATCH 19/42] Moved skip test to the outer scope of a project. --- firebase-app/build.gradle.kts | 16 +++++++++------- firebase-common/build.gradle.kts | 15 +++++++++------ firebase-config/build.gradle.kts | 16 +++++++++------- firebase-database/build.gradle.kts | 16 +++++++++------- firebase-firestore/build.gradle.kts | 17 ++++++++++------- firebase-functions/build.gradle.kts | 16 +++++++++------- 6 files changed, 55 insertions(+), 41 deletions(-) diff --git a/firebase-app/build.gradle.kts b/firebase-app/build.gradle.kts index b541b318c..b972a06e6 100644 --- a/firebase-app/build.gradle.kts +++ b/firebase-app/build.gradle.kts @@ -58,8 +58,6 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("firebase-app.skipIosTests") != "true" - if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { @@ -144,17 +142,21 @@ kotlin { val iosSimulatorArm64Main by getting iosSimulatorArm64Main.dependsOn(iosMain) - if (runIosTests) { - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) - } + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) } val jsMain by getting } } +if (project.property("firebase-app.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index 32a85cda8..0052ee881 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -47,7 +47,6 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("firebase-common.skipIosTests") != "true" if (supportIosTarget) { ios() @@ -102,11 +101,9 @@ kotlin { val iosSimulatorArm64Main by getting iosSimulatorArm64Main.dependsOn(iosMain) - if (runIosTests) { - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) - } + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) } val jsMain by getting { @@ -117,6 +114,12 @@ kotlin { } } +if (project.property("firebase-common.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index a74f87f27..dbf82bf2a 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -70,8 +70,6 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("firebase-config.skipIosTests") != "true" - if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { val nativeFrameworkPaths = listOf( @@ -153,17 +151,21 @@ kotlin { val iosSimulatorArm64Main by getting iosSimulatorArm64Main.dependsOn(iosMain) - if (runIosTests) { - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) - } + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) } val jsMain by getting } } +if (project.property("firebase-config.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index ba9968494..f6c2d818f 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -57,8 +57,6 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("firebase-database.skipIosTests") != "true" - if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { val nativeFrameworkPaths = listOf( @@ -153,17 +151,21 @@ kotlin { val iosSimulatorArm64Main by getting iosSimulatorArm64Main.dependsOn(iosMain) - if (runIosTests) { - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) - } + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) } val jsMain by getting } } +if (project.property("firebase-skipIosTests.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index adb84e344..9f977487f 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -60,8 +60,6 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("firebase-firestore.skipIosTests") != "true" - if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { val nativeFrameworkPaths = listOf( @@ -159,16 +157,21 @@ kotlin { val iosSimulatorArm64Main by getting iosSimulatorArm64Main.dependsOn(iosMain) - if (runIosTests) { - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) - } + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) } val jsMain by getting } } + +if (project.property("firebase-firestore.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index f442527e2..2b544b89c 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -52,8 +52,6 @@ kotlin { } val supportIosTarget = project.property("skipIosTarget") != "true" - val runIosTests = project.property("firebase-functions.skipIosTests") != "true" - if (supportIosTarget) { fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { val nativeFrameworkPaths = listOf( @@ -147,17 +145,21 @@ kotlin { val iosSimulatorArm64Main by getting iosSimulatorArm64Main.dependsOn(iosMain) - if (runIosTests) { - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) - } + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) } val jsMain by getting } } +if (project.property("firebase-functions.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project From 14f926e163c6a062e23eb8cdde72032fb235a73b Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 08:51:27 +0100 Subject: [PATCH 20/42] Added ignore case for task check --- firebase-app/build.gradle.kts | 2 +- firebase-auth/build.gradle.kts | 5 +---- firebase-common/build.gradle.kts | 2 +- firebase-config/build.gradle.kts | 2 +- firebase-database/build.gradle.kts | 2 +- firebase-firestore/build.gradle.kts | 2 +- firebase-functions/build.gradle.kts | 2 +- 7 files changed, 7 insertions(+), 10 deletions(-) diff --git a/firebase-app/build.gradle.kts b/firebase-app/build.gradle.kts index b972a06e6..b55e1ec5e 100644 --- a/firebase-app/build.gradle.kts +++ b/firebase-app/build.gradle.kts @@ -153,7 +153,7 @@ kotlin { if (project.property("firebase-app.skipIosTests") == "true") { tasks.forEach { - if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } } } diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index dca9edf73..f359d3152 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -184,10 +184,7 @@ kotlin { if (project.property("firebase-auth.skipIosTests") == "true") { tasks.forEach { - if (it.name.contains("ios") && it.name.contains("test")) { - println("Skipping ${it.name}") - it.enabled = false - } + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } } } diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index 0052ee881..c809581df 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -116,7 +116,7 @@ kotlin { if (project.property("firebase-common.skipIosTests") == "true") { tasks.forEach { - if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } } } diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index dbf82bf2a..6f1bb82c4 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -162,7 +162,7 @@ kotlin { if (project.property("firebase-config.skipIosTests") == "true") { tasks.forEach { - if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } } } diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index f6c2d818f..380b0a12c 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -162,7 +162,7 @@ kotlin { if (project.property("firebase-skipIosTests.skipIosTests") == "true") { tasks.forEach { - if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } } } diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index 9f977487f..44a2a001b 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -168,7 +168,7 @@ kotlin { if (project.property("firebase-firestore.skipIosTests") == "true") { tasks.forEach { - if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } } } diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index 2b544b89c..d9392dffe 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -156,7 +156,7 @@ kotlin { if (project.property("firebase-functions.skipIosTests") == "true") { tasks.forEach { - if (it.name.contains("ios") && it.name.contains("test")) { it.enabled = false } + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } } } From 2e49afdff4a06038878bed0cb40eac7d4246a681 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 09:03:31 +0100 Subject: [PATCH 21/42] fixed typo --- firebase-database/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index 380b0a12c..196209885 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -160,7 +160,7 @@ kotlin { } } -if (project.property("firebase-skipIosTests.skipIosTests") == "true") { +if (project.property("firebase-database.skipIosTests") == "true") { tasks.forEach { if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } } From 879ca6036697fff8c992abfc12c3f0eae143b13e Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 10:11:12 +0100 Subject: [PATCH 22/42] Added fix for android tests --- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/firebase-auth/src/androidAndroidTest/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/androidAndroidTest/kotlin/dev/gitlive/firebase/auth/auth.kt index b6495fc34..364e7f381 100644 --- a/firebase-auth/src/androidAndroidTest/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/androidAndroidTest/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -13,14 +13,7 @@ actual val emulatorHost: String = "10.0.2.2" actual val context: Any = InstrumentationRegistry.getInstrumentation().targetContext -actual val currentPlatform: Platform = Platform.Android - -actual fun runTest(skip: Boolean, test: suspend () -> Unit) = runBlocking { - if (skip) { - Log.w("Test", "Skip the test.") - return@runBlocking - } - +actual fun runTest(test: suspend () -> Unit) = runBlocking { test() } From 8737a7d4fe786132a37cb553685e257b4e92d45a Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 10:26:54 +0100 Subject: [PATCH 23/42] Adjust workflow for debugging --- .github/workflows/pull_request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 107872fe7..9d0bf310e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,6 +4,8 @@ name: Pull Request on: + push: + branches: [ GL-855-fix-upload-issue-with-firebase ] pull_request: branches: [ master ] From e3fa77034de9286010f55bfbda319c9c58810467 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 10:27:31 +0100 Subject: [PATCH 24/42] bump version --- gradle.properties | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 94533b4d7..8c04adbb6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -29,10 +29,10 @@ firebase-functions.skipIosTests=false firebase-config.skipIosTests=false # Versions: -firebase-app.version=1.4.2 -firebase-auth.version=1.4.2 -firebase-common.version=1.4.2 -firebase-database.version=1.4.2 -firebase-firestore.version=1.4.2 -firebase-functions.version=1.4.2 -firebase-config.version=1.4.2 +firebase-app.version=1.4.3 +firebase-auth.version=1.4.3 +firebase-common.version=1.4.3 +firebase-database.version=1.4.3 +firebase-firestore.version=1.4.3 +firebase-functions.version=1.4.3 +firebase-config.version=1.4.3 From 7b48bea3df794e3d7bddb1542ff2b3d59c3a1f5e Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 10:44:27 +0100 Subject: [PATCH 25/42] Adjusted workflow --- .github/workflows/publish.yml | 2 ++ .github/workflows/pull_request.yml | 2 -- firebase-app/package.json | 2 +- firebase-auth/package.json | 2 +- firebase-config/package.json | 2 +- firebase-database/package.json | 2 +- firebase-firestore/package.json | 2 +- firebase-functions/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e0ae15d91..0f1a25da5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,8 @@ name: Publish on: + push: + branches: [ GL-855-fix-upload-issue-with-firebase ] release: types: [prereleased, released] diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 9d0bf310e..107872fe7 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,8 +4,6 @@ name: Pull Request on: - push: - branches: [ GL-855-fix-upload-issue-with-firebase ] pull_request: branches: [ master ] diff --git a/firebase-app/package.json b/firebase-app/package.json index 569347617..615a88589 100644 --- a/firebase-app/package.json +++ b/firebase-app/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-common": "1.4.2", + "@gitlive/firebase-common": "1.4.3", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-auth/package.json b/firebase-auth/package.json index ca07d0f26..7e96fd49d 100644 --- a/firebase-auth/package.json +++ b/firebase-auth/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.2", + "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-config/package.json b/firebase-config/package.json index bf92a5db6..5a496ba6a 100644 --- a/firebase-config/package.json +++ b/firebase-config/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.2", + "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-database/package.json b/firebase-database/package.json index 5ced5cf67..b2fbc615a 100644 --- a/firebase-database/package.json +++ b/firebase-database/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.2", + "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-firestore/package.json b/firebase-firestore/package.json index 5e888d979..677b33af1 100644 --- a/firebase-firestore/package.json +++ b/firebase-firestore/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.2", + "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-functions/package.json b/firebase-functions/package.json index 52318978d..7861d99fa 100644 --- a/firebase-functions/package.json +++ b/firebase-functions/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.2", + "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", "kotlin": "1.5.30", "kotlinx-coroutines-core": "1.5.2" From e31ae19991516c0b022822d222adfe6d466595f9 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 11:08:09 +0100 Subject: [PATCH 26/42] Adjusted workflow --- gradle.properties | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8c04adbb6..03de8993b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true testOptions.unitTests.isIncludeAndroidResources=true # Set to true to skip tests and even compilation of the iOS target. -skipIosTarget=false +skipIosTarget=true # Skip iOS Tests firebase-app.skipIosTests=false firebase-auth.skipIosTests=true @@ -29,10 +29,10 @@ firebase-functions.skipIosTests=false firebase-config.skipIosTests=false # Versions: -firebase-app.version=1.4.3 -firebase-auth.version=1.4.3 -firebase-common.version=1.4.3 -firebase-database.version=1.4.3 -firebase-firestore.version=1.4.3 -firebase-functions.version=1.4.3 -firebase-config.version=1.4.3 +firebase-app.version=1.4.2 +firebase-auth.version=1.4.2 +firebase-common.version=1.4.2 +firebase-database.version=1.4.2 +firebase-firestore.version=1.4.2 +firebase-functions.version=1.4.2 +firebase-config.version=1.4.2 From 69fbf24b31aca99420accece24ed19bade856e7f Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 11:20:51 +0100 Subject: [PATCH 27/42] Adjusted workflow --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 03de8993b..94533b4d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true testOptions.unitTests.isIncludeAndroidResources=true # Set to true to skip tests and even compilation of the iOS target. -skipIosTarget=true +skipIosTarget=false # Skip iOS Tests firebase-app.skipIosTests=false firebase-auth.skipIosTests=true From 38d857007bc2ca107bbea955755b4bb5208b1210 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 12:16:38 +0100 Subject: [PATCH 28/42] Added Independant publish tasks --- .github/workflows/publish.yml | 58 +++++++++++++++++++++++++++++++++-- gradle.properties | 14 ++++----- 2 files changed, 63 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0f1a25da5..3d4678a6f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,12 +29,66 @@ jobs: run: chmod +x gradlew - name: Install Carthage run: brew install carthage - - name: Publish + - name: Publish Firebase App uses: eskatos/gradle-command-action@v1 with: - arguments: publish + arguments: :firebase-app:publish env: sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }} sonatypePassword: ${{ secrets.SONATYPEPASSWORD }} ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }} + - name: Publish Firebase Auth + uses: eskatos/gradle-command-action@v1 + with: + arguments: :firebase-auth:publish + env: + sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }} + sonatypePassword: ${{ secrets.SONATYPEPASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }} + - name: Publish Firebase Common + uses: eskatos/gradle-command-action@v1 + with: + arguments: :firebase-common:publish + env: + sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }} + sonatypePassword: ${{ secrets.SONATYPEPASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }} + - name: Publish Firebase Config + uses: eskatos/gradle-command-action@v1 + with: + arguments: :firebase-config:publish + env: + sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }} + sonatypePassword: ${{ secrets.SONATYPEPASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }} + - name: Publish Firebase Database + uses: eskatos/gradle-command-action@v1 + with: + arguments: :firebase-database:publish + env: + sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }} + sonatypePassword: ${{ secrets.SONATYPEPASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }} + - name: Publish Firebase Firestore + uses: eskatos/gradle-command-action@v1 + with: + arguments: :firebase-firestore:publish + env: + sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }} + sonatypePassword: ${{ secrets.SONATYPEPASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }} + - name: Publish Firebase Functions + uses: eskatos/gradle-command-action@v1 + with: + arguments: :firebase-functions:publish + env: + sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }} + sonatypePassword: ${{ secrets.SONATYPEPASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 94533b4d7..8c04adbb6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -29,10 +29,10 @@ firebase-functions.skipIosTests=false firebase-config.skipIosTests=false # Versions: -firebase-app.version=1.4.2 -firebase-auth.version=1.4.2 -firebase-common.version=1.4.2 -firebase-database.version=1.4.2 -firebase-firestore.version=1.4.2 -firebase-functions.version=1.4.2 -firebase-config.version=1.4.2 +firebase-app.version=1.4.3 +firebase-auth.version=1.4.3 +firebase-common.version=1.4.3 +firebase-database.version=1.4.3 +firebase-firestore.version=1.4.3 +firebase-functions.version=1.4.3 +firebase-config.version=1.4.3 From dbf2d76f6d769009918afad5f93a7c2b05296a09 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 13:02:08 +0100 Subject: [PATCH 29/42] Added alpha tag --- gradle.properties | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8c04adbb6..dee0b6d0c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -29,10 +29,10 @@ firebase-functions.skipIosTests=false firebase-config.skipIosTests=false # Versions: -firebase-app.version=1.4.3 -firebase-auth.version=1.4.3 -firebase-common.version=1.4.3 -firebase-database.version=1.4.3 -firebase-firestore.version=1.4.3 -firebase-functions.version=1.4.3 -firebase-config.version=1.4.3 +firebase-app.version=1.4.3-alpha +firebase-auth.version=1.4.3-alpha +firebase-common.version=1.4.3-alpha +firebase-database.version=1.4.3-alpha +firebase-firestore.version=1.4.3-alpha +firebase-functions.version=1.4.3-alpha +firebase-config.version=1.4.3-alpha From 1b4d997f6957ca255da17982e13e78fa82a02e2c Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 13:04:07 +0100 Subject: [PATCH 30/42] Gl 861 add ability to skip ios tests for firebase (#230) * Added properties to skip iostarget and skip ios tests. * Adjusted tests to not use skip variable. Added granular ios test skip * Added missing property. Added skip for ios tests in auth target. * added logging * Added different approach to cancel ios tests * Disable test tasks in gradle to skip ios tests * Disable test tasks in gradle to skip ios tests * Moved skip test to the outer scope of a project. * Added ignore case for task check * fixed typo * Added fix for android tests --- firebase-app/build.gradle.kts | 84 ++++++++------ firebase-auth/build.gradle.kts | 97 +++++++++------- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 9 +- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 20 ++-- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 9 +- .../kotlin/dev/gitlive/firebase/auth/auth.kt | 9 +- firebase-common/build.gradle.kts | 28 +++-- firebase-config/build.gradle.kts | 87 +++++++------- firebase-database/build.gradle.kts | 97 +++++++++------- firebase-firestore/build.gradle.kts | 106 ++++++++++-------- firebase-functions/build.gradle.kts | 97 +++++++++------- gradle.properties | 11 ++ 12 files changed, 359 insertions(+), 295 deletions(-) diff --git a/firebase-app/build.gradle.kts b/firebase-app/build.gradle.kts index a45a18ca9..b55e1ec5e 100644 --- a/firebase-app/build.gradle.kts +++ b/firebase-app/build.gradle.kts @@ -57,42 +57,46 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + val supportIosTarget = project.property("skipIosTarget") != "true" + if (supportIosTarget) { + + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseCore") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseCore") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -133,18 +137,26 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } val jsMain by getting } } +if (project.property("firebase-app.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index 54cb61fc2..f359d3152 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -80,50 +80,53 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ).plus( - listOf( - "FirebaseAuth", - "GTMSessionFetcher" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + val supportIosTarget = project.property("skipIosTarget") != "true" + if (supportIosTarget) { + + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ).plus( + listOf( + "FirebaseAuth", + "GTMSessionFetcher" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + compilations.getByName("main") { + cinterops.create("FirebaseAuth") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - compilations.getByName("main") { - cinterops.create("FirebaseAuth") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") - } - } + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) - js { useCommonJs() nodejs { @@ -165,18 +168,26 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } val jsMain by getting } } +if (project.property("firebase-auth.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-auth/src/androidAndroidTest/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/androidAndroidTest/kotlin/dev/gitlive/firebase/auth/auth.kt index b6495fc34..364e7f381 100644 --- a/firebase-auth/src/androidAndroidTest/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/androidAndroidTest/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -13,14 +13,7 @@ actual val emulatorHost: String = "10.0.2.2" actual val context: Any = InstrumentationRegistry.getInstrumentation().targetContext -actual val currentPlatform: Platform = Platform.Android - -actual fun runTest(skip: Boolean, test: suspend () -> Unit) = runBlocking { - if (skip) { - Log.w("Test", "Skip the test.") - return@runBlocking - } - +actual fun runTest(test: suspend () -> Unit) = runBlocking { test() } diff --git a/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt index 2fe59c4c6..d4accec09 100644 --- a/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -10,16 +10,10 @@ import kotlin.test.* expect val emulatorHost: String expect val context: Any -expect fun runTest(skip: Boolean = false, test: suspend () -> Unit) -expect val currentPlatform: Platform - -enum class Platform { Android, IOS, JS } +expect fun runTest(test: suspend () -> Unit) class FirebaseAuthTest { - // Skip the tests on iOS simulator due keychain exceptions - private val skip = currentPlatform == Platform.IOS - @BeforeTest fun initializeFirebase() { Firebase @@ -41,14 +35,14 @@ class FirebaseAuthTest { } @Test - fun testSignInWithUsernameAndPassword() = runTest(skip) { + fun testSignInWithUsernameAndPassword() = runTest { val uid = getTestUid("test@test.com", "test123") val result = Firebase.auth.signInWithEmailAndPassword("test@test.com", "test123") assertEquals(uid, result.user!!.uid) } @Test - fun testCreateUserWithEmailAndPassword() = runTest(skip) { + fun testCreateUserWithEmailAndPassword() = runTest { val email = "test+${Random.nextInt(100000)}@test.com" val createResult = Firebase.auth.createUserWithEmailAndPassword(email, "test123") assertNotEquals(null, createResult.user?.uid) @@ -63,7 +57,7 @@ class FirebaseAuthTest { } @Test - fun testFetchSignInMethods() = runTest(skip) { + fun testFetchSignInMethods() = runTest { val email = "test+${Random.nextInt(100000)}@test.com" var signInMethodResult = Firebase.auth.fetchSignInMethodsForEmail(email) assertEquals(emptyList(), signInMethodResult) @@ -75,7 +69,7 @@ class FirebaseAuthTest { } @Test - fun testSendEmailVerification() = runTest(skip) { + fun testSendEmailVerification() = runTest { val email = "test+${Random.nextInt(100000)}@test.com" val createResult = Firebase.auth.createUserWithEmailAndPassword(email, "test123") assertNotEquals(null, createResult.user?.uid) @@ -85,7 +79,7 @@ class FirebaseAuthTest { } @Test - fun sendPasswordResetEmail() = runTest(skip) { + fun sendPasswordResetEmail() = runTest { val email = "test+${Random.nextInt(100000)}@test.com" val createResult = Firebase.auth.createUserWithEmailAndPassword(email, "test123") assertNotEquals(null, createResult.user?.uid) @@ -96,7 +90,7 @@ class FirebaseAuthTest { } @Test - fun testSignInWithCredential() = runTest(skip) { + fun testSignInWithCredential() = runTest { val uid = getTestUid("test@test.com", "test123") val credential = EmailAuthProvider.credential("test@test.com", "test123") val result = Firebase.auth.signInWithCredential(credential) diff --git a/firebase-auth/src/iosTest/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/iosTest/kotlin/dev/gitlive/firebase/auth/auth.kt index bd72b1dbe..540531237 100644 --- a/firebase-auth/src/iosTest/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/iosTest/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -11,14 +11,7 @@ actual val emulatorHost: String = "localhost" actual val context: Any = Unit -actual val currentPlatform: Platform = Platform.IOS - -actual fun runTest(skip: Boolean, test: suspend () -> Unit) = runBlocking { - if (skip) { - NSLog("Skip the test.") - return@runBlocking - } - +actual fun runTest(test: suspend () -> Unit) = runBlocking { val testRun = MainScope().async { test() } while (testRun.isActive) { NSRunLoop.mainRunLoop.runMode( diff --git a/firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth/auth.kt index 93fb3effa..340f1fa6c 100644 --- a/firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -11,15 +11,8 @@ actual val emulatorHost: String = "localhost" actual val context: Any = Unit -actual val currentPlatform: Platform = Platform.JS - -actual fun runTest(skip: Boolean, test: suspend () -> Unit) = GlobalScope +actual fun runTest(test: suspend () -> Unit) = GlobalScope .promise { - if (skip) { - console.log("Skip the test.") - return@promise - } - try { test() } catch (e: dynamic) { diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index ee32e66bb..c809581df 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -46,8 +46,12 @@ kotlin { publishAllLibraryVariants() } - ios() - iosSimulatorArm64() + val supportIosTarget = project.property("skipIosTarget") != "true" + + if (supportIosTarget) { + ios() + iosSimulatorArm64() + } js { useCommonJs() @@ -92,13 +96,15 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } val jsMain by getting { dependencies { @@ -108,6 +114,12 @@ kotlin { } } +if (project.property("firebase-common.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index fe19b5aa3..6f1bb82c4 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -69,45 +69,48 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseAnalytics", - "GoogleAppMeasurement", - "FirebaseInstallations", - "GoogleDataTransport", - "GoogleUtilities", - "PromisesObjC", - "nanopb" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - }.plus( - listOf( - "FirebaseABTesting", - "FirebaseRemoteConfig" + val supportIosTarget = project.property("skipIosTarget") != "true" + if (supportIosTarget) { + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseAnalytics", + "GoogleAppMeasurement", + "FirebaseInstallations", + "GoogleDataTransport", + "GoogleUtilities", + "PromisesObjC", + "nanopb" ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + }.plus( + listOf( + "FirebaseABTesting", + "FirebaseRemoteConfig" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseRemoteConfig") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseRemoteConfig") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -143,18 +146,26 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } val jsMain by getting } } +if (project.property("firebase-config.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index 352c3b304..196209885 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -56,49 +56,52 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ).plus( - listOf( - "FirebaseDatabase", - "leveldb-library" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + val supportIosTarget = project.property("skipIosTarget") != "true" + if (supportIosTarget) { + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ).plus( + listOf( + "FirebaseDatabase", + "leveldb-library" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseDatabase") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseDatabase") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -143,18 +146,26 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } val jsMain by getting } } +if (project.property("firebase-database.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index b3a2e30f2..44a2a001b 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -59,53 +59,56 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ).plus( - listOf( - "abseil", - "BoringSSL-GRPC", - "FirebaseFirestore", - "gRPC-Core", - "gRPC-C++", - "leveldb-library" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + val supportIosTarget = project.property("skipIosTarget") != "true" + if (supportIosTarget) { + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ).plus( + listOf( + "abseil", + "BoringSSL-GRPC", + "FirebaseFirestore", + "gRPC-Core", + "gRPC-C++", + "leveldb-library" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseFirestore") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseFirestore") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -149,17 +152,26 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } val jsMain by getting } } + +if (project.property("firebase-firestore.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index efcb5016d..d9392dffe 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -51,49 +51,52 @@ kotlin { publishAllLibraryVariants() } - fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { - val nativeFrameworkPaths = listOf( - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") - ).plus( - listOf( - "FirebaseAnalytics", - "FirebaseCore", - "FirebaseCoreDiagnostics", - "FirebaseInstallations", - "GoogleAppMeasurement", - "GoogleDataTransport", - "GoogleUtilities", - "nanopb", - "PromisesObjC" - ).map { - rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ).plus( - listOf( - "FirebaseFunctions", - "GTMSessionFetcher" - ).map { - projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") - } - ) + val supportIosTarget = project.property("skipIosTarget") != "true" + if (supportIosTarget) { + fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = { + val nativeFrameworkPaths = listOf( + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS") + ).plus( + listOf( + "FirebaseAnalytics", + "FirebaseCore", + "FirebaseCoreDiagnostics", + "FirebaseInstallations", + "GoogleAppMeasurement", + "GoogleDataTransport", + "GoogleUtilities", + "nanopb", + "PromisesObjC" + ).map { + rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ).plus( + listOf( + "FirebaseFunctions", + "GTMSessionFetcher" + ).map { + projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") + } + ) - binaries { - getTest("DEBUG").apply { - linkerOpts(nativeFrameworkPaths.map { "-F$it" }) - linkerOpts("-ObjC") + binaries { + getTest("DEBUG").apply { + linkerOpts(nativeFrameworkPaths.map { "-F$it" }) + linkerOpts("-ObjC") + } } - } - compilations.getByName("main") { - cinterops.create("FirebaseFunctions") { - compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + compilations.getByName("main") { + cinterops.create("FirebaseFunctions") { + compilerOpts(nativeFrameworkPaths.map { "-F$it" }) + extraOpts("-verbose") + } } } - } - ios(configure = nativeTargetConfig()) - iosSimulatorArm64(configure = nativeTargetConfig()) + ios(configure = nativeTargetConfig()) + iosSimulatorArm64(configure = nativeTargetConfig()) + } js { useCommonJs() @@ -137,18 +140,26 @@ kotlin { } } - val iosMain by getting - val iosSimulatorArm64Main by getting - iosSimulatorArm64Main.dependsOn(iosMain) + if (supportIosTarget) { + val iosMain by getting + val iosSimulatorArm64Main by getting + iosSimulatorArm64Main.dependsOn(iosMain) - val iosTest by sourceSets.getting - val iosSimulatorArm64Test by sourceSets.getting - iosSimulatorArm64Test.dependsOn(iosTest) + val iosTest by sourceSets.getting + val iosSimulatorArm64Test by sourceSets.getting + iosSimulatorArm64Test.dependsOn(iosTest) + } val jsMain by getting } } +if (project.property("firebase-functions.skipIosTests") == "true") { + tasks.forEach { + if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false } + } +} + signing { val signingKey: String? by project val signingPassword: String? by project diff --git a/gradle.properties b/gradle.properties index 4d4351bea..94533b4d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,6 +17,17 @@ org.gradle.parallel=true systemProp.org.gradle.internal.publish.checksums.insecure=true testOptions.unitTests.isIncludeAndroidResources=true +# Set to true to skip tests and even compilation of the iOS target. +skipIosTarget=false +# Skip iOS Tests +firebase-app.skipIosTests=false +firebase-auth.skipIosTests=true +firebase-common.skipIosTests=false +firebase-database.skipIosTests=false +firebase-firestore.skipIosTests=false +firebase-functions.skipIosTests=false +firebase-config.skipIosTests=false + # Versions: firebase-app.version=1.4.2 firebase-auth.version=1.4.2 From e912c396d270060f0429bc60585dc9d825d9ffe4 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 14:08:16 +0100 Subject: [PATCH 31/42] Removed debug trigger --- .github/workflows/publish.yml | 2 -- gradle.properties | 14 +++++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3d4678a6f..955306bf0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,8 +4,6 @@ name: Publish on: - push: - branches: [ GL-855-fix-upload-issue-with-firebase ] release: types: [prereleased, released] diff --git a/gradle.properties b/gradle.properties index dee0b6d0c..8c04adbb6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -29,10 +29,10 @@ firebase-functions.skipIosTests=false firebase-config.skipIosTests=false # Versions: -firebase-app.version=1.4.3-alpha -firebase-auth.version=1.4.3-alpha -firebase-common.version=1.4.3-alpha -firebase-database.version=1.4.3-alpha -firebase-firestore.version=1.4.3-alpha -firebase-functions.version=1.4.3-alpha -firebase-config.version=1.4.3-alpha +firebase-app.version=1.4.3 +firebase-auth.version=1.4.3 +firebase-common.version=1.4.3 +firebase-database.version=1.4.3 +firebase-firestore.version=1.4.3 +firebase-functions.version=1.4.3 +firebase-config.version=1.4.3 From f07215df559b219c0ab455a71c22ffb55376549a Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Tue, 5 Oct 2021 14:20:37 +0100 Subject: [PATCH 32/42] Added comment on skip test. Adjusted readme. --- README.md | 28 ++++++++++++++-------------- gradle.properties | 1 + 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 06a18d02b..d0d1bbeb0 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ The following libraries are available for the various Firebase products. | Service or Product | Gradle Dependency | API Coverage | | ------------------------------------------------------------------------------------ | :-----------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Authentication](https://firebase.google.com/docs/auth#kotlin-android) | [`dev.gitlive:firebase-auth:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.4.2/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt) | -| [Realtime Database](https://firebase.google.com/docs/database#kotlin-android) | [`dev.gitlive:firebase-database:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.4.2/pom) | [![70%](https://img.shields.io/badge/-70%25-orange?style=flat-square)](/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt) | -| [Cloud Firestore](https://firebase.google.com/docs/firestore#kotlin-android) | [`dev.gitlive:firebase-firestore:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.4.2/pom) | [![60%](https://img.shields.io/badge/-60%25-orange?style=flat-square)](/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt) | -| [Cloud Functions](https://firebase.google.com/docs/functions/callable#kotlin-android)| [`dev.gitlive:firebase-functions:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.4.2/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-functions/src/commonMain/kotlin/dev/gitlive/firebase/functions/functions.kt) | -| [Cloud Messaging](https://firebase.google.com/docs/messaging#kotlin-android) | [`dev.gitlive:firebase-messaging:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.4.2/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) | -| [Cloud Storage](https://firebase.google.com/docs/storage#kotlin-android) | [`dev.gitlive:firebase-storage:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.4.2/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) | -| [Remote Config](https://firebase.google.com/docs/remote-config/get-started?platform=android) | [`dev.gitlive:firebase-config:1.4.2`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.4.2/pom) | ![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square) | +| [Authentication](https://firebase.google.com/docs/auth#kotlin-android) | [`dev.gitlive:firebase-auth:1.4.3`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.4.3/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt) | +| [Realtime Database](https://firebase.google.com/docs/database#kotlin-android) | [`dev.gitlive:firebase-database:1.4.3`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.4.3/pom) | [![70%](https://img.shields.io/badge/-70%25-orange?style=flat-square)](/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt) | +| [Cloud Firestore](https://firebase.google.com/docs/firestore#kotlin-android) | [`dev.gitlive:firebase-firestore:1.4.3`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.4.3/pom) | [![60%](https://img.shields.io/badge/-60%25-orange?style=flat-square)](/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt) | +| [Cloud Functions](https://firebase.google.com/docs/functions/callable#kotlin-android)| [`dev.gitlive:firebase-functions:1.4.3`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.4.3/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-functions/src/commonMain/kotlin/dev/gitlive/firebase/functions/functions.kt) | +| [Cloud Messaging](https://firebase.google.com/docs/messaging#kotlin-android) | [`dev.gitlive:firebase-messaging:1.4.3`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.4.3/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) | +| [Cloud Storage](https://firebase.google.com/docs/storage#kotlin-android) | [`dev.gitlive:firebase-storage:1.4.3`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.4.3/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) | +| [Remote Config](https://firebase.google.com/docs/remote-config/get-started?platform=android) | [`dev.gitlive:firebase-config:1.4.3`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.4.3/pom) | ![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square) | @@ -166,13 +166,13 @@ If you are building a Kotlin multiplatform library which will be consumed from J ```json "dependencies": { - "@gitlive/firebase-auth": "1.4.2", - "@gitlive/firebase-database": "1.4.2", - "@gitlive/firebase-firestore": "1.4.2", - "@gitlive/firebase-functions": "1.4.2", - "@gitlive/firebase-storage": "1.4.2", - "@gitlive/firebase-messaging": "1.4.2", - "@gitlive/firebase-config": "1.4.2" + "@gitlive/firebase-auth": "1.4.3", + "@gitlive/firebase-database": "1.4.3", + "@gitlive/firebase-firestore": "1.4.3", + "@gitlive/firebase-functions": "1.4.3", + "@gitlive/firebase-storage": "1.4.3", + "@gitlive/firebase-messaging": "1.4.3", + "@gitlive/firebase-config": "1.4.3" } ``` diff --git a/gradle.properties b/gradle.properties index 8c04adbb6..dead1d414 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,6 +21,7 @@ testOptions.unitTests.isIncludeAndroidResources=true skipIosTarget=false # Skip iOS Tests firebase-app.skipIosTests=false +# We are skipping auth ios tests due to an issue with keychain and simulator. firebase-auth.skipIosTests=true firebase-common.skipIosTests=false firebase-database.skipIosTests=false From 8d282731cd73abefeaee081ed87f50ee7537dc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Owodzi=C5=84?= Date: Mon, 11 Oct 2021 18:50:14 +0100 Subject: [PATCH 33/42] updated Firebase SDKs & dependencies (#228) * updated Firebase SDKs & dependencies * gradle update --- build.gradle.kts | 4 +- firebase-app/build.gradle.kts | 1 + firebase-app/package.json | 2 +- .../src/nativeInterop/cinterop/Cartfile | 2 +- .../nativeInterop/cinterop/FirebaseCore.def | 2 +- firebase-auth/build.gradle.kts | 1 + firebase-auth/package.json | 2 +- .../src/nativeInterop/cinterop/Cartfile | 2 +- firebase-common/build.gradle.kts | 4 +- firebase-common/package.json | 4 +- firebase-config/build.gradle.kts | 1 + firebase-config/package.json | 2 +- .../src/nativeInterop/cinterop/Cartfile | 2 +- .../cinterop/FirebaseRemoteConfig.def | 2 +- firebase-database/build.gradle.kts | 1 + firebase-database/package.json | 2 +- .../src/nativeInterop/cinterop/Cartfile | 2 +- firebase-firestore/build.gradle.kts | 5 +- firebase-firestore/package.json | 2 +- .../src/nativeInterop/cinterop/Cartfile | 2 +- firebase-functions/build.gradle.kts | 1 + firebase-functions/package.json | 2 +- .../src/nativeInterop/cinterop/Cartfile | 2 +- gradle/wrapper/gradle-wrapper.jar | Bin 55190 -> 59536 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 282 +++++++++++------- gradlew.bat | 43 +-- 27 files changed, 225 insertions(+), 153 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9ab1f39bc..e512e1f2a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { - kotlin("multiplatform") version "1.5.30" apply false + kotlin("multiplatform") version "1.5.31" apply false id("base") } @@ -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.0")) + "androidMainImplementation"(platform("com.google.firebase:firebase-bom:28.4.1")) "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 b55e1ec5e..eff011173 100644 --- a/firebase-app/build.gradle.kts +++ b/firebase-app/build.gradle.kts @@ -70,6 +70,7 @@ kotlin { "FirebaseCoreDiagnostics", "FirebaseInstallations", "GoogleAppMeasurement", + "GoogleAppMeasurementIdentitySupport", "GoogleDataTransport", "GoogleUtilities", "nanopb", diff --git a/firebase-app/package.json b/firebase-app/package.json index 615a88589..b04ec1a26 100644 --- a/firebase-app/package.json +++ b/firebase-app/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-common": "1.4.3", "firebase": "8.10.0", - "kotlin": "1.5.30", + "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-app/src/nativeInterop/cinterop/Cartfile b/firebase-app/src/nativeInterop/cinterop/Cartfile index 766237c1a..8d78efb90 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.6.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.8.0 diff --git a/firebase-app/src/nativeInterop/cinterop/FirebaseCore.def b/firebase-app/src/nativeInterop/cinterop/FirebaseCore.def index 4287b7982..ae9ff7d73 100644 --- a/firebase-app/src/nativeInterop/cinterop/FirebaseCore.def +++ b/firebase-app/src/nativeInterop/cinterop/FirebaseCore.def @@ -2,4 +2,4 @@ language = Objective-C package = cocoapods.FirebaseCore modules = FirebaseCore compilerOpts = -framework FirebaseCore -linkerOpts = -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseAnalytics -framework GoogleAppMeasurement -framework FirebaseInstallations -framework GoogleDataTransport -framework GoogleUtilities -framework PromisesObjC -framework nanopb -framework StoreKit -lsqlite3 +linkerOpts = -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstallations -framework GoogleAppMeasurement -framework GoogleAppMeasurementIdentitySupport -framework GoogleDataTransport -framework GoogleUtilities -framework nanopb -framework PromisesObjC -framework StoreKit -lsqlite3 diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index f359d3152..00c0a4be8 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -93,6 +93,7 @@ kotlin { "FirebaseCoreDiagnostics", "FirebaseInstallations", "GoogleAppMeasurement", + "GoogleAppMeasurementIdentitySupport", "GoogleDataTransport", "GoogleUtilities", "nanopb", diff --git a/firebase-auth/package.json b/firebase-auth/package.json index 7e96fd49d..e2668ff1f 100644 --- a/firebase-auth/package.json +++ b/firebase-auth/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", - "kotlin": "1.5.30", + "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-auth/src/nativeInterop/cinterop/Cartfile b/firebase-auth/src/nativeInterop/cinterop/Cartfile index 245d5135f..c9d68bb30 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.6.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" == 8.8.0 diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index c809581df..ba4c667cf 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -9,7 +9,7 @@ version = project.property("firebase-common.version") as String plugins { id("com.android.library") kotlin("multiplatform") - kotlin("plugin.serialization") version "1.5.30" + kotlin("plugin.serialization") version "1.5.31" } android { @@ -86,7 +86,7 @@ kotlin { val commonMain by getting { dependencies { - api("org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.0-RC") + api("org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.0") } } diff --git a/firebase-common/package.json b/firebase-common/package.json index aa15bf6fa..96cfb72d1 100644 --- a/firebase-common/package.json +++ b/firebase-common/package.json @@ -24,8 +24,8 @@ "homepage": "https://github.com/GitLiveApp/firebase-kotlin-multiplatform-sdk", "dependencies": { "firebase": "8.10.0", - "kotlin": "1.5.30", + "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2", - "kotlinx-serialization-kotlinx-serialization-runtime": "1.2.2" + "kotlinx-serialization-kotlinx-serialization-runtime": "1.3.0" } } diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index 6f1bb82c4..6af6ec0ea 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -77,6 +77,7 @@ kotlin { "FirebaseCoreDiagnostics", "FirebaseAnalytics", "GoogleAppMeasurement", + "GoogleAppMeasurementIdentitySupport", "FirebaseInstallations", "GoogleDataTransport", "GoogleUtilities", diff --git a/firebase-config/package.json b/firebase-config/package.json index 5a496ba6a..a1a774ef7 100644 --- a/firebase-config/package.json +++ b/firebase-config/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", - "kotlin": "1.5.30", + "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-config/src/nativeInterop/cinterop/Cartfile b/firebase-config/src/nativeInterop/cinterop/Cartfile index 2e485003c..a944bdb12 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.6.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" == 8.8.0 diff --git a/firebase-config/src/nativeInterop/cinterop/FirebaseRemoteConfig.def b/firebase-config/src/nativeInterop/cinterop/FirebaseRemoteConfig.def index 0d79ca265..366525c26 100644 --- a/firebase-config/src/nativeInterop/cinterop/FirebaseRemoteConfig.def +++ b/firebase-config/src/nativeInterop/cinterop/FirebaseRemoteConfig.def @@ -2,4 +2,4 @@ language = Objective-C package = cocoapods.FirebaseRemoteConfig modules = FirebaseRemoteConfig compilerOpts = -framework FirebaseRemoteConfig -linkerOpts = -framework FirebaseRemoteConfig -framework FirebaseABTesting +linkerOpts = -framework FirebaseABTesting -framework FirebaseRemoteConfig diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index 196209885..8b5c08b7d 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -68,6 +68,7 @@ kotlin { "FirebaseCoreDiagnostics", "FirebaseInstallations", "GoogleAppMeasurement", + "GoogleAppMeasurementIdentitySupport", "GoogleDataTransport", "GoogleUtilities", "nanopb", diff --git a/firebase-database/package.json b/firebase-database/package.json index b2fbc615a..a18360057 100644 --- a/firebase-database/package.json +++ b/firebase-database/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", - "kotlin": "1.5.30", + "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-database/src/nativeInterop/cinterop/Cartfile b/firebase-database/src/nativeInterop/cinterop/Cartfile index 05b39ac4d..48e590b2d 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.6.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json" == 8.8.0 diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index 44a2a001b..bff60b38e 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -10,7 +10,7 @@ version = project.property("firebase-firestore.version") as String plugins { id("com.android.library") kotlin("multiplatform") - kotlin("plugin.serialization") version "1.5.30" + kotlin("plugin.serialization") version "1.5.31" } android { @@ -71,6 +71,7 @@ kotlin { "FirebaseCoreDiagnostics", "FirebaseInstallations", "GoogleAppMeasurement", + "GoogleAppMeasurementIdentitySupport", "GoogleDataTransport", "GoogleUtilities", "nanopb", @@ -83,8 +84,8 @@ kotlin { "abseil", "BoringSSL-GRPC", "FirebaseFirestore", - "gRPC-Core", "gRPC-C++", + "gRPC-Core", "leveldb-library" ).map { projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}") diff --git a/firebase-firestore/package.json b/firebase-firestore/package.json index 677b33af1..4583702a3 100644 --- a/firebase-firestore/package.json +++ b/firebase-firestore/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", - "kotlin": "1.5.30", + "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-firestore/src/nativeInterop/cinterop/Cartfile b/firebase-firestore/src/nativeInterop/cinterop/Cartfile index aaf8803f4..d8580d2e9 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.6.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFirestoreBinary.json" == 8.8.0 diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index d9392dffe..f9e42f1ce 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -63,6 +63,7 @@ kotlin { "FirebaseCoreDiagnostics", "FirebaseInstallations", "GoogleAppMeasurement", + "GoogleAppMeasurementIdentitySupport", "GoogleDataTransport", "GoogleUtilities", "nanopb", diff --git a/firebase-functions/package.json b/firebase-functions/package.json index 7861d99fa..a5ec276fb 100644 --- a/firebase-functions/package.json +++ b/firebase-functions/package.json @@ -25,7 +25,7 @@ "dependencies": { "@gitlive/firebase-app": "1.4.3", "firebase": "8.10.0", - "kotlin": "1.5.30", + "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" } } diff --git a/firebase-functions/src/nativeInterop/cinterop/Cartfile b/firebase-functions/src/nativeInterop/cinterop/Cartfile index 1bd88ed9d..04b616b81 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.6.0 +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFunctionsBinary.json" == 8.8.0 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 87b738cbd051603d91cc39de6cb000dd98fe6b02..7454180f2ae8848c63b8b4dea2cb829da983f2fa 100644 GIT binary patch delta 26684 zcmY&(< z2MM1vVIvtEyFtzX9aNI9LOB7B?cd z+2yXM**T*f0L(k)C)j;wOH|LdtG&KN1tMgBb||cTo030n!MZg8jJpIURcM_!b|u?! zk$`~3oH>(OIqFID^laI(1;2u?V6w&)Roj`@#x*tDvZnEw z5p_B?Pp$f=6dG*z%Nk|1IJ~_+N0gv>ttrir>y(B_Oe z)hrb;O@My`P%8h|L|_Wj1Aa-z#i;yM^5AeSN|86Pv7?ZVw1CFY=r!7HzZc4B!;kr_ z%i6-jw(@v!`nQD){U&m;3Cyc&quU8!W+r_Ys9nr zQ<(zU8RW(NZJu#KmF=(E9o#}&^OlI&6`gH?)v1bvlOnO2@7W*G65pq$xb*4~+fn^t z-nz)mwE-mGZz_hPgHFnF5RmX-V6d=YU|=F(Hs9!Lh@im0$p3p{_@6rC1Dk5-TG(F% zZtIQoQ7p94Ax)w(VCYP3nvI(A)bmgb-yB*u7$-<-9X-!1OXh8_>wfY-1$TVHJyNW( zwk>6PmIJ8=4}3i`GN!!))9Woe|DFuEz63u$Sb|EPWhBASSq+Dw;C_f@r7=^O;a*SP zh@>-dG%0=s8D?d{D&mk&Hs zu9M$?PFr_pd$4crJ#vc`($^zGM4$g0HWDIK9s}yU`d&(rar4r!xJ$#N3r?n5BlNE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DL`x_rRLH3`teR~X0)R9BM#ZYvN#a~%dM%fB9qS?7iS<&=~d2Xp4Y zY}EXrz-keO!~~qI^MhoX0OTkWps~RZ(&)rMUW{2GK-&fk^t2n8+OP#F^aA%brT?<- z{r`8`zvnDMQuhDbg)wf7Dc0*|;bqV3=JC|c#>30O##2`V2lp=l0nAB_F^L^U1Pkjw D;yMN8 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 760721ee7..ffed3a254 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed May 20 18:31:34 BST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip diff --git a/gradlew b/gradlew index af6708ff2..1b6c78733 100755 --- a/gradlew +++ b/gradlew @@ -1,78 +1,129 @@ -#!/usr/bin/env sh +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m"' +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -81,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -89,84 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 6d57edc70..107acd32c 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,28 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell From 9ce92221006d5aee3ffe418ed03fa7833f90d540 Mon Sep 17 00:00:00 2001 From: Alex Shepeliev Date: Sun, 31 Oct 2021 00:50:56 +0300 Subject: [PATCH 34/42] Add ServerTimestampBehavior in Firestore module (#246) * Add ServerTimestampBehavior * Remove redundant parentheses --- .../gitlive/firebase/firestore/firestore.kt | 3 +- .../gitlive/firebase/firestore/firestore.kt | 23 +++-- .../gitlive/firebase/firestore/firestore.kt | 16 +++- .../gitlive/firebase/firestore/firestore.kt | 92 ++++++++++++++++++- .../gitlive/firebase/firestore/firestore.kt | 34 +++++-- .../gitlive/firebase/firestore/firestore.kt | 2 +- .../gitlive/firebase/firestore/firestore.kt | 22 +++-- .../gitlive/firebase/firestore/firestore.kt | 4 +- 8 files changed, 160 insertions(+), 36 deletions(-) diff --git a/firebase-firestore/src/androidAndroidTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/androidAndroidTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 34a69d9fd..9c3f485e2 100644 --- a/firebase-firestore/src/androidAndroidTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/androidAndroidTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -6,10 +6,11 @@ package dev.gitlive.firebase.firestore import androidx.test.platform.app.InstrumentationRegistry +import kotlinx.coroutines.CoroutineScope 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() } +actual fun runTest(test: suspend CoroutineScope.() -> Unit) = runBlocking { test() } diff --git a/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 67fb451d8..970bea996 100644 --- a/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -409,22 +409,32 @@ actual class DocumentSnapshot(val android: com.google.firebase.firestore.Documen actual val id get() = android.id actual val reference get() = DocumentReference(android.reference) - actual inline fun data() = decode(value = android.data) + actual inline fun data(serverTimestampBehavior: ServerTimestampBehavior): T = + decode(value = android.getData(serverTimestampBehavior.toAndroid())) - actual fun data(strategy: DeserializationStrategy) = decode(strategy, android.data) + actual fun data(strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior): T = + decode(strategy, android.getData(serverTimestampBehavior.toAndroid())) - actual fun dataMap(): Map = android.data ?: emptyMap() + actual fun dataMap(serverTimestampBehavior: ServerTimestampBehavior): Map = + android.getData(serverTimestampBehavior.toAndroid()) ?: emptyMap() - actual inline fun get(field: String) = decode(value = android.get(field)) + actual inline fun get(field: String, serverTimestampBehavior: ServerTimestampBehavior): T = + decode(value = android.get(field, serverTimestampBehavior.toAndroid())) - actual fun get(field: String, strategy: DeserializationStrategy) = - decode(strategy, android.get(field)) + actual fun get(field: String, strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior): T = + decode(strategy, android.get(field, serverTimestampBehavior.toAndroid())) actual fun contains(field: String) = android.contains(field) actual val exists get() = android.exists() actual val metadata: SnapshotMetadata get() = SnapshotMetadata(android.metadata) + + fun ServerTimestampBehavior.toAndroid(): com.google.firebase.firestore.DocumentSnapshot.ServerTimestampBehavior = when (this) { + ServerTimestampBehavior.ESTIMATE -> com.google.firebase.firestore.DocumentSnapshot.ServerTimestampBehavior.ESTIMATE + ServerTimestampBehavior.NONE -> com.google.firebase.firestore.DocumentSnapshot.ServerTimestampBehavior.NONE + ServerTimestampBehavior.PREVIOUS -> com.google.firebase.firestore.DocumentSnapshot.ServerTimestampBehavior.PREVIOUS + } } actual class SnapshotMetadata(val android: com.google.firebase.firestore.SnapshotMetadata) { @@ -444,4 +454,3 @@ actual object FieldValue { actual fun arrayRemove(vararg elements: Any): Any = FieldValue.arrayRemove(*elements) actual fun delete(): Any = delete } - diff --git a/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 11c34996b..12565196d 100644 --- a/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -188,15 +188,15 @@ expect class DocumentChange { expect class DocumentSnapshot { - inline fun get(field: String): T - fun get(field: String, strategy: DeserializationStrategy): T + inline fun get(field: String, serverTimestampBehavior: ServerTimestampBehavior = ServerTimestampBehavior.NONE): T + fun get(field: String, strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior = ServerTimestampBehavior.NONE): T fun contains(field: String): Boolean - inline fun data(): T - fun data(strategy: DeserializationStrategy): T + inline fun data(serverTimestampBehavior: ServerTimestampBehavior = ServerTimestampBehavior.NONE): T + fun data(strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior = ServerTimestampBehavior.NONE): T - fun dataMap(): Map + fun dataMap(serverTimestampBehavior: ServerTimestampBehavior = ServerTimestampBehavior.NONE): Map val exists: Boolean val id: String @@ -204,6 +204,12 @@ expect class DocumentSnapshot { val metadata: SnapshotMetadata } +enum class ServerTimestampBehavior { + ESTIMATE, + NONE, + PREVIOUS +} + expect class SnapshotMetadata { val hasPendingWrites: Boolean val isFromCache: Boolean diff --git a/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 8655373cc..65d2ff576 100644 --- a/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -4,13 +4,29 @@ package dev.gitlive.firebase.firestore -import dev.gitlive.firebase.* -import kotlinx.serialization.* -import kotlin.test.* +import dev.gitlive.firebase.Firebase +import dev.gitlive.firebase.FirebaseOptions +import dev.gitlive.firebase.apps +import dev.gitlive.firebase.initialize +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.async +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.filter +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.withTimeout +import kotlinx.serialization.Serializable +import kotlin.random.Random +import kotlin.test.BeforeTest +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertNotEquals +import kotlin.test.assertNotNull +import kotlin.test.assertNull +import kotlin.test.assertTrue expect val emulatorHost: String expect val context: Any -expect fun runTest(test: suspend () -> Unit) +expect fun runTest(test: suspend CoroutineScope.() -> Unit) class FirebaseFirestoreTest { @@ -121,7 +137,73 @@ class FirebaseFirestoreTest { assertNotEquals(FieldValue.serverTimestamp, doc.get().get("time")) assertNotEquals(FieldValue.serverTimestamp, doc.get().data(FirestoreTest.serializer()).time) + } + + @Test + fun testServerTimestampBehaviorNone() = runTest { + val doc = Firebase.firestore + .collection("testServerTimestampBehaviorNone") + .document("test${Random.nextInt()}") + + val deferredPendingWritesSnapshot = async { + withTimeout(5000) { + doc.snapshots.filter { it.exists }.first() + } + } + delay(100) // makes possible to catch pending writes snapshot + + doc.set( + FirestoreTest.serializer(), + FirestoreTest("ServerTimestampBehavior", FieldValue.serverTimestamp) + ) + + val pendingWritesSnapshot = deferredPendingWritesSnapshot.await() + assertTrue(pendingWritesSnapshot.metadata.hasPendingWrites) + assertNull(pendingWritesSnapshot.get("time", ServerTimestampBehavior.NONE)) + assertNull(pendingWritesSnapshot.dataMap(ServerTimestampBehavior.NONE)["time"]) + } + + @Test + fun testServerTimestampBehaviorEstimate() = runTest { + val doc = Firebase.firestore + .collection("testServerTimestampBehaviorEstimate") + .document("test${Random.nextInt()}") + + val deferredPendingWritesSnapshot = async { + withTimeout(5000) { + doc.snapshots.filter { it.exists }.first() + } + } + delay(100) // makes possible to catch pending writes snapshot + + doc.set(FirestoreTest.serializer(), FirestoreTest("ServerTimestampBehavior", FieldValue.serverTimestamp)) + + val pendingWritesSnapshot = deferredPendingWritesSnapshot.await() + assertTrue(pendingWritesSnapshot.metadata.hasPendingWrites) + assertNotNull(pendingWritesSnapshot.get("time", ServerTimestampBehavior.ESTIMATE)) + assertNotNull(pendingWritesSnapshot.dataMap(ServerTimestampBehavior.ESTIMATE)["time"]) + assertNotEquals(0.0, pendingWritesSnapshot.data(FirestoreTest.serializer(), ServerTimestampBehavior.ESTIMATE).time) + } + + @Test + fun testServerTimestampBehaviorPrevious() = runTest { + val doc = Firebase.firestore + .collection("testServerTimestampBehaviorPrevious") + .document("test${Random.nextInt()}") + + val deferredPendingWritesSnapshot = async { + withTimeout(5000) { + doc.snapshots.filter { it.exists }.first() + } + } + delay(100) // makes possible to catch pending writes snapshot + + doc.set(FirestoreTest.serializer(), FirestoreTest("ServerTimestampBehavior", FieldValue.serverTimestamp)) + val pendingWritesSnapshot = deferredPendingWritesSnapshot.await() + assertTrue(pendingWritesSnapshot.metadata.hasPendingWrites) + assertNull(pendingWritesSnapshot.get("time", ServerTimestampBehavior.PREVIOUS)) + assertNull(pendingWritesSnapshot.dataMap(ServerTimestampBehavior.PREVIOUS)["time"]) } @Test @@ -169,4 +251,4 @@ class FirebaseFirestoreTest { .document("three") .set(FirestoreTest.serializer(), FirestoreTest("ccc")) } -} \ No newline at end of file +} diff --git a/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index c59e9f148..5d928c290 100644 --- a/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -15,6 +15,7 @@ import kotlinx.coroutines.runBlocking import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.SerializationStrategy import platform.Foundation.NSError +import platform.Foundation.NSNull @PublishedApi internal inline fun decode(value: Any?): T = @@ -377,22 +378,43 @@ actual class DocumentSnapshot(val ios: FIRDocumentSnapshot) { actual val reference get() = DocumentReference(ios.reference) - actual inline fun data() = decode(value = ios.data()) + actual inline fun data(serverTimestampBehavior: ServerTimestampBehavior): T { + val data = ios.dataWithServerTimestampBehavior(serverTimestampBehavior.toIos()) + return decode(value = data?.mapValues { (_, value) -> value?.takeIf { it !is NSNull } }) + } - actual fun data(strategy: DeserializationStrategy) = decode(strategy, ios.data()) + actual fun data(strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior): T { + val data = ios.dataWithServerTimestampBehavior(serverTimestampBehavior.toIos()) + return decode(strategy, data?.mapValues { (_, value) -> value?.takeIf { it !is NSNull } }) + } - actual fun dataMap(): Map = ios.data()?.map { it.key.toString() to it.value }?.toMap() ?: emptyMap() + actual fun dataMap(serverTimestampBehavior: ServerTimestampBehavior): Map = + ios.dataWithServerTimestampBehavior(serverTimestampBehavior.toIos()) + ?.map { (key, value) -> key.toString() to value?.takeIf { it !is NSNull } } + ?.toMap() + ?: emptyMap() - actual inline fun get(field: String) = decode(value = ios.valueForField(field)) + actual inline fun get(field: String, serverTimestampBehavior: ServerTimestampBehavior): T { + val value = ios.valueForField(field, serverTimestampBehavior.toIos())?.takeIf { it !is NSNull } + return decode(value) + } - actual fun get(field: String, strategy: DeserializationStrategy) = - decode(strategy, ios.valueForField(field)) + actual fun get(field: String, strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior): T { + val value = ios.valueForField(field, serverTimestampBehavior.toIos())?.takeIf { it !is NSNull } + return decode(strategy, value) + } actual fun contains(field: String) = ios.valueForField(field) != null actual val exists get() = ios.exists actual val metadata: SnapshotMetadata get() = SnapshotMetadata(ios.metadata) + + fun ServerTimestampBehavior.toIos() : FIRServerTimestampBehavior = when (this) { + ServerTimestampBehavior.ESTIMATE -> FIRServerTimestampBehavior.FIRServerTimestampBehaviorEstimate + ServerTimestampBehavior.NONE -> FIRServerTimestampBehavior.FIRServerTimestampBehaviorNone + ServerTimestampBehavior.PREVIOUS -> FIRServerTimestampBehavior.FIRServerTimestampBehaviorPrevious + } } actual class SnapshotMetadata(val ios: FIRSnapshotMetadata) { diff --git a/firebase-firestore/src/iosTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/iosTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt index d4915f9d4..294182dd3 100644 --- a/firebase-firestore/src/iosTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/iosTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -11,7 +11,7 @@ actual val emulatorHost: String = "localhost" actual val context: Any = Unit -actual fun runTest(test: suspend () -> Unit) = runBlocking { +actual fun runTest(test: suspend CoroutineScope.() -> Unit) = runBlocking { val testRun = MainScope().async { test() } while (testRun.isActive) { NSRunLoop.mainRunLoop.runMode( diff --git a/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 526f1acb9..c078ccde3 100644 --- a/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -387,23 +387,27 @@ actual class DocumentSnapshot(val js: firebase.firestore.DocumentSnapshot) { actual val id get() = rethrow { js.id } actual val reference get() = rethrow { DocumentReference(js.ref) } - actual inline fun data(): T = - rethrow { decode(value = js.data()) } + actual inline fun data(serverTimestampBehavior: ServerTimestampBehavior): T = + rethrow { decode(value = js.data(getTimestampsOptions(serverTimestampBehavior))) } - actual fun data(strategy: DeserializationStrategy): T = - rethrow { decode(strategy, js.data()) } + actual fun data(strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior): T = + rethrow { decode(strategy, js.data(getTimestampsOptions(serverTimestampBehavior))) } - actual fun dataMap(): Map = rethrow { mapOf(js.data().asDynamic()) } + actual fun dataMap(serverTimestampBehavior: ServerTimestampBehavior): Map = + rethrow { mapOf(js.data(getTimestampsOptions(serverTimestampBehavior)).asDynamic()) } - actual inline fun get(field: String) = - rethrow { decode(value = js.get(field)) } + actual inline fun get(field: String, serverTimestampBehavior: ServerTimestampBehavior) = + rethrow { decode(value = js.get(field, getTimestampsOptions(serverTimestampBehavior))) } - actual fun get(field: String, strategy: DeserializationStrategy) = - rethrow { decode(strategy, js.get(field)) } + actual fun get(field: String, strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior) = + rethrow { decode(strategy, js.get(field, getTimestampsOptions(serverTimestampBehavior))) } actual fun contains(field: String) = rethrow { js.get(field) != undefined } actual val exists get() = rethrow { js.exists } actual val metadata: SnapshotMetadata get() = SnapshotMetadata(js.metadata) + + fun getTimestampsOptions(serverTimestampBehavior: ServerTimestampBehavior) = + json("serverTimestamps" to serverTimestampBehavior.name.lowercase()) } actual class SnapshotMetadata(val js: firebase.firestore.SnapshotMetadata) { 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 b3ed41815..2f4951baa 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 @@ -4,6 +4,7 @@ package dev.gitlive.firebase.firestore +import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.promise @@ -11,7 +12,7 @@ actual val emulatorHost: String = "localhost" actual val context: Any = Unit -actual fun runTest(test: suspend () -> Unit) = GlobalScope +actual fun runTest(test: suspend CoroutineScope.() -> Unit) = GlobalScope .promise { try { test() @@ -28,4 +29,3 @@ internal fun Throwable.log() { it.log() } } - From 7af9843e9c1356bced5585750b4e4fea3a7b777b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Owodzi=C5=84?= Date: Thu, 18 Nov 2021 00:21:35 +0000 Subject: [PATCH 35/42] removed DocumentSnapshot.dataMap() (#250) --- .../gitlive/firebase/firestore/firestore.kt | 3 --- .../gitlive/firebase/firestore/firestore.kt | 2 -- .../gitlive/firebase/firestore/firestore.kt | 20 ------------------- .../gitlive/firebase/firestore/firestore.kt | 6 ------ .../gitlive/firebase/firestore/firestore.kt | 3 --- 5 files changed, 34 deletions(-) diff --git a/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 970bea996..115d4a114 100644 --- a/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -415,9 +415,6 @@ actual class DocumentSnapshot(val android: com.google.firebase.firestore.Documen actual fun data(strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior): T = decode(strategy, android.getData(serverTimestampBehavior.toAndroid())) - actual fun dataMap(serverTimestampBehavior: ServerTimestampBehavior): Map = - android.getData(serverTimestampBehavior.toAndroid()) ?: emptyMap() - actual inline fun get(field: String, serverTimestampBehavior: ServerTimestampBehavior): T = decode(value = android.get(field, serverTimestampBehavior.toAndroid())) diff --git a/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 12565196d..366b416b2 100644 --- a/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -196,8 +196,6 @@ expect class DocumentSnapshot { inline fun data(serverTimestampBehavior: ServerTimestampBehavior = ServerTimestampBehavior.NONE): T fun data(strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior = ServerTimestampBehavior.NONE): T - fun dataMap(serverTimestampBehavior: ServerTimestampBehavior = ServerTimestampBehavior.NONE): Map - val exists: Boolean val id: String val reference: DocumentReference diff --git a/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 65d2ff576..f48ae582d 100644 --- a/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -160,7 +160,6 @@ class FirebaseFirestoreTest { val pendingWritesSnapshot = deferredPendingWritesSnapshot.await() assertTrue(pendingWritesSnapshot.metadata.hasPendingWrites) assertNull(pendingWritesSnapshot.get("time", ServerTimestampBehavior.NONE)) - assertNull(pendingWritesSnapshot.dataMap(ServerTimestampBehavior.NONE)["time"]) } @Test @@ -181,7 +180,6 @@ class FirebaseFirestoreTest { val pendingWritesSnapshot = deferredPendingWritesSnapshot.await() assertTrue(pendingWritesSnapshot.metadata.hasPendingWrites) assertNotNull(pendingWritesSnapshot.get("time", ServerTimestampBehavior.ESTIMATE)) - assertNotNull(pendingWritesSnapshot.dataMap(ServerTimestampBehavior.ESTIMATE)["time"]) assertNotEquals(0.0, pendingWritesSnapshot.data(FirestoreTest.serializer(), ServerTimestampBehavior.ESTIMATE).time) } @@ -203,7 +201,6 @@ class FirebaseFirestoreTest { val pendingWritesSnapshot = deferredPendingWritesSnapshot.await() assertTrue(pendingWritesSnapshot.metadata.hasPendingWrites) assertNull(pendingWritesSnapshot.get("time", ServerTimestampBehavior.PREVIOUS)) - assertNull(pendingWritesSnapshot.dataMap(ServerTimestampBehavior.PREVIOUS)["time"]) } @Test @@ -223,23 +220,6 @@ class FirebaseFirestoreTest { assertEquals("AutoId", resultDoc.get("prop1")) } - @Test - fun testDataMap() = runTest { - val doc = Firebase.firestore - .collection("testDataMap") - .document - - doc.set(FirestoreTest.serializer(), FirestoreTest("dataMap", 123.45)) - - val resultDoc = Firebase.firestore - .collection("testDataMap") - .document(doc.id) - .get() - - assertEquals(true, resultDoc.exists) - assertEquals(mapOf("prop1" to "dataMap", "time" to 123.45), resultDoc.dataMap()) - } - private suspend fun setupFirestoreData() { Firebase.firestore.collection("FirebaseFirestoreTest") .document("one") diff --git a/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index 5d928c290..02dfb91c5 100644 --- a/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -388,12 +388,6 @@ actual class DocumentSnapshot(val ios: FIRDocumentSnapshot) { return decode(strategy, data?.mapValues { (_, value) -> value?.takeIf { it !is NSNull } }) } - actual fun dataMap(serverTimestampBehavior: ServerTimestampBehavior): Map = - ios.dataWithServerTimestampBehavior(serverTimestampBehavior.toIos()) - ?.map { (key, value) -> key.toString() to value?.takeIf { it !is NSNull } } - ?.toMap() - ?: emptyMap() - actual inline fun get(field: String, serverTimestampBehavior: ServerTimestampBehavior): T { val value = ios.valueForField(field, serverTimestampBehavior.toIos())?.takeIf { it !is NSNull } return decode(value) diff --git a/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt b/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt index c078ccde3..fadb1a6b2 100644 --- a/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt +++ b/firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt @@ -393,9 +393,6 @@ actual class DocumentSnapshot(val js: firebase.firestore.DocumentSnapshot) { actual fun data(strategy: DeserializationStrategy, serverTimestampBehavior: ServerTimestampBehavior): T = rethrow { decode(strategy, js.data(getTimestampsOptions(serverTimestampBehavior))) } - actual fun dataMap(serverTimestampBehavior: ServerTimestampBehavior): Map = - rethrow { mapOf(js.data(getTimestampsOptions(serverTimestampBehavior)).asDynamic()) } - actual inline fun get(field: String, serverTimestampBehavior: ServerTimestampBehavior) = rethrow { decode(value = js.get(field, getTimestampsOptions(serverTimestampBehavior))) } From a1b99ceaa069977cc0a277b5cb81f751e455aab6 Mon Sep 17 00:00:00 2001 From: Yves Tessier <45495048+muwasi@users.noreply.github.com> Date: Mon, 22 Nov 2021 19:10:48 -0500 Subject: [PATCH 36/42] fix compilation with xcode 13 (#244) Co-authored-by: yves tessier --- build.gradle.kts | 3 +-- firebase-app/build.gradle.kts | 2 +- firebase-auth/build.gradle.kts | 2 +- firebase-config/build.gradle.kts | 2 +- firebase-database/build.gradle.kts | 2 +- firebase-firestore/build.gradle.kts | 2 +- firebase-functions/build.gradle.kts | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index e512e1f2a..1bf79cd0b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -162,8 +162,7 @@ subprojects { args( it, "--project-directory", projectDir.resolve("src/nativeInterop/cinterop"), - "--platform", "iOS", - "--cache-builds" + "--platform", "iOS" ) } } diff --git a/firebase-app/build.gradle.kts b/firebase-app/build.gradle.kts index eff011173..530e4ba3e 100644 --- a/firebase-app/build.gradle.kts +++ b/firebase-app/build.gradle.kts @@ -90,7 +90,7 @@ kotlin { compilations.getByName("main") { cinterops.create("FirebaseCore") { compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + extraOpts = listOf("-compiler-option", "-DNS_FORMAT_ARGUMENT(A)=", "-verbose") } } } diff --git a/firebase-auth/build.gradle.kts b/firebase-auth/build.gradle.kts index 00c0a4be8..1402f4358 100644 --- a/firebase-auth/build.gradle.kts +++ b/firebase-auth/build.gradle.kts @@ -119,7 +119,7 @@ kotlin { compilations.getByName("main") { cinterops.create("FirebaseAuth") { compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + extraOpts = listOf("-compiler-option", "-DNS_FORMAT_ARGUMENT(A)=", "-verbose") } } } diff --git a/firebase-config/build.gradle.kts b/firebase-config/build.gradle.kts index 6af6ec0ea..6b113bdcd 100644 --- a/firebase-config/build.gradle.kts +++ b/firebase-config/build.gradle.kts @@ -104,7 +104,7 @@ kotlin { compilations.getByName("main") { cinterops.create("FirebaseRemoteConfig") { compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + extraOpts = listOf("-compiler-option", "-DNS_FORMAT_ARGUMENT(A)=", "-verbose") } } } diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index 8b5c08b7d..ab68f72d1 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -95,7 +95,7 @@ kotlin { compilations.getByName("main") { cinterops.create("FirebaseDatabase") { compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + extraOpts = listOf("-compiler-option", "-DNS_FORMAT_ARGUMENT(A)=", "-verbose") } } } diff --git a/firebase-firestore/build.gradle.kts b/firebase-firestore/build.gradle.kts index bff60b38e..243bf2cd1 100644 --- a/firebase-firestore/build.gradle.kts +++ b/firebase-firestore/build.gradle.kts @@ -102,7 +102,7 @@ kotlin { compilations.getByName("main") { cinterops.create("FirebaseFirestore") { compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + extraOpts = listOf("-compiler-option", "-DNS_FORMAT_ARGUMENT(A)=", "-verbose") } } } diff --git a/firebase-functions/build.gradle.kts b/firebase-functions/build.gradle.kts index f9e42f1ce..6174f47d0 100644 --- a/firebase-functions/build.gradle.kts +++ b/firebase-functions/build.gradle.kts @@ -90,7 +90,7 @@ kotlin { compilations.getByName("main") { cinterops.create("FirebaseFunctions") { compilerOpts(nativeFrameworkPaths.map { "-F$it" }) - extraOpts("-verbose") + extraOpts = listOf("-compiler-option", "-DNS_FORMAT_ARGUMENT(A)=", "-verbose") } } } From 0ff3444beb525a7c19bbcae28ada6880c42bb621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Owodzi=C5=84?= Date: Tue, 23 Nov 2021 00:12:04 +0000 Subject: [PATCH 37/42] updated Firebase JS SDKs (#254) --- firebase-app/package.json | 2 +- firebase-auth/package.json | 2 +- firebase-common/build.gradle.kts | 2 +- firebase-common/package.json | 2 +- .../kotlin/dev/gitlive/firebase/externals.kt | 2 +- .../kotlin/dev/gitlive/firebase/externals2.kt | 15 ++++++++++----- firebase-config/package.json | 2 +- firebase-database/package.json | 2 +- firebase-firestore/package.json | 2 +- firebase-functions/package.json | 2 +- 10 files changed, 19 insertions(+), 14 deletions(-) diff --git a/firebase-app/package.json b/firebase-app/package.json index b04ec1a26..9b852f91c 100644 --- a/firebase-app/package.json +++ b/firebase-app/package.json @@ -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" } diff --git a/firebase-auth/package.json b/firebase-auth/package.json index e2668ff1f..9c71c23d8 100644 --- a/firebase-auth/package.json +++ b/firebase-auth/package.json @@ -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" } diff --git a/firebase-common/build.gradle.kts b/firebase-common/build.gradle.kts index ba4c667cf..2496f3c15 100644 --- a/firebase-common/build.gradle.kts +++ b/firebase-common/build.gradle.kts @@ -108,7 +108,7 @@ kotlin { val jsMain by getting { dependencies { - api(npm("firebase", "8.7.1")) + api(npm("firebase", "9.4.1")) } } } diff --git a/firebase-common/package.json b/firebase-common/package.json index 96cfb72d1..306f5de28 100644 --- a/firebase-common/package.json +++ b/firebase-common/package.json @@ -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" diff --git a/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt b/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt index 3485345b0..f56164bae 100644 --- a/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt +++ b/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt @@ -2,7 +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 diff --git a/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals2.kt b/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals2.kt index fbc2409a8..3c2b981c1 100644 --- a/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals2.kt +++ b/firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals2.kt @@ -6,19 +6,24 @@ package dev.gitlive.firebase import kotlin.js.Promise -@JsModule("firebase/functions") +@JsModule("firebase/compat/functions") +@JsName("default") external object functions -@JsModule("firebase/auth") +@JsModule("firebase/compat/auth") +@JsName("default") external object auth -@JsModule("firebase/database") +@JsModule("firebase/compat/database") +@JsName("default") external object database -@JsModule("firebase/firestore") +@JsModule("firebase/compat/firestore") +@JsName("default") external object firestore -@JsModule("firebase/remote-config") +@JsModule("firebase/compat/remote-config") +@JsName("default") external object remoteConfig typealias SnapshotCallback = (data: firebase.database.DataSnapshot, b: String?) -> Unit diff --git a/firebase-config/package.json b/firebase-config/package.json index a1a774ef7..389ebaa56 100644 --- a/firebase-config/package.json +++ b/firebase-config/package.json @@ -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" } diff --git a/firebase-database/package.json b/firebase-database/package.json index a18360057..e93312c26 100644 --- a/firebase-database/package.json +++ b/firebase-database/package.json @@ -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" } diff --git a/firebase-firestore/package.json b/firebase-firestore/package.json index 4583702a3..d3df2f1c3 100644 --- a/firebase-firestore/package.json +++ b/firebase-firestore/package.json @@ -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" } diff --git a/firebase-functions/package.json b/firebase-functions/package.json index a5ec276fb..ff55e2ba7 100644 --- a/firebase-functions/package.json +++ b/firebase-functions/package.json @@ -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" } 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 38/42] 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 From e48927c0c5292de6c701b5183fdec2fe2063549b Mon Sep 17 00:00:00 2001 From: pauminku Date: Wed, 29 Dec 2021 17:16:42 +0100 Subject: [PATCH 39/42] allow to get database root reference --- .../kotlin/dev/gitlive/firebase/database/database.kt | 3 +++ .../kotlin/dev/gitlive/firebase/database/database.kt | 1 + .../iosMain/kotlin/dev/gitlive/firebase/database/database.kt | 3 +++ .../jsMain/kotlin/dev/gitlive/firebase/database/database.kt | 1 + 4 files changed, 8 insertions(+) diff --git a/firebase-database/src/androidMain/kotlin/dev/gitlive/firebase/database/database.kt b/firebase-database/src/androidMain/kotlin/dev/gitlive/firebase/database/database.kt index e92f95dd3..9e926a99f 100644 --- a/firebase-database/src/androidMain/kotlin/dev/gitlive/firebase/database/database.kt +++ b/firebase-database/src/androidMain/kotlin/dev/gitlive/firebase/database/database.kt @@ -67,6 +67,9 @@ actual class FirebaseDatabase internal constructor(val android: com.google.fireb actual fun reference(path: String) = DatabaseReference(android.getReference(path), persistenceEnabled) + actual fun reference() = + DatabaseReference(android.reference, persistenceEnabled) + actual fun setPersistenceEnabled(enabled: Boolean) = android.setPersistenceEnabled(enabled).also { persistenceEnabled = enabled } diff --git a/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt b/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt index c3b532c4d..5860a8be8 100644 --- a/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt +++ b/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt @@ -25,6 +25,7 @@ expect fun Firebase.database(app: FirebaseApp, url: String): FirebaseDatabase expect class FirebaseDatabase { fun reference(path: String): DatabaseReference + fun reference(): DatabaseReference fun setPersistenceEnabled(enabled: Boolean) fun setLoggingEnabled(enabled: Boolean) fun useEmulator(host: String, port: Int) diff --git a/firebase-database/src/iosMain/kotlin/dev/gitlive/firebase/database/database.kt b/firebase-database/src/iosMain/kotlin/dev/gitlive/firebase/database/database.kt index 9ba833dc6..e1ef05f3e 100644 --- a/firebase-database/src/iosMain/kotlin/dev/gitlive/firebase/database/database.kt +++ b/firebase-database/src/iosMain/kotlin/dev/gitlive/firebase/database/database.kt @@ -51,6 +51,9 @@ actual class FirebaseDatabase internal constructor(val ios: FIRDatabase) { actual fun reference(path: String) = DatabaseReference(ios.referenceWithPath(path), ios.persistenceEnabled) + actual fun reference() = + DatabaseReference(ios.reference(), ios.persistenceEnabled) + actual fun setPersistenceEnabled(enabled: Boolean) { ios.persistenceEnabled = enabled } diff --git a/firebase-database/src/jsMain/kotlin/dev/gitlive/firebase/database/database.kt b/firebase-database/src/jsMain/kotlin/dev/gitlive/firebase/database/database.kt index 9fbc04bba..9d26c1a35 100644 --- a/firebase-database/src/jsMain/kotlin/dev/gitlive/firebase/database/database.kt +++ b/firebase-database/src/jsMain/kotlin/dev/gitlive/firebase/database/database.kt @@ -37,6 +37,7 @@ actual fun Firebase.database(app: FirebaseApp, url: String) = actual class FirebaseDatabase internal constructor(val js: firebase.database.Database) { actual fun reference(path: String) = rethrow { DatabaseReference(js.ref(path)) } + actual fun reference() = rethrow { DatabaseReference(js.ref()) } actual fun setPersistenceEnabled(enabled: Boolean) {} actual fun setLoggingEnabled(enabled: Boolean) = rethrow { firebase.database.enableLogging(enabled) } actual fun useEmulator(host: String, port: Int) = rethrow { js.useEmulator(host, port) } From a70fdd2684b6286ddd5a660af416d7dd6ae57420 Mon Sep 17 00:00:00 2001 From: pauminku Date: Thu, 30 Dec 2021 15:36:14 +0100 Subject: [PATCH 40/42] version of firebase-database serialization plugin updated to be the same used in the rest of modules --- firebase-database/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index 51cc9f243..b7cf20587 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -10,7 +10,7 @@ version = project.property("firebase-database.version") as String plugins { id("com.android.library") kotlin("multiplatform") - kotlin("plugin.serialization") version "1.5.10" + kotlin("plugin.serialization") version "1.5.31" } repositories { From d40859374138c2ecdd5c5dbc79020367730287da Mon Sep 17 00:00:00 2001 From: pauminku Date: Sat, 29 Jan 2022 11:42:59 +0100 Subject: [PATCH 41/42] firebase version updated --- build.gradle.kts | 2 ++ firebase-app/package.json | 2 +- firebase-auth/package.json | 2 +- firebase-config/package.json | 2 +- firebase-database/build.gradle.kts | 1 + firebase-database/package.json | 2 +- firebase-firestore/package.json | 2 +- firebase-functions/package.json | 2 +- gradle.properties | 14 +++++++------- 9 files changed, 16 insertions(+), 13 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4c5d38a08..f4cbeeaea 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,6 +5,8 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { kotlin("multiplatform") version "1.5.31" apply false id("base") + id("maven-publish") + kotlin("native.cocoapods") } buildscript { diff --git a/firebase-app/package.json b/firebase-app/package.json index 9b852f91c..5dd434369 100644 --- a/firebase-app/package.json +++ b/firebase-app/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-common": "1.4.3", + "@gitlive/firebase-common": "1.4.4", "firebase": "9.4.1", "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-auth/package.json b/firebase-auth/package.json index 9c71c23d8..60ece0d84 100644 --- a/firebase-auth/package.json +++ b/firebase-auth/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.3", + "@gitlive/firebase-app": "1.4.4", "firebase": "9.4.1", "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-config/package.json b/firebase-config/package.json index 389ebaa56..9a2b6103c 100644 --- a/firebase-config/package.json +++ b/firebase-config/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.3", + "@gitlive/firebase-app": "1.4.4", "firebase": "9.4.1", "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-database/build.gradle.kts b/firebase-database/build.gradle.kts index b7cf20587..d96ab2e07 100644 --- a/firebase-database/build.gradle.kts +++ b/firebase-database/build.gradle.kts @@ -11,6 +11,7 @@ plugins { id("com.android.library") kotlin("multiplatform") kotlin("plugin.serialization") version "1.5.31" + kotlin("native.cocoapods") } repositories { diff --git a/firebase-database/package.json b/firebase-database/package.json index e93312c26..d554e3b67 100644 --- a/firebase-database/package.json +++ b/firebase-database/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.3", + "@gitlive/firebase-app": "1.4.4", "firebase": "9.4.1", "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-firestore/package.json b/firebase-firestore/package.json index d3df2f1c3..5e2a4b8b8 100644 --- a/firebase-firestore/package.json +++ b/firebase-firestore/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.3", + "@gitlive/firebase-app": "1.4.4", "firebase": "9.4.1", "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" diff --git a/firebase-functions/package.json b/firebase-functions/package.json index ff55e2ba7..391121397 100644 --- a/firebase-functions/package.json +++ b/firebase-functions/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk", "dependencies": { - "@gitlive/firebase-app": "1.4.3", + "@gitlive/firebase-app": "1.4.4", "firebase": "9.4.1", "kotlin": "1.5.31", "kotlinx-coroutines-core": "1.5.2" diff --git a/gradle.properties b/gradle.properties index dead1d414..3dd4326a1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -30,10 +30,10 @@ firebase-functions.skipIosTests=false firebase-config.skipIosTests=false # Versions: -firebase-app.version=1.4.3 -firebase-auth.version=1.4.3 -firebase-common.version=1.4.3 -firebase-database.version=1.4.3 -firebase-firestore.version=1.4.3 -firebase-functions.version=1.4.3 -firebase-config.version=1.4.3 +firebase-app.version=1.4.4 +firebase-auth.version=1.4.4 +firebase-common.version=1.4.4 +firebase-database.version=1.4.4 +firebase-firestore.version=1.4.4 +firebase-functions.version=1.4.4 +firebase-config.version=1.4.4 From 7201b37dd0041f88480b31762ea74ee05c4cdb8c Mon Sep 17 00:00:00 2001 From: pauminku Date: Sat, 29 Jan 2022 11:43:23 +0100 Subject: [PATCH 42/42] doTransaction fix --- .../kotlin/dev/gitlive/firebase/database/database.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/firebase-database/src/androidMain/kotlin/dev/gitlive/firebase/database/database.kt b/firebase-database/src/androidMain/kotlin/dev/gitlive/firebase/database/database.kt index 06f4e8ad0..9efbaafe4 100644 --- a/firebase-database/src/androidMain/kotlin/dev/gitlive/firebase/database/database.kt +++ b/firebase-database/src/androidMain/kotlin/dev/gitlive/firebase/database/database.kt @@ -192,8 +192,12 @@ actual class DatabaseReference internal constructor( val deferred = CompletableDeferred() android.runTransaction(object : Transaction.Handler { - override fun doTransaction(currentData: MutableData) = - Transaction.success(transactionUpdate(decode(strategy, currentData)) as MutableData) + override fun doTransaction(currentData: MutableData): Transaction.Result { + currentData.value = currentData.value?.let { + transactionUpdate(decode(strategy, it)) + } + return Transaction.success(currentData) + } override fun onComplete( error: DatabaseError?,