Skip to content

Commit 7425a6b

Browse files
Merge branch 'master' into database-transactions
2 parents b97957d + 8d28273 commit 7425a6b

File tree

51 files changed

+835
-544
lines changed

Some content is hidden

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

51 files changed

+835
-544
lines changed

.github/workflows/publish.yml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,66 @@ jobs:
2727
run: chmod +x gradlew
2828
- name: Install Carthage
2929
run: brew install carthage
30-
- name: Publish
30+
- name: Publish Firebase App
3131
uses: eskatos/gradle-command-action@v1
3232
with:
33-
arguments: publish
33+
arguments: :firebase-app:publish
3434
env:
3535
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
3636
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
3737
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
3838
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
39+
- name: Publish Firebase Auth
40+
uses: eskatos/gradle-command-action@v1
41+
with:
42+
arguments: :firebase-auth:publish
43+
env:
44+
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
45+
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
46+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
47+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
48+
- name: Publish Firebase Common
49+
uses: eskatos/gradle-command-action@v1
50+
with:
51+
arguments: :firebase-common:publish
52+
env:
53+
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
54+
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
55+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
56+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
57+
- name: Publish Firebase Config
58+
uses: eskatos/gradle-command-action@v1
59+
with:
60+
arguments: :firebase-config:publish
61+
env:
62+
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
63+
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
64+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
65+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
66+
- name: Publish Firebase Database
67+
uses: eskatos/gradle-command-action@v1
68+
with:
69+
arguments: :firebase-database:publish
70+
env:
71+
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
72+
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
73+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
74+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
75+
- name: Publish Firebase Firestore
76+
uses: eskatos/gradle-command-action@v1
77+
with:
78+
arguments: :firebase-firestore:publish
79+
env:
80+
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
81+
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
82+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
83+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
84+
- name: Publish Firebase Functions
85+
uses: eskatos/gradle-command-action@v1
86+
with:
87+
arguments: :firebase-functions:publish
88+
env:
89+
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
90+
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
91+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
92+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ 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.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) |
16-
| [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) |
17-
| [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) |
18-
| [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) |
19-
| [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) |
20-
| [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) |
21-
| [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) |
15+
| [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) |
16+
| [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) |
17+
| [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) |
18+
| [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) |
19+
| [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) |
20+
| [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) |
21+
| [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) |
2222

2323

2424

@@ -66,7 +66,7 @@ The Firebase Kotlin SDK uses Kotlin serialization to read and write custom class
6666
```groovy
6767
plugins {
6868
kotlin("multiplatform") // or kotlin("jvm") or any other kotlin plugin
69-
kotlin("plugin.serialization") version "1.5.10"
69+
kotlin("plugin.serialization") version "1.5.30"
7070
}
7171
```
7272

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

167167
```json
168168
"dependencies": {
169-
"@gitlive/firebase-auth": "1.4.1",
170-
"@gitlive/firebase-database": "1.4.1",
171-
"@gitlive/firebase-firestore": "1.4.1",
172-
"@gitlive/firebase-functions": "1.4.1",
173-
"@gitlive/firebase-storage": "1.4.1",
174-
"@gitlive/firebase-messaging": "1.4.1",
175-
"@gitlive/firebase-config": "1.4.1"
169+
"@gitlive/firebase-auth": "1.4.3",
170+
"@gitlive/firebase-database": "1.4.3",
171+
"@gitlive/firebase-firestore": "1.4.3",
172+
"@gitlive/firebase-functions": "1.4.3",
173+
"@gitlive/firebase-storage": "1.4.3",
174+
"@gitlive/firebase-messaging": "1.4.3",
175+
"@gitlive/firebase-config": "1.4.3"
176176
}
177177
```
178178

build.gradle.kts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
21
import org.apache.tools.ant.taskdefs.condition.Os
32
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
43
import org.gradle.api.tasks.testing.logging.TestLogEvent
54

65
plugins {
7-
kotlin("multiplatform") version "1.5.21" apply false
6+
kotlin("multiplatform") version "1.5.31" apply false
87
id("base")
98
}
109

@@ -18,23 +17,14 @@ buildscript {
1817
}
1918
}
2019
dependencies {
21-
classpath("com.android.tools.build:gradle:7.0.0")
20+
classpath("com.android.tools.build:gradle:7.0.1")
2221
classpath("com.adarshr:gradle-test-logger-plugin:2.1.1")
2322
}
2423
}
2524

2625
val targetSdkVersion by extra(30)
2726
val minSdkVersion by extra(16)
2827

