Skip to content

fix(auth)!: add an Android Lint workflow and gate the Kotlin modules on it - #2498

Merged
russellwheatley merged 2 commits into
version-10.0.0-beta05from
ci/run-android-lint-in-the-build
Sep 9, 2026
Merged

fix(auth)!: add an Android Lint workflow and gate the Kotlin modules on it#2498
russellwheatley merged 2 commits into
version-10.0.0-beta05from
ci/run-android-lint-in-the-build

Conversation

@demolaf

@demolaf demolaf commented Sep 9, 2026

Copy link
Copy Markdown
Member

Every module configures Android Lint — :auth with checkAllWarnings and warningsAsErrors — and nothing has ever invoked it. checkstyle is the only style gate the build knows about, and it is scoped include("**/*.java"), so on a Kotlin module like :auth it inspects zero files and exits green. The first real run found 193 errors in :auth and 5 in :database; every other module was already clean.

  • New lint.yml workflow runs lintAll, a root task gating the eight modules that configure a lint { } block. Deliberately not a build.sh step: inline it took the build job from 3-6 min to 8-11, and under set -e a lint failure aborted the run before testDebugUnitTest.
  • The 13 genuine :auth findings are fixed rather than suppressed — MemberExtensionConflict, NoOp, two UseKtx, RedundantLabel, and VectorRaster on an icon that declared a 314dp intrinsic size where every sibling is 24dp.
  • fui_confirmation_code_layout.xml and fui_phone_layout.xml deleted: both reference SpacedEditText/CountryListSpinner, removed in 21a6823, so inflating either would throw.
  • DatabasePagingKey.java gains @Nullable on the child value and node key. This narrows the Kotlin-visible type from String! to String?, so it is a source-level break for Kotlin consumers — acceptable pre-GA, but calling it out.
  • library/build.gradle.kts flips abortOnError to true; it was false, so :library would have sat in the new gate unable to ever fail it.
  • 180 pre-existing localization and Compose findings are baselined in auth/lint-baseline.xml, so new findings still fail. The old library/quality/lint-baseline.xml is removed — eight modules pointed at one file, but baseline paths are recorded per module, so its entries matched either every module or none.
  • LogConditional is disabled rather than satisfied: any enclosing if meets it, so it flagged 5 of :auth's 23 Log.d calls, and guarding those with Log.isLoggable would silence them by default.

⚠️ Breaking Changes

AuthMethodPicker's customLayout moves to the last parameter so it can be passed as a trailing lambda. Positional callers break at compile time, and because the JVM descriptor changed, callers using named arguments need a recompile too. EmailAuthStep is internal, so the equivalent move there has no external effect.


Maintainer note: Fixes internal CPRN-428

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates Android Lint into the build process by adding a repository-wide lintAll task, updating the CI scripts, and cleaning up module-specific lint baseline configurations. It also introduces logging optimizations using Log.isLoggable checks, refactors coroutine cancellation in AuthFlowController, adds nullability annotations to the database paging classes, and updates documentation regarding the new linting setup. The reviewer feedback highlights two key improvement opportunities: implementing equals and hashCode in DatabasePagingKey to ensure proper Paging 3 diffing and state restoration, and optimizing the QR code bitmap generation in QrCodeImage.kt by using bulk setPixels to reduce JNI overhead.

Comment thread auth/src/main/java/com/firebase/ui/auth/ui/components/QrCodeImage.kt Outdated
@demolaf
demolaf force-pushed the ci/run-android-lint-in-the-build branch 2 times, most recently from fe6962b to 9fcd7f0 Compare September 9, 2026 12:34
@demolaf
demolaf marked this pull request as ready for review September 9, 2026 12:38
@demolaf
demolaf force-pushed the ci/run-android-lint-in-the-build branch from 9fcd7f0 to 0d104b2 Compare September 9, 2026 13:08
@demolaf
demolaf force-pushed the ci/run-android-lint-in-the-build branch from 0d104b2 to 64ce7cf Compare September 9, 2026 13:33
@demolaf
demolaf force-pushed the ci/run-android-lint-in-the-build branch from 64ce7cf to 4f2b154 Compare September 9, 2026 13:35
@demolaf demolaf changed the title ci: run Android Lint in the build and gate the Kotlin modules on it ci: add an Android Lint workflow and gate the Kotlin modules on it Sep 9, 2026
@russellwheatley russellwheatley changed the title ci: add an Android Lint workflow and gate the Kotlin modules on it fix(auth)!: add an Android Lint workflow and gate the Kotlin modules on it Sep 9, 2026
@russellwheatley
russellwheatley merged commit 3d8030a into version-10.0.0-beta05 Sep 9, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in studio-2394994192-60a69 Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants