From 33419be508af92ce5554519cca4d8d8ae093b22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ros=C3=A1rio=20P=2E=20Fernandes?= Date: Tue, 18 Mar 2025 21:46:03 +0000 Subject: [PATCH 01/10] chore: update release process and docs (#2195) --- docs/internal/releasing.md | 61 ++++++++++++++++++++++++++++---------- gradle.properties | 3 ++ 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/docs/internal/releasing.md b/docs/internal/releasing.md index 212ab11c8..9b7719679 100644 --- a/docs/internal/releasing.md +++ b/docs/internal/releasing.md @@ -6,7 +6,7 @@ more complex. ## 0 - Decide when to release All releases should have a milestone. A release is ready to go when all issues/PRs in the milestone -are either closed or have the `fix-implemented` lablel. +are either closed or have the `fix-implemented` label. FirebaseUI does not have strict guidance on release frequency. Minor and patch releases can go out as soon as they are ready. Major releases with breaking changes should happen as infrequently as @@ -28,7 +28,6 @@ Next, make the following changes on the release branch: * Update `Config.kt` and `gradle.properties` to remove the `SNAPSHOT` from the version name and set the release version. * Update `README.md` and `auth/README.md` to point to the latest version of the library and to have the correct descriptions of transitive dependencies. - * Empty `CHANGELOG.md` Commit the changes with a generic message: @@ -48,8 +47,8 @@ When ready, merge the pull request. ### Credentials -The library is published to Maven Central by the firebase-sonatype account, Googlers can find the -password for this account in [Valentine](http://valentine/) +The library is published to Maven Central by the `firebase-sonatype` account, Googlers can find the +password for this account in [Valentine](http://go/valentine/) ### GPG Key @@ -77,36 +76,68 @@ Finally upload your key to the keyserver: gpg --keyserver hkp://keys.openpgp.org --send-keys ``` +You might receive an email from `keyserver@keys.openpgp.org` to verify your email. +Click the link in the email to complete the verification before proceeding. + +
+ +gpg: keyserver send failed: Server indicated a failure + +If you run into the `gpg: keyserver send failed: Server indicated a failure` error when trying to + upload the key from a macOS machine, you can try the solution proposed [here](https://github.com/asdf-vm/asdf-nodejs/issues/192#issuecomment-797448073): + +```shell +echo "standard-resolver" > ~/.gnupg/dirmngr.conf +``` + +and then: + +```shell +sudo pkill dirmngr +``` + +
+ ### Local Properties -Open your `$HOME/.gradle/gradle.properties` file at and fill in the values: +1. Navigate to https://oss.sonatype.org/ and **Log In** using the credentials from [Valentine](http://go/valentine). +1. Follow [these instructions](https://central.sonatype.org/publish/generate-token/) to **Access User Token**. + You should see an XML that looks like this: + ```xml + + ${server} + tokenuser + tokenkey-dlghnfgh8+4LfXmg5Hsd8jd + + ``` +1. Open your `$HOME/.gradle/gradle.properties` file and fill in the values: ``` signing.keyId= signing.password= signing.secretKeyRingFile= -mavenCentralRepositoryUsername=firebase-sonatype -mavenCentralRepositoryUsername= +mavenCentralUsername= +mavenCentralPassword= ``` -## 2b - Publish and Release +## 2b - Publish and release -### Publish +_Publish_ and _release_ [used to be done](https://github.com/firebase/FirebaseUI-Android/blob/9.0.0/docs/internal/releasing.md#2b---publish-and-release) +in two separate manual steps, but starting in [v0.22.0](https://vanniktech.github.io/gradle-maven-publish-plugin/changelog/#0220-2022-09-09) +of the `com.vanniktech:gradle-maven-publish-plugin`, the `publishAllPublicationsToMavenRepository` +now handles the _publish_ step automatically and you only need to perform the _release_ manually. -Once you are sure the release branch is healthy, run the following command: +Once you are sure the release branch is healthy, run the following commands: ```shell ./gradlew clean :library:prepareArtifacts ./gradlew --no-daemon --no-parallel publishAllPublicationsToMavenRepository ``` -### Release - Follow [the instructions here](https://central.sonatype.org/pages/releasing-the-deployment.html): - 1. Navigate to https://oss.sonatype.org/ and **Log In** + 1. Navigate to https://oss.sonatype.org/ and **Log In**, if you haven't already. 1. On the left side click **Staging Repositories** and look for the `com.firebaseui` repo. - 1. Click **Close** ... wait a few minutes (you can check status with **Refresh**) 1. Click **Release** ## 3 - Update issues, milestones, and release notes @@ -117,7 +148,7 @@ First, go to the milestone for the released version and for each open issue: * Comment to let anyone watching know that the fix/feature has been released. Next, create a git tag for the latest version. In GitHub, create release notes based on the -template from the previous version and assign the release ntoes to the tag. +template from the previous version and assign the release notes to the tag. ## 4 - Prepare next development branch diff --git a/gradle.properties b/gradle.properties index 7255d6da2..26ae8292a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,3 +28,6 @@ POM_LICENCE_NAME=The Apache Software License, Version 2.0 POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt POM_DEVELOPER_NAME=FirebaseUI Contributors POM_DEVELOPER_URL=https://github.com/firebase/FirebaseUI-Android/graphs/contributors +# See https://vanniktech.github.io/gradle-maven-publish-plugin/changelog/#0200-2022-06-02 +SONATYPE_HOST=DEFAULT +RELEASE_SIGNING_ENABLED=true From 55b6c3996d1566f9a6ae0f136edb9a3805905332 Mon Sep 17 00:00:00 2001 From: rosariopf Date: Wed, 19 Mar 2025 15:17:56 +0000 Subject: [PATCH 02/10] Begin development on 9.1.0 --- buildSrc/src/main/kotlin/Config.kt | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/Config.kt b/buildSrc/src/main/kotlin/Config.kt index e4aed3d45..f98b9ddc0 100644 --- a/buildSrc/src/main/kotlin/Config.kt +++ b/buildSrc/src/main/kotlin/Config.kt @@ -1,5 +1,5 @@ object Config { - const val version = "9.0.0" + const val version = "9.1.0-SNAPSHOT" val submodules = listOf("auth", "common", "firestore", "database", "storage") private const val kotlinVersion = "2.1.0" diff --git a/gradle.properties b/gradle.properties index 26ae8292a..479fda855 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,7 @@ android.nonTransitiveRClass=false android.defaults.buildfeatures.buildconfig=true GROUP=com.firebaseui -VERSION_NAME=9.0.0 +VERSION_NAME=9.1.0-SNAPSHOT POM_PACKAGING=aar POM_DESCRIPTION=FirebaseUI for Android From 1feb8f8afb392fdaa4ef156eaa2a2eb472d22707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ros=C3=A1rio=20P=2E=20Fernandes?= Date: Wed, 19 Mar 2025 17:06:27 +0000 Subject: [PATCH 03/10] chore: use minSdk=23 for auth, and minSdk=21 for other modules (#2196) --- app/build.gradle.kts | 2 +- auth/build.gradle.kts | 5 +++-- buildSrc/src/main/kotlin/Config.kt | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cec75d966..772a7b7ae 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -10,7 +10,7 @@ android { namespace = "com.firebase.uidemo" defaultConfig { - minSdk = Config.SdkVersions.min + minSdk = 23 targetSdk = Config.SdkVersions.target versionName = Config.version diff --git a/auth/build.gradle.kts b/auth/build.gradle.kts index 66df263a8..2005c5c25 100644 --- a/auth/build.gradle.kts +++ b/auth/build.gradle.kts @@ -11,8 +11,9 @@ android { namespace = "com.firebase.ui.auth" defaultConfig { - minSdk = Config.SdkVersions.min - targetSdk =Config.SdkVersions.target + // Auth requires a higher minSdk than the current Config.SdkVersions.min + minSdk = 23 + targetSdk = Config.SdkVersions.target buildConfigField("String", "VERSION_NAME", "\"${Config.version}\"") diff --git a/buildSrc/src/main/kotlin/Config.kt b/buildSrc/src/main/kotlin/Config.kt index f98b9ddc0..69be31051 100644 --- a/buildSrc/src/main/kotlin/Config.kt +++ b/buildSrc/src/main/kotlin/Config.kt @@ -7,7 +7,9 @@ object Config { object SdkVersions { const val compile = 34 const val target = 34 - const val min = 23 + // Note that auth uses a different minSdk than this and + // should be changed in auth/build.gradle.kts + const val min = 21 } object Plugins { From 4af7d0be889c9bc566b1493f399d763c83a7b4a2 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Mar 2025 12:42:05 +0000 Subject: [PATCH 04/10] fix(auth): remove enableHints parsing from FlowParameters (#2199) --- .../java/com/firebase/ui/auth/data/model/FlowParameters.java | 1 - 1 file changed, 1 deletion(-) diff --git a/auth/src/main/java/com/firebase/ui/auth/data/model/FlowParameters.java b/auth/src/main/java/com/firebase/ui/auth/data/model/FlowParameters.java index c6dac950a..d13187c7d 100644 --- a/auth/src/main/java/com/firebase/ui/auth/data/model/FlowParameters.java +++ b/auth/src/main/java/com/firebase/ui/auth/data/model/FlowParameters.java @@ -53,7 +53,6 @@ public FlowParameters createFromParcel(Parcel in) { String termsOfServiceUrl = in.readString(); String privacyPolicyUrl = in.readString(); boolean enableCredentials = in.readInt() != 0; - boolean enableHints = in.readInt() != 0; boolean enableAnonymousUpgrade = in.readInt() != 0; boolean alwaysShowProviderChoice = in.readInt() != 0; boolean lockOrientation = in.readInt() != 0; From 83d1ce2f416db4652bd67dfc6b353737a82e5999 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 22 Oct 2025 17:05:25 +0200 Subject: [PATCH 05/10] feat: add support for API 35 EdgeToEdge (#2187) --- .../com/firebase/uidemo/ChooserActivity.java | 24 ++++ .../uidemo/auth/AnonymousUpgradeActivity.java | 5 + .../firebase/uidemo/auth/AuthUiActivity.java | 5 + .../uidemo/auth/SignedInActivity.java | 4 + .../firestore/FirestoreChatActivity.java | 5 + .../realtime/RealtimeDbChatActivity.java | 5 + .../uidemo/storage/ImageActivity.java | 5 + .../res/layout/activity_anonymous_upgrade.xml | 115 +++++++++--------- app/src/main/res/layout/activity_chat.xml | 102 +++++++++------- app/src/main/res/layout/activity_chooser.xml | 31 +++-- .../main/res/layout/activity_chooser_item.xml | 2 +- app/src/main/res/layout/activity_image.xml | 92 +++++++------- app/src/main/res/layout/auth_ui_layout.xml | 7 +- app/src/main/res/layout/signed_in_layout.xml | 5 +- app/src/main/res/values/styles.xml | 9 +- .../java/com/firebase/ui/auth/AuthUI.java | 3 + .../firebase/ui/auth/ui/AppCompatBase.java | 26 ++++ .../CredentialManagerHandler.kt | 1 + buildSrc/src/main/kotlin/Config.kt | 4 +- 19 files changed, 288 insertions(+), 162 deletions(-) diff --git a/app/src/main/java/com/firebase/uidemo/ChooserActivity.java b/app/src/main/java/com/firebase/uidemo/ChooserActivity.java index 4f7504299..2b9e4df1e 100644 --- a/app/src/main/java/com/firebase/uidemo/ChooserActivity.java +++ b/app/src/main/java/com/firebase/uidemo/ChooserActivity.java @@ -20,6 +20,11 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowCompat; +import androidx.core.view.WindowInsetsCompat; +import androidx.core.view.WindowInsetsControllerCompat; import com.firebase.ui.auth.AuthUI; import com.firebase.ui.auth.util.ExtraConstants; @@ -45,6 +50,9 @@ public class ChooserActivity extends AppCompatActivity { protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + // Enable edge-to-edge + WindowCompat.setDecorFitsSystemWindows(getWindow(), false); + if (AuthUI.canHandleIntent(getIntent())) { Intent intent = new Intent(ChooserActivity.this, AuthUiActivity .class); @@ -56,6 +64,22 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { mBinding = ActivityChooserBinding.inflate(getLayoutInflater()); setContentView(mBinding.getRoot()); + // Set up toolbar + setSupportActionBar(mBinding.toolbar); + getSupportActionBar().setTitle(R.string.app_name); + + // Handle the navigation bar padding + ViewCompat.setOnApplyWindowInsetsListener(mBinding.activities, (view, windowInsets) -> { + Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.navigationBars()); + view.setPadding( + view.getPaddingLeft(), + view.getPaddingTop(), + view.getPaddingRight(), + insets.bottom + ); + return WindowInsetsCompat.CONSUMED; + }); + mBinding.activities.setLayoutManager(new LinearLayoutManager(this)); mBinding.activities.setAdapter(new ActivityChooserAdapter()); mBinding.activities.setHasFixedSize(true); diff --git a/app/src/main/java/com/firebase/uidemo/auth/AnonymousUpgradeActivity.java b/app/src/main/java/com/firebase/uidemo/auth/AnonymousUpgradeActivity.java index 4453c4cbd..a34e4965d 100644 --- a/app/src/main/java/com/firebase/uidemo/auth/AnonymousUpgradeActivity.java +++ b/app/src/main/java/com/firebase/uidemo/auth/AnonymousUpgradeActivity.java @@ -29,6 +29,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; +import androidx.core.view.WindowCompat; public class AnonymousUpgradeActivity extends AppCompatActivity implements ActivityResultCallback { @@ -45,6 +46,10 @@ public class AnonymousUpgradeActivity extends AppCompatActivity @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + // Enable edge-to-edge + WindowCompat.setDecorFitsSystemWindows(getWindow(), false); + mBinding = ActivityAnonymousUpgradeBinding.inflate(getLayoutInflater()); setContentView(mBinding.getRoot()); diff --git a/app/src/main/java/com/firebase/uidemo/auth/AuthUiActivity.java b/app/src/main/java/com/firebase/uidemo/auth/AuthUiActivity.java index 0a8d44cd3..e18ba6a2a 100644 --- a/app/src/main/java/com/firebase/uidemo/auth/AuthUiActivity.java +++ b/app/src/main/java/com/firebase/uidemo/auth/AuthUiActivity.java @@ -53,6 +53,7 @@ import androidx.annotation.StyleRes; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatDelegate; +import androidx.core.view.WindowCompat; public class AuthUiActivity extends AppCompatActivity implements ActivityResultCallback { @@ -80,6 +81,10 @@ public static Intent createIntent(@NonNull Context context) { @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + // Enable edge-to-edge + WindowCompat.setDecorFitsSystemWindows(getWindow(), false); + mBinding = AuthUiLayoutBinding.inflate(getLayoutInflater()); setContentView(mBinding.getRoot()); diff --git a/app/src/main/java/com/firebase/uidemo/auth/SignedInActivity.java b/app/src/main/java/com/firebase/uidemo/auth/SignedInActivity.java index 9749f5c86..88acc3385 100644 --- a/app/src/main/java/com/firebase/uidemo/auth/SignedInActivity.java +++ b/app/src/main/java/com/firebase/uidemo/auth/SignedInActivity.java @@ -50,6 +50,7 @@ import androidx.annotation.Nullable; import androidx.annotation.StringRes; import androidx.appcompat.app.AppCompatActivity; +import androidx.core.view.WindowCompat; import static com.firebase.ui.auth.AuthUI.EMAIL_LINK_PROVIDER; @@ -68,6 +69,9 @@ public static Intent createIntent(@NonNull Context context, @Nullable IdpRespons public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + // Enable edge-to-edge + WindowCompat.setDecorFitsSystemWindows(getWindow(), false); + FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser(); if (currentUser == null) { startActivity(AuthUiActivity.createIntent(this)); diff --git a/app/src/main/java/com/firebase/uidemo/database/firestore/FirestoreChatActivity.java b/app/src/main/java/com/firebase/uidemo/database/firestore/FirestoreChatActivity.java index 59af0408b..b232ff06b 100644 --- a/app/src/main/java/com/firebase/uidemo/database/firestore/FirestoreChatActivity.java +++ b/app/src/main/java/com/firebase/uidemo/database/firestore/FirestoreChatActivity.java @@ -24,6 +24,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; +import androidx.core.view.WindowCompat; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -55,6 +56,10 @@ public class FirestoreChatActivity extends AppCompatActivity @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + // Enable edge-to-edge + WindowCompat.setDecorFitsSystemWindows(getWindow(), false); + mBinding = ActivityChatBinding.inflate(getLayoutInflater()); setContentView(mBinding.getRoot()); diff --git a/app/src/main/java/com/firebase/uidemo/database/realtime/RealtimeDbChatActivity.java b/app/src/main/java/com/firebase/uidemo/database/realtime/RealtimeDbChatActivity.java index 381893f7c..f30e1cf41 100644 --- a/app/src/main/java/com/firebase/uidemo/database/realtime/RealtimeDbChatActivity.java +++ b/app/src/main/java/com/firebase/uidemo/database/realtime/RealtimeDbChatActivity.java @@ -24,6 +24,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; +import androidx.core.view.WindowCompat; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -52,6 +53,10 @@ public class RealtimeDbChatActivity extends AppCompatActivity @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + // Enable edge-to-edge + WindowCompat.setDecorFitsSystemWindows(getWindow(), false); + mBinding = ActivityChatBinding.inflate(getLayoutInflater()); setContentView(mBinding.getRoot()); diff --git a/app/src/main/java/com/firebase/uidemo/storage/ImageActivity.java b/app/src/main/java/com/firebase/uidemo/storage/ImageActivity.java index bf2f57a80..67232fdfe 100644 --- a/app/src/main/java/com/firebase/uidemo/storage/ImageActivity.java +++ b/app/src/main/java/com/firebase/uidemo/storage/ImageActivity.java @@ -28,6 +28,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; +import androidx.core.view.WindowCompat; import pub.devrel.easypermissions.AfterPermissionGranted; import pub.devrel.easypermissions.AppSettingsDialog; import pub.devrel.easypermissions.EasyPermissions; @@ -46,6 +47,10 @@ public class ImageActivity extends AppCompatActivity implements EasyPermissions. @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + // Enable edge-to-edge + WindowCompat.setDecorFitsSystemWindows(getWindow(), false); + mBinding = ActivityImageBinding.inflate(getLayoutInflater()); setContentView(mBinding.getRoot()); diff --git a/app/src/main/res/layout/activity_anonymous_upgrade.xml b/app/src/main/res/layout/activity_anonymous_upgrade.xml index 2677a1c71..946dfaf4b 100644 --- a/app/src/main/res/layout/activity_anonymous_upgrade.xml +++ b/app/src/main/res/layout/activity_anonymous_upgrade.xml @@ -1,67 +1,72 @@ - + android:fitsSystemWindows="true"> - - - + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="16dp" + android:clipToPadding="false" + android:fitsSystemWindows="true"> + + + + + +