Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request restricts the visibility of several classes, interfaces, and properties in the auth module to internal to better encapsulate them within the library. The feedback suggests adding the @Volatile annotation to the mutable test provider properties in FirebaseAuthUI to guarantee thread visibility during asynchronous operations. Additionally, it is recommended to change the base class PasswordCredentialException to internal to maintain consistency with its subclasses.
demolaf
changed the base branch from
build/e2etest-auth-friend-paths
to
pre-GA
September 22, 2026 09:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Narrows the
com.firebase.ui.auth.credentialmanagerpackage and theFirebaseAuthUItest seams while that is still free to do. After the GA cut it would no longer be.:e2eTestdrives several of these seams, so it gets friend-path access to:authin the same change.Changes
internalplus@RestrictTo(LIBRARY_GROUP)on all seven declarations incredentialmanager/:PasswordCredential,CredentialManagerProvider,DefaultCredentialManagerProvider,PasswordCredentialHandlerand its companion seam,PasswordCredentialExceptionand its two subclasses.internalonFirebaseAuthUI.testCredentialManagerProvider,testLoginManagerProviderandclearInstanceCache(), each keeping its@RestrictTo, matching whatgetCacheSize()already did.PasswordCredentialHandler's companion KDoc, which is what invited consumers to depend on the seam, and an orphaned KDoc line onFirebaseAuthUIthat documented a property that no longer exists.friendPathsblock toe2eTest/build.gradle.kts, scoped to the unit-test compilations, filtering the compile classpath (libraries) for entries underauth/buildrather than hardcoding the AGP intermediates jar it resolves to today.Why
@RestrictTostays rather than being replaced byinternalinternalis Kotlin-only. A top-levelinternalclass emitsACC_PUBLIC, and a public member of aninternalclass's companion is not name-mangled, soPasswordCredentialHandler.Companion.setTestCredentialManagerProvider(...)stays callable from Java either way.@RestrictTois what drives theRestrictedApilint check, and it is the only signal a Java consumer gets. Verified against the compiledclasses.jarrather than assumed.Why this needs no deprecation cycle
PasswordCredentialHandler.testCredentialManagerProvidercarried no@RestrictToand its KDoc told consumers how to set it, but it is a test seam, never intended as public API. Nothing here was API to break.Friend-path notes
Appending
-Xfriend-pathstocompilerOptions.freeCompilerArgsis ignored, because KGP generates that flag itself from the typedfriendPathsproperty, and pointing atauth/build/tmp/kotlin-classes/debugfails because:e2eTestnever sees that directory. Both were measured. The wiring hangs offorg.jetbrains.kotlin.gradle.tasks.KotlinCompile, so the pending AGP 9.0 built-in-Kotlin migration will need it rewritten.Out of scope
FirebaseAuthActivity,FirebaseUIComposeRegistrarandFirebaseAuthUI.updateAuthStatestay exactly as they are, neither documented nor narrowed.Maintainer note: Fixes internal CPRN-492
Maintainer note: Fixes internal CPRN-493