diff --git a/.circleci/config.yml b/.circleci/config.yml
index ecc11bc..f4e49ed 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- - image: circleci/android:api-28-alpha
+ - image: circleci/android:api-29@sha256:92328e25353eb1e6fb542ffd9a32aee5cdc5309e1732458e2c47e87538a40048
environment:
JVM_OPTS: -Xmx3200m
TZ: "/usr/share/zoneinfo/Asia/Seoul"
@@ -10,9 +10,6 @@ jobs:
- checkout
- restore_cache:
key: jars-{{ checksum "dependencies.gradle" }}
- - run:
- name: Install Build tools 28.0.0
- command: sdkmanager "build-tools;28.0.0"
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
diff --git a/coverage.gradle b/coverage.gradle
index 7523039..4d6f724 100644
--- a/coverage.gradle
+++ b/coverage.gradle
@@ -11,15 +11,15 @@ subprojects {
group = "Reporting"
description = "Generate Jacoco coverage report"
- sourceDirectories = files(["${projectDir}/src/main/java"])
- classDirectories = fileTree(
+ sourceDirectories.from = files(["${projectDir}/src/main/java"])
+ classDirectories.from = fileTree(
dir: "${buildDir}/intermediates/classes/debug",
excludes: ['**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*',
'com/android/**/*.class'])
- executionData = files("${buildDir}/jacoco/testDebugUnitTest.exec")
+ executionData.from = files("${buildDir}/jacoco/testDebugUnitTest.exec")
reports {
xml.enabled = true
@@ -62,9 +62,9 @@ task mergeCoverageReports(type: JacocoReport) {
}
}
- sourceDirectories = files(sources as String[])
- classDirectories = classDirs
- executionData = files(executions as String[])
+ sourceDirectories.from = files(sources as String[])
+ classDirectories.from = classDirs
+ executionData.from = files(executions as String[])
reports {
xml {
@@ -82,4 +82,4 @@ task mergeCoverageReports(type: JacocoReport) {
subprojects*.coverageReport
}
}
-}
\ No newline at end of file
+}
diff --git a/dependencies.gradle b/dependencies.gradle
index e3e3e76..691f712 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -1,27 +1,27 @@
ext {
// Libraries
- autoValueVersion = '1.5'
+ autoValueVersion = '1.5.3'
assertjVersion = '1.2.0'
firebaseAuthVersion = '16.1.0'
firebaseCoreVersion = '16.0.5'
firebaseDatabaseVersion = '16.0.3'
firebaseFirestoreVersion = '17.1.5'
firebaseStorageVersion = '16.0.1'
- junitVersion = '4.12'
- kotlinVersion = '1.2.61'
- mockitoVersion = "2.13.0"
+ junitVersion = '4.13'
+ kotlinVersion = '1.4.20'
+ mockitoVersion = "3.0.0"
mockitoKotlinVersion = "1.5.0"
- rxJavaVersion = '2.1.8'
+ rxJavaVersion = '3.0.8'
// Build plugins
- androidPluginVersion = '3.2.1'
- versionMatcherPluginVersion = '1.0.3'
+ androidPluginVersion = '4.1.1'
+ versionMatcherPluginVersion = '1.2.2'
// Build SDK versions
minSdkVersion = 14
- compileSdkVersion = 28
+ compileSdkVersion = 29
// CI
diff --git a/firebase-auth-kotlin/build.gradle b/firebase-auth-kotlin/build.gradle
index 3bd15c9..2b0b3d5 100644
--- a/firebase-auth-kotlin/build.gradle
+++ b/firebase-auth-kotlin/build.gradle
@@ -9,8 +9,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
@@ -38,7 +38,7 @@ dependencies {
implementation project(':firebase-auth')
compileOnly "com.google.firebase:firebase-auth:${firebaseAuthVersion}"
- compileOnly "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ compileOnly "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
}
diff --git a/firebase-auth-kotlin/src/main/AndroidManifest.xml b/firebase-auth-kotlin/src/main/AndroidManifest.xml
index 08ce6dc..5a984a7 100644
--- a/firebase-auth-kotlin/src/main/AndroidManifest.xml
+++ b/firebase-auth-kotlin/src/main/AndroidManifest.xml
@@ -1 +1 @@
-
+
diff --git a/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseAuth.kt b/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseAuth.kt
similarity index 92%
rename from firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseAuth.kt
rename to firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseAuth.kt
index 4723bb2..31f8737 100644
--- a/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseAuth.kt
+++ b/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseAuth.kt
@@ -1,15 +1,15 @@
@file:Suppress("NOTHING_TO_INLINE", "UNUSED")
-package com.androidhuman.rxfirebase2.auth
+package com.androidhuman.rxfirebase3.auth
import com.google.firebase.auth.AuthCredential
import com.google.firebase.auth.AuthResult
import com.google.firebase.auth.FirebaseAuth
import com.google.firebase.auth.FirebaseUser
-import io.reactivex.Completable
-import io.reactivex.Maybe
-import io.reactivex.Observable
-import io.reactivex.Single
+import io.reactivex.rxjava3.core.Completable
+import io.reactivex.rxjava3.core.Maybe
+import io.reactivex.rxjava3.core.Observable
+import io.reactivex.rxjava3.core.Single
inline fun FirebaseAuth.authStateChanges()
: Observable
@@ -78,4 +78,4 @@ inline fun FirebaseAuth.rxUpdateCurrentUser(user: FirebaseUser)
inline fun FirebaseAuth.rxSignOut()
: Completable
- = RxFirebaseAuth.signOut(this)
\ No newline at end of file
+ = RxFirebaseAuth.signOut(this)
diff --git a/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseUser.kt b/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseUser.kt
similarity index 93%
rename from firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseUser.kt
rename to firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseUser.kt
index dae4c84..614d3a3 100644
--- a/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseUser.kt
+++ b/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseUser.kt
@@ -1,13 +1,13 @@
@file:Suppress("NOTHING_TO_INLINE", "UNUSED")
-package com.androidhuman.rxfirebase2.auth
+package com.androidhuman.rxfirebase3.auth
import com.google.firebase.auth.AuthCredential
import com.google.firebase.auth.FirebaseUser
import com.google.firebase.auth.PhoneAuthCredential
import com.google.firebase.auth.UserProfileChangeRequest
-import io.reactivex.Completable
-import io.reactivex.Single
+import io.reactivex.rxjava3.core.Completable
+import io.reactivex.rxjava3.core.Single
inline fun FirebaseUser.rxDelete()
: Completable
diff --git a/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/auth/RxPhoneAuthProvider.kt b/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/auth/RxPhoneAuthProvider.kt
similarity index 94%
rename from firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/auth/RxPhoneAuthProvider.kt
rename to firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/auth/RxPhoneAuthProvider.kt
index 13703f2..5c0912c 100644
--- a/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/auth/RxPhoneAuthProvider.kt
+++ b/firebase-auth-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/auth/RxPhoneAuthProvider.kt
@@ -1,10 +1,10 @@
@file:Suppress("NOTHING_TO_INLINE", "UNUSED")
-package com.androidhuman.rxfirebase2.auth
+package com.androidhuman.rxfirebase3.auth
import android.app.Activity
import com.google.firebase.auth.PhoneAuthProvider
-import io.reactivex.Observable
+import io.reactivex.rxjava3.core.Observable
import java.util.concurrent.Executor
import java.util.concurrent.TimeUnit
diff --git a/firebase-auth/build.gradle b/firebase-auth/build.gradle
index 367b7d0..eafabe9 100644
--- a/firebase-auth/build.gradle
+++ b/firebase-auth/build.gradle
@@ -9,8 +9,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
@@ -43,14 +43,14 @@ dependencies {
compileOnly "com.google.auto.value:auto-value:${autoValueVersion}"
compileOnly "com.google.firebase:firebase-auth:${firebaseAuthVersion}"
- compileOnly "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ compileOnly "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
annotationProcessor "com.google.auto.value:auto-value:${autoValueVersion}"
testImplementation "com.google.firebase:firebase-auth:${firebaseAuthVersion}"
testImplementation "com.nhaarman:mockito-kotlin:${mockitoKotlinVersion}"
testImplementation "junit:junit:${junitVersion}"
- testImplementation "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ testImplementation "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
testImplementation "org.assertj:assertj-core:${assertjVersion}"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
diff --git a/firebase-auth/src/main/AndroidManifest.xml b/firebase-auth/src/main/AndroidManifest.xml
index e11f1ea..1e2ba72 100644
--- a/firebase-auth/src/main/AndroidManifest.xml
+++ b/firebase-auth/src/main/AndroidManifest.xml
@@ -1 +1 @@
-
+
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/AuthStateChangesObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/AuthStateChangesObserver.java
similarity index 81%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/AuthStateChangesObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/AuthStateChangesObserver.java
index 090c695..3fba04b 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/AuthStateChangesObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/AuthStateChangesObserver.java
@@ -1,14 +1,13 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.firebase.auth.FirebaseAuth;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Observable;
-import io.reactivex.Observer;
-
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Observer;
final class AuthStateChangesObserver extends Observable {
@@ -19,7 +18,7 @@ final class AuthStateChangesObserver extends Observable {
}
@Override
- public void subscribeActual(Observer super FirebaseAuth> observer) {
+ public void subscribeActual(@NonNull Observer super FirebaseAuth> observer) {
Listener listener = new Listener(instance, observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/CreateUserWithEmailAndPasswordObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/CreateUserWithEmailAndPasswordObserver.java
similarity index 83%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/CreateUserWithEmailAndPasswordObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/CreateUserWithEmailAndPasswordObserver.java
index 5821bea..4af0080 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/CreateUserWithEmailAndPasswordObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/CreateUserWithEmailAndPasswordObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
class CreateUserWithEmailAndPasswordObserver extends Single {
@@ -28,7 +28,7 @@ class CreateUserWithEmailAndPasswordObserver extends Single {
}
@Override
- public void subscribeActual(SingleObserver super FirebaseUser> observer) {
+ public void subscribeActual(@NonNull SingleObserver super FirebaseUser> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/FetchProvidersForEmailObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/FetchProvidersForEmailObserver.java
similarity index 84%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/FetchProvidersForEmailObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/FetchProvidersForEmailObserver.java
index 3fd5d17..820b7d6 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/FetchProvidersForEmailObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/FetchProvidersForEmailObserver.java
@@ -1,17 +1,17 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.ProviderQueryResult;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
import java.util.List;
-import io.reactivex.Maybe;
-import io.reactivex.MaybeObserver;
+import io.reactivex.rxjava3.core.Maybe;
+import io.reactivex.rxjava3.core.MaybeObserver;
@Deprecated
final class FetchProvidersForEmailObserver extends Maybe> {
@@ -26,7 +26,7 @@ final class FetchProvidersForEmailObserver extends Maybe> {
}
@Override
- protected void subscribeActual(MaybeObserver super List> observer) {
+ protected void subscribeActual(@NonNull MaybeObserver super List> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/FetchSignInMethodsForEmailObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/FetchSignInMethodsForEmailObserver.java
similarity index 85%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/FetchSignInMethodsForEmailObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/FetchSignInMethodsForEmailObserver.java
index 9ac67e7..2eb65fd 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/FetchSignInMethodsForEmailObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/FetchSignInMethodsForEmailObserver.java
@@ -1,17 +1,17 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.SignInMethodQueryResult;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
import java.util.List;
-import io.reactivex.Maybe;
-import io.reactivex.MaybeObserver;
+import io.reactivex.rxjava3.core.Maybe;
+import io.reactivex.rxjava3.core.MaybeObserver;
final class FetchSignInMethodsForEmailObserver extends Maybe> {
@@ -26,7 +26,7 @@ final class FetchSignInMethodsForEmailObserver extends Maybe> {
}
@Override
- protected void subscribeActual(MaybeObserver super List> observer) {
+ protected void subscribeActual(@NonNull MaybeObserver super List> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/GetCurrentUserObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/GetCurrentUserObserver.java
similarity index 59%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/GetCurrentUserObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/GetCurrentUserObserver.java
index 9c9adb9..3388804 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/GetCurrentUserObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/GetCurrentUserObserver.java
@@ -1,21 +1,23 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
-import io.reactivex.Maybe;
-import io.reactivex.MaybeObserver;
+import android.support.annotation.NonNull;
+
+import io.reactivex.rxjava3.core.Maybe;
+import io.reactivex.rxjava3.core.MaybeObserver;
final class GetCurrentUserObserver extends Maybe {
- private FirebaseAuth instance;
+ private final FirebaseAuth instance;
GetCurrentUserObserver(FirebaseAuth instance) {
this.instance = instance;
}
@Override
- protected void subscribeActual(MaybeObserver super FirebaseUser> observer) {
+ protected void subscribeActual(@NonNull MaybeObserver super FirebaseUser> observer) {
FirebaseUser user = instance.getCurrentUser();
if (null != user) {
observer.onSuccess(user);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/OnVerificationStateChangedDisposable.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/OnVerificationStateChangedDisposable.java
similarity index 76%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/OnVerificationStateChangedDisposable.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/OnVerificationStateChangedDisposable.java
index fd83af5..99e7481 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/OnVerificationStateChangedDisposable.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/OnVerificationStateChangedDisposable.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.firebase.auth.PhoneAuthProvider;
import java.util.concurrent.atomic.AtomicBoolean;
-import io.reactivex.disposables.Disposable;
+import io.reactivex.rxjava3.disposables.Disposable;
abstract class OnVerificationStateChangedDisposable
extends PhoneAuthProvider.OnVerificationStateChangedCallbacks implements Disposable {
- private AtomicBoolean unsubscribed = new AtomicBoolean();
+ private final AtomicBoolean unsubscribed = new AtomicBoolean();
@Override
public boolean isDisposed() {
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthCodeAutoRetrievalTimeOutEvent.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthCodeAutoRetrievalTimeOutEvent.java
similarity index 92%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthCodeAutoRetrievalTimeOutEvent.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthCodeAutoRetrievalTimeOutEvent.java
index 59ad46a..89d5b15 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthCodeAutoRetrievalTimeOutEvent.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthCodeAutoRetrievalTimeOutEvent.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.auto.value.AutoValue;
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthCodeSentEvent.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthCodeSentEvent.java
similarity index 93%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthCodeSentEvent.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthCodeSentEvent.java
index af71edb..f360cf0 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthCodeSentEvent.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthCodeSentEvent.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.auto.value.AutoValue;
import com.google.firebase.auth.PhoneAuthProvider;
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthEvent.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthEvent.java
similarity index 62%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthEvent.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthEvent.java
index a5b1e92..3ff5c0e 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthEvent.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthEvent.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
public abstract class PhoneAuthEvent {
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthProviderVerifyPhoneNumberActivityObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthProviderVerifyPhoneNumberActivityObserver.java
similarity index 93%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthProviderVerifyPhoneNumberActivityObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthProviderVerifyPhoneNumberActivityObserver.java
index c597df6..f6b74ef 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthProviderVerifyPhoneNumberActivityObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthProviderVerifyPhoneNumberActivityObserver.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.firebase.FirebaseException;
import com.google.firebase.auth.PhoneAuthCredential;
@@ -10,8 +10,8 @@
import java.util.concurrent.TimeUnit;
-import io.reactivex.Observable;
-import io.reactivex.Observer;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Observer;
public final class PhoneAuthProviderVerifyPhoneNumberActivityObserver
extends Observable {
@@ -42,7 +42,7 @@ public final class PhoneAuthProviderVerifyPhoneNumberActivityObserver
}
@Override
- protected void subscribeActual(Observer super PhoneAuthEvent> observer) {
+ protected void subscribeActual(@NonNull Observer super PhoneAuthEvent> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthProviderVerifyPhoneNumberExecutorObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthProviderVerifyPhoneNumberExecutorObserver.java
similarity index 93%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthProviderVerifyPhoneNumberExecutorObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthProviderVerifyPhoneNumberExecutorObserver.java
index f7d439d..60404fd 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthProviderVerifyPhoneNumberExecutorObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthProviderVerifyPhoneNumberExecutorObserver.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.firebase.FirebaseException;
import com.google.firebase.auth.PhoneAuthCredential;
@@ -10,8 +10,8 @@
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
-import io.reactivex.Observable;
-import io.reactivex.Observer;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Observer;
public final class PhoneAuthProviderVerifyPhoneNumberExecutorObserver
extends Observable {
@@ -42,7 +42,7 @@ public final class PhoneAuthProviderVerifyPhoneNumberExecutorObserver
}
@Override
- protected void subscribeActual(Observer super PhoneAuthEvent> observer) {
+ protected void subscribeActual(@NonNull Observer super PhoneAuthEvent> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthVerificationCompleteEvent.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthVerificationCompleteEvent.java
similarity index 93%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthVerificationCompleteEvent.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthVerificationCompleteEvent.java
index 43318d3..4ce020f 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/PhoneAuthVerificationCompleteEvent.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/PhoneAuthVerificationCompleteEvent.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.auto.value.AutoValue;
import com.google.firebase.auth.PhoneAuthCredential;
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/RxFirebaseAuth.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/RxFirebaseAuth.java
similarity index 94%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/RxFirebaseAuth.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/RxFirebaseAuth.java
index ec3dc7b..6466cc0 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/RxFirebaseAuth.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/RxFirebaseAuth.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.AuthResult;
@@ -10,12 +10,11 @@
import java.util.List;
-import io.reactivex.Completable;
-import io.reactivex.Maybe;
-import io.reactivex.Observable;
-import io.reactivex.Single;
-import io.reactivex.functions.Function;
-
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.Maybe;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.functions.Function;
public final class RxFirebaseAuth {
@@ -96,7 +95,7 @@ public static Single signInAnonymously(
return new SignInAnonymouslyObserver(instance)
.map(new Function() {
@Override
- public FirebaseUser apply(AuthResult authResult) throws Exception {
+ public FirebaseUser apply(AuthResult authResult) {
return authResult.getUser();
}
});
@@ -109,7 +108,7 @@ public static Single signInWithCredential(
return new SignInWithCredentialObserver(instance, credential)
.map(new Function() {
@Override
- public FirebaseUser apply(AuthResult authResult) throws Exception {
+ public FirebaseUser apply(AuthResult authResult) {
return authResult.getUser();
}
});
@@ -122,7 +121,7 @@ public static Single signInWithCustomToken(
return new SignInWithCustomTokenObserver(instance, token)
.map(new Function() {
@Override
- public FirebaseUser apply(AuthResult authResult) throws Exception {
+ public FirebaseUser apply(AuthResult authResult) {
return authResult.getUser();
}
});
@@ -135,7 +134,7 @@ public static Single signInWithEmailAndPassword(
return new SignInWithEmailAndPasswordObserver(instance, email, password)
.map(new Function() {
@Override
- public FirebaseUser apply(AuthResult authResult) throws Exception {
+ public FirebaseUser apply(AuthResult authResult) {
return authResult.getUser();
}
});
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/RxFirebaseUser.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/RxFirebaseUser.java
similarity index 95%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/RxFirebaseUser.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/RxFirebaseUser.java
index ae02d95..11d667b 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/RxFirebaseUser.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/RxFirebaseUser.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.FirebaseUser;
@@ -8,9 +8,8 @@
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.Single;
-
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.Single;
public final class RxFirebaseUser {
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/RxPhoneAuthProvider.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/RxPhoneAuthProvider.java
similarity index 95%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/RxPhoneAuthProvider.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/RxPhoneAuthProvider.java
index 61c2011..77df86b 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/RxPhoneAuthProvider.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/RxPhoneAuthProvider.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.firebase.auth.PhoneAuthProvider;
@@ -10,7 +10,7 @@
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
-import io.reactivex.Observable;
+import io.reactivex.rxjava3.core.Observable;
public final class RxPhoneAuthProvider {
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SendPasswordResetEmailObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SendPasswordResetEmailObserver.java
similarity index 80%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SendPasswordResetEmailObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SendPasswordResetEmailObserver.java
index d04048e..7ec6fea 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SendPasswordResetEmailObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SendPasswordResetEmailObserver.java
@@ -1,14 +1,14 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class SendPasswordResetEmailObserver extends Completable {
@@ -22,7 +22,7 @@ final class SendPasswordResetEmailObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInAnonymouslyObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInAnonymouslyObserver.java
similarity index 75%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInAnonymouslyObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInAnonymouslyObserver.java
index 9df0457..236bbcc 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInAnonymouslyObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInAnonymouslyObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class SignInAnonymouslyObserver extends Single {
@@ -20,7 +20,7 @@ final class SignInAnonymouslyObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super AuthResult> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super AuthResult> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -28,7 +28,7 @@ protected void subscribeActual(SingleObserver super AuthResult> observer) {
.addOnCompleteListener(listener);
}
- private final class Listener extends OnCompleteDisposable {
+ private static final class Listener extends OnCompleteDisposable {
private final SingleObserver super AuthResult> observer;
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithCredentialObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithCredentialObserver.java
similarity index 77%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithCredentialObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithCredentialObserver.java
index 6195168..ee4c6d0 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithCredentialObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithCredentialObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class SignInWithCredentialObserver extends Single {
@@ -24,7 +24,7 @@ final class SignInWithCredentialObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super AuthResult> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super AuthResult> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -32,7 +32,7 @@ protected void subscribeActual(SingleObserver super AuthResult> observer) {
.addOnCompleteListener(listener);
}
- private final class Listener extends OnCompleteDisposable {
+ private static final class Listener extends OnCompleteDisposable {
private final SingleObserver super AuthResult> observer;
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithCustomTokenObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithCustomTokenObserver.java
similarity index 76%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithCustomTokenObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithCustomTokenObserver.java
index 8ba8813..40c450e 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithCustomTokenObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithCustomTokenObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class SignInWithCustomTokenObserver extends Single {
@@ -23,7 +23,7 @@ final class SignInWithCustomTokenObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super AuthResult> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super AuthResult> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -31,7 +31,7 @@ protected void subscribeActual(SingleObserver super AuthResult> observer) {
.addOnCompleteListener(listener);
}
- private final class Listener extends OnCompleteDisposable {
+ private static final class Listener extends OnCompleteDisposable {
private final SingleObserver super AuthResult> observer;
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithEmailAndPasswordObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithEmailAndPasswordObserver.java
similarity index 78%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithEmailAndPasswordObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithEmailAndPasswordObserver.java
index 8de61ff..babc5e8 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithEmailAndPasswordObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithEmailAndPasswordObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class SignInWithEmailAndPasswordObserver extends Single {
@@ -26,7 +26,7 @@ final class SignInWithEmailAndPasswordObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super AuthResult> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super AuthResult> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -34,7 +34,7 @@ protected void subscribeActual(SingleObserver super AuthResult> observer) {
.addOnCompleteListener(listener);
}
- private final class Listener extends OnCompleteDisposable {
+ private static final class Listener extends OnCompleteDisposable {
private final SingleObserver super AuthResult> observer;
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithEmailLinkObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithEmailLinkObserver.java
similarity index 82%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithEmailLinkObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithEmailLinkObserver.java
index 5844b3c..b2a0008 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignInWithEmailLinkObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignInWithEmailLinkObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class SignInWithEmailLinkObserver extends Single {
@@ -26,7 +26,7 @@ final class SignInWithEmailLinkObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super AuthResult> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super AuthResult> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignOutObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignOutObserver.java
similarity index 72%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignOutObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignOutObserver.java
index 93251fb..883d005 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/SignOutObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/SignOutObserver.java
@@ -1,9 +1,9 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.firebase.auth.FirebaseAuth;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class SignOutObserver extends Completable {
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UpdateCurrentUserObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UpdateCurrentUserObserver.java
similarity index 81%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UpdateCurrentUserObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UpdateCurrentUserObserver.java
index 3eec8cc..efc77ef 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UpdateCurrentUserObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UpdateCurrentUserObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UpdateCurrentUserObserver extends Completable {
@@ -24,7 +24,7 @@ final class UpdateCurrentUserObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserDeleteObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserDeleteObserver.java
similarity index 78%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserDeleteObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserDeleteObserver.java
index c6ac8be..16fd0dc 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserDeleteObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserDeleteObserver.java
@@ -1,15 +1,14 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
-
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UserDeleteObserver extends Completable {
@@ -20,7 +19,7 @@ final class UserDeleteObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserGetIdTokenObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserGetIdTokenObserver.java
similarity index 81%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserGetIdTokenObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserGetIdTokenObserver.java
index f8290a4..0a8543a 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserGetIdTokenObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserGetIdTokenObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.GetTokenResult;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class UserGetIdTokenObserver extends Single {
@@ -23,7 +23,7 @@ final class UserGetIdTokenObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super String> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super String> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserLinkWithCredentialObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserLinkWithCredentialObserver.java
similarity index 82%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserLinkWithCredentialObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserLinkWithCredentialObserver.java
index 930c4a9..25ac019 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserLinkWithCredentialObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserLinkWithCredentialObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class UserLinkWithCredentialObserver extends Single {
@@ -24,7 +24,7 @@ final class UserLinkWithCredentialObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super FirebaseUser> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super FirebaseUser> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserReauthenticateObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserReauthenticateObserver.java
similarity index 81%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserReauthenticateObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserReauthenticateObserver.java
index 455c6ca..574d3f1 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserReauthenticateObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserReauthenticateObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UserReauthenticateObserver extends Completable {
@@ -23,7 +23,7 @@ final class UserReauthenticateObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserReloadObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserReloadObserver.java
similarity index 78%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserReloadObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserReloadObserver.java
index e579e4f..d280501 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserReloadObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserReloadObserver.java
@@ -1,14 +1,14 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UserReloadObserver extends Completable {
@@ -19,7 +19,7 @@ final class UserReloadObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserSendEmailVerificationObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserSendEmailVerificationObserver.java
similarity index 79%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserSendEmailVerificationObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserSendEmailVerificationObserver.java
index 6d56149..e402354 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserSendEmailVerificationObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserSendEmailVerificationObserver.java
@@ -1,14 +1,14 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UserSendEmailVerificationObserver extends Completable {
@@ -19,7 +19,7 @@ final class UserSendEmailVerificationObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUnlinkObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUnlinkObserver.java
similarity index 75%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUnlinkObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUnlinkObserver.java
index ee310f2..3f9a13a 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUnlinkObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUnlinkObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class UserUnlinkObserver extends Single {
@@ -23,7 +23,7 @@ final class UserUnlinkObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super FirebaseUser> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super FirebaseUser> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -31,7 +31,7 @@ protected void subscribeActual(SingleObserver super FirebaseUser> observer) {
.addOnCompleteListener(listener);
}
- private final class Listener extends OnCompleteDisposable {
+ private static final class Listener extends OnCompleteDisposable {
private final SingleObserver super FirebaseUser> observer;
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdateEmailObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdateEmailObserver.java
similarity index 80%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdateEmailObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdateEmailObserver.java
index 2af0e06..cc9bd2c 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdateEmailObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdateEmailObserver.java
@@ -1,14 +1,14 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UserUpdateEmailObserver extends Completable {
@@ -22,7 +22,7 @@ final class UserUpdateEmailObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdatePasswordObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdatePasswordObserver.java
similarity index 80%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdatePasswordObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdatePasswordObserver.java
index e8fc350..b31c11a 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdatePasswordObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdatePasswordObserver.java
@@ -1,14 +1,14 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseUser;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UserUpdatePasswordObserver extends Completable {
@@ -22,7 +22,7 @@ final class UserUpdatePasswordObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdatePhoneNumberObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdatePhoneNumberObserver.java
similarity index 81%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdatePhoneNumberObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdatePhoneNumberObserver.java
index 3191e40..61a5db9 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdatePhoneNumberObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdatePhoneNumberObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.PhoneAuthCredential;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UserUpdatePhoneNumberObserver extends Completable {
@@ -23,7 +23,7 @@ final class UserUpdatePhoneNumberObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdateProfileObserver.java b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdateProfileObserver.java
similarity index 81%
rename from firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdateProfileObserver.java
rename to firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdateProfileObserver.java
index d727f8c..58e0ac8 100644
--- a/firebase-auth/src/main/java/com/androidhuman/rxfirebase2/auth/UserUpdateProfileObserver.java
+++ b/firebase-auth/src/main/java/com/androidhuman/rxfirebase3/auth/UserUpdateProfileObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.auth;
+package com.androidhuman.rxfirebase3.auth;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.UserProfileChangeRequest;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UserUpdateProfileObserver extends Completable {
@@ -23,7 +23,7 @@ final class UserUpdateProfileObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseAuthTest.kt b/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseAuthTest.kt
similarity index 99%
rename from firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseAuthTest.kt
rename to firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseAuthTest.kt
index dbb247f..cb16ad3 100644
--- a/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseAuthTest.kt
+++ b/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseAuthTest.kt
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth
+package com.androidhuman.rxfirebase3.auth
import com.google.android.gms.tasks.OnCompleteListener
import com.google.android.gms.tasks.Task
@@ -13,7 +13,7 @@ import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.times
import com.nhaarman.mockito_kotlin.verify
import com.nhaarman.mockito_kotlin.whenever
-import io.reactivex.observers.TestObserver
+import io.reactivex.rxjava3.observers.TestObserver
import org.assertj.core.api.Assertions.assertThat
import org.junit.Before
import org.junit.Test
diff --git a/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseUserTest.kt b/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseUserTest.kt
similarity index 99%
rename from firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseUserTest.kt
rename to firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseUserTest.kt
index b67b599..625a77f 100644
--- a/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/RxFirebaseUserTest.kt
+++ b/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/RxFirebaseUserTest.kt
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth
+package com.androidhuman.rxfirebase3.auth
import com.google.android.gms.tasks.OnCompleteListener
import com.google.android.gms.tasks.Task
@@ -13,7 +13,7 @@ import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.times
import com.nhaarman.mockito_kotlin.verify
import com.nhaarman.mockito_kotlin.whenever
-import io.reactivex.observers.TestObserver
+import io.reactivex.rxjava3.observers.TestObserver
import org.junit.Before
import org.junit.Test
import org.mockito.Mock
@@ -666,4 +666,4 @@ class RxFirebaseUserTest {
verify(this, times(1))
.addOnCompleteListener(onVoidCompleteListener.capture())
}
-}
\ No newline at end of file
+}
diff --git a/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/RxPhoneAuthProviderTest.kt b/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/RxPhoneAuthProviderTest.kt
similarity index 99%
rename from firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/RxPhoneAuthProviderTest.kt
rename to firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/RxPhoneAuthProviderTest.kt
index ff4d4b9..b4cac62 100644
--- a/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/RxPhoneAuthProviderTest.kt
+++ b/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/RxPhoneAuthProviderTest.kt
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth
+package com.androidhuman.rxfirebase3.auth
import android.app.Activity
import com.google.firebase.FirebaseException
@@ -9,7 +9,7 @@ import com.nhaarman.mockito_kotlin.eq
import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.times
import com.nhaarman.mockito_kotlin.verify
-import io.reactivex.observers.TestObserver
+import io.reactivex.rxjava3.observers.TestObserver
import org.junit.Before
import org.junit.Test
import org.mockito.Mock
@@ -290,4 +290,4 @@ class RxPhoneAuthProviderTest {
dispose()
}
}
-}
\ No newline at end of file
+}
diff --git a/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/mockutils.kt b/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/mockutils.kt
similarity index 98%
rename from firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/mockutils.kt
rename to firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/mockutils.kt
index 97ae79a..794314b 100644
--- a/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase2/auth/mockutils.kt
+++ b/firebase-auth/src/test/kotlin/com/androidhuman/rxfirebase3/auth/mockutils.kt
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.auth
+package com.androidhuman.rxfirebase3.auth
import com.google.android.gms.tasks.Task
import com.google.firebase.auth.AuthResult
diff --git a/firebase-core/build.gradle b/firebase-core/build.gradle
index 693515d..63fadb2 100644
--- a/firebase-core/build.gradle
+++ b/firebase-core/build.gradle
@@ -9,8 +9,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
@@ -37,12 +37,12 @@ android {
dependencies {
compileOnly "com.google.firebase:firebase-core:${firebaseCoreVersion}"
- compileOnly "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ compileOnly "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
testImplementation "com.google.firebase:firebase-core:${firebaseCoreVersion}"
testImplementation "junit:junit:${junitVersion}"
- testImplementation "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ testImplementation "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
testImplementation "org.assertj:assertj-core:${assertjVersion}"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
}
diff --git a/firebase-core/src/main/AndroidManifest.xml b/firebase-core/src/main/AndroidManifest.xml
index ee40a75..c127aed 100644
--- a/firebase-core/src/main/AndroidManifest.xml
+++ b/firebase-core/src/main/AndroidManifest.xml
@@ -1 +1 @@
-
+
diff --git a/firebase-core/src/main/kotlin/com/androidhuman/rxfirebase2/core/OnCompleteDisposable.kt b/firebase-core/src/main/kotlin/com/androidhuman/rxfirebase3/core/OnCompleteDisposable.kt
similarity index 82%
rename from firebase-core/src/main/kotlin/com/androidhuman/rxfirebase2/core/OnCompleteDisposable.kt
rename to firebase-core/src/main/kotlin/com/androidhuman/rxfirebase3/core/OnCompleteDisposable.kt
index aa5f47a..5059cfa 100644
--- a/firebase-core/src/main/kotlin/com/androidhuman/rxfirebase2/core/OnCompleteDisposable.kt
+++ b/firebase-core/src/main/kotlin/com/androidhuman/rxfirebase3/core/OnCompleteDisposable.kt
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.core
+package com.androidhuman.rxfirebase3.core
import com.google.android.gms.tasks.OnCompleteListener
@@ -7,4 +7,4 @@ abstract class OnCompleteDisposable : SimpleDisposable(), OnCompleteListener<
override fun onDispose() {
// do nothing
}
-}
\ No newline at end of file
+}
diff --git a/firebase-core/src/main/kotlin/com/androidhuman/rxfirebase2/core/SimpleDisposable.kt b/firebase-core/src/main/kotlin/com/androidhuman/rxfirebase3/core/SimpleDisposable.kt
similarity index 79%
rename from firebase-core/src/main/kotlin/com/androidhuman/rxfirebase2/core/SimpleDisposable.kt
rename to firebase-core/src/main/kotlin/com/androidhuman/rxfirebase3/core/SimpleDisposable.kt
index 5e5bd82..f3c6703 100644
--- a/firebase-core/src/main/kotlin/com/androidhuman/rxfirebase2/core/SimpleDisposable.kt
+++ b/firebase-core/src/main/kotlin/com/androidhuman/rxfirebase3/core/SimpleDisposable.kt
@@ -1,6 +1,6 @@
-package com.androidhuman.rxfirebase2.core
+package com.androidhuman.rxfirebase3.core
-import io.reactivex.disposables.Disposable
+import io.reactivex.rxjava3.disposables.Disposable
import java.util.concurrent.atomic.AtomicBoolean
abstract class SimpleDisposable : Disposable {
diff --git a/firebase-core/src/test/kotlin/com/androidhuman/rxfirebase2/core/SimpleDisposableTest.kt b/firebase-core/src/test/kotlin/com/androidhuman/rxfirebase3/core/SimpleDisposableTest.kt
similarity index 95%
rename from firebase-core/src/test/kotlin/com/androidhuman/rxfirebase2/core/SimpleDisposableTest.kt
rename to firebase-core/src/test/kotlin/com/androidhuman/rxfirebase3/core/SimpleDisposableTest.kt
index e720624..d344a55 100644
--- a/firebase-core/src/test/kotlin/com/androidhuman/rxfirebase2/core/SimpleDisposableTest.kt
+++ b/firebase-core/src/test/kotlin/com/androidhuman/rxfirebase3/core/SimpleDisposableTest.kt
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.core
+package com.androidhuman.rxfirebase3.core
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
@@ -35,4 +35,4 @@ class SimpleDisposableTest {
assertThat(called.get()).isEqualTo(1)
}
-}
\ No newline at end of file
+}
diff --git a/firebase-database-kotlin/build.gradle b/firebase-database-kotlin/build.gradle
index 2f871b0..a34582b 100644
--- a/firebase-database-kotlin/build.gradle
+++ b/firebase-database-kotlin/build.gradle
@@ -9,8 +9,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
@@ -38,7 +38,7 @@ dependencies {
implementation project(':firebase-database')
compileOnly "com.google.firebase:firebase-database:${firebaseDatabaseVersion}"
- compileOnly "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ compileOnly "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
}
diff --git a/firebase-database-kotlin/src/main/AndroidManifest.xml b/firebase-database-kotlin/src/main/AndroidManifest.xml
index b2f2d04..38d08b1 100644
--- a/firebase-database-kotlin/src/main/AndroidManifest.xml
+++ b/firebase-database-kotlin/src/main/AndroidManifest.xml
@@ -1 +1 @@
-
+
diff --git a/firebase-database-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/database/RxFirebaseDatabase.kt b/firebase-database-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/database/RxFirebaseDatabase.kt
similarity index 93%
rename from firebase-database-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/database/RxFirebaseDatabase.kt
rename to firebase-database-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/database/RxFirebaseDatabase.kt
index 6d66ca3..2c01a85 100644
--- a/firebase-database-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/database/RxFirebaseDatabase.kt
+++ b/firebase-database-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/database/RxFirebaseDatabase.kt
@@ -1,19 +1,19 @@
@file:Suppress("NOTHING_TO_INLINE", "UNUSED")
-package com.androidhuman.rxfirebase2.database
+package com.androidhuman.rxfirebase3.database
-import com.androidhuman.rxfirebase2.database.model.DataValue
+import com.androidhuman.rxfirebase3.database.model.DataValue
import com.google.firebase.database.DataSnapshot
import com.google.firebase.database.DatabaseReference
import com.google.firebase.database.GenericTypeIndicator
import com.google.firebase.database.MutableData
import com.google.firebase.database.Query
import com.google.firebase.database.Transaction
-import io.reactivex.BackpressureStrategy
-import io.reactivex.Completable
-import io.reactivex.Flowable
-import io.reactivex.Observable
-import io.reactivex.Single
+import io.reactivex.rxjava3.core.BackpressureStrategy
+import io.reactivex.rxjava3.core.Completable
+import io.reactivex.rxjava3.core.Flowable
+import io.reactivex.rxjava3.core.Observable
+import io.reactivex.rxjava3.core.Single
inline fun DatabaseReference.childEvents()
: Observable
diff --git a/firebase-database/build.gradle b/firebase-database/build.gradle
index e8e7d46..258c463 100644
--- a/firebase-database/build.gradle
+++ b/firebase-database/build.gradle
@@ -9,8 +9,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
@@ -39,14 +39,14 @@ dependencies {
compileOnly "com.google.auto.value:auto-value:${autoValueVersion}"
compileOnly "com.google.firebase:firebase-database:${firebaseDatabaseVersion}"
- compileOnly "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ compileOnly "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
annotationProcessor "com.google.auto.value:auto-value:${autoValueVersion}"
testImplementation "com.google.firebase:firebase-database:${firebaseDatabaseVersion}"
testImplementation "com.nhaarman:mockito-kotlin:${mockitoKotlinVersion}"
testImplementation "junit:junit:${junitVersion}"
- testImplementation "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ testImplementation "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
testImplementation "org.assertj:assertj-core:${assertjVersion}"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
diff --git a/firebase-database/src/main/AndroidManifest.xml b/firebase-database/src/main/AndroidManifest.xml
index fc917dd..de6b649 100644
--- a/firebase-database/src/main/AndroidManifest.xml
+++ b/firebase-database/src/main/AndroidManifest.xml
@@ -1 +1 @@
-
+
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildAddEvent.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildAddEvent.java
similarity index 92%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildAddEvent.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildAddEvent.java
index 84c239b..ba1b3a7 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildAddEvent.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildAddEvent.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.auto.value.AutoValue;
import com.google.firebase.database.DataSnapshot;
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildChangeEvent.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildChangeEvent.java
similarity index 92%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildChangeEvent.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildChangeEvent.java
index 4ae6120..2d6fd0e 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildChangeEvent.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildChangeEvent.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.auto.value.AutoValue;
import com.google.firebase.database.DataSnapshot;
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildEvent.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildEvent.java
similarity index 82%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildEvent.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildEvent.java
index 8478a05..5b068f8 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildEvent.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildEvent.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DataSnapshot;
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildEventsObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildEventsObserver.java
similarity index 68%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildEventsObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildEventsObserver.java
index 9d7e04a..4f18f0d 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildEventsObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildEventsObserver.java
@@ -1,27 +1,27 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.ChildEventListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Observable;
-import io.reactivex.Observer;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Observer;
final class ChildEventsObserver extends Observable {
- private DatabaseReference instance;
+ private final DatabaseReference instance;
ChildEventsObserver(DatabaseReference instance) {
this.instance = instance;
}
@Override
- protected void subscribeActual(Observer super ChildEvent> observer) {
+ protected void subscribeActual(@NonNull final Observer super ChildEvent> observer) {
Listener listener = new Listener(instance, observer);
observer.onSubscribe(listener);
@@ -41,35 +41,38 @@ static final class Listener extends SimpleDisposable implements ChildEventListen
}
@Override
- public void onChildAdded(DataSnapshot dataSnapshot, String previousChildName) {
+ public void onChildAdded(@NonNull final DataSnapshot dataSnapshot,
+ String previousChildName) {
if (!isDisposed()) {
observer.onNext(ChildAddEvent.create(dataSnapshot, previousChildName));
}
}
@Override
- public void onChildChanged(DataSnapshot dataSnapshot, String previousChildName) {
+ public void onChildChanged(@NonNull final DataSnapshot dataSnapshot,
+ String previousChildName) {
if (!isDisposed()) {
observer.onNext(ChildChangeEvent.create(dataSnapshot, previousChildName));
}
}
@Override
- public void onChildRemoved(DataSnapshot dataSnapshot) {
+ public void onChildRemoved(@NonNull final DataSnapshot dataSnapshot) {
if (!isDisposed()) {
observer.onNext(ChildRemoveEvent.create(dataSnapshot));
}
}
@Override
- public void onChildMoved(DataSnapshot dataSnapshot, String previousChildName) {
+ public void onChildMoved(@NonNull final DataSnapshot dataSnapshot,
+ String previousChildName) {
if (!isDisposed()) {
observer.onNext(ChildMoveEvent.create(dataSnapshot, previousChildName));
}
}
@Override
- public void onCancelled(DatabaseError databaseError) {
+ public void onCancelled(@NonNull final DatabaseError databaseError) {
if (!isDisposed()) {
observer.onError(databaseError.toException());
}
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildMoveEvent.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildMoveEvent.java
similarity index 92%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildMoveEvent.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildMoveEvent.java
index 9b3b8f4..d905ebb 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildMoveEvent.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildMoveEvent.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.auto.value.AutoValue;
import com.google.firebase.database.DataSnapshot;
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildRemoveEvent.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildRemoveEvent.java
similarity index 90%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildRemoveEvent.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildRemoveEvent.java
index 4f793be..412b193 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/ChildRemoveEvent.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/ChildRemoveEvent.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.auto.value.AutoValue;
import com.google.firebase.database.DataSnapshot;
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/DataChangesObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/DataChangesObserver.java
similarity index 67%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/DataChangesObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/DataChangesObserver.java
index bb1c6a4..46836ac 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/DataChangesObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/DataChangesObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.ValueEventListener;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Observable;
-import io.reactivex.Observer;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Observer;
final class DataChangesObserver extends Observable {
@@ -21,34 +21,34 @@ final class DataChangesObserver extends Observable {
}
@Override
- protected void subscribeActual(Observer super DataSnapshot> observer) {
+ protected void subscribeActual(@NonNull final Observer super DataSnapshot> observer) {
Listener listener = new Listener(instance, observer);
observer.onSubscribe(listener);
instance.addValueEventListener(listener);
}
- private final class Listener extends SimpleDisposable implements ValueEventListener {
+ private static final class Listener extends SimpleDisposable implements ValueEventListener {
private final DatabaseReference ref;
private final Observer super DataSnapshot> observer;
Listener(@NonNull DatabaseReference ref,
- @NonNull Observer super DataSnapshot> observer) {
+ @NonNull Observer super DataSnapshot> observer) {
this.ref = ref;
this.observer = observer;
}
@Override
- public void onDataChange(DataSnapshot dataSnapshot) {
+ public void onDataChange(@NonNull final DataSnapshot dataSnapshot) {
if (!isDisposed()) {
observer.onNext(dataSnapshot);
}
}
@Override
- public void onCancelled(DatabaseError databaseError) {
+ public void onCancelled(@NonNull final DatabaseError databaseError) {
if (!isDisposed()) {
observer.onError(databaseError.toException());
}
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/DataObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/DataObserver.java
similarity index 75%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/DataObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/DataObserver.java
index 25461e5..35818e4 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/DataObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/DataObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.ValueEventListener;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class DataObserver extends Single {
@@ -21,7 +21,7 @@ final class DataObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super DataSnapshot> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super DataSnapshot> observer) {
Listener listener = new Listener(instance, observer);
observer.onSubscribe(listener);
@@ -41,14 +41,14 @@ static final class Listener extends SimpleDisposable implements ValueEventListen
}
@Override
- public void onDataChange(DataSnapshot dataSnapshot) {
+ public void onDataChange(@NonNull final DataSnapshot dataSnapshot) {
if (!isDisposed()) {
observer.onSuccess(dataSnapshot);
}
}
@Override
- public void onCancelled(DatabaseError databaseError) {
+ public void onCancelled(@NonNull final DatabaseError databaseError) {
if (!isDisposed()) {
observer.onError(databaseError.toException());
}
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/QueryChangesObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/QueryChangesObserver.java
similarity index 75%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/QueryChangesObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/QueryChangesObserver.java
index 2127dc0..76585b0 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/QueryChangesObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/QueryChangesObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.Query;
import com.google.firebase.database.ValueEventListener;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Observable;
-import io.reactivex.Observer;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Observer;
final class QueryChangesObserver extends Observable {
@@ -21,7 +21,7 @@ final class QueryChangesObserver extends Observable {
}
@Override
- protected void subscribeActual(Observer super DataSnapshot> observer) {
+ protected void subscribeActual(@NonNull final Observer super DataSnapshot> observer) {
Listener listener = new Listener(instance, observer);
observer.onSubscribe(listener);
@@ -40,14 +40,14 @@ static final class Listener extends SimpleDisposable implements ValueEventListen
}
@Override
- public void onDataChange(DataSnapshot dataSnapshot) {
+ public void onDataChange(@NonNull final DataSnapshot dataSnapshot) {
if (!isDisposed()) {
observer.onNext(dataSnapshot);
}
}
@Override
- public void onCancelled(DatabaseError databaseError) {
+ public void onCancelled(@NonNull final DatabaseError databaseError) {
if (!isDisposed()) {
observer.onError(databaseError.toException());
}
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/QueryChildEventsObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/QueryChildEventsObserver.java
similarity index 68%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/QueryChildEventsObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/QueryChildEventsObserver.java
index 29f6aa3..c94db5e 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/QueryChildEventsObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/QueryChildEventsObserver.java
@@ -1,27 +1,27 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.ChildEventListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.Query;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Observable;
-import io.reactivex.Observer;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Observer;
final class QueryChildEventsObserver extends Observable {
- private Query instance;
+ private final Query instance;
QueryChildEventsObserver(Query instance) {
this.instance = instance;
}
@Override
- protected void subscribeActual(Observer super ChildEvent> observer) {
+ protected void subscribeActual(@NonNull final Observer super ChildEvent> observer) {
Listener listener = new Listener(instance, observer);
observer.onSubscribe(listener);
@@ -41,35 +41,38 @@ static final class Listener extends SimpleDisposable implements ChildEventListen
}
@Override
- public void onChildAdded(DataSnapshot dataSnapshot, String previousChildName) {
+ public void onChildAdded(@NonNull final DataSnapshot dataSnapshot,
+ String previousChildName) {
if (!isDisposed()) {
observer.onNext(ChildAddEvent.create(dataSnapshot, previousChildName));
}
}
@Override
- public void onChildChanged(DataSnapshot dataSnapshot, String previousChildName) {
+ public void onChildChanged(@NonNull final DataSnapshot dataSnapshot,
+ String previousChildName) {
if (!isDisposed()) {
observer.onNext(ChildChangeEvent.create(dataSnapshot, previousChildName));
}
}
@Override
- public void onChildRemoved(DataSnapshot dataSnapshot) {
+ public void onChildRemoved(@NonNull final DataSnapshot dataSnapshot) {
if (!isDisposed()) {
observer.onNext(ChildRemoveEvent.create(dataSnapshot));
}
}
@Override
- public void onChildMoved(DataSnapshot dataSnapshot, String previousChildName) {
+ public void onChildMoved(@NonNull final DataSnapshot dataSnapshot,
+ String previousChildName) {
if (!isDisposed()) {
observer.onNext(ChildMoveEvent.create(dataSnapshot, previousChildName));
}
}
@Override
- public void onCancelled(DatabaseError databaseError) {
+ public void onCancelled(@NonNull final DatabaseError databaseError) {
if (!isDisposed()) {
observer.onError(databaseError.toException());
}
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/QueryObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/QueryObserver.java
similarity index 75%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/QueryObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/QueryObserver.java
index 424ce65..8ba35fb 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/QueryObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/QueryObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.Query;
import com.google.firebase.database.ValueEventListener;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class QueryObserver extends Single {
@@ -21,7 +21,7 @@ final class QueryObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super DataSnapshot> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super DataSnapshot> observer) {
Listener listener = new Listener(instance, observer);
observer.onSubscribe(listener);
@@ -40,14 +40,14 @@ static final class Listener extends SimpleDisposable implements ValueEventListen
}
@Override
- public void onDataChange(DataSnapshot dataSnapshot) {
+ public void onDataChange(@NonNull final DataSnapshot dataSnapshot) {
if (!isDisposed()) {
observer.onSuccess(dataSnapshot);
}
}
@Override
- public void onCancelled(DatabaseError databaseError) {
+ public void onCancelled(@NonNull final DatabaseError databaseError) {
if (!isDisposed()) {
observer.onError(databaseError.toException());
}
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/RemoveValueObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/RemoveValueObserver.java
similarity index 70%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/RemoveValueObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/RemoveValueObserver.java
index 03cfff2..36c4c16 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/RemoveValueObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/RemoveValueObserver.java
@@ -1,14 +1,15 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class RemoveValueObserver extends Completable {
@@ -19,7 +20,7 @@ final class RemoveValueObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -36,7 +37,8 @@ static final class Listener extends SimpleDisposable
}
@Override
- public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {
+ public void onComplete(@Nullable final DatabaseError databaseError,
+ @NonNull final DatabaseReference databaseReference) {
if (!isDisposed()) {
if (null != databaseError) {
observer.onError(databaseError.toException());
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/RunTransactionObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/RunTransactionObserver.java
similarity index 78%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/RunTransactionObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/RunTransactionObserver.java
index 5af32b8..1de7743 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/RunTransactionObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/RunTransactionObserver.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
@@ -6,13 +6,13 @@
import com.google.firebase.database.MutableData;
import com.google.firebase.database.Transaction;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
-import io.reactivex.functions.Function;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
+import io.reactivex.rxjava3.functions.Function;
final class RunTransactionObserver extends Completable {
@@ -20,7 +20,7 @@ final class RunTransactionObserver extends Completable {
private final boolean fireLocalEvents;
- private Function task;
+ private final Function task;
RunTransactionObserver(
DatabaseReference instance, boolean fireLocalEvents,
@@ -31,7 +31,7 @@ final class RunTransactionObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(task, observer);
observer.onSubscribe(listener);
@@ -50,11 +50,12 @@ static final class Listener extends SimpleDisposable implements Transaction.Hand
this.observer = observer;
}
+ @NonNull
@Override
- public Transaction.Result doTransaction(MutableData mutableData) {
+ public Transaction.Result doTransaction(@NonNull final MutableData mutableData) {
try {
return this.task.apply(mutableData);
- } catch (Exception e) {
+ } catch (Throwable e) {
return Transaction.abort();
}
}
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/RxFirebaseDatabase.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/RxFirebaseDatabase.java
similarity index 91%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/RxFirebaseDatabase.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/RxFirebaseDatabase.java
index 18224d3..0e1aa15 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/RxFirebaseDatabase.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/RxFirebaseDatabase.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseReference;
@@ -7,24 +7,23 @@
import com.google.firebase.database.Query;
import com.google.firebase.database.Transaction;
-import com.androidhuman.rxfirebase2.database.model.DataValue;
-import com.androidhuman.rxfirebase2.database.transformers.SingleTransformerOfClazz;
-import com.androidhuman.rxfirebase2.database.transformers.SingleTransformerOfGenericTypeIndicator;
-import com.androidhuman.rxfirebase2.database.transformers.TransformerOfClazz;
-import com.androidhuman.rxfirebase2.database.transformers.TransformerOfGenericTypeIndicator;
+import com.androidhuman.rxfirebase3.database.model.DataValue;
+import com.androidhuman.rxfirebase3.database.transformers.SingleTransformerOfClazz;
+import com.androidhuman.rxfirebase3.database.transformers.SingleTransformerOfGenericTypeIndicator;
+import com.androidhuman.rxfirebase3.database.transformers.TransformerOfClazz;
+import com.androidhuman.rxfirebase3.database.transformers.TransformerOfGenericTypeIndicator;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import java.util.Map;
-import io.reactivex.BackpressureStrategy;
-import io.reactivex.Completable;
-import io.reactivex.Flowable;
-import io.reactivex.Observable;
-import io.reactivex.Single;
-import io.reactivex.functions.Function;
-
+import io.reactivex.rxjava3.core.BackpressureStrategy;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.Flowable;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.functions.Function;
public final class RxFirebaseDatabase {
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/SetPriorityObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/SetPriorityObserver.java
similarity index 74%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/SetPriorityObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/SetPriorityObserver.java
index f29a95c..e3b91c8 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/SetPriorityObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/SetPriorityObserver.java
@@ -1,14 +1,14 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class SetPriorityObserver extends Completable {
@@ -22,7 +22,7 @@ final class SetPriorityObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -39,7 +39,8 @@ static final class Listener extends SimpleDisposable
}
@Override
- public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {
+ public void onComplete(DatabaseError databaseError,
+ @NonNull final DatabaseReference databaseReference) {
if (!isDisposed()) {
if (null != databaseError) {
observer.onError(databaseError.toException());
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/SetValueObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/SetValueObserver.java
similarity index 74%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/SetValueObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/SetValueObserver.java
index c76df4e..406c93c 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/SetValueObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/SetValueObserver.java
@@ -1,14 +1,14 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class SetValueObserver extends Completable {
@@ -22,7 +22,7 @@ final class SetValueObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -39,7 +39,8 @@ static final class Listener extends SimpleDisposable
}
@Override
- public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {
+ public void onComplete(DatabaseError databaseError,
+ @NonNull final DatabaseReference databaseReference) {
if (!isDisposed()) {
if (null != databaseError) {
observer.onError(databaseError.toException());
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/SetValueWithPriorityObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/SetValueWithPriorityObserver.java
similarity index 76%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/SetValueWithPriorityObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/SetValueWithPriorityObserver.java
index 61e2af0..65cc365 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/SetValueWithPriorityObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/SetValueWithPriorityObserver.java
@@ -1,14 +1,14 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class SetValueWithPriorityObserver extends Completable {
@@ -25,7 +25,7 @@ final class SetValueWithPriorityObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -42,7 +42,8 @@ static final class Listener extends SimpleDisposable
}
@Override
- public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {
+ public void onComplete(DatabaseError databaseError,
+ @NonNull final DatabaseReference databaseReference) {
if (!isDisposed()) {
if (null != databaseError) {
observer.onError(databaseError.toException());
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/UpdateChildrenObserver.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/UpdateChildrenObserver.java
similarity index 75%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/UpdateChildrenObserver.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/UpdateChildrenObserver.java
index e3ef4bb..d2c87ea 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/UpdateChildrenObserver.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/UpdateChildrenObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.database;
+package com.androidhuman.rxfirebase3.database;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
import android.support.annotation.NonNull;
import java.util.Map;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UpdateChildrenObserver extends Completable {
@@ -24,7 +24,7 @@ final class UpdateChildrenObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -40,7 +40,8 @@ static class Listener extends SimpleDisposable implements DatabaseReference.Comp
}
@Override
- public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {
+ public void onComplete(DatabaseError databaseError,
+ @NonNull final DatabaseReference databaseReference) {
if (!isDisposed()) {
if (null != databaseError) {
observer.onError(databaseError.toException());
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/model/DataValue.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/model/DataValue.java
similarity index 93%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/model/DataValue.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/model/DataValue.java
index 20e2741..5fcd355 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/model/DataValue.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/model/DataValue.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database.model;
+package com.androidhuman.rxfirebase3.database.model;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/model/Empty.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/model/Empty.java
similarity index 83%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/model/Empty.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/model/Empty.java
index 8cc58c0..ccf8134 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/model/Empty.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/model/Empty.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database.model;
+package com.androidhuman.rxfirebase3.database.model;
import com.google.auto.value.AutoValue;
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/model/Some.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/model/Some.java
similarity index 78%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/model/Some.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/model/Some.java
index e296b40..6548054 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/model/Some.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/model/Some.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.database.model;
+package com.androidhuman.rxfirebase3.database.model;
import com.google.auto.value.AutoValue;
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/SingleTransformerOfClazz.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/SingleTransformerOfClazz.java
similarity index 68%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/SingleTransformerOfClazz.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/SingleTransformerOfClazz.java
index 0f4a801..a2e07b0 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/SingleTransformerOfClazz.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/SingleTransformerOfClazz.java
@@ -1,14 +1,15 @@
-package com.androidhuman.rxfirebase2.database.transformers;
+package com.androidhuman.rxfirebase3.database.transformers;
import com.google.firebase.database.DataSnapshot;
+import android.support.annotation.NonNull;
+
import java.util.NoSuchElementException;
-import io.reactivex.Single;
-import io.reactivex.SingleSource;
-import io.reactivex.SingleTransformer;
-import io.reactivex.annotations.NonNull;
-import io.reactivex.functions.Function;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleSource;
+import io.reactivex.rxjava3.core.SingleTransformer;
+import io.reactivex.rxjava3.functions.Function;
public final class SingleTransformerOfClazz
implements SingleTransformer {
@@ -20,7 +21,7 @@ public SingleTransformerOfClazz(Class clazz) {
}
@Override
- public SingleSource apply(Single upstream) {
+ public SingleSource apply(@NonNull final Single upstream) {
return upstream.flatMap(new Function>() {
@Override
public SingleSource extends T> apply(@NonNull DataSnapshot dataSnapshot) {
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/SingleTransformerOfGenericTypeIndicator.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/SingleTransformerOfGenericTypeIndicator.java
similarity index 67%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/SingleTransformerOfGenericTypeIndicator.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/SingleTransformerOfGenericTypeIndicator.java
index 24f7bfa..ec07323 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/SingleTransformerOfGenericTypeIndicator.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/SingleTransformerOfGenericTypeIndicator.java
@@ -1,27 +1,28 @@
-package com.androidhuman.rxfirebase2.database.transformers;
+package com.androidhuman.rxfirebase3.database.transformers;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.GenericTypeIndicator;
+import android.support.annotation.NonNull;
+
import java.util.NoSuchElementException;
-import io.reactivex.Single;
-import io.reactivex.SingleSource;
-import io.reactivex.SingleTransformer;
-import io.reactivex.annotations.NonNull;
-import io.reactivex.functions.Function;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleSource;
+import io.reactivex.rxjava3.core.SingleTransformer;
+import io.reactivex.rxjava3.functions.Function;
public final class SingleTransformerOfGenericTypeIndicator
implements SingleTransformer {
- private GenericTypeIndicator typeIndicator;
+ private final GenericTypeIndicator typeIndicator;
public SingleTransformerOfGenericTypeIndicator(GenericTypeIndicator indicator) {
this.typeIndicator = indicator;
}
@Override
- public SingleSource apply(Single upstream) {
+ public SingleSource apply(@NonNull final Single upstream) {
return upstream.flatMap(new Function>() {
@Override
public SingleSource extends T> apply(@NonNull DataSnapshot dataSnapshot) {
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/TransformerOfClazz.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/TransformerOfClazz.java
similarity index 56%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/TransformerOfClazz.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/TransformerOfClazz.java
index 58d9d8b..847dff2 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/TransformerOfClazz.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/TransformerOfClazz.java
@@ -1,13 +1,15 @@
-package com.androidhuman.rxfirebase2.database.transformers;
+package com.androidhuman.rxfirebase3.database.transformers;
import com.google.firebase.database.DataSnapshot;
-import com.androidhuman.rxfirebase2.database.model.DataValue;
+import com.androidhuman.rxfirebase3.database.model.DataValue;
-import io.reactivex.Observable;
-import io.reactivex.ObservableSource;
-import io.reactivex.ObservableTransformer;
-import io.reactivex.functions.Function;
+import android.support.annotation.NonNull;
+
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.ObservableSource;
+import io.reactivex.rxjava3.core.ObservableTransformer;
+import io.reactivex.rxjava3.functions.Function;
public final class TransformerOfClazz
implements ObservableTransformer> {
@@ -19,10 +21,10 @@ public TransformerOfClazz(Class clazz) {
}
@Override
- public ObservableSource> apply(Observable upstream) {
+ public ObservableSource> apply(@NonNull final Observable upstream) {
return upstream.map(new Function>() {
@Override
- public DataValue apply(DataSnapshot dataSnapshot) throws Exception {
+ public DataValue apply(@NonNull final DataSnapshot dataSnapshot) {
DataValue result;
if (dataSnapshot.exists()) {
result = DataValue.of(dataSnapshot.getValue(clazz));
diff --git a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/TransformerOfGenericTypeIndicator.java b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/TransformerOfGenericTypeIndicator.java
similarity index 56%
rename from firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/TransformerOfGenericTypeIndicator.java
rename to firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/TransformerOfGenericTypeIndicator.java
index 653eaaa..b808168 100644
--- a/firebase-database/src/main/java/com/androidhuman/rxfirebase2/database/transformers/TransformerOfGenericTypeIndicator.java
+++ b/firebase-database/src/main/java/com/androidhuman/rxfirebase3/database/transformers/TransformerOfGenericTypeIndicator.java
@@ -1,29 +1,31 @@
-package com.androidhuman.rxfirebase2.database.transformers;
+package com.androidhuman.rxfirebase3.database.transformers;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.GenericTypeIndicator;
-import com.androidhuman.rxfirebase2.database.model.DataValue;
+import com.androidhuman.rxfirebase3.database.model.DataValue;
-import io.reactivex.Observable;
-import io.reactivex.ObservableSource;
-import io.reactivex.ObservableTransformer;
-import io.reactivex.functions.Function;
+import android.support.annotation.NonNull;
+
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.ObservableSource;
+import io.reactivex.rxjava3.core.ObservableTransformer;
+import io.reactivex.rxjava3.functions.Function;
public final class TransformerOfGenericTypeIndicator
implements ObservableTransformer> {
- private GenericTypeIndicator typeIndicator;
+ private final GenericTypeIndicator typeIndicator;
public TransformerOfGenericTypeIndicator(GenericTypeIndicator indicator) {
this.typeIndicator = indicator;
}
@Override
- public ObservableSource> apply(Observable upstream) {
+ public ObservableSource> apply(@NonNull final Observable upstream) {
return upstream.map(new Function>() {
@Override
- public DataValue apply(DataSnapshot dataSnapshot) throws Exception {
+ public DataValue apply(@NonNull final DataSnapshot dataSnapshot) {
DataValue result;
if (dataSnapshot.exists()) {
result = DataValue.of(dataSnapshot.getValue(typeIndicator));
diff --git a/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/ErrorTestObserver.kt b/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/ErrorTestObserver.kt
new file mode 100644
index 0000000..eb9a813
--- /dev/null
+++ b/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/ErrorTestObserver.kt
@@ -0,0 +1,7 @@
+package com.androidhuman.rxfirebase3.database
+
+import io.reactivex.rxjava3.observers.TestObserver
+
+class ErrorTestObserver : TestObserver() {
+ fun errorCount(): Int = errors.size
+}
diff --git a/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/ErrorTestSubscriber.kt b/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/ErrorTestSubscriber.kt
new file mode 100644
index 0000000..9b4d2bf
--- /dev/null
+++ b/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/ErrorTestSubscriber.kt
@@ -0,0 +1,7 @@
+package com.androidhuman.rxfirebase3.database
+
+import io.reactivex.rxjava3.subscribers.TestSubscriber
+
+class ErrorTestSubscriber : TestSubscriber() {
+ fun errorCount(): Int = errors.size
+}
diff --git a/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase2/database/RxFirebaseDatabaseTest.kt b/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/RxFirebaseDatabaseTest.kt
similarity index 97%
rename from firebase-database/src/test/kotlin/com/androidhuman/rxfirebase2/database/RxFirebaseDatabaseTest.kt
rename to firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/RxFirebaseDatabaseTest.kt
index 6d1a3ff..26d8bd7 100644
--- a/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase2/database/RxFirebaseDatabaseTest.kt
+++ b/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/RxFirebaseDatabaseTest.kt
@@ -1,6 +1,6 @@
-package com.androidhuman.rxfirebase2.database
+package com.androidhuman.rxfirebase3.database
-import com.androidhuman.rxfirebase2.database.model.DataValue
+import com.androidhuman.rxfirebase3.database.model.DataValue
import com.google.firebase.database.ChildEventListener
import com.google.firebase.database.DataSnapshot
import com.google.firebase.database.DatabaseException
@@ -16,9 +16,10 @@ import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.times
import com.nhaarman.mockito_kotlin.verify
import com.nhaarman.mockito_kotlin.whenever
-import io.reactivex.BackpressureStrategy
-import io.reactivex.observers.TestObserver
-import io.reactivex.subscribers.TestSubscriber
+import io.reactivex.rxjava3.core.BackpressureStrategy
+import io.reactivex.rxjava3.functions.Function
+import io.reactivex.rxjava3.observers.TestObserver
+import io.reactivex.rxjava3.subscribers.TestSubscriber
import org.assertj.core.api.Assertions.assertThat
import org.junit.Before
import org.junit.Test
@@ -70,7 +71,7 @@ class RxFirebaseDatabaseTest {
ChildAddEvent.create(snapshot, "foo"),
ChildAddEvent.create(snapshot, "bar"))
- dispose()
+ cancel()
// simulate the callback
childEventListener.lastValue.onChildAdded(snapshot, "baz")
@@ -132,7 +133,7 @@ class RxFirebaseDatabaseTest {
ChildChangeEvent.create(snapshot, "foo"),
ChildChangeEvent.create(snapshot, "bar"))
- dispose()
+ cancel()
// simulate the callback
childEventListener.lastValue.onChildChanged(snapshot, "baz")
@@ -194,7 +195,7 @@ class RxFirebaseDatabaseTest {
ChildRemoveEvent.create(snapshot),
ChildRemoveEvent.create(snapshot))
- dispose()
+ cancel()
// simulate the callback
childEventListener.lastValue.onChildRemoved(snapshot)
@@ -256,7 +257,7 @@ class RxFirebaseDatabaseTest {
ChildMoveEvent.create(snapshot, "foo"),
ChildMoveEvent.create(snapshot, "bar"))
- dispose()
+ cancel()
// simulate the callback
childEventListener.lastValue.onChildMoved(snapshot, "baz")
@@ -313,7 +314,7 @@ class RxFirebaseDatabaseTest {
assertError(DatabaseException::class.java)
- dispose()
+ cancel()
}
}
@@ -399,7 +400,7 @@ class RxFirebaseDatabaseTest {
assertValueAt(0) { "foo" == it.value }
assertValueAt(1) { "bar" == it.value }
- dispose()
+ cancel()
// simulate the callback
valueEventListener.lastValue.onDataChange(snapshot1)
@@ -444,7 +445,7 @@ class RxFirebaseDatabaseTest {
fun dataReferenceFlowableDataChangesCancelled() {
val error = databaseError()
- with(TestSubscriber.create()) {
+ with(ErrorTestSubscriber()) {
RxFirebaseDatabase.dataChanges(databaseReference, BackpressureStrategy.BUFFER)
.subscribe(this)
@@ -456,7 +457,7 @@ class RxFirebaseDatabaseTest {
assertError(DatabaseException::class.java)
- dispose()
+ cancel()
// simulate the callback
valueEventListener.lastValue.onCancelled(error)
@@ -471,7 +472,7 @@ class RxFirebaseDatabaseTest {
fun dataReferenceObservableDataChangesCancelled() {
val error = databaseError()
- with(TestObserver.create()) {
+ with(ErrorTestObserver()) {
RxFirebaseDatabase.dataChanges(databaseReference)
.subscribe(this)
@@ -513,7 +514,7 @@ class RxFirebaseDatabaseTest {
assertNotComplete()
assertValueAt(0) { "foo" == it.value() }
- dispose()
+ cancel()
// simulate the callback
valueEventListener.lastValue.onDataChange(snapshot)
@@ -572,7 +573,7 @@ class RxFirebaseDatabaseTest {
assertThat(values()[0].value())
.containsExactly("foo", "bar")
- dispose()
+ cancel()
// simulate the callback
valueEventListener.lastValue.onDataChange(snapshot)
@@ -858,7 +859,7 @@ class RxFirebaseDatabaseTest {
@Test
fun dataReferenceRunTransaction() {
val snapshot = dataSnapshot("foo")
- val task = mock>()
+ val task = mock>()
with(TestObserver.create()) {
RxFirebaseDatabase.runTransaction(databaseReference, task)
@@ -882,7 +883,7 @@ class RxFirebaseDatabaseTest {
@Test
fun dataReferenceRunTransactionNotSuccessful() {
val snapshot = dataSnapshot("foo")
- val task = mock>()
+ val task = mock>()
with(TestObserver.create()) {
RxFirebaseDatabase.runTransaction(databaseReference, task)
@@ -924,7 +925,7 @@ class RxFirebaseDatabaseTest {
ChildAddEvent.create(snapshot, "foo"),
ChildAddEvent.create(snapshot, "bar"))
- dispose()
+ cancel()
// simulate the callback
childEventListener.lastValue.onChildAdded(snapshot, "baz")
@@ -986,7 +987,7 @@ class RxFirebaseDatabaseTest {
ChildChangeEvent.create(snapshot, "foo"),
ChildChangeEvent.create(snapshot, "bar"))
- dispose()
+ cancel()
// simulate the callback
childEventListener.lastValue.onChildChanged(snapshot, "baz")
@@ -1048,7 +1049,7 @@ class RxFirebaseDatabaseTest {
ChildRemoveEvent.create(snapshot),
ChildRemoveEvent.create(snapshot))
- dispose()
+ cancel()
// simulate the callback
childEventListener.lastValue.onChildRemoved(snapshot)
@@ -1110,7 +1111,7 @@ class RxFirebaseDatabaseTest {
ChildMoveEvent.create(snapshot, "foo"),
ChildMoveEvent.create(snapshot, "bar"))
- dispose()
+ cancel()
// simulate the callback
childEventListener.lastValue.onChildMoved(snapshot, "baz")
@@ -1167,7 +1168,7 @@ class RxFirebaseDatabaseTest {
assertError(DatabaseException::class.java)
- dispose()
+ cancel()
}
}
@@ -1256,7 +1257,7 @@ class RxFirebaseDatabaseTest {
assertValueAt(0) { "foo" == it.value }
assertValueAt(1) { "bar" == it.value }
- dispose()
+ cancel()
// simulate the callback
valueEventListener.lastValue.onDataChange(snapshot1)
@@ -1301,7 +1302,7 @@ class RxFirebaseDatabaseTest {
fun queryFlowableDataChangesCancelled() {
val error = databaseError()
- with(TestSubscriber.create()) {
+ with(ErrorTestSubscriber()) {
RxFirebaseDatabase.dataChanges(query, BackpressureStrategy.BUFFER)
.subscribe(this)
@@ -1313,7 +1314,7 @@ class RxFirebaseDatabaseTest {
assertError(DatabaseException::class.java)
- dispose()
+ cancel()
// simulate the callback
valueEventListener.lastValue.onCancelled(error)
@@ -1328,7 +1329,7 @@ class RxFirebaseDatabaseTest {
fun queryObservableDataChangesCancelled() {
val error = databaseError()
- with(TestObserver.create()) {
+ with(ErrorTestObserver()) {
RxFirebaseDatabase.dataChanges(query)
.subscribe(this)
@@ -1370,7 +1371,7 @@ class RxFirebaseDatabaseTest {
assertNotComplete()
assertValueAt(0) { "foo" == it.value() }
- dispose()
+ cancel()
// simulate the callback
valueEventListener.lastValue.onDataChange(snapshot)
@@ -1429,7 +1430,7 @@ class RxFirebaseDatabaseTest {
assertThat(values()[0].value())
.containsExactly("foo", "bar")
- dispose()
+ cancel()
// simulate the callback
valueEventListener.lastValue.onDataChange(snapshot)
@@ -1542,4 +1543,4 @@ class RxFirebaseDatabaseTest {
verify(this, times(1))
.addValueEventListener(valueEventListener.capture())
}
-}
\ No newline at end of file
+}
diff --git a/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase2/database/mockutils.kt b/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/mockutils.kt
similarity index 88%
rename from firebase-database/src/test/kotlin/com/androidhuman/rxfirebase2/database/mockutils.kt
rename to firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/mockutils.kt
index c1de88e..80f0951 100644
--- a/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase2/database/mockutils.kt
+++ b/firebase-database/src/test/kotlin/com/androidhuman/rxfirebase3/database/mockutils.kt
@@ -1,8 +1,7 @@
-package com.androidhuman.rxfirebase2.database
+package com.androidhuman.rxfirebase3.database
import com.google.firebase.database.DataSnapshot
import com.google.firebase.database.DatabaseError
-import com.google.firebase.database.DatabaseException
import com.google.firebase.database.GenericTypeIndicator
import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.whenever
@@ -10,7 +9,7 @@ import com.nhaarman.mockito_kotlin.whenever
internal fun databaseError(): DatabaseError {
return mock().apply {
whenever(toException())
- .thenReturn(mock())
+ .thenReturn(mock())
}
}
diff --git a/firebase-firestore-kotlin/build.gradle b/firebase-firestore-kotlin/build.gradle
index d2a59c1..1bff12e 100644
--- a/firebase-firestore-kotlin/build.gradle
+++ b/firebase-firestore-kotlin/build.gradle
@@ -9,8 +9,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
@@ -38,7 +38,7 @@ dependencies {
implementation project(':firebase-firestore')
compileOnly "com.google.firebase:firebase-firestore:${firebaseFirestoreVersion}"
- compileOnly "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ compileOnly "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}"
}
diff --git a/firebase-firestore-kotlin/src/main/AndroidManifest.xml b/firebase-firestore-kotlin/src/main/AndroidManifest.xml
index cc8b071..dd7efb6 100644
--- a/firebase-firestore-kotlin/src/main/AndroidManifest.xml
+++ b/firebase-firestore-kotlin/src/main/AndroidManifest.xml
@@ -1 +1 @@
-
+
diff --git a/firebase-firestore-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/firestore/RxFirebaseFirestore.kt b/firebase-firestore-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/firestore/RxFirebaseFirestore.kt
similarity index 88%
rename from firebase-firestore-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/firestore/RxFirebaseFirestore.kt
rename to firebase-firestore-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/firestore/RxFirebaseFirestore.kt
index 69b2dd5..643d5e7 100644
--- a/firebase-firestore-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/firestore/RxFirebaseFirestore.kt
+++ b/firebase-firestore-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/firestore/RxFirebaseFirestore.kt
@@ -1,8 +1,8 @@
@file:Suppress("NOTHING_TO_INLINE", "UNUSED")
-package com.androidhuman.rxfirebase2.firestore
+package com.androidhuman.rxfirebase3.firestore
-import com.androidhuman.rxfirebase2.firestore.model.Value
+import com.androidhuman.rxfirebase3.firestore.model.Value
import com.google.firebase.firestore.CollectionReference
import com.google.firebase.firestore.DocumentReference
import com.google.firebase.firestore.DocumentSnapshot
@@ -10,11 +10,11 @@ import com.google.firebase.firestore.Query
import com.google.firebase.firestore.QuerySnapshot
import com.google.firebase.firestore.SetOptions
import com.google.firebase.firestore.Source
-import io.reactivex.BackpressureStrategy
-import io.reactivex.Completable
-import io.reactivex.Flowable
-import io.reactivex.Observable
-import io.reactivex.Single
+import io.reactivex.rxjava3.core.BackpressureStrategy
+import io.reactivex.rxjava3.core.Completable
+import io.reactivex.rxjava3.core.Flowable
+import io.reactivex.rxjava3.core.Observable
+import io.reactivex.rxjava3.core.Single
inline fun CollectionReference.rxAdd(value: T)
: Single = RxFirebaseFirestore.add(this, value)
@@ -53,7 +53,7 @@ inline fun DocumentReference.rxSet(value: T)
: Completable = RxFirebaseFirestore.set(this, value)
inline fun DocumentReference.rxSet(value: T, options: SetOptions)
- : Completable = RxFirebaseFirestore.set(this, value, options);
+ : Completable = RxFirebaseFirestore.set(this, value, options)
inline fun DocumentReference.rxSet(value: Map)
: Completable = RxFirebaseFirestore.set(this, value)
diff --git a/firebase-firestore/build.gradle b/firebase-firestore/build.gradle
index a7526e2..a50a04b 100644
--- a/firebase-firestore/build.gradle
+++ b/firebase-firestore/build.gradle
@@ -9,8 +9,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
@@ -39,14 +39,14 @@ dependencies {
compileOnly "com.google.auto.value:auto-value:${autoValueVersion}"
compileOnly "com.google.firebase:firebase-firestore:${firebaseFirestoreVersion}"
- compileOnly "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ compileOnly "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
annotationProcessor "com.google.auto.value:auto-value:${autoValueVersion}"
testImplementation "com.google.firebase:firebase-firestore:${firebaseFirestoreVersion}"
testImplementation "com.nhaarman:mockito-kotlin:${mockitoKotlinVersion}"
testImplementation "junit:junit:${junitVersion}"
- testImplementation "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ testImplementation "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
testImplementation "org.assertj:assertj-core:${assertjVersion}"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
diff --git a/firebase-firestore/src/main/AndroidManifest.xml b/firebase-firestore/src/main/AndroidManifest.xml
index 8d1e404..d507f22 100644
--- a/firebase-firestore/src/main/AndroidManifest.xml
+++ b/firebase-firestore/src/main/AndroidManifest.xml
@@ -1 +1 @@
-
\ No newline at end of file
+
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/AddDocumentObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/AddDocumentObserver.java
similarity index 82%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/AddDocumentObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/AddDocumentObserver.java
index 7a7028f..6f210f1 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/AddDocumentObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/AddDocumentObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.CollectionReference;
import com.google.firebase.firestore.DocumentReference;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class AddDocumentObserver extends Single {
@@ -23,7 +23,8 @@ final class AddDocumentObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super DocumentReference> observer) {
+ protected void subscribeActual(
+ @NonNull final SingleObserver super DocumentReference> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/AddMapDocumentObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/AddMapDocumentObserver.java
similarity index 83%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/AddMapDocumentObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/AddMapDocumentObserver.java
index 028bdff..3693067 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/AddMapDocumentObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/AddMapDocumentObserver.java
@@ -1,17 +1,17 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.CollectionReference;
import com.google.firebase.firestore.DocumentReference;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
import java.util.Map;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class AddMapDocumentObserver extends Single {
@@ -25,7 +25,8 @@ final class AddMapDocumentObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super DocumentReference> observer) {
+ protected void subscribeActual(
+ @NonNull final SingleObserver super DocumentReference> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/DeleteDocumentObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/DeleteDocumentObserver.java
similarity index 81%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/DeleteDocumentObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/DeleteDocumentObserver.java
index 6fcd7d9..95ca9de 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/DeleteDocumentObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/DeleteDocumentObserver.java
@@ -1,14 +1,14 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.DocumentReference;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class DeleteDocumentObserver extends Completable {
@@ -19,7 +19,7 @@ final class DeleteDocumentObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/DocumentChangesObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/DocumentChangesObserver.java
similarity index 83%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/DocumentChangesObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/DocumentChangesObserver.java
index d04bac6..eb7121a 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/DocumentChangesObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/DocumentChangesObserver.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.DocumentSnapshot;
@@ -6,13 +6,13 @@
import com.google.firebase.firestore.FirebaseFirestoreException;
import com.google.firebase.firestore.ListenerRegistration;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
-import com.androidhuman.rxfirebase2.firestore.model.Value;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.firestore.model.Value;
import android.support.annotation.NonNull;
-import io.reactivex.Observable;
-import io.reactivex.Observer;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Observer;
final class DocumentChangesObserver extends Observable> {
@@ -23,7 +23,8 @@ final class DocumentChangesObserver extends Observable>
}
@Override
- protected void subscribeActual(Observer super Value> observer) {
+ protected void subscribeActual(
+ @NonNull final Observer super Value> observer) {
Listener listener = new Listener(instance, observer);
observer.onSubscribe(listener);
}
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/DocumentObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/DocumentObserver.java
similarity index 82%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/DocumentObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/DocumentObserver.java
index 7a80f68..f6f6367 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/DocumentObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/DocumentObserver.java
@@ -1,18 +1,18 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.Source;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
-import com.androidhuman.rxfirebase2.firestore.model.Value;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.firestore.model.Value;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class DocumentObserver extends Single> {
@@ -31,7 +31,8 @@ final class DocumentObserver extends Single> {
}
@Override
- protected void subscribeActual(SingleObserver super Value> observer) {
+ protected void subscribeActual(
+ @NonNull final SingleObserver super Value> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -64,7 +65,7 @@ public void onComplete(@NonNull Task task) {
}
} else {
DocumentSnapshot document = task.getResult();
- if (document.exists()) {
+ if (document != null && document.exists()) {
observer.onSuccess(Value.of(document));
} else {
observer.onSuccess(Value.empty());
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/QueryChangesObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/QueryChangesObserver.java
similarity index 82%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/QueryChangesObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/QueryChangesObserver.java
index 5381b13..db75e56 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/QueryChangesObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/QueryChangesObserver.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.firebase.firestore.EventListener;
import com.google.firebase.firestore.FirebaseFirestoreException;
@@ -6,13 +6,13 @@
import com.google.firebase.firestore.Query;
import com.google.firebase.firestore.QuerySnapshot;
-import com.androidhuman.rxfirebase2.core.SimpleDisposable;
-import com.androidhuman.rxfirebase2.firestore.model.Value;
+import com.androidhuman.rxfirebase3.core.SimpleDisposable;
+import com.androidhuman.rxfirebase3.firestore.model.Value;
import android.support.annotation.NonNull;
-import io.reactivex.Observable;
-import io.reactivex.Observer;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Observer;
final class QueryChangesObserver extends Observable> {
@@ -23,7 +23,7 @@ final class QueryChangesObserver extends Observable> {
}
@Override
- protected void subscribeActual(Observer super Value> observer) {
+ protected void subscribeActual(@NonNull final Observer super Value> observer) {
Listener listener = new Listener(query, observer);
observer.onSubscribe(listener);
}
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/QueryObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/QueryObserver.java
similarity index 81%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/QueryObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/QueryObserver.java
index 4027755..75fb0df 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/QueryObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/QueryObserver.java
@@ -1,18 +1,18 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.Query;
import com.google.firebase.firestore.QuerySnapshot;
import com.google.firebase.firestore.Source;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
-import com.androidhuman.rxfirebase2.firestore.model.Value;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.firestore.model.Value;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class QueryObserver extends Single> {
@@ -31,7 +31,8 @@ final class QueryObserver extends Single> {
}
@Override
- protected void subscribeActual(SingleObserver super Value> observer) {
+ protected void subscribeActual(
+ @NonNull final SingleObserver super Value> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
@@ -64,7 +65,7 @@ public void onComplete(@NonNull Task task) {
}
} else {
QuerySnapshot snapshot = task.getResult();
- if (!snapshot.isEmpty()) {
+ if (snapshot != null && !snapshot.isEmpty()) {
observer.onSuccess(Value.of(snapshot));
} else {
observer.onSuccess(Value.empty());
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/RxFirebaseFirestore.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/RxFirebaseFirestore.java
similarity index 91%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/RxFirebaseFirestore.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/RxFirebaseFirestore.java
index 140f322..7ac7ff0 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/RxFirebaseFirestore.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/RxFirebaseFirestore.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.firebase.firestore.CollectionReference;
import com.google.firebase.firestore.DocumentReference;
@@ -8,18 +8,18 @@
import com.google.firebase.firestore.SetOptions;
import com.google.firebase.firestore.Source;
-import com.androidhuman.rxfirebase2.firestore.model.Value;
+import com.androidhuman.rxfirebase3.firestore.model.Value;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import java.util.Map;
-import io.reactivex.BackpressureStrategy;
-import io.reactivex.Completable;
-import io.reactivex.Flowable;
-import io.reactivex.Observable;
-import io.reactivex.Single;
+import io.reactivex.rxjava3.core.BackpressureStrategy;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.Flowable;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.Single;
public final class RxFirebaseFirestore {
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/SetMapValueObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/SetMapValueObserver.java
similarity index 86%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/SetMapValueObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/SetMapValueObserver.java
index b63ed90..db636bc 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/SetMapValueObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/SetMapValueObserver.java
@@ -1,18 +1,18 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.SetOptions;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import java.util.Map;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
public final class SetMapValueObserver extends Completable {
@@ -36,7 +36,7 @@ public final class SetMapValueObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/SetValueObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/SetValueObserver.java
similarity index 86%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/SetValueObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/SetValueObserver.java
index d75b2da..5c229a7 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/SetValueObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/SetValueObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.SetOptions;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class SetValueObserver extends Completable {
@@ -34,7 +34,7 @@ final class SetValueObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/UpdateMapDocumentObserver.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/UpdateMapDocumentObserver.java
similarity index 83%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/UpdateMapDocumentObserver.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/UpdateMapDocumentObserver.java
index 7006c38..27426b9 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/UpdateMapDocumentObserver.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/UpdateMapDocumentObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.firestore;
+package com.androidhuman.rxfirebase3.firestore;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.DocumentReference;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.support.annotation.NonNull;
import java.util.Map;
-import io.reactivex.Completable;
-import io.reactivex.CompletableObserver;
+import io.reactivex.rxjava3.core.Completable;
+import io.reactivex.rxjava3.core.CompletableObserver;
final class UpdateMapDocumentObserver extends Completable {
@@ -24,7 +24,7 @@ final class UpdateMapDocumentObserver extends Completable {
}
@Override
- protected void subscribeActual(CompletableObserver observer) {
+ protected void subscribeActual(@NonNull final CompletableObserver observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/model/Empty.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/model/Empty.java
similarity index 82%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/model/Empty.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/model/Empty.java
index 7aaca6b..285141d 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/model/Empty.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/model/Empty.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.firestore.model;
+package com.androidhuman.rxfirebase3.firestore.model;
import com.google.auto.value.AutoValue;
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/model/Some.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/model/Some.java
similarity index 78%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/model/Some.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/model/Some.java
index d121dca..999340e 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/model/Some.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/model/Some.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.firestore.model;
+package com.androidhuman.rxfirebase3.firestore.model;
import com.google.auto.value.AutoValue;
diff --git a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/model/Value.java b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/model/Value.java
similarity index 93%
rename from firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/model/Value.java
rename to firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/model/Value.java
index 9d3efcb..368aef7 100644
--- a/firebase-firestore/src/main/java/com/androidhuman/rxfirebase2/firestore/model/Value.java
+++ b/firebase-firestore/src/main/java/com/androidhuman/rxfirebase3/firestore/model/Value.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.firestore.model;
+package com.androidhuman.rxfirebase3.firestore.model;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
diff --git a/firebase-firestore/src/test/kotlin/com/androidhuman/rxfirebase2/firestore/RxFirebaseFirestoreTest.kt b/firebase-firestore/src/test/kotlin/com/androidhuman/rxfirebase3/firestore/RxFirebaseFirestoreTest.kt
similarity index 99%
rename from firebase-firestore/src/test/kotlin/com/androidhuman/rxfirebase2/firestore/RxFirebaseFirestoreTest.kt
rename to firebase-firestore/src/test/kotlin/com/androidhuman/rxfirebase3/firestore/RxFirebaseFirestoreTest.kt
index 0a8f81a..0625e2f 100644
--- a/firebase-firestore/src/test/kotlin/com/androidhuman/rxfirebase2/firestore/RxFirebaseFirestoreTest.kt
+++ b/firebase-firestore/src/test/kotlin/com/androidhuman/rxfirebase3/firestore/RxFirebaseFirestoreTest.kt
@@ -1,7 +1,7 @@
-package com.androidhuman.rxfirebase2.firestore
+package com.androidhuman.rxfirebase3.firestore
-import com.androidhuman.rxfirebase2.firestore.model.Empty
-import com.androidhuman.rxfirebase2.firestore.model.Value
+import com.androidhuman.rxfirebase3.firestore.model.Empty
+import com.androidhuman.rxfirebase3.firestore.model.Value
import com.google.android.gms.tasks.OnCompleteListener
import com.google.android.gms.tasks.Task
import com.google.firebase.firestore.CollectionReference
@@ -19,9 +19,9 @@ import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.times
import com.nhaarman.mockito_kotlin.verify
import com.nhaarman.mockito_kotlin.whenever
-import io.reactivex.BackpressureStrategy
-import io.reactivex.observers.TestObserver
-import io.reactivex.subscribers.TestSubscriber
+import io.reactivex.rxjava3.core.BackpressureStrategy
+import io.reactivex.rxjava3.observers.TestObserver
+import io.reactivex.rxjava3.subscribers.TestSubscriber
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
@@ -104,7 +104,7 @@ class RxFirebaseFirestoreTest {
docRefCompleteListener.lastValue.onComplete(task)
// assert no more values are emitted
- assertEquals(1, valueCount())
+ assertEquals(1, values().size)
}
}
@@ -233,7 +233,7 @@ class RxFirebaseFirestoreTest {
docRefCompleteListener.lastValue.onComplete(task)
// assert no more values are emitted
- assertEquals(1, valueCount())
+ assertEquals(1, values().size)
}
}
@@ -1037,7 +1037,7 @@ class RxFirebaseFirestoreTest {
assertValue { it.value() == docSnapshot }
- dispose()
+ cancel()
// simulate callback
docSnapshotEventListener.lastValue.onEvent(docSnapshot, null)
@@ -1071,7 +1071,7 @@ class RxFirebaseFirestoreTest {
assertValue { it is Empty }
- dispose()
+ cancel()
}
}
@@ -1097,7 +1097,7 @@ class RxFirebaseFirestoreTest {
assertError(exception)
- dispose()
+ cancel()
}
}
@@ -1207,7 +1207,7 @@ class RxFirebaseFirestoreTest {
assertValue { it.value() == querySnapshot }
- dispose()
+ cancel()
// simulate callback
querySnapshotEventListener.lastValue.onEvent(querySnapshot, null)
@@ -1241,7 +1241,7 @@ class RxFirebaseFirestoreTest {
assertValue { it is Empty }
- dispose()
+ cancel()
}
}
@@ -1267,7 +1267,7 @@ class RxFirebaseFirestoreTest {
assertError(exception)
- dispose()
+ cancel()
}
}
@@ -2133,4 +2133,4 @@ class RxFirebaseFirestoreTest {
}
}
-}
\ No newline at end of file
+}
diff --git a/firebase-storage-kotlin/build.gradle b/firebase-storage-kotlin/build.gradle
index 7fd855c..1044b14 100644
--- a/firebase-storage-kotlin/build.gradle
+++ b/firebase-storage-kotlin/build.gradle
@@ -9,8 +9,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
@@ -38,7 +38,7 @@ dependencies {
implementation project(':firebase-storage')
compileOnly "com.google.firebase:firebase-storage:${firebaseStorageVersion}"
- compileOnly "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ compileOnly "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
}
diff --git a/firebase-storage-kotlin/src/main/AndroidManifest.xml b/firebase-storage-kotlin/src/main/AndroidManifest.xml
index 9912836..50748c3 100644
--- a/firebase-storage-kotlin/src/main/AndroidManifest.xml
+++ b/firebase-storage-kotlin/src/main/AndroidManifest.xml
@@ -1 +1 @@
-
+
diff --git a/firebase-storage-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/storage/RxFirebaseStorage.kt b/firebase-storage-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/storage/RxFirebaseStorage.kt
similarity index 88%
rename from firebase-storage-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/storage/RxFirebaseStorage.kt
rename to firebase-storage-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/storage/RxFirebaseStorage.kt
index 3f42370..987bbc3 100644
--- a/firebase-storage-kotlin/src/main/kotlin/com/androidhuman/rxfirebase2/storage/RxFirebaseStorage.kt
+++ b/firebase-storage-kotlin/src/main/kotlin/com/androidhuman/rxfirebase3/storage/RxFirebaseStorage.kt
@@ -1,12 +1,12 @@
@file:Suppress("NOTHING_TO_INLINE", "UNUSED")
-package com.androidhuman.rxfirebase2.storage
+package com.androidhuman.rxfirebase3.storage
import android.net.Uri
import com.google.firebase.storage.StorageMetadata
import com.google.firebase.storage.StorageReference
import com.google.firebase.storage.UploadTask
-import io.reactivex.Single
+import io.reactivex.rxjava3.core.Single
inline fun StorageReference.rxPutFile(uri: Uri)
: Single = RxFirebaseStorage.putDocument(this, uri)
diff --git a/firebase-storage/build.gradle b/firebase-storage/build.gradle
index 0664d5e..4ddc5b4 100644
--- a/firebase-storage/build.gradle
+++ b/firebase-storage/build.gradle
@@ -9,8 +9,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
@@ -39,14 +39,14 @@ dependencies {
compileOnly "com.google.auto.value:auto-value:${autoValueVersion}"
compileOnly "com.google.firebase:firebase-storage:${firebaseStorageVersion}"
- compileOnly "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ compileOnly "io.reactivex.rxjava3:rxjava:3.0.8"
annotationProcessor "com.google.auto.value:auto-value:${autoValueVersion}"
testImplementation "com.google.firebase:firebase-storage:${firebaseStorageVersion}"
testImplementation "com.nhaarman:mockito-kotlin:${mockitoKotlinVersion}"
testImplementation "junit:junit:${junitVersion}"
- testImplementation "io.reactivex.rxjava2:rxjava:${rxJavaVersion}"
+ testImplementation "io.reactivex.rxjava3:rxjava:${rxJavaVersion}"
testImplementation "org.assertj:assertj-core:${assertjVersion}"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
diff --git a/firebase-storage/src/main/AndroidManifest.xml b/firebase-storage/src/main/AndroidManifest.xml
index 9e8bdae..4e0e2e5 100644
--- a/firebase-storage/src/main/AndroidManifest.xml
+++ b/firebase-storage/src/main/AndroidManifest.xml
@@ -1 +1 @@
-
+
diff --git a/firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/DownloadUrlObserver.java b/firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/DownloadUrlObserver.java
similarity index 79%
rename from firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/DownloadUrlObserver.java
rename to firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/DownloadUrlObserver.java
index 8429c30..76ec4ea 100644
--- a/firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/DownloadUrlObserver.java
+++ b/firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/DownloadUrlObserver.java
@@ -1,15 +1,15 @@
-package com.androidhuman.rxfirebase2.storage;
+package com.androidhuman.rxfirebase3.storage;
import com.google.android.gms.tasks.Task;
import com.google.firebase.storage.StorageReference;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.net.Uri;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class DownloadUrlObserver extends Single {
@@ -20,7 +20,7 @@ final class DownloadUrlObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super Uri> observer) {
+ protected void subscribeActual(@NonNull final SingleObserver super Uri> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/PutFileObserver.java b/firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/PutFileObserver.java
similarity index 80%
rename from firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/PutFileObserver.java
rename to firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/PutFileObserver.java
index 24f892b..94ade96 100644
--- a/firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/PutFileObserver.java
+++ b/firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/PutFileObserver.java
@@ -1,16 +1,16 @@
-package com.androidhuman.rxfirebase2.storage;
+package com.androidhuman.rxfirebase3.storage;
import com.google.android.gms.tasks.Task;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.net.Uri;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class PutFileObserver extends Single {
@@ -24,7 +24,8 @@ final class PutFileObserver extends Single {
}
@Override
- protected void subscribeActual(SingleObserver super UploadTask.TaskSnapshot> observer) {
+ protected void subscribeActual(
+ @NonNull final SingleObserver super UploadTask.TaskSnapshot> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/PutFileWithMetadataObserver.java b/firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/PutFileWithMetadataObserver.java
similarity index 82%
rename from firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/PutFileWithMetadataObserver.java
rename to firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/PutFileWithMetadataObserver.java
index 226e70f..8459142 100644
--- a/firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/PutFileWithMetadataObserver.java
+++ b/firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/PutFileWithMetadataObserver.java
@@ -1,17 +1,17 @@
-package com.androidhuman.rxfirebase2.storage;
+package com.androidhuman.rxfirebase3.storage;
import com.google.android.gms.tasks.Task;
import com.google.firebase.storage.StorageMetadata;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;
-import com.androidhuman.rxfirebase2.core.OnCompleteDisposable;
+import com.androidhuman.rxfirebase3.core.OnCompleteDisposable;
import android.net.Uri;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
-import io.reactivex.SingleObserver;
+import io.reactivex.rxjava3.core.Single;
+import io.reactivex.rxjava3.core.SingleObserver;
final class PutFileWithMetadataObserver extends Single {
@@ -29,7 +29,8 @@ final class PutFileWithMetadataObserver extends Single
}
@Override
- protected void subscribeActual(SingleObserver super UploadTask.TaskSnapshot> observer) {
+ protected void subscribeActual(
+ @NonNull final SingleObserver super UploadTask.TaskSnapshot> observer) {
Listener listener = new Listener(observer);
observer.onSubscribe(listener);
diff --git a/firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/RxFirebaseStorage.java b/firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/RxFirebaseStorage.java
similarity index 85%
rename from firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/RxFirebaseStorage.java
rename to firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/RxFirebaseStorage.java
index c57877f..979389b 100644
--- a/firebase-storage/src/main/java/com/androidhuman/rxfirebase2/storage/RxFirebaseStorage.java
+++ b/firebase-storage/src/main/java/com/androidhuman/rxfirebase3/storage/RxFirebaseStorage.java
@@ -1,4 +1,4 @@
-package com.androidhuman.rxfirebase2.storage;
+package com.androidhuman.rxfirebase3.storage;
import com.google.firebase.storage.StorageMetadata;
import com.google.firebase.storage.StorageReference;
@@ -8,14 +8,14 @@
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
-import io.reactivex.Single;
+import io.reactivex.rxjava3.core.Single;
public final class RxFirebaseStorage {
@NonNull
@CheckResult
public static Single putDocument(@NonNull StorageReference ref,
- @NonNull Uri uri) {
+ @NonNull Uri uri) {
return new PutFileObserver(ref, uri);
}
diff --git a/gradle.properties b/gradle.properties
index 2d7f14a..b02fcc0 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-GROUP=com.androidhuman.rxfirebase2
+GROUP=com.androidhuman.rxfirebase3
POM_DESCRIPTION=RxJava binding APIs for Firebase Android SDK.
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 5cafcc3..4928466 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip