Skip to content

Commit cf2e97c

Browse files
authored
Merge branch 'master' into fix_crash_on_ios_with_remoteConfig
2 parents a87a9d6 + 039f5ed commit cf2e97c

File tree

49 files changed

+468
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+468
-84
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ You can also omit the serializer but this is discouraged due to a [current limit
9393

9494
```kotlin
9595
@Serializable
96-
data class Post(val timestamp: Double = ServerValue.TIMESTAMP)
96+
data class Post(
97+
// In case using Realtime Database.
98+
val timestamp: Double = ServerValue.TIMESTAMP,
99+
// In case using Cloud Firestore.
100+
val timestamp: Double = FieldValue.serverTimestamp,
101+
)
102+
97103
```
98104

99105
<h3><a href="https://kotlinlang.org/docs/reference/functions.html#default-arguments">Default arguments</a></h3>

build.gradle.kts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,25 @@ buildscript {
1717
}
1818
}
1919
dependencies {
20-
classpath("com.android.tools.build:gradle:7.0.1")
20+
classpath("com.android.tools.build:gradle:7.0.3")
2121
classpath("com.adarshr:gradle-test-logger-plugin:2.1.1")
2222
}
2323
}
2424

2525
val targetSdkVersion by extra(30)
26-
val minSdkVersion by extra(16)
26+
val minSdkVersion by extra(19)
2727

2828
tasks {
2929
val updateVersions by registering {
3030
dependsOn(
3131
"firebase-app:updateVersion", "firebase-app:updateDependencyVersion",
3232
"firebase-auth:updateVersion", "firebase-auth:updateDependencyVersion",
3333
"firebase-common:updateVersion", "firebase-common:updateDependencyVersion",
34+
"firebase-config:updateVersion", "firebase-config:updateDependencyVersion",
3435
"firebase-database:updateVersion", "firebase-database:updateDependencyVersion",
3536
"firebase-firestore:updateVersion", "firebase-firestore:updateDependencyVersion",
3637
"firebase-functions:updateVersion", "firebase-functions:updateDependencyVersion",
37-
"firebase-config:updateVersion", "firebase-config:updateDependencyVersion"
38+
"firebase-installations:updateVersion", "firebase-installations:updateDependencyVersion"
3839
)
3940
}
4041
}
@@ -154,8 +155,8 @@ subprojects {
154155
}
155156
}
156157

157-
if (projectDir.resolve("src/nativeInterop/cinterop/Cartfile").exists()) { // skipping firebase-common module
158-
listOf("bootstrap", "update").forEach {
158+
val carthageTasks = if (projectDir.resolve("src/nativeInterop/cinterop/Cartfile").exists()) { // skipping firebase-common module
159+
listOf("bootstrap", "update").map {
159160
task<Exec>("carthage${it.capitalize()}") {
160161
group = "carthage"
161162
executable = "carthage"
@@ -166,11 +167,13 @@ subprojects {
166167
)
167168
}
168169
}
169-
}
170+
} else emptyList()
170171

171172
if (Os.isFamily(Os.FAMILY_MAC)) {
172173
withType(org.jetbrains.kotlin.gradle.tasks.CInteropProcess::class) {
173-
dependsOn("carthageBootstrap")
174+
if (carthageTasks.isNotEmpty()) {
175+
dependsOn("carthageBootstrap")
176+
}
174177
}
175178
}
176179

@@ -196,7 +199,7 @@ subprojects {
196199
dependencies {
197200
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2-native-mt")
198201
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.2-native-mt")
199-
"androidMainImplementation"(platform("com.google.firebase:firebase-bom:28.4.1"))
202+
"androidMainImplementation"(platform("com.google.firebase:firebase-bom:29.0.1"))
200203
"commonTestImplementation"(kotlin("test-common"))
201204
"commonTestImplementation"(kotlin("test-annotations-common"))
202205
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2-native-mt")

firebase-app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ kotlin {
134134

135135
val androidMain by getting {
136136
dependencies {
137-
api("com.google.firebase:firebase-common-ktx")
137+
api("com.google.firebase:firebase-common")
138138
}
139139
}
140140

firebase-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
2525
"dependencies": {
2626
"@gitlive/firebase-common": "1.4.3",
27-
"firebase": "8.10.0",
27+
"firebase": "9.4.1",
2828
"kotlin": "1.5.31",
2929
"kotlinx-coroutines-core": "1.5.2-native-mt"
3030
}

firebase-app/src/iosMain/c_interop/Cartfile.resolved

Lines changed: 0 additions & 1 deletion
This file was deleted.

firebase-app/src/jsTest/kotlin/dev/gitlive/firebase/firebase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope
1414
try {
1515
test()
1616
} catch (e: dynamic) {
17-
e.log()
17+
(e as? Throwable)?.log()
1818
throw e
1919
}
2020
}.asDynamic()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.8.0
1+
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.9.1

firebase-auth/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ kotlin {
165165

166166
val androidMain by getting {
167167
dependencies {
168-
api("com.google.firebase:firebase-auth-ktx")
168+
api("com.google.firebase:firebase-auth")
169169
}
170170
}
171171

firebase-auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
2525
"dependencies": {
2626
"@gitlive/firebase-app": "1.4.3",
27-
"firebase": "8.10.0",
27+
"firebase": "9.4.1",
2828
"kotlin": "1.5.31",
2929
"kotlinx-coroutines-core": "1.5.2-native-mt"
3030
}

firebase-auth/src/iosMain/c_interop/Cartfile.resolved

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)