Skip to content

Commit b4fbdb1

Browse files
Merge branch 'master' into database-transactions
2 parents 1d8b989 + c2c2da3 commit b4fbdb1

File tree

35 files changed

+301
-192
lines changed

35 files changed

+301
-192
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v2
17-
- name: Set up JDK 1.8
18-
uses: actions/setup-java@v1
17+
- name: Set up JDK
18+
uses: actions/setup-java@v2
1919
with:
20-
java-version: 1.8
20+
distribution: 'zulu'
21+
java-version: '11'
2122
- name: Setup versions
2223
uses: eskatos/gradle-command-action@v1
2324
with:

.github/workflows/pull_request.yml

Lines changed: 58 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,61 @@ jobs:
1313
runs-on: macos-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up JDK 1.8
18-
uses: actions/setup-java@v1
19-
with:
20-
java-version: 1.8
21-
- name: Grant execute permission for gradlew
22-
run: chmod +x gradlew
23-
- name: Install Carthage
24-
run: brew list carthage || brew install carthage
25-
- name: Install Firebase tools
26-
run: npm install -g firebase-tools
27-
- name: Start Firebase emulator
28-
run: "firebase emulators:start --config=./test/firebase.json &"
29-
- name: Assemble
30-
run: ./gradlew assemble
31-
- name: Run JS Tests
32-
run: ./gradlew cleanTest jsTest
33-
env:
34-
FIREBASE_AUTH_EMULATOR_HOST: "localhost:9099"
35-
FIREBASE_DATABASE_EMULATOR_HOST: "localhost:9000"
36-
FIRESTORE_EMULATOR_HOST: "localhost:8080"
37-
- name: Upload test artifact
38-
uses: actions/upload-artifact@v2
39-
if: failure()
40-
with:
41-
name: "JSTest Report HTML"
42-
path: "firebase-firestore/build/reports/tests/jsTest/"
43-
- name: Run Android Instrumented Tests
44-
uses: reactivecircus/android-emulator-runner@v2
45-
with:
46-
api-level: 29
47-
target: google_apis
48-
arch: x86_64
49-
profile: Nexus 6
50-
script: ./gradlew connectedAndroidTest
51-
env:
52-
FIREBASE_AUTH_EMULATOR_HOST: "localhost:9099"
53-
FIREBASE_DATABASE_EMULATOR_HOST: "localhost:9000"
54-
FIRESTORE_EMULATOR_HOST: "localhost:8080"
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK
18+
uses: actions/setup-java@v2
19+
with:
20+
distribution: 'zulu'
21+
java-version: '11'
22+
- name: Grant execute permission for gradlew
23+
run: chmod +x gradlew
24+
- name: Install Carthage
25+
run: brew list carthage || brew install carthage
26+
- name: Install Firebase tools
27+
run: npm install -g firebase-tools
28+
- name: Start Firebase emulator
29+
run: "firebase emulators:start --config=./test/firebase.json &"
30+
- name: Assemble
31+
run: ./gradlew assemble
32+
- name: Run JS Tests
33+
run: ./gradlew cleanTest jsTest
34+
env:
35+
FIREBASE_AUTH_EMULATOR_HOST: "localhost:9099"
36+
FIREBASE_DATABASE_EMULATOR_HOST: "localhost:9000"
37+
FIRESTORE_EMULATOR_HOST: "localhost:8080"
38+
- name: Upload JS test artifact
39+
uses: actions/upload-artifact@v2
40+
if: failure()
41+
with:
42+
name: "JS Test Report HTML"
43+
path: "firebase-firestore/build/reports/tests/jsTest/"
44+
- name: Run iOS Tests
45+
run: ./gradlew cleanTest iosX64Test
46+
env:
47+
FIREBASE_AUTH_EMULATOR_HOST: "localhost:9099"
48+
FIREBASE_DATABASE_EMULATOR_HOST: "localhost:9000"
49+
FIRESTORE_EMULATOR_HOST: "localhost:8080"
50+
- name: Upload iOS test artifact
51+
uses: actions/upload-artifact@v2
52+
if: failure()
53+
with:
54+
name: "iOS Test Report HTML"
55+
path: "firebase-firestore/build/reports/tests/iosTest/"
56+
- name: Run Android Instrumented Tests
57+
uses: reactivecircus/android-emulator-runner@v2
58+
with:
59+
api-level: 29
60+
target: google_apis
61+
arch: x86_64
62+
profile: Nexus 6
63+
script: ./gradlew connectedAndroidTest
64+
env:
65+
FIREBASE_AUTH_EMULATOR_HOST: "localhost:9099"
66+
FIREBASE_DATABASE_EMULATOR_HOST: "localhost:9000"
67+
FIRESTORE_EMULATOR_HOST: "localhost:8080"
68+
- name: Upload Android test artifact
69+
uses: actions/upload-artifact@v2
70+
if: failure()
71+
with:
72+
name: "Android Test Report HTML"
73+
path: "firebase-firestore/build/reports/tests/androidTests/"

