Skip to content

Commit ab8d5d2

Browse files
Merge branch 'database-transactions' of github.com:GitLiveApp/firebase-kotlin-sdk into database-transactions
2 parents 8b63096 + aaca522 commit ab8d5d2

File tree

50 files changed

+1103
-56
lines changed

Some content is hidden

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

50 files changed

+1103
-56
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ The following libraries are available for the various Firebase products.
1212

1313
| Service or Product | Gradle Dependency | API Coverage |
1414
| ------------------------------------------------------------------------------------ | :-----------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15-
| [Authentication](https://firebase.google.com/docs/auth#kotlin-android) | [`dev.gitlive:firebase-auth:1.3.1`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.3.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) |
16-
| [Realtime Database](https://firebase.google.com/docs/database#kotlin-android) | [`dev.gitlive:firebase-database:1.3.1`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.3.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) |
17-
| [Cloud Firestore](https://firebase.google.com/docs/firestore#kotlin-android) | [`dev.gitlive:firebase-firestore:1.3.1`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.3.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) |
18-
| [Cloud Functions](https://firebase.google.com/docs/functions/callable#kotlin-android)| [`dev.gitlive:firebase-functions:1.3.1`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.3.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) |
19-
| [Cloud Messaging](https://firebase.google.com/docs/messaging#kotlin-android) | [`dev.gitlive:firebase-messaging:1.3.1`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.3.1/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
20-
| [Cloud Storage](https://firebase.google.com/docs/storage#kotlin-android) | [`dev.gitlive:firebase-storage:1.3.1`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.3.1/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
15+
| [Authentication](https://firebase.google.com/docs/auth#kotlin-android) | [`dev.gitlive:firebase-auth:1.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.4.0/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt) |
16+
| [Realtime Database](https://firebase.google.com/docs/database#kotlin-android) | [`dev.gitlive:firebase-database:1.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.4.0/pom) | [![70%](https://img.shields.io/badge/-70%25-orange?style=flat-square)](/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt) |
17+
| [Cloud Firestore](https://firebase.google.com/docs/firestore#kotlin-android) | [`dev.gitlive:firebase-firestore:1.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.4.0/pom) | [![60%](https://img.shields.io/badge/-60%25-orange?style=flat-square)](/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt) |
18+
| [Cloud Functions](https://firebase.google.com/docs/functions/callable#kotlin-android)| [`dev.gitlive:firebase-functions:1.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.4.0/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-functions/src/commonMain/kotlin/dev/gitlive/firebase/functions/functions.kt) |
19+
| [Cloud Messaging](https://firebase.google.com/docs/messaging#kotlin-android) | [`dev.gitlive:firebase-messaging:1.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.4.0/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
20+
| [Cloud Storage](https://firebase.google.com/docs/storage#kotlin-android) | [`dev.gitlive:firebase-storage:1.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.4.0/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
21+
| [Remote Config](https://firebase.google.com/docs/remote-config/get-started?platform=android) | [`dev.gitlive:firebase-config:1.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.4.0/pom) | ![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square) |
22+
23+
2124

2225
Is the Firebase library or API you need missing? [Create an issue](https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/new?labels=API+coverage&template=increase-api-coverage.md&title=Add+%5Bclass+name%5D.%5Bfunction+name%5D+to+%5Blibrary+name%5D+for+%5Bplatform+names%5D) to request additional API coverage or be awesome and [submit a PR](https://github.com/GitLiveApp/firebase-kotlin-sdk/fork)
2326

@@ -163,12 +166,13 @@ If you are building a Kotlin multiplatform library which will be consumed from J
163166

164167
```json
165168
"dependencies": {
166-
"@gitlive/firebase-auth": "1.3.1",
167-
"@gitlive/firebase-database": "1.3.1",
168-
"@gitlive/firebase-firestore": "1.3.1",
169-
"@gitlive/firebase-functions": "1.3.1",
170-
"@gitlive/firebase-storage": "1.3.1",
171-
"@gitlive/firebase-messaging": "1.3.1"
169+
"@gitlive/firebase-auth": "1.4.0",
170+
"@gitlive/firebase-database": "1.4.0",
171+
"@gitlive/firebase-firestore": "1.4.0",
172+
"@gitlive/firebase-functions": "1.4.0",
173+
"@gitlive/firebase-storage": "1.4.0",
174+
"@gitlive/firebase-messaging": "1.4.0",
175+
"@gitlive/firebase-config": "1.4.0"
172176
}
173177
```
174178

build.gradle.kts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ plugins {
1010

1111
buildscript {
1212
repositories {
13-
jcenter()
1413
google()
14+
mavenCentral()
1515
gradlePluginPortal()
1616
maven {
1717
url = uri("https://plugins.gradle.org/m2/")
1818
}
19+
jcenter()
1920
}
2021
dependencies {
2122
classpath("com.android.tools.build:gradle:4.2.1")
@@ -43,7 +44,8 @@ tasks {
4344
"firebase-common:updateVersion", "firebase-common:updateDependencyVersion",
4445
"firebase-database:updateVersion", "firebase-database:updateDependencyVersion",
4546
"firebase-firestore:updateVersion", "firebase-firestore:updateDependencyVersion",
46-
"firebase-functions:updateVersion", "firebase-functions:updateDependencyVersion"
47+
"firebase-functions:updateVersion", "firebase-functions:updateDependencyVersion",
48+
"firebase-config:updateVersion", "firebase-config:updateDependencyVersion"
4749
)
4850
}
4951
}
@@ -58,8 +60,8 @@ subprojects {
5860

5961
repositories {
6062
mavenLocal()
61-
mavenCentral()
6263
google()
64+
mavenCentral()
6365
jcenter()
6466
}
6567

firebase-app/build.gradle.kts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44

55
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
6+
import org.jetbrains.kotlin.konan.target.KonanTarget
67

78
version = project.property("firebase-app.version") as String
89

@@ -12,8 +13,8 @@ plugins {
1213
}
1314

1415
repositories {
15-
mavenCentral()
1616
google()
17+
mavenCentral()
1718
jcenter()
1819
}
1920

@@ -53,6 +54,22 @@ kotlin {
5354
fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = {
5455
val nativeFrameworkPaths = listOf(
5556
projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS")
57+
).plus(
58+
listOf(
59+
"FirebaseAnalytics",
60+
"FirebaseCore",
61+
"FirebaseCoreDiagnostics",
62+
"FirebaseInstallations",
63+
"GoogleAppMeasurement",
64+
"GoogleDataTransport",
65+
"GoogleUtilities",
66+
"nanopb",
67+
"PromisesObjC"
68+
).map {
69+
val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7"
70+
71+
projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant")
72+
}
5673
)
5774

5875
binaries {
@@ -111,7 +128,7 @@ kotlin {
111128

112129
val androidMain by getting {
113130
dependencies {
114-
api("com.google.firebase:firebase-common:19.5.0")
131+
api("com.google.firebase:firebase-common:20.0.0")
115132
}
116133
}
117134

firebase-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
},
2424
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
2525
"dependencies": {
26-
"@gitlive/firebase-common": "1.3.1",
27-
"firebase": "8.5.0",
26+
"@gitlive/firebase-common": "1.4.0",
27+
"firebase": "8.6.7",
2828
"kotlin": "1.5.10",
2929
"kotlinx-coroutines-core": "1.5.0"
3030
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" "6.30.0"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ actual fun Firebase.apps(context: Any?) = firebase.apps.map { FirebaseApp(it) }
3434

3535
private fun FirebaseOptions.toJson() = json(
3636
"apiKey" to apiKey,
37-
"applicationId" to applicationId,
37+
"appId" to applicationId,
3838
"databaseURL" to (databaseUrl ?: undefined),
3939
"storageBucket" to (storageBucket ?: undefined),
4040
"projectId" to (projectId ?: undefined),
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" == 7.4.0
1+
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.1.1

firebase-auth/build.gradle.kts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44

55
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
6+
import org.jetbrains.kotlin.konan.target.KonanTarget
67

78
version = project.property("firebase-auth.version") as String
89

@@ -75,8 +76,16 @@ kotlin {
7576

7677
fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = {
7778
val nativeFrameworkPaths = listOf(
78-
rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS"),
79-
projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS")
79+
rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS")
80+
).plus(
81+
listOf(
82+
"FirebaseAuth",
83+
"GTMSessionFetcher"
84+
).map {
85+
val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7"
86+
87+
projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant")
88+
}
8089
)
8190

8291
binaries {
@@ -137,7 +146,7 @@ kotlin {
137146

138147
val androidMain by getting {
139148
dependencies {
140-
api("com.google.firebase:firebase-auth:20.0.4")
149+
api("com.google.firebase:firebase-auth:21.0.1")
141150
}
142151
}
143152

firebase-auth/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
},
2424
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
2525
"dependencies": {
26-
"@gitlive/firebase-app": "1.3.1",
27-
"firebase": "8.5.0",
26+
"@gitlive/firebase-app": "1.4.0",
27+
"firebase": "8.6.7",
2828
"kotlin": "1.5.10",
2929
"kotlinx-coroutines-core": "1.5.0"
3030
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" "6.30.0"

0 commit comments

Comments
 (0)