29-
// TODO: Hierarchical project structures are not fully supported in IDEA, enable only for a regular built (https://youtrack.jetbrains.com/issue/KT-35011)
30-
// add idea.active=true for local development
31-
val _ideaActive = gradleLocalProperties(rootDir)["idea.active"] == "true"
32-
33-
//if (!_ideaActive) {
34-
// ext["kotlin.mpp.enableGranularSourceSetsMetadata"] = "true"
35-
// ext["kotlin.native.enableDependencyPropagation"] = "false"
36-
//}
37-
3828
tasks {
3929
val updateVersions by registering {
4030
dependsOn(
@@ -51,8 +41,6 @@ tasks {
5141

5242
subprojects {
5343

54-
val ideaActive by extra(_ideaActive)
55-
5644
group = "dev.gitlive"
5745

5846
apply(plugin="com.adarshr.test-logger")
@@ -207,12 +195,12 @@ subprojects {
207195
}
208196

209197
dependencies {
210-
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
211-
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.1")
212-
"androidMainImplementation"(platform("com.google.firebase:firebase-bom:28.3.1"))
198+
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
199+
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.2")
200+
"androidMainImplementation"(platform("com.google.firebase:firebase-bom:28.4.1"))
213201
"commonTestImplementation"(kotlin("test-common"))
214202
"commonTestImplementation"(kotlin("test-annotations-common"))
215-
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
203+
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
216204
"jsTestImplementation"(kotlin("test-js"))
217205
"androidAndroidTestImplementation"(kotlin("test-junit"))
218206
"androidAndroidTestImplementation"("junit:junit:4.13.2")

firebase-app/build.gradle.kts

Lines changed: 55 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -44,52 +44,59 @@ android {
4444
}
4545
}
4646

47+
val KonanTarget.archVariant: String
48+
get() = if (this is KonanTarget.IOS_X64 || this is KonanTarget.IOS_SIMULATOR_ARM64) {
49+
"ios-arm64_i386_x86_64-simulator"
50+
} else {
51+
"ios-arm64_armv7"
52+
}
53+
4754
kotlin {
4855

4956
android {
5057
publishAllLibraryVariants()
5158
}
5259

53-
fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = {
54-
val nativeFrameworkPaths = listOf(
55-
projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS")
56-
).plus(
57-
listOf(
58-
"FirebaseAnalytics",
59-
"FirebaseCore",
60-
"FirebaseCoreDiagnostics",
61-
"FirebaseInstallations",
62-
"GoogleAppMeasurement",
63-
"GoogleDataTransport",
64-
"GoogleUtilities",
65-
"nanopb",
66-
"PromisesObjC"
67-
).map {
68-
val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7"
69-
70-
projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant")
71-
}
72-
)
60+
val supportIosTarget = project.property("skipIosTarget") != "true"
61+
if (supportIosTarget) {
62+
63+
fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = {
64+
val nativeFrameworkPaths = listOf(
65+
projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS")
66+
).plus(
67+
listOf(
68+
"FirebaseAnalytics",
69+
"FirebaseCore",
70+
"FirebaseCoreDiagnostics",
71+
"FirebaseInstallations",
72+
"GoogleAppMeasurement",
73+
"GoogleAppMeasurementIdentitySupport",
74+
"GoogleDataTransport",
75+
"GoogleUtilities",
76+
"nanopb",
77+
"PromisesObjC"
78+
).map {
79+
projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/${konanTarget.archVariant}")
80+
}
81+
)
7382

74-
binaries {
75-
getTest("DEBUG").apply {
76-
linkerOpts(nativeFrameworkPaths.map { "-F$it" })
77-
linkerOpts("-ObjC")
83+
binaries {
84+
getTest("DEBUG").apply {
85+
linkerOpts(nativeFrameworkPaths.map { "-F$it" })
86+
linkerOpts("-ObjC")
87+
}
7888
}
79-
}
8089

81-
compilations.getByName("main") {
82-
cinterops.create("FirebaseCore") {
83-
compilerOpts(nativeFrameworkPaths.map { "-F$it" })
84-
extraOpts("-verbose")
90+
compilations.getByName("main") {
91+
cinterops.create("FirebaseCore") {
92+
compilerOpts(nativeFrameworkPaths.map { "-F$it" })
93+
extraOpts("-verbose")
94+
}
8595
}
8696
}
87-
}
8897

89-
if (project.extra["ideaActive"] as Boolean) {
90-
iosX64("ios", nativeTargetConfig())
91-
} else {
9298
ios(configure = nativeTargetConfig())
99+
iosSimulatorArm64(configure = nativeTargetConfig())
93100
}
94101

95102
js {
@@ -131,12 +138,26 @@ kotlin {
131138
}
132139
}
133140

134-
val iosMain by getting
141+
if (supportIosTarget) {
142+
val iosMain by getting
143+
val iosSimulatorArm64Main by getting
144+
iosSimulatorArm64Main.dependsOn(iosMain)
145+
146+
val iosTest by sourceSets.getting
147+
val iosSimulatorArm64Test by sourceSets.getting
148+
iosSimulatorArm64Test.dependsOn(iosTest)
149+
}
135150

136151
val jsMain by getting
137152
}
138153
}
139154

155+
if (project.property("firebase-app.skipIosTests") == "true") {
156+
tasks.forEach {
157+
if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false }
158+
}
159+
}
160+
140161
signing {
141162
val signingKey: String? by project
142163
val signingPassword: String? by project

firebase-app/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
},
2424
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
2525
"dependencies": {
26-
"@gitlive/firebase-common": "1.4.1",
27-
"firebase": "8.8.1",
28-
"kotlin": "1.5.21",
29-
"kotlinx-coroutines-core": "1.5.1"
26+
"@gitlive/firebase-common": "1.4.3",
27+
"firebase": "8.10.0",
28+
"kotlin": "1.5.31",
29+
"kotlinx-coroutines-core": "1.5.2"
3030
}
3131
}
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.5.0
1+
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.8.0

firebase-app/src/nativeInterop/cinterop/FirebaseCore.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ language = Objective-C
22
package = cocoapods.FirebaseCore
33
modules = FirebaseCore
44
compilerOpts = -framework FirebaseCore
5-
linkerOpts = -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseAnalytics -framework GoogleAppMeasurement -framework FirebaseInstallations -framework GoogleDataTransport -framework GoogleUtilities -framework PromisesObjC -framework nanopb -framework StoreKit -lsqlite3
5+
linkerOpts = -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstallations -framework GoogleAppMeasurement -framework GoogleAppMeasurementIdentitySupport -framework GoogleDataTransport -framework GoogleUtilities -framework nanopb -framework PromisesObjC -framework StoreKit -lsqlite3

0 commit comments

Comments
 (0)