README.md

Lines changed: 14 additions & 14 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.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) |
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) |
2222

2323

2424

@@ -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.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"
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"
176176
}
177177
```
178178

build.gradle.kts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
44
import org.gradle.api.tasks.testing.logging.TestLogEvent
55

66
plugins {
7-
kotlin("multiplatform") version "1.5.10" apply false
7+
kotlin("multiplatform") version "1.5.21" apply false
88
id("base")
99
}
1010

@@ -16,10 +16,9 @@ buildscript {
1616
maven {
1717
url = uri("https://plugins.gradle.org/m2/")
1818
}
19-
jcenter()
2019
}
2120
dependencies {
22-
classpath("com.android.tools.build:gradle:4.2.1")
21+
classpath("com.android.tools.build:gradle:7.0.0")
2322
classpath("com.adarshr:gradle-test-logger-plugin:2.1.1")
2423
}
2524
}
@@ -62,7 +61,6 @@ subprojects {
6261
mavenLocal()
6362
google()
6463
mavenCentral()
65-
jcenter()
6664
}
6765

6866
tasks.withType<Sign>().configureEach {
@@ -209,19 +207,18 @@ subprojects {
209207
}
210208

211209
dependencies {
212-
"commonMainImplementation"(kotlin("stdlib-common"))
213-
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
214-
"jsMainImplementation"(kotlin("stdlib-js"))
215-
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.0")
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"))
216213
"commonTestImplementation"(kotlin("test-common"))
217214
"commonTestImplementation"(kotlin("test-annotations-common"))
218-
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
215+
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
219216
"jsTestImplementation"(kotlin("test-js"))
220217
"androidAndroidTestImplementation"(kotlin("test-junit"))
221218
"androidAndroidTestImplementation"("junit:junit:4.13.2")
222-
"androidAndroidTestImplementation"("androidx.test:core:1.3.0")
223-
"androidAndroidTestImplementation"("androidx.test.ext:junit:1.1.2")
224-
"androidAndroidTestImplementation"("androidx.test:runner:1.3.0")
219+
"androidAndroidTestImplementation"("androidx.test:core:1.4.0")
220+
"androidAndroidTestImplementation"("androidx.test.ext:junit:1.1.3")
221+
"androidAndroidTestImplementation"("androidx.test:runner:1.4.0")
225222
}
226223
}
227224

firebase-app/build.gradle.kts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ plugins {
1515
repositories {
1616
google()
1717
mavenCentral()
18-
jcenter()
1918
}
2019

2120
android {
22-
compileSdkVersion(property("targetSdkVersion") as Int)
21+
compileSdk = property("targetSdkVersion") as Int
2322
defaultConfig {
24-
minSdkVersion(property("minSdkVersion") as Int)
25-
targetSdkVersion(property("targetSdkVersion") as Int)
23+
minSdk = property("minSdkVersion") as Int
24+
targetSdk = property("targetSdkVersion") as Int
2625
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2726
}
2827
sourceSets {
@@ -36,11 +35,11 @@ android {
3635
}
3736
}
3837
packagingOptions {
39-
pickFirst("META-INF/kotlinx-serialization-core.kotlin_module")
40-
pickFirst("META-INF/AL2.0")
41-
pickFirst("META-INF/LGPL2.1")
38+
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
39+
resources.pickFirsts.add("META-INF/AL2.0")
40+
resources.pickFirsts.add("META-INF/LGPL2.1")
4241
}
43-
lintOptions {
42+
lint {
4443
isAbortOnError = false
4544
}
4645
}
@@ -128,7 +127,7 @@ kotlin {
128127

129128
val androidMain by getting {
130129
dependencies {
131-
api("com.google.firebase:firebase-common:20.0.0")
130+
api("com.google.firebase:firebase-common-ktx")
132131
}
133132
}
134133

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.0",
27-
"firebase": "8.6.7",
28-
"kotlin": "1.5.10",
29-
"kotlinx-coroutines-core": "1.5.0"
26+
"@gitlive/firebase-common": "1.4.1",
27+
"firebase": "8.8.1",
28+
"kotlin": "1.5.21",
29+
"kotlinx-coroutines-core": "1.5.1"
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.1.1
1+
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.5.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 FIRAnalyticsConnector -framework GoogleAppMeasurement -framework FirebaseInstallations -framework GoogleDataTransport -framework GoogleUtilities -framework PromisesObjC -framework nanopb -framework StoreKit -lsqlite3
5+
linkerOpts = -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseAnalytics -framework GoogleAppMeasurement -framework FirebaseInstallations -framework GoogleDataTransport -framework GoogleUtilities -framework PromisesObjC -framework nanopb -framework StoreKit -lsqlite3

firebase-auth/build.gradle.kts

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ plugins {
1515

1616
//buildscript {
1717
// repositories {
18-
// jcenter()
1918
// google()
2019
// gradlePluginPortal()
2120
// }
@@ -25,10 +24,10 @@ plugins {
2524
//}
2625

2726
android {
28-
compileSdkVersion(property("targetSdkVersion") as Int)
27+
compileSdk = property("targetSdkVersion") as Int
2928
defaultConfig {
30-
minSdkVersion(property("minSdkVersion") as Int)
31-
targetSdkVersion(property("targetSdkVersion") as Int)
29+
minSdk = property("minSdkVersion") as Int
30+
targetSdk = property("targetSdkVersion") as Int
3231
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3332
}
3433
sourceSets {
@@ -46,11 +45,11 @@ android {
4645
}
4746
}
4847
packagingOptions {
49-
pickFirst("META-INF/kotlinx-serialization-core.kotlin_module")
50-
pickFirst("META-INF/AL2.0")
51-
pickFirst("META-INF/LGPL2.1")
48+
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
49+
resources.pickFirsts.add("META-INF/AL2.0")
50+
resources.pickFirsts.add("META-INF/LGPL2.1")
5251
}
53-
lintOptions {
52+
lint {
5453
isAbortOnError = false
5554
}
5655
}
@@ -77,6 +76,22 @@ kotlin {
7776
fun nativeTargetConfig(): KotlinNativeTarget.() -> Unit = {
7877
val nativeFrameworkPaths = listOf(
7978
rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/iOS")
79+
).plus(
80+
listOf(
81+
"FirebaseAnalytics",
82+
"FirebaseCore",
83+
"FirebaseCoreDiagnostics",
84+
"FirebaseInstallations",
85+
"GoogleAppMeasurement",
86+
"GoogleDataTransport",
87+
"GoogleUtilities",
88+
"nanopb",
89+
"PromisesObjC"
90+
).map {
91+
val archVariant = if (konanTarget is KonanTarget.IOS_X64) "ios-arm64_i386_x86_64-simulator" else "ios-arm64_armv7"
92+
93+
rootProject.project("firebase-app").projectDir.resolve("src/nativeInterop/cinterop/Carthage/Build/$it.xcframework/$archVariant")
94+
}
8095
).plus(
8196
listOf(
8297
"FirebaseAuth",
@@ -146,7 +161,7 @@ kotlin {
146161

147162
val androidMain by getting {
148163
dependencies {
149-
api("com.google.firebase:firebase-auth:21.0.1")
164+
api("com.google.firebase:firebase-auth-ktx")
150165
}
151166
}
152167

firebase-auth/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-app": "1.4.0",
27-
"firebase": "8.6.7",
28-
"kotlin": "1.5.10",
29-
"kotlinx-coroutines-core": "1.5.0"
26+
"@gitlive/firebase-app": "1.4.1",
27+
"firebase": "8.8.1",
28+
"kotlin": "1.5.21",
29+
"kotlinx-coroutines-core": "1.5.1"
3030
}
3131
}

0 commit comments

Comments
 (0)