@@ -13,12 +13,12 @@ The following libraries are available for the various Firebase products.
13
13
14
14
| Service or Product | Gradle Dependency | API Coverage |
15
15
| ------------------------------------------------------------------------------------ | :-----------------------------------------------------------------------------------------------------------------------------------| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
- | [ Authentication] ( https://firebase.google.com/docs/auth#kotlin-android ) | [ ` dev.gitlive:firebase-auth:0.1 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-auth/0.1 .0/pom ) | [ ![ 40%] ( https://img.shields.io/badge/-40 %25-red?style=flat-square )] ( /firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt ) |
17
- | [ Realtime Database] ( https://firebase.google.com/docs/database#kotlin-android ) | [ ` dev.gitlive:firebase-database:0.1 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-database/0.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 ) |
18
- | [ Cloud Firestore] ( https://firebase.google.com/docs/firestore#kotlin-android ) | [ ` dev.gitlive:firebase-firestore:0.1 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-firestore/0.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 ) |
19
- | [ Cloud Functions] ( https://firebase.google.com/docs/functions/callable#kotlin-android ) | [ ` dev.gitlive:firebase-functions:0.1 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-functions/0.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 ) |
20
- | [ Cloud Messaging] ( https://firebase.google.com/docs/messaging#kotlin-android ) | [ ` dev.gitlive:firebase-messaging:0.1 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-messaging/0.1 .0/pom ) | ![ 0%] ( https://img.shields.io/badge/-0%25-lightgrey?style=flat-square ) |
21
- | [ Cloud Storage] ( https://firebase.google.com/docs/storage#kotlin-android ) | [ ` dev.gitlive:firebase-storage:0.1 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-storage/0.1 .0/pom ) | ![ 0%] ( https://img.shields.io/badge/-0%25-lightgrey?style=flat-square ) |
16
+ | [ Authentication] ( https://firebase.google.com/docs/auth#kotlin-android ) | [ ` dev.gitlive:firebase-auth:0.2 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-auth/0.2 .0/pom ) | [ ![ 40%] ( https://img.shields.io/badge/-50 %25-red?style=flat-square )] ( /firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt ) |
17
+ | [ Realtime Database] ( https://firebase.google.com/docs/database#kotlin-android ) | [ ` dev.gitlive:firebase-database:0.2 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-database/0.2 .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 ) |
18
+ | [ Cloud Firestore] ( https://firebase.google.com/docs/firestore#kotlin-android ) | [ ` dev.gitlive:firebase-firestore:0.2 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-firestore/0.2 .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 ) |
19
+ | [ Cloud Functions] ( https://firebase.google.com/docs/functions/callable#kotlin-android ) | [ ` dev.gitlive:firebase-functions:0.2 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-functions/0.2 .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 ) |
20
+ | [ Cloud Messaging] ( https://firebase.google.com/docs/messaging#kotlin-android ) | [ ` dev.gitlive:firebase-messaging:0.2 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-messaging/0.2 .0/pom ) | ![ 0%] ( https://img.shields.io/badge/-0%25-lightgrey?style=flat-square ) |
21
+ | [ Cloud Storage] ( https://firebase.google.com/docs/storage#kotlin-android ) | [ ` dev.gitlive:firebase-storage:0.2 .0 ` ] ( https://search.maven.org/artifact/dev.gitlive/firebase-storage/0.2 .0/pom ) | ![ 0%] ( https://img.shields.io/badge/-0%25-lightgrey?style=flat-square ) |
22
22
23
23
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 )
24
24
@@ -78,9 +78,11 @@ data class City(val name: String)
78
78
Instances of these classes can now be passed [ along with their serializer] ( https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/runtime_usage.md#obtaining-serializers ) to the SDK:
79
79
80
80
``` kotlin
81
- db.collection(" cities" ).document(" LA" ).set(City .serializer(), city)
81
+ db.collection(" cities" ).document(" LA" ).set(City .serializer(), city, encodeDefaults = true )
82
82
```
83
83
84
+ 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.
85
+
84
86
You can also omit the serializer for classes that does not have generic type arguments, these functions are marked [ ` @ImplicitReflectionSerializer ` ] ( https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/runtime_usage.md#implicit-reflection-serializers ) and their usage is discouraged in general because it is implicit and uses reflection (and therefore not working on Kotlin/Native), but may be useful shorthand in some cases.
85
87
86
88
<h3 ><a href =" https://kotlinlang.org/docs/reference/functions.html#named-arguments " >Named arguments</a ></h3 >
@@ -127,12 +129,12 @@ If you are building a Kotlin multiplatform library which will be consumed from J
127
129
128
130
``` json
129
131
"dependencies" : {
130
- "@gitlive/firebase-auth" : " 0.1 .0" ,
131
- "@gitlive/firebase-database" : " 0.1 .0" ,
132
- "@gitlive/firebase-firestore" : " 0.1 .0" ,
133
- "@gitlive/firebase-functions" : " 0.1 .0" ,
134
- "@gitlive/firebase-storage" : " 0.1 .0" ,
135
- "@gitlive/firebase-messaging" : " 0.1 .0"
132
+ "@gitlive/firebase-auth" : " 0.2 .0" ,
133
+ "@gitlive/firebase-database" : " 0.2 .0" ,
134
+ "@gitlive/firebase-firestore" : " 0.2 .0" ,
135
+ "@gitlive/firebase-functions" : " 0.2 .0" ,
136
+ "@gitlive/firebase-storage" : " 0.2 .0" ,
137
+ "@gitlive/firebase-messaging" : " 0.2 .0"
136
138
}
137
139
```
138
140
0 commit comments