Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] SNAPSHOT publishing #62

Draft
wants to merge 90 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
8e0bdf3
use faster install for SDK
thoutbeckers May 23, 2023
7f807b6
publish snapshots to Splendo repo
thoutbeckers May 23, 2023
ffa1654
add build nr in version
thoutbeckers May 23, 2023
759cb89
typo in sdk name
thoutbeckers May 23, 2023
d686baa
Merge branch 'master' into snapshot
Daeda88 Sep 27, 2023
5d04273
Attempt to fix publication
Daeda88 Sep 27, 2023
7a59d7e
Merge remote-tracking branch 'origin/master' into snapshot
Daeda88 Nov 17, 2023
897d9b5
Use Firebase 10.17
Daeda88 Nov 20, 2023
51e201b
Minor fixes
Daeda88 Nov 20, 2023
71c6939
Merge remote-tracking branch 'origin/master' into snapshot
Daeda88 Dec 19, 2023
973da05
Raise version
Daeda88 Dec 19, 2023
888ea93
Fix update issue
Daeda88 Apr 3, 2024
fdd3525
Merge pull request #69 from splendo/update-fix
Daeda88 Apr 3, 2024
5979a04
Merge remote-tracking branch 'origin/master' into snapshot
Daeda88 May 13, 2024
377b887
Missing fields added to AuthResult
mr-kew Jun 27, 2024
a737063
Merge branch 'master' into auth-result
mr-kew Jun 27, 2024
4885a5d
Merge branch 'master' into auth-result
nbransby Jun 27, 2024
dcd28c7
Merge branch 'master' into auth-result
nbransby Jun 30, 2024
31d8466
Removed unused import
mr-kew Jun 30, 2024
37867cf
AuthResult test
mr-kew Jun 30, 2024
3a7f273
Merge branch 'master' into auth-result
nbransby Jul 12, 2024
93b9dda
Added messages to asserts in AuthResult test
mr-kew Jul 15, 2024
ef5e5d9
JVM lint issues fixed
mr-kew Jul 15, 2024
be998c3
JVM lint issues properly fixed
mr-kew Jul 15, 2024
f2c2c51
Public api updated
mr-kew Jul 15, 2024
ed24041
Public api fix
mr-kew Jul 15, 2024
434abaa
AuthResult structure test allows null values
mr-kew Jul 15, 2024
84cdf2c
AuthResult structure test unwrap fixed
mr-kew Jul 15, 2024
a18e3f2
AuthResult structure additionalUserInfo exists
mr-kew Jul 15, 2024
79a7516
AuthResult structure isNewUser default respected
mr-kew Jul 15, 2024
ac4cffa
AuthResult structure test made more forgiving
Jul 17, 2024
277e7f5
Merge branch 'master' into auth-result
mr-kew Aug 16, 2024
e5af67d
AuthResult map parsing fixed in JS
mr-kew Aug 28, 2024
9681cf4
Used Json? instead od dynamic for better clarity
mr-kew Aug 28, 2024
fad3664
AuthResult structure JS test fixed
mr-kew Aug 28, 2024
60e42c0
Merge branch 'master' into auth-result
mr-kew Aug 29, 2024
b566e31
Merge cleanup
mr-kew Aug 29, 2024
1a9a14a
API dump
mr-kew Aug 29, 2024
0428e26
Updated firebase-cocoapods to "11.1.0"
siarhei-luskanau Aug 23, 2024
aa71564
Merge remote-tracking branch 'origin/master' into snapshot
Daeda88 Aug 29, 2024
3f71c00
Track small github action difference
Daeda88 Aug 29, 2024
ba73861
Merge pull request #592 from siarhei-luskanau/firebase-cocoapods-11.1.0
nbransby Aug 29, 2024
6378db9
Merge branch 'master' into feature/public-ValueWithSerializer
nbransby Aug 29, 2024
3eb1a0c
Native properties moved into extensions
mr-kew Aug 29, 2024
ecfa47d
Merge branch 'master' into auth-result
nbransby Aug 30, 2024
9e8ef04
Update auth.kt
nbransby Aug 30, 2024
1c28ed3
Adding support for encoded queries
Daeda88 Aug 30, 2024
f682e3e
Merge remote-tracking branch 'origin/feature/public-ValueWithSerializ…
Daeda88 Aug 30, 2024
bf8680c
Add support for customizing encoding behaviour when updating Values a…
Daeda88 Aug 30, 2024
fc7cb62
Merge pull request #556 from mr-kew/auth-result
nbransby Aug 30, 2024
3fde0f5
Improves DSL for updating firestore references
Daeda88 Sep 1, 2024
dd19681
Merge remote-tracking branch 'GitLiveApp/master' into feature/field-v…
Daeda88 Sep 1, 2024
6e0a4de
Slight api format change for readability
Daeda88 Sep 2, 2024
66df979
Bumped version
Reedyuk Sep 2, 2024
d8f82a5
Updated readme
Reedyuk Sep 2, 2024
fde1e95
Merge pull request #611 from GitLiveApp/version-bump
nbransby Sep 2, 2024
c612f9c
Fixed some bugs and adding tests
Daeda88 Sep 2, 2024
9464afc
Added get reference from url
Reedyuk Sep 2, 2024
80f0ba0
adjusted firebase storage api
Reedyuk Sep 2, 2024
90f870c
Added several tests to stabilize tests
Daeda88 Sep 2, 2024
431bdb8
Merge remote-tracking branch 'GitLiveApp/master' into feature/field-v…
Daeda88 Sep 2, 2024
c060bd5
Merge branch 'feature/field-value-encoding' into track-master-2.1
Daeda88 Sep 2, 2024
aa1fbb3
Bump dev.gitlive:firebase-java-sdk from 0.4.5 to 0.4.6
dependabot[bot] Sep 2, 2024
5fbf6fd
Merge pull request #617 from GitLiveApp/dependabot/gradle/dev.gitlive…
nbransby Sep 3, 2024
ccfec12
Bump org.jetbrains.kotlinx:kotlinx-serialization-core
dependabot[bot] Sep 3, 2024
7af92d4
Bump agp from 8.5.2 to 8.6.0
dependabot[bot] Sep 3, 2024
687773f
Merge pull request #612 from GitLiveApp/added-missing-storage-method
nbransby Sep 3, 2024
1877b02
Merge remote-tracking branch 'GitLiveApp/master' into feature/field-v…
Daeda88 Sep 3, 2024
063bbe0
Merge branch 'master' into dependabot/gradle/org.jetbrains.kotlinx-ko…
Reedyuk Sep 3, 2024
0cbf604
Merge branch 'master' into dependabot/gradle/agp-8.6.0
Reedyuk Sep 3, 2024
d6e1a94
Bump com.android.tools:desugar_jdk_libs from 2.1.0 to 2.1.1 (#616)
dependabot[bot] Sep 3, 2024
5535b9f
Disable Desugaring for the library itself
Daeda88 Sep 3, 2024
ebe3198
Merge remote-tracking branch 'GitLiveApp/master' into feature/field-v…
Daeda88 Sep 3, 2024
cd188b6
Merge branch 'feature/field-value-encoding' into track-master-2.1
Daeda88 Sep 3, 2024
1455dbc
Merge branch 'master' into dependabot/gradle/org.jetbrains.kotlinx-ko…
Reedyuk Sep 3, 2024
a01c631
Merge branch 'master' into dependabot/gradle/agp-8.6.0
Reedyuk Sep 3, 2024
c2ae27d
Merge branch 'track-master-2.1' into snapshot
Daeda88 Sep 3, 2024
50ba2ac
Merge pull request #618 from splendo/feature/610-disable-desugaring
Reedyuk Sep 3, 2024
90a10c6
Merge branch 'master' into dependabot/gradle/agp-8.6.0
Reedyuk Sep 3, 2024
d02a8f0
Merge branch 'master' into dependabot/gradle/org.jetbrains.kotlinx-ko…
Reedyuk Sep 3, 2024
1a3b378
Merge pull request #615 from GitLiveApp/dependabot/gradle/org.jetbrai…
Reedyuk Sep 3, 2024
5d69506
Merge branch 'master' into dependabot/gradle/agp-8.6.0
Reedyuk Sep 3, 2024
00968f7
Merge pull request #614 from GitLiveApp/dependabot/gradle/agp-8.6.0
Reedyuk Sep 3, 2024
5332e61
Merge remote-tracking branch 'GitLiveApp/master' into feature/field-v…
Daeda88 Sep 4, 2024
4176fe6
Make builders abstract to allow for testing
Daeda88 Sep 13, 2024
32599ff
Merge branch 'feature/field-value-encoding' into track-master-2.1
Daeda88 Sep 13, 2024
73aa5ca
Merge branch 'track-master-2.1' into snapshot
Daeda88 Sep 13, 2024
a138c10
Revert "Make builders abstract to allow for testing"
Daeda88 Sep 13, 2024
6743d80
Merge branch 'feature/field-value-encoding' into track-master-2.1
Daeda88 Sep 13, 2024
e6278af
Merge branch 'track-master-2.1' into snapshot
Daeda88 Sep 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
name: Publish

on:
release:
types: [ prereleased, released ]
## do not upstream ##
push:
branches: [ master, snapshot ]
## ############### ##

env:
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
Expand All @@ -23,6 +25,11 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
## do no upstream ##
- name: replace -SNAPSHOT with -run_number-SNAPSHOT
run: sed -i '' 's/-SNAPSHOT/-${{github.run_number}}-SNAPSHOT/g' gradle.properties
shell: bash
## ############## ##
- uses: gradle/actions/setup-gradle@v4
- name: Setup versions
run: ./gradlew :updateVersions
Expand Down
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ The following libraries are available for the various Firebase products.

| Service or Product | Gradle Dependency | API Coverage |
|---------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Analytics](https://firebase.google.com/docs/analytics) | [`dev.gitlive:firebase-analytics:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-analytics/2.0.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) |
| [Authentication](https://firebase.google.com/docs/auth) | [`dev.gitlive:firebase-auth:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/2.0.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) |
| [Realtime Database](https://firebase.google.com/docs/database) | [`dev.gitlive:firebase-database:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/2.0.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) |
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | [`dev.gitlive:firebase-firestore:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/2.0.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) |
| [Cloud Functions](https://firebase.google.com/docs/functions) | [`dev.gitlive:firebase-functions:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/2.0.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) |
| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) | [`dev.gitlive:firebase-messaging:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/2.0.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) |
| [Cloud Storage](https://firebase.google.com/docs/storage) | [`dev.gitlive:firebase-storage:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/2.0.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) |
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/2.0.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) |
| [Remote Config](https://firebase.google.com/docs/remote-config) | [`dev.gitlive:firebase-config:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/2.0.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) |
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/2.0.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) |
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:2.0.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/2.0.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) |
| [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) |
| [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) |
| [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) |
| [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) |
| [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) |
| [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) |
| [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) |
| [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) |
| [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) |
| [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) |
| [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) |

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)

