Skip to content

Commit 837daa7

Browse files
committed
Merge branch 'master' into feature/kotlin-2.0
2 parents a3cd5fa + e54c12e commit 837daa7

File tree

94 files changed

+2081
-461
lines changed

Some content is hidden

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

94 files changed

+2081
-461
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,29 @@ jobs:
5353
- name: Publish Firebase Performance
5454
run: ./gradlew :firebase-perf:publish
5555
- name: Publish Firebase Crashlytics
56-
run: ./gradlew :firebase-crashlytics:publish
56+
run: ./gradlew :firebase-crashlytics:publish
57+
documentation:
58+
runs-on: macos-13
59+
steps:
60+
- uses: actions/checkout@v3
61+
- name: Set up JDK
62+
uses: actions/setup-java@v3
63+
with:
64+
distribution: 'zulu'
65+
java-version: '17'
66+
- uses: gradle/gradle-build-action@v2
67+
- name: Grant execute permission for gradlew
68+
run: chmod +x gradlew
69+
- name: Generate documentation
70+
run: ./gradlew dokkaHtmlMultiModule
71+
- name: Uploading build folder
72+
uses: actions/upload-artifact@v2
73+
with:
74+
name: artefact
75+
path: build/dokka/htmlMultiModule
76+
- name: Deploy API documentation to Github Pages
77+
uses: JamesIves/github-pages-deploy-action@v4
78+
with:
79+
branch: gh-pages
80+
folder: build/dokka/htmlMultiModule
81+
target-folder: docs

.github/workflows/pull_request.yml

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,41 @@ on:
88
branches: [ master ]
99

