Skip to content

Commit a68574e

Browse files
authored
Merge branch 'master' into patch-1
2 parents b431967 + ea46fb4 commit a68574e

File tree

135 files changed

+1177
-918
lines changed

Some content is hidden

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

135 files changed

+1177
-918
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [GitLiveApp]

.github/workflows/publish.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ name: Publish
66
on:
77
release:
88
types: [ prereleased, released ]
9+
workflow_dispatch:
910

1011
env:
11-
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
12-
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
13-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
14-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
12+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPEUSERNAME }}
13+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPEPASSWORD }}
14+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }}
15+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PASSPHRASE }}
1516

1617
jobs:
1718
build:
@@ -28,6 +29,9 @@ jobs:
2829
run: ./gradlew :updateVersions
2930
- name: Grant execute permission for gradlew
3031
run: chmod +x gradlew
32+
- uses: maxim-lobanov/setup-xcode@v1
33+
with:
34+
xcode-version: latest-stable
3135
- name: Publish Firebase Analytics
3236
run: ./gradlew :firebase-analytics:publish
3337
- name: Publish Firebase App
@@ -57,7 +61,7 @@ jobs:
5761
- name: Publish Firebase Crashlytics
5862
run: ./gradlew :firebase-crashlytics:publish
5963
documentation:
60-
runs-on: macos-13
64+
runs-on: macos-latest
6165
steps:
6266
- uses: actions/checkout@v4
6367
- name: Set up JDK
@@ -68,6 +72,9 @@ jobs:
6872
- uses: gradle/gradle-build-action@v3
6973
- name: Grant execute permission for gradlew
7074
run: chmod +x gradlew
75+
- uses: maxim-lobanov/setup-xcode@v1
76+
with:
77+
xcode-version: latest-stable
7178
- name: Generate documentation
7279
run: ./gradlew dokkaHtmlMultiModule
7380
- name: Uploading build folder

.github/workflows/pull_request.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,13 @@ on:
77
pull_request:
88
branches: [ master ]
99