Expand Down Expand Up @@ -250,6 +250,15 @@ citiesRef.where {
}
```

Similar methods exist for `update` methods in the Firestore module:

```kotlin
documentRef.update {
"field" to "value"
"otherField".to(IntAsStringSerializer(), 1)
}
```

<h3><a href="https://kotlinlang.org/docs/reference/operator-overloading.html">Operator overloading</a></h3>

In cases where it makes sense, such as Firebase Functions HTTPS Callable, operator overloading is used:
Expand Down Expand Up @@ -278,9 +287,13 @@ These properties are only accessible from the equivalent target's source set. Fo
.build()
```

### Running on Android

On 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*.

### Running on iOS

On iOS the official [Firebase iOS SDK](https://github.com/firebase/firebase-ios-sdk) in not linked as a transtive 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).
On 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).

Similarly, 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`:
```kotlin
Expand Down
9 changes: 7 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ tasks.withType<AbstractDokkaTask>().configureEach {

subprojects {

group = "dev.gitlive"
//// do not upstream ////
group = "com.splendo.firebase"
//// /////////////// ////

val nonDocumentationList = listOf("test-utils", "firebase-common", "firebase-common-internal")
val skipDocumentation = nonDocumentationList.contains(project.name)
Expand Down Expand Up @@ -196,7 +198,10 @@ subprojects {

repositories {
maven {
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
//// do not upstream ////
this.name = "snapshot"
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
//// /////////////// ////

credentials {
username = project.findProperty("sonatypeUsername") as String? ?: System.getenv("sonatypeUsername")
Expand Down
4 changes: 2 additions & 2 deletions firebase-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-analytics",
"version": "2.0.0",
"version": "2.2.0-SNAPSHOT",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-analytics.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "2.0.0",
"@gitlive/firebase-app": "2.2.0-SNAPSHOT",
"firebase": "9.19.1",
"kotlin": "1.6.10",
"kotlinx-coroutines-core": "1.6.1-native-mt"
Expand Down
4 changes: 2 additions & 2 deletions firebase-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-app",
"version": "2.0.0",
"version": "2.2.0-SNAPSHOT",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-app.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-common": "2.0.0",
"@gitlive/firebase-common": "2.2.0-SNAPSHOT",
"firebase": "9.19.1",
"kotlin": "1.8.20",
"kotlinx-coroutines-core": "1.6.4"
Expand Down
12 changes: 12 additions & 0 deletions firebase-auth/api/android/firebase-auth.api
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ public final class dev/gitlive/firebase/auth/ActionCodeSettings {
public fun toString ()Ljava/lang/String;
}

public final class dev/gitlive/firebase/auth/AdditionalUserInfo {
public fun <init> (Lcom/google/firebase/auth/AdditionalUserInfo;)V
public final fun getProfile ()Ljava/util/Map;
public final fun getProviderId ()Ljava/lang/String;
public final fun getUsername ()Ljava/lang/String;
public final fun isNewUser ()Z
}

public final class dev/gitlive/firebase/auth/AndroidPackageName {
public fun <init> (Ljava/lang/String;ZLjava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;ZLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
Expand All @@ -74,6 +82,9 @@ public class dev/gitlive/firebase/auth/AuthCredential {
}

public final class dev/gitlive/firebase/auth/AuthResult {
public fun <init> (Lcom/google/firebase/auth/AuthResult;)V
public final fun getAdditionalUserInfo ()Ldev/gitlive/firebase/auth/AdditionalUserInfo;
public final fun getCredential ()Ldev/gitlive/firebase/auth/AuthCredential;
public final fun getUser ()Ldev/gitlive/firebase/auth/FirebaseUser;
}

Expand Down Expand Up @@ -278,6 +289,7 @@ public final class dev/gitlive/firebase/auth/UserMetaData {

public final class dev/gitlive/firebase/auth/android {
public static final fun auth (Ldev/gitlive/firebase/Firebase;Ldev/gitlive/firebase/FirebaseApp;)Ldev/gitlive/firebase/auth/FirebaseAuth;
public static final fun getAndroid (Ldev/gitlive/firebase/auth/AdditionalUserInfo;)Lcom/google/firebase/auth/AdditionalUserInfo;
public static final fun getAndroid (Ldev/gitlive/firebase/auth/AuthResult;)Lcom/google/firebase/auth/AuthResult;
public static final fun getAndroid (Ldev/gitlive/firebase/auth/AuthTokenResult;)Lcom/google/firebase/auth/GetTokenResult;
public static final fun getAndroid (Ldev/gitlive/firebase/auth/FirebaseAuth;)Lcom/google/firebase/auth/FirebaseAuth;
Expand Down
11 changes: 11 additions & 0 deletions firebase-auth/api/jvm/firebase-auth.api
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ public final class dev/gitlive/firebase/auth/ActionCodeSettings {
public fun toString ()Ljava/lang/String;
}

public final class dev/gitlive/firebase/auth/AdditionalUserInfo {
public fun <init> ()V
public final fun getProfile ()Ljava/util/Map;
public final fun getProviderId ()Ljava/lang/String;
public final fun getUsername ()Ljava/lang/String;
public final fun isNewUser ()Z
}

public final class dev/gitlive/firebase/auth/AndroidPackageName {
public fun <init> (Ljava/lang/String;ZLjava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;ZLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
Expand All @@ -74,6 +82,9 @@ public class dev/gitlive/firebase/auth/AuthCredential {
}

public final class dev/gitlive/firebase/auth/AuthResult {
public fun <init> (Lcom/google/firebase/auth/AuthResult;)V
public final fun getAdditionalUserInfo ()Ldev/gitlive/firebase/auth/AdditionalUserInfo;
public final fun getCredential ()Ldev/gitlive/firebase/auth/AuthCredential;
public final fun getUser ()Ldev/gitlive/firebase/auth/FirebaseUser;
}

Expand Down
4 changes: 2 additions & 2 deletions firebase-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-auth",
"version": "2.0.0",
"version": "2.2.0-SNAPSHOT",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-auth.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "2.0.0",
"@gitlive/firebase-app": "2.2.0-SNAPSHOT",
"firebase": "9.19.1",
"kotlin": "1.8.20",
"kotlinx-coroutines-core": "1.6.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,29 @@ public actual class FirebaseAuth internal constructor(internal val android: com.

public val AuthResult.android: com.google.firebase.auth.AuthResult get() = android

public actual class AuthResult internal constructor(internal val android: com.google.firebase.auth.AuthResult) {
public actual class AuthResult(internal val android: com.google.firebase.auth.AuthResult) {
public actual val user: FirebaseUser?
get() = android.user?.let { FirebaseUser(it) }
public actual val credential: AuthCredential?
get() = android.credential?.let { AuthCredential(it) }
public actual val additionalUserInfo: AdditionalUserInfo?
get() = android.additionalUserInfo?.let { AdditionalUserInfo(it) }
}

public val AdditionalUserInfo.android: com.google.firebase.auth.AdditionalUserInfo
get() = android

public actual class AdditionalUserInfo(
internal val android: com.google.firebase.auth.AdditionalUserInfo,
) {
public actual val providerId: String?
get() = android.providerId
public actual val username: String?
get() = android.username
public actual val profile: Map<String, Any?>?
get() = android.profile
public actual val isNewUser: Boolean
get() = android.isNewUser
}

public val AuthTokenResult.android: com.google.firebase.auth.GetTokenResult get() = android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ public expect class FirebaseAuth {

public expect class AuthResult {
public val user: FirebaseUser?
public val credential: AuthCredential?
public val additionalUserInfo: AdditionalUserInfo?
}

public expect class AdditionalUserInfo {
public val providerId: String?
public val username: String?
public val profile: Map<String, Any?>?
public val isNewUser: Boolean
}

public expect class AuthTokenResult {
Expand Down
Loading
Loading