1010
jobs:
11+
jobEmulatorMatrixSetup:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
emulator_jobs_matrix: ${{ steps.dataStep.outputs.emulator_jobs_matrix }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: 'zulu'
21+
java-version: '17'
22+
cache: gradle
23+
- name: Prepare the matrix JSON
24+
run: ./gradlew ciEmulatorJobsMatrixSetup
25+
- id: dataStep
26+
run: echo "emulator_jobs_matrix=$(jq -c . < ./build/emulator_jobs_matrix.json)" >> $GITHUB_OUTPUT
1127
build-android:
12-
runs-on: macos-13
28+
needs: jobEmulatorMatrixSetup
29+
runs-on: ubuntu-latest
1330
strategy:
14-
matrix:
15-
api-level: [ 34 ]
31+
fail-fast: false
32+
matrix: ${{ fromJson(needs.jobEmulatorMatrixSetup.outputs.emulator_jobs_matrix) }}
1633
steps:
1734
- uses: actions/checkout@v3
35+
- name: Enable KVM group perms
36+
run: |
37+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
38+
sudo udevadm control --reload-rules
39+
sudo udevadm trigger --name-match=kvm
1840
- name: Setup test environment
1941
uses: ./.github/actions/setup_test_action
20-
- name: AVD cache
21-
uses: actions/cache@v3
22-
id: avd-cache
23-
with:
24-
path: |
25-
~/.android/avd/*
26-
~/.android/adb*
27-
key: avd-${{ matrix.api-level }}-${{ runner.os }}-${{ runner.arch }}
28-
- name: create AVD and generate snapshot for caching
29-
if: steps.avd-cache.outputs.cache-hit != 'true'
30-
uses: reactivecircus/android-emulator-runner@v2
31-
with:
32-
api-level: ${{ matrix.api-level }}
33-
arch: x86_64
34-
target: google_apis
35-
avd-name: pixel6_API${{ matrix.api-level }}
36-
force-avd-creation: false
37-
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
38-
disable-animations: false
39-
script: echo "Generated AVD snapshot for caching."
42+
- name: Apply Android licenses
43+
run: ./gradlew ciSdkManagerLicenses
4044
- name: Run Android Instrumented Tests
41-
uses: reactivecircus/android-emulator-runner@v2
42-
with:
43-
api-level: ${{ matrix.api-level }}
44-
arch: x86_64
45-
target: google_apis
46-
avd-name: pixel6_API${{ matrix.api-level }}
47-
force-avd-creation: false
48-
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
49-
disable-animations: true
50-
script: ./gradlew connectedAndroidTest
45+
run: ./gradlew ${{ matrix.gradle_tasks }}
5146
- name: Upload Android test artifact
5247
uses: actions/upload-artifact@v3
5348
if: failure()

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Project exclude paths
2-
/.gradle/
2+
/**/.gradle/
33
/**/build/
44
/.idea/
55
local.properties

README.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ The following libraries are available for the various Firebase products.
1616

1717
| Service or Product | Gradle Dependency | API Coverage |
1818
|---------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
19-
| [Authentication](https://firebase.google.com/docs/auth) | [`dev.gitlive:firebase-auth:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.12.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) |
20-
| [Realtime Database](https://firebase.google.com/docs/database) | [`dev.gitlive:firebase-database:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.12.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) |
21-
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | [`dev.gitlive:firebase-firestore:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.12.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) |
22-
| [Cloud Functions](https://firebase.google.com/docs/functions) | [`dev.gitlive:firebase-functions:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.12.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) |
23-
| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) | [`dev.gitlive:firebase-messaging:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.12.0/pom) | [![1%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square)](/firebase-messaging/src/commonMain/kotlin/dev/gitlive/firebase/messaging/messaging.kt) |
24-
| [Cloud Storage](https://firebase.google.com/docs/storage) | [`dev.gitlive:firebase-storage:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.12.0/pom) | [![40%](https://img.shields.io/badge/-40%25-orange?style=flat-square)](/firebase-storage/src/commonMain/kotlin/dev/gitlive/firebase/storage/storage.kt) |
25-
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/1.12.0/pom) | [![90%](https://img.shields.io/badge/-90%25-green?style=flat-square)](/firebase-installations/src/commonMain/kotlin/dev/gitlive/firebase/installations/installations.kt) |
26-
| [Remote Config](https://firebase.google.com/docs/remote-config) | [`dev.gitlive:firebase-config:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.12.0/pom) | [![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square)](/firebase-config/src/commonMain/kotlin/dev/gitlive/firebase/remoteconfig/FirebaseRemoteConfig.kt) |
27-
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/1.12.0/pom) | [![1%](https://img.shields.io/badge/-1%25-orange?style=flat-square)](/firebase-perf/src/commonMain/kotlin/dev/gitlive/firebase/perf/performance.kt) |
28-
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:1.12.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/1.12.0/pom) | [![80%](https://img.shields.io/badge/-1%25-orange?style=flat-square)](/firebase-crashlytics/src/commonMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt) |
19+
| [Analytics](https://firebase.google.com/docs/analytics) | [`dev.gitlive:firebase-analytics:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-analytics/1.13.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) |
20+
| [Authentication](https://firebase.google.com/docs/auth) | [`dev.gitlive:firebase-auth:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.13.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) |
21+
| [Realtime Database](https://firebase.google.com/docs/database) | [`dev.gitlive:firebase-database:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.13.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) |
22+
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | [`dev.gitlive:firebase-firestore:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.13.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) |
23+
| [Cloud Functions](https://firebase.google.com/docs/functions) | [`dev.gitlive:firebase-functions:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.13.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) |
24+
| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) | [`dev.gitlive:firebase-messaging:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.13.0/pom) | [![1%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square)](/firebase-messaging/src/commonMain/kotlin/dev/gitlive/firebase/messaging/messaging.kt) |
25+
| [Cloud Storage](https://firebase.google.com/docs/storage) | [`dev.gitlive:firebase-storage:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.13.0/pom) | [![40%](https://img.shields.io/badge/-40%25-orange?style=flat-square)](/firebase-storage/src/commonMain/kotlin/dev/gitlive/firebase/storage/storage.kt) |
26+
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/1.13.0/pom) | [![90%](https://img.shields.io/badge/-90%25-green?style=flat-square)](/firebase-installations/src/commonMain/kotlin/dev/gitlive/firebase/installations/installations.kt) |
27+
| [Remote Config](https://firebase.google.com/docs/remote-config) | [`dev.gitlive:firebase-config:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.13.0/pom) | [![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square)](/firebase-config/src/commonMain/kotlin/dev/gitlive/firebase/remoteconfig/FirebaseRemoteConfig.kt) |
28+
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/1.13.0/pom) | [![1%](https://img.shields.io/badge/-1%25-orange?style=flat-square)](/firebase-perf/src/commonMain/kotlin/dev/gitlive/firebase/perf/performance.kt) |
29+
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:1.13.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/1.13.0/pom) | [![80%](https://img.shields.io/badge/-1%25-orange?style=flat-square)](/firebase-crashlytics/src/commonMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt) |
2930

3031
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)
3132

@@ -287,6 +288,23 @@ You can build and test the project locally.
287288
3. Install the GitLive plugin into IntelliJ
288289
4. After a gradle sync then run `publishToMavenLocal`
289290

291+
### Testing
292+
To run the tests you can use the following gradle tasks:
293+
294+
`./gradlew connectedAndroidTest` (an emulator needs to be running)
295+
296+
`./gradlew iosSimulatorArm64Test`
297+
298+
`./gradlew jsNodeTest`
299+
300+
For some tests you need to have the firebase emulator suite running. After installing them you can run the following command inside the `test` directory:
301+
302+
`firebase emulators:start`
303+
304+
### Documentation
305+
For every publicly available class or function there needs to be documentation written in the [KDoc syntax](https://kotlinlang.org/docs/kotlin-doc.html).
306+
We publish a new version of the documentation after every release and can be found [here](https://gitliveapp.github.io/firebase-kotlin-sdk/)
307+
290308
### Compatibility with the official [Firebase Android SDK](https://github.com/firebase/firebase-android-sdk)
291309

292310
When this project began, the official Firebase Android SDK was a pure java library and the separate Kotlin extensions (KTX) module consisted of only a few extensions providing some syntactic sugar, for example `Firebase.firestore` instead of `Firebase.getInstance(),` which we naturally copied for the Firebase Kotlin SDK.

0 commit comments

Comments
 (0)