FirebaseUI version 8.0.0
has significant breaking API changes and also adopts new major versions of many critical dependencies. Below is a description of each breaking change.
In order to use FirebaseUI v8.0 or higher your app must use Java 8.0 language featuresa and version 7.x of the Android Gradle Plugin.
Add the following to your app's build.gradle
android {
...
// Configure only for each module that uses Java 8
// language features (either in its source code or
// through dependencies).
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// For Kotlin projects
kotlinOptions {
jvmTarget = "1.8"
}
}
For more information on using Java 8 language features in your app, see the Android documentation.
In your root build.gradle
file make sure you are using AGP 7 or higher:
buildscript {
// ...
dependencies {
// ...
classpath 'com.android.tools.build:gradle:7.0.0'
}
}
This will require installing Gradle 7 and JDK 11 on your machine. For more information on this relase see the Android documentation.
FirebaseUI now depends on the Firebase SDK at BOM major version 28.0.0
. You should update your app to use the same major version to avoid possible compilation errors or crashes.
For more information on this SDK release see the Firebase Android SDK release notes.
FirebaseUI Authentication now depends on the Material Design UI components rather than the older AppCompat components. This will require two breaking changes for existing users:
First, you must define a theme with the following minimal properties:
colorPrimary
colorPrimaryVariant
colorAccent
android:statusBarColor
(API > 21) orcolorPrimaryDark
(API < 21)
Second, you must explicitly pass a reference to this theme when starting FirebaseUI using setTheme()
:
Intent signInIntent =
AuthUI.getInstance(this).createSignInIntentBuilder()
// ...
.setTheme(R.style.AppTheme)
.build())
For more information on how to build a Material theme, see the Material Design documentation.
The offensive terms "whitelist" and "blacklist" have been removed from the FirebaseUI public API. Specifically the IdpConfig.PhoneBuilder
class has changed:
Before
IdpConfig phoneConfigWithAllowedCountries = new IdpConfig.PhoneBuilder()
.setWhitelistedCountries(allowedCountries)
.build();
IdpConfig phoneConfigWithBlockedCountries = new IdpConfig.PhoneBuilder()
.setBlacklistedCountries(blockedCountries)
.build();
After
IdpConfig phoneConfigWithAllowedCountries = new IdpConfig.PhoneBuilder()
.setAllowedCountries(allowedCountries)
.build();
IdpConfig phoneConfigWithBlockedCountries = new IdpConfig.PhoneBuilder()
.setBlockedCountries(blockedCountries)
.build();
The FirestorePagingAdapter
class now depends on AndroidX Paging version 3, which has a new API.
To see the new FirebaseUI API, see the firestore/README.md file for an example.
For general information on upgrading your app to Paging 3, see the Android documentation.
The FirebaseRecyclerPagingAdapter
class now depends on AndroidX Paging version 3, which has a new API.
To see the new FirebaseUI API, see the database/README.md file for an example.
For general information on upgrading your app to Paging 3, see the Android documentation.