10+
concurrency:
11+
group: ci-pull-request-${{ github.head_ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
11-
lint:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
- name: Set up JDK
16-
uses: actions/setup-java@v4
17-
with:
18-
distribution: 'zulu'
19-
java-version: '17'
20-
- name: ktLint
21-
run: ./gradlew lintKotlin
22-
- name: run apiCheck
23-
run: ./gradlew apiCheck
2415
jobMatrixSetup:
25-
runs-on: ubuntu-latest
16+
runs-on: macos-latest
2617
outputs:
2718
emulator_jobs_matrix: ${{ steps.dataStep.outputs.emulator_jobs_matrix }}
2819
ios_test_jobs_matrix: ${{ steps.dataStep.outputs.ios_test_jobs_matrix }}
@@ -128,6 +119,9 @@ jobs:
128119
*/build/cocoapods
129120
*/build/classes
130121
key: cocoapods-cache-v2
122+
- uses: maxim-lobanov/setup-xcode@v1
123+
with:
124+
xcode-version: latest-stable
131125
- name: Setup test environment
132126
uses: ./.github/actions/setup_test_action
133127
- name: Set Artifact Name
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Lint and API Checks
2+
3+
on:
4+
pull_request_target:
5+
branches: [ master ]
6+
7+
concurrency:
8+
group: ci-lint-api-check-${{ github.head_ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
lintAndApiChecks:
13+
runs-on: macos-latest
14+
permissions:
15+
contents: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up JDK
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: 'zulu'
22+
java-version: '17'
23+
cache: gradle
24+
- name: Cocoapods cache
25+
uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.cocoapods
29+
~/Library/Caches/CocoaPods
30+
*/build/cocoapods
31+
*/build/classes
32+
key: cocoapods-cache-v2
33+
- uses: maxim-lobanov/setup-xcode@v1
34+
with:
35+
xcode-version: latest-stable
36+
- name: Format Kotlin
37+
run: ./gradlew formatKotlin
38+
- name: Api File Update
39+
run: ./gradlew apiDump
40+
- uses: stefanzweifel/git-auto-commit-action@v6

.github/workflows/push.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<h1 align="left">Firebase Kotlin SDK <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/gitliveapp/firebase-kotlin-sdk?style=flat-square"> <a href="https://git.live"><img src="https://img.shields.io/badge/GitLive-45_active_forks-blueviolet?style=flat-square"></a></h1>
1+
<h1 align="left">Firebase Kotlin SDK <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/gitliveapp/firebase-kotlin-sdk?style=flat-square"> <a href="https://git.live"><img src="https://img.shields.io/endpoint?style=flatsquare&url=https%3A%2F%2Fgit.live%2Fbadge%3Forg%3DGitLiveApp%26repo%3Dfirebase-kotlin-sdk"></a></h1>
22
<img align="left" width="75px" src="https://avatars2.githubusercontent.com/u/42865805?s=200&v=4">
33
<b>Built and maintained with 🧡 by <a href="https://git.live">GitLive</a></b><br/>
44
<i>Development teams merge faster with GitLive</i><br/>
55
<br/>
66
<br/>
77
The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the
8-
<a href="https://firebase.github.io/firebase-android-sdk/reference/kotlin/firebase-ktx/">Firebase Android SDK Kotlin Extensions</a>
8+
<a href="https://firebase.google.com/docs/reference/kotlin/packages">Firebase Android SDK Kotlin Extensions</a>
99
but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting
1010
<strong>iOS</strong>, <strong>Android</strong>, <strong>Desktop</strong> or <strong>Web</strong>, enabling the use of
1111
Firebase as a backend for <a href="https://www.jetbrains.com/lp/compose-multiplatform/">Compose Multiplatform</a>, for example.
@@ -16,17 +16,17 @@ The following libraries are available for the various Firebase products.
1616

1717
| Service or Product | Gradle Dependency | API Coverage |
1818
|---------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
19-
| [Analytics](https://firebase.google.com/docs/analytics) | [`dev.gitlive:firebase-analytics:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-analytics/2.1.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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/2.1.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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/2.1.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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/2.1.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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/2.1.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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/2.1.0/pom) | [![1%](https://img.shields.io/badge/-10%25-orange?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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/2.1.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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/2.1.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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/2.1.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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/2.1.0/pom) | [![1%](https://img.shields.io/badge/-10%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:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/2.1.0/pom) | [![80%](https://img.shields.io/badge/-10%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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-analytics/2.3.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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/2.3.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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/2.3.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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/2.3.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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/2.3.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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/2.3.0/pom) | [![1%](https://img.shields.io/badge/-10%25-orange?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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/2.3.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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/2.3.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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/2.3.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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/2.3.0/pom) | [![1%](https://img.shields.io/badge/-10%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:2.3.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/2.3.0/pom) | [![80%](https://img.shields.io/badge/-10%25-orange?style=flat-square)](/firebase-crashlytics/src/commonMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt) |
3030

3131
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)
3232

@@ -440,3 +440,5 @@ More recently, with the official SDK for Android providing better support for Ko
440440
For contributors this means following these points when adding new code to the public API of this project:
441441
- **Match the [Android SDKs API](https://firebase.google.com/docs/reference/kotlin/packages).** When adding new API coverage use the Android SDK as the guide on what the public API should be in regard to naming, parameters etc. The goal here is *near binary compatibility*, meaning code consuming the Android SDK compiles *as is* with the Kotlin SDK after just changing the package imports from `com.google` to `dev.gitlive`.
442442
- **Follow our [Kotlin-first design](https://github.com/GitLiveApp/firebase-kotlin-sdk/?tab=readme-ov-file#kotlin-first-design) principles when needed.** If the API you are adding coverage for is new, and it's Kotlin-first in the Android SDK, then you can simply just match the Android SDKs API as described in the first point, but if it's an older Java-first API then ideally we would include an identical API for API compatibility *plus* a Kotlin-first overload. A good example for this is where the Builder pattern is employed in the Android SDK, here we can follow [this Kotlin-first design principle](https://github.com/GitLiveApp/firebase-kotlin-sdk/?tab=readme-ov-file#default-arguments) and provide both methods, one taking the options created with the builder and an overload with default arguments to avoid the builder boilerplate for developers not porting an existing android code base.
443+
444+
And finally, please remember that this is an open source project, all the project maintainers are **volunteers**, they are **not paid to maintain** this project, and they have **their own jobs**, so please be **patient** when waiting for a response to your issue or PR. Any form of abuse or harassment will not be tolerated and will result in being reported to GitHub.

0 commit comments

Comments
 (0)