{"id":13537266,"url":"https://github.com/gitliveapp/firebase-kotlin-sdk","last_synced_at":"2026-05-21T06:08:07.567Z","repository":{"id":37861776,"uuid":"213915094","full_name":"GitLiveApp/firebase-kotlin-sdk","owner":"GitLiveApp","description":"A Kotlin-first SDK for Firebase","archived":false,"fork":false,"pushed_at":"2025-03-03T21:35:56.000Z","size":5526,"stargazers_count":1332,"open_issues_count":112,"forks_count":166,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-09T18:09:56.589Z","etag":null,"topics":["firebase","firebase-auth","firebase-database","firebase-firestore","firebase-functions","kotlin","kotlin-coroutines","kotlin-multiplatform"],"latest_commit_sha":null,"homepage":"https://gitliveapp.github.io/firebase-kotlin-sdk/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GitLiveApp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-09T12:39:23.000Z","updated_at":"2025-04-09T16:25:04.000Z","dependencies_parsed_at":"2023-09-28T11:55:32.271Z","dependency_job_id":"8cc1ca02-d0fd-4733-8ccb-14cd3111aa4b","html_url":"https://github.com/GitLiveApp/firebase-kotlin-sdk","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitLiveApp%2Ffirebase-kotlin-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitLiveApp%2Ffirebase-kotlin-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitLiveApp%2Ffirebase-kotlin-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitLiveApp%2Ffirebase-kotlin-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitLiveApp","download_url":"https://codeload.github.com/GitLiveApp/firebase-kotlin-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328829,"owners_count":21085404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","firebase-auth","firebase-database","firebase-firestore","firebase-functions","kotlin","kotlin-coroutines","kotlin-multiplatform"],"created_at":"2024-08-01T09:00:57.068Z","updated_at":"2026-05-21T06:08:07.561Z","avatar_url":"https://github.com/GitLiveApp.png","language":"Kotlin","funding_links":[],"categories":["Libraries"],"sub_categories":["Firebase"],"readme":"\u003ch1 align=\"left\"\u003eFirebase Kotlin SDK \u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/gitliveapp/firebase-kotlin-sdk?style=flat-square\"\u003e \u003ca href=\"https://git.live\"\u003e\u003cimg src=\"https://img.shields.io/endpoint?style=flatsquare\u0026url=https%3A%2F%2Fapp.git.live%2Fbadge%3Forg%3DGitLiveApp%26repo%3Dfirebase-kotlin-sdk\"\u003e\u003c/a\u003e\u003c/h1\u003e\n\u003cimg align=\"left\" width=\"75px\" src=\"https://avatars2.githubusercontent.com/u/42865805?s=200\u0026v=4\"\u003e \n  \u003cb\u003eBuilt and maintained with 🧡 by \u003ca href=\"https://git.live\"\u003eGitLive\u003c/a\u003e\u003c/b\u003e\u003cbr/\u003e\n  \u003ci\u003eDevelopment teams merge faster with GitLive\u003c/i\u003e\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\nThe Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the \n\u003ca href=\"https://firebase.google.com/docs/reference/kotlin/packages\"\u003eFirebase Android SDK Kotlin Extensions\u003c/a\u003e \nbut also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting \n\u003cstrong\u003eiOS\u003c/strong\u003e, \u003cstrong\u003eAndroid\u003c/strong\u003e, \u003cstrong\u003eDesktop\u003c/strong\u003e or \u003cstrong\u003eWeb\u003c/strong\u003e, enabling the use of \nFirebase as a backend for \u003ca href=\"https://www.jetbrains.com/lp/compose-multiplatform/\"\u003eCompose Multiplatform\u003c/a\u003e, for example.\n\n## Available libraries\n\nThe following libraries are available for the various Firebase products.\n\n| Service or Product\t                                                             | Gradle Dependency                                                                                                              | API Coverage                                                                                                                                                             |\n|---------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Analytics](https://firebase.google.com/docs/analytics)                         | [`dev.gitlive:firebase-analytics:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-analytics/2.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)                            |\n| [Authentication](https://firebase.google.com/docs/auth)                         | [`dev.gitlive:firebase-auth:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/2.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)                            |\n| [Realtime Database](https://firebase.google.com/docs/database)                  | [`dev.gitlive:firebase-database:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/2.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)               |\n| [Cloud Firestore](https://firebase.google.com/docs/firestore)                   | [`dev.gitlive:firebase-firestore:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/2.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)            |\n| [Cloud Functions](https://firebase.google.com/docs/functions)                   | [`dev.gitlive:firebase-functions:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/2.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)             |\n| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging)             | [`dev.gitlive:firebase-messaging:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/2.4.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)           |\n| [Cloud Storage](https://firebase.google.com/docs/storage)                       | [`dev.gitlive:firebase-storage:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/2.4.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)                  |\n| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/2.4.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) |\n| [Remote Config](https://firebase.google.com/docs/remote-config)                 | [`dev.gitlive:firebase-config:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/2.4.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) |\n| [Performance](https://firebase.google.com/docs/perf-mon)                        | [`dev.gitlive:firebase-perf:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/2.4.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)                      |\n| [Crashlytics](https://firebase.google.com/docs/crashlytics)                     | [`dev.gitlive:firebase-crashlytics:2.4.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/2.4.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)       |\n\nIs the Firebase library or API you need missing? [Create an issue](https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/new?labels=API+coverage\u0026template=increase-api-coverage.md\u0026title=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)\n\n## Kotlin-first design\n\nUnlike the Kotlin Extensions for the Firebase Android SDK this project does not extend a Java based SDK so we get the full power of Kotlin including coroutines and serialization!\n\n\u003ch3\u003e\u003ca href=\"https://kotlinlang.org/docs/tutorials/coroutines/async-programming.html#coroutines\"\u003eSuspending functions\u003c/a\u003e\u003c/h3\u003e\n\nAsynchronous operations that return a single or no value are represented by suspending functions in the SDK instead of callbacks, listeners or OS specific types such as [Task](https://developer.android.com/reference/com/google/android/play/core/tasks/Task), for example:\n\n```kotlin\nsuspend fun signInWithCustomToken(token: String): AuthResult\n```\n\nIt is important to remember that unlike a callback based API, waiting for suspending functions to complete is implicit and so if you don't want to wait for the result you can `launch` a new coroutine:\n\n```kotlin\n//TODO don't use GlobalScope\nGlobalScope.launch {\n  Firebase.auth.signOut()\n}\n```\n\n\u003ch3\u003e\u003ca href=\"https://kotlinlang.org/docs/reference/coroutines/flow.html\"\u003eFlows\u003c/a\u003e\u003c/h3\u003e\n\nAsynchronous streams of values are represented by Flows in the SDK instead of repeatedly invoked callbacks or listeners, for example:\n\n```kotlin\nval snapshots: Flow\u003cDocumentSnapshot\u003e\n```\n\nThe flows are cold, which means a new listener is added every time a terminal operator is applied to the resulting flow. A buffer with the [default size](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-channel/-b-u-f-f-e-r-e-d.html) is used to buffer values received from the listener, use the [`buffer` operator](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/buffer.html) on the flow to specify a user-defined value and to control what happens when data is produced faster than consumed, i.e. to control the back-pressure behavior. Often you are only interested in the latest value received, in this case you can use the [`conflate` operator](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/conflate.html) to disable buffering.\n\nThe listener is removed once the flow [completes](https://kotlinlang.org/docs/reference/coroutines/flow.html#flow-completion) or is [cancelled](https://kotlinlang.org/docs/reference/coroutines/flow.html#flow-cancellation).\n\n\u003ch3\u003e\u003ca href=\"https://github.com/Kotlin/kotlinx.serialization\"\u003eSerialization\u003c/a\u003e\u003c/h3\u003e\n\nThe official Firebase SDKs use different platform-specific ways to support writing data with and without custom classes in [Cloud Firestore](https://firebase.google.com/docs/firestore/manage-data/add-data#custom_objects), [Realtime Database](https://firebase.google.com/docs/database/android/read-and-write#basic_write) and [Functions](https://firebase.google.com/docs/functions/callable).\n\nThe Firebase Kotlin SDK uses Kotlin serialization to read and write custom classes to Firebase. To use Kotlin serialization in your project add the plugin to your gradle file:\n\n```groovy\nplugins {\n    kotlin(\"multiplatform\") version \"1.9.20\" // or kotlin(\"jvm\") or any other kotlin plugin\n    kotlin(\"plugin.serialization\") version \"1.9.20\"\n}\n```\n\nThen mark your custom classes `@Serializable`:\n\n```kotlin\n@Serializable\ndata class City(val name: String)\n```\n\nInstances of these classes can now be passed [along with their serializer](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#introduction-to-serializers) to the SDK:\n\n```kotlin\ndb.collection(\"cities\").document(\"LA\").set(City.serializer(), city) { encodeDefaults = true }\n```\n\nThe `buildSettings` closure is optional and allows for configuring serialization behaviour. \n\nSetting the `encodeDefaults` parameter is optional and defaults to `true`, set this to false to omit writing optional properties if they are equal to theirs default values.\nUsing [@EncodeDefault](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-encode-default/) on properties is a recommended way to locally override the behavior set with `encodeDefaults`.\n\nYou can also omit the serializer if it can be inferred using `serializer\u003cKType\u003e()`. \nTo support [contextual serialization](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#contextual-serialization) or [open polymorphism](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/polymorphism.md#open-polymorphism) the `serializersModule` can be overridden in the `buildSettings` closure:\n\n```kotlin\n@Serializable\nabstract class AbstractCity {\n    abstract val name: String\n}\n\n@Serializable\n@SerialName(\"capital\")\ndata class Capital(override val name: String, val isSeatOfGovernment: Boolean) : AbstractCity()\n\nval module = SerializersModule {\n    polymorphic(AbstractCity::class, AbstractCity.serializer()) {\n        subclass(Capital::class, Capital.serializer())\n    }\n}\n\nval city = Capital(\"London\", true)\ndb.collection(\"cities\").document(\"UK\").set(AbstractCity.serializer(), city) { \n    encodeDefaults = true\n    serializersModule = module\n    \n}\nval storedCity = db.collection(\"cities\").document(\"UK\").get().data(AbstractCity.serializer()) {\n    serializersModule = module\n}\n```\n\n\u003ch4\u003e\u003ca href=\"https://firebase.google.com/docs/firestore/manage-data/add-data#server_timestamp\"\u003eServer Timestamp\u003c/a\u003e\u003c/h3\u003e\n\n[Firestore](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/firestore/FieldValue?hl=en#serverTimestamp()) and the [Realtime Database](https://firebase.google.com/docs/reference/android/com/google/firebase/database/ServerValue#TIMESTAMP) provide a sentinel value you can use to set a field in your document to a server timestamp. So you can use these values in custom classes:\n\n```kotlin\n@Serializable\ndata class Post(\n    // In case using Realtime Database.\n    val timestamp = ServerValue.TIMESTAMP,\n    // In case using Cloud Firestore.\n    val timestamp: Timestamp = Timestamp.ServerTimestamp,\n    // or\n    val alternativeTimestamp = FieldValue.serverTimestamp,\n    // or\n    @Serializable(with = DoubleAsTimestampSerializer::class),\n    val doubleTimestamp: Double = DoubleAsTimestampSerializer.serverTimestamp\n)\n```\n\nIn addition `firebase-firestore` provides [GeoPoint] and [DocumentReference] classes which allow persisting\ngeo points and document references in a native way:\n\n```kotlin\n@Serializable\ndata class PointOfInterest(\n    val reference: DocumentReference, \n    val location: GeoPoint\n)\nval document = PointOfInterest(\n    reference = Firebase.firestore.collection(\"foo\").document(\"bar\"),\n    location = GeoPoint(51.939, 4.506)\n)\n```\n\n\u003ch4\u003ePolymorphic serialization (sealed classes)\u003c/h4\u003e\n\nThis sdk will handle polymorphic serialization automatically if you have a sealed class and its children marked as `Serializable`. It will include a `type` property that will be used to discriminate which child class is the serialized.\n\nYou can change this `type` property by using the `@FirebaseClassDiscrminator` annotation in the parent sealed class:\n\n```kotlin\n@Serializable\n@FirebaseClassDiscriminator(\"class\")\nsealed class Parent {\n    @Serializable\n    @SerialName(\"child\")\n    data class Child(\n        val property: Boolean\n    ) : Parent\n}\n```\n\nIn combination with a `SerialName` specified for the child class, you have full control over the serialized data. In this case it will be:\n\n```json\n{\n  \"class\": \"child\",\n  \"property\": true\n}\n```\n\n\u003ch4\u003eSerialization of Updates\u003c/h4\u003e\nFirestore contains update methods that allow for multiple fields to be updated at the same time. \nThis sdk offers special update methods that allow for applying custom serialization to each individual field though an update builder.\nWhere an `update` method exists, an `updateFields` method will also be available. In this, each value can have its serializer customized:\n\n```kotlin\ndocumentRef.updateFields {\n    // Root level encode settings\n    encodeDefaults = false\n    serializersModule = module\n    \n    \"field\" to \"value\"\n    // Set the value of otherField to \"1\" using a custom Serializer\n    \"otherField\".to(IntAsStringSerializer(), 1)\n    \n    // Overwrite build settings. All fields added within this block will have these build settings applied\n    withEncodeSettings {\n        encodeDefaults = true\n        serializersModule = otherModule\n        \"city\" to abstractCity\n    }\n}\n```\n\nSimilarly, the `Query` methods `startAt`/`startAfter`/`endAt`/`endBefore` have an alternative method in `startAtFieldValues`/`startAfterFieldValues`/`endAtFieldValues`/`endBeforeFieldValues`\n\n```kotlin\nquery.orderBy(\"field\", \"otherField\", \"city\").startAtFieldValues { // similar syntax for startAfter/endAt/endBefore\n    // Root level encode settings\n    encodeDefaults = false\n    serializersModule = module\n    \n    add(\"Value\")\n\n    // Starts at \"1\" for the otherField value\n    add(1, IntAsStringSerializer())\n\n    // Overwrite build settings. All field values added within this block will have these build settings applied\n    withEncodeSettings {\n        encodeDefaults = true\n        serializersModule = otherModule\n        add(abstractCity)\n    }\n}\n```\n\n\u003ch3\u003e\u003ca href=\"https://kotlinlang.org/docs/reference/functions.html#default-arguments\"\u003eDefault arguments\u003c/a\u003e\u003c/h3\u003e\n\nTo reduce boilerplate, default arguments are used in the places where the Firebase Android SDK employs the builder pattern:\n```kotlin\nUserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()\n        .setDisplayName(\"Jane Q. User\")\n        .setPhotoUri(Uri.parse(\"https://example.com/jane-q-user/profile.jpg\"))\n        .build()\n\nuser.updateProfile(profileUpdates)\n        .addOnCompleteListener(new OnCompleteListener\u003cVoid\u003e() {\n            @Override\n            public void onComplete(@NonNull Task\u003cVoid\u003e task) {\n                if (task.isSuccessful()) {\n                    Log.d(TAG, \"User profile updated.\")\n                }\n            }\n        })\n\n//...becomes...\n\nuser.updateProfile(displayName = \"Jane Q. User\", photoURL = \"https://example.com/jane-q-user/profile.jpg\")\n```\n\n\u003ch3\u003e\u003ca href=\"https://kotlinlang.org/docs/functions.html#infix-notation\"\u003eInfix notation\u003c/a\u003e\u003c/h3\u003e\n\nTo improve readability and reduce boilerplate for functions such as the Cloud Firestore query operators are built with infix notation:\n\n```kotlin\ncitiesRef.whereEqualTo(\"state\", \"CA\")\ncitiesRef.whereArrayContains(\"regions\", \"west_coast\")\ncitiesRef.where(Filter.and(\n    Filter.equalTo(\"state\", \"CA\"),\n    Filter.or(\n        Filter.equalTo(\"capital\", true),\n        Filter.greaterThanOrEqualTo(\"population\", 1000000)\n    )\n))\n\n//...becomes...\n\ncitiesRef.where { \"state\" equalTo \"CA\" }\ncitiesRef.where { \"regions\" contains \"west_coast\" }\ncitiesRef.where {\n    all(\n        \"state\" equalTo \"CA\",\n        any(\n            \"capital\" equalTo true,\n            \"population\" greaterThanOrEqualTo 1000000\n        )\n    )\n}\n```\n\n\u003ch3\u003e\u003ca href=\"https://kotlinlang.org/docs/reference/operator-overloading.html\"\u003eOperator overloading\u003c/a\u003e\u003c/h3\u003e\n\nIn cases where it makes sense, such as Firebase Functions HTTPS Callable, operator overloading is used:\n\n```kotlin\n    val addMessage = functions.getHttpsCallable(\"addMessage\")\n    //In the official android Firebase SDK this would be addMessage.call(...)\n    addMessage(mapOf(\"text\" to text, \"push\" to true))\n```\n\n## Multiplatform\n\nThe Firebase Kotlin SDK provides a common API to access Firebase for projects targeting *iOS*, *Android*, *JVM* and *JS* meaning you can use Firebase directly in your common code. Under the hood, the SDK achieves this by binding to the respective official Firebase SDK for each supported platform.\n\nIt uses the \u003ca href=\"https://github.com/GitLiveApp/firebase-java-sdk\"\u003eFirebase Java SDK\u003c/a\u003e to support the JVM target. The library requires [additional initialization](https://github.com/GitLiveApp/firebase-java-sdk?tab=readme-ov-file#initializing-the-sdk) compared to the official Firebase SDKs.\n\n### Accessing the underlying Firebase SDK\n\nIn some cases you might want to access the underlying official Firebase SDK in platform specific code, for example when the common API is missing the functionality you need. For this purpose each class in the SDK has `android`, `ios` and `js` extension properties that hold the equivalent object of the underlying official Firebase SDK. For *JVM*, as the `firebase-java-sdk` is a direct port of the Firebase Android SDK, is it also accessed via the `android` property.\n\nThese properties are only accessible from the equivalent target's source set. For example to disable persistence in Cloud Firestore on Android you can write the following in your Android specific code (e.g. `androidMain` or `androidTest`):\n\n```kotlin\n  Firebase.firestore.android.firestoreSettings = FirebaseFirestoreSettings.Builder(Firebase.firestore.android.firestoreSettings)\n          .setPersistenceEnabled(false)\n          .build()\n```\n\n### Running on Android\n\nOn android, some modules (`config`) require you to enable [Core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) if you have a *minSDK lower than API 26*.\n\n### Running on iOS\n\nOn iOS the official [Firebase iOS SDK](https://github.com/firebase/firebase-ios-sdk) in not linked as a transitive dependency. Therefore, any project using this SDK needs to link the actual Firestore SDK as well. This can be done through your preferred installation method (Cocoapods/SPM).\n\nSimilarly, tests require linking as well. Make sure to add the required frameworks to the search path of your test targets. This can be done by specifying a `cocoapods` block in your `build.gradle`:\n```kotlin\ncocoapods {\n   pod(\"FirebaseCore\") // Repeat for Firebase pods required by your project, e.g FirebaseFirestore for the `firebase-firestore` module.\n}\n```\n\n## Contributing\nIf you'd like to contribute to this project then you can fork this repository. \nYou can build and test the project locally.\n1. Open the project in IntelliJ IDEA.\n2. Install cocoapods via `sudo gem install -n /usr/local/bin cocoapods`\n3. Install the GitLive plugin into IntelliJ\n4. After a gradle sync then run `publishToMavenLocal`\n\n### Testing\nTo run the tests you can use the following gradle tasks:\n\n`./gradlew connectedAndroidTest` (an emulator needs to be running)\n\n`./gradlew iosSimulatorArm64Test` (On Apple Chip) `./gradlew iosX64Test` (On Intel Chip)\n\n`./gradlew jsNodeTest`\n\n`./gradlew jvmTest`\n\nFor some tests you need to have the firebase emulator suite running. After installing them you can run the following command inside the `test` directory:\n\n`firebase emulators:start`\n\n### Documentation\nFor every publicly available class or function there needs to be documentation written in the [KDoc syntax](https://kotlinlang.org/docs/kotlin-doc.html).\nWe publish a new version of the documentation after every release and can be found [here](https://gitliveapp.github.io/firebase-kotlin-sdk/)\n\n### Validation\nTo ensure changes to the public API are well documented, this library validates its binary API. If you make changes to the API, make sure to run\n\n`./gradlew apiDump`\n\n### Code style\nThis library uses the [Intellij Kotlin code style](https://www.jetbrains.com/help/idea/code-style-kotlin.html). Run the linter to make sure you follow these styles.\n\n`./gradlew formatKotlin` to format to the proper style\n`./gradlew lintKotlin` to validate the correct style is used\n\n### Compatibility with the official [Firebase Android SDK](https://github.com/firebase/firebase-android-sdk)\n\nWhen 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.\n\nBut with the majority of the Android SDK being designed for Java, the Kotlin SDK was primarily guided by our [Kotlin-first design](https://github.com/GitLiveApp/firebase-kotlin-sdk/?tab=readme-ov-file#kotlin-first-design) principles.\n\nMore recently, with the official SDK for Android providing better support for Kotlin and the inclusion of the new Kotlin-friendly features direct in the main modules, the API differences between the official SDK and this project are likely to start to blur. Therefore, in particular for developers porting android code to multiplatform, one of our goals going forward will be API compatibility with the Android SDK where possible.\n\nFor contributors this means following these points when adding new code to the public API of this project:\n- **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`.\n- **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.\n\nAnd 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitliveapp%2Ffirebase-kotlin-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitliveapp%2Ffirebase-kotlin-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitliveapp%2Ffirebase-kotlin-sdk/lists"}