Skip to content

Commit 9991321

Browse files
authored
Merge branch 'master' into add-database-reference-testing
2 parents 165f6c9 + 039f5ed commit 9991321

File tree

52 files changed

+622
-115
lines changed

Some content is hidden

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

52 files changed

+622
-115
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: 12 additions & 10 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,24 +155,25 @@ 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"
162163
args(
163164
it,
164165
"--project-directory", projectDir.resolve("src/nativeInterop/cinterop"),
165-
"--platform", "iOS",
166-
"--cache-builds"
166+
"--platform", "iOS"
167167
)
168168
}
169169
}
170-
}
170+
} else emptyList()
171171

172172
if (Os.isFamily(Os.FAMILY_MAC)) {
173173
withType(org.jetbrains.kotlin.gradle.tasks.CInteropProcess::class) {
174-
dependsOn("carthageBootstrap")
174+
if (carthageTasks.isNotEmpty()) {
175+
dependsOn("carthageBootstrap")
176+
}
175177
}
176178
}
177179

@@ -197,7 +199,7 @@ subprojects {
197199
dependencies {
198200
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
199201
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.2")
200-
"androidMainImplementation"(platform("com.google.firebase:firebase-bom:28.4.1"))
202+
"androidMainImplementation"(platform("com.google.firebase:firebase-bom:29.0.1"))
201203
"commonTestImplementation"(kotlin("test-common"))
202204
"commonTestImplementation"(kotlin("test-annotations-common"))
203205
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")

firebase-app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ kotlin {
9090
compilations.getByName("main") {
9191
cinterops.create("FirebaseCore") {
9292
compilerOpts(nativeFrameworkPaths.map { "-F$it" })
93-
extraOpts("-verbose")
93+
extraOpts = listOf("-compiler-option", "-DNS_FORMAT_ARGUMENT(A)=", "-verbose")
9494
}
9595
}
9696
}
@@ -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"
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ kotlin {
119119
compilations.getByName("main") {
120120
cinterops.create("FirebaseAuth") {
121121
compilerOpts(nativeFrameworkPaths.map { "-F$it" })
122-
extraOpts("-verbose")
122+
extraOpts = listOf("-compiler-option", "-DNS_FORMAT_ARGUMENT(A)=", "-verbose")
123123
}
124124
}
125125
}
@@ -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"
3030
}

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

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

0 commit comments

Comments
 (0)