Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
java-version: '21'
distribution: 'temurin'

# lintAll gates :proguard-tests, which applies the google-services plugin and
# will not configure without this file. Mirrors what scripts/build.sh copies.
# lintAll gates :app and :proguard-tests, both of which apply the google-services
# plugin and will not configure without this file. Mirrors what build.sh copies.
- name: Copy google-services.json
run: |
cp library/google-services.json app/google-services.json
Expand Down
20 changes: 20 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ android {
}
}
}

lint {
// Module specific
disable += mutableSetOf(
// Reads the root wrapper, but only the application module analyses it, so it
// belongs here rather than in the shared policy. For reproducible builds.
"AndroidGradlePluginVersion",
// The demos log their auth callbacks unconditionally on purpose — watching
// logcat is how you see one fire. Unlike :auth's, none of these log user data.
"LogConditional",
// Glide's KSP processor does not generate GlideApp, which the storage demo and
// storage/README.md are both written around. Migration tracked separately.
"KaptUsageInsteadOfKsp",
// A themed icon needs a flat silhouette drawn for the purpose. The only
// candidate here is ic_launcher_foreground, whose opaque region is a solid
// plate, so it tints to a featureless block — worse than no monochrome layer.
"MonochromeLauncherIcon"
)
}
Comment thread
demolaf marked this conversation as resolved.

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down
9 changes: 7 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@
android:usesCleartextTraffic="true">
<activity
android:name="com.firebaseui.android.demo.MainActivity"
android:label="@string/app_name"
android:exported="true"
android:theme="@style/Theme.FirebaseUIAndroid">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter android:autoVerify="true">
<!--
The host is a placeholder the demo's own Firebase project fills in, so lint
can neither read it as a domain nor resolve it over the network.
-->
<intent-filter
android:autoVerify="true"
tools:ignore="AppLinkUrlError,AppLinksAutoVerify">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.firebase.ui.database.paging.DatabasePagingOptions
import com.firebase.ui.database.paging.FirebaseRecyclerPagingAdapter
import com.firebaseui.android.demo.R
import com.google.firebase.auth.FirebaseAuth
import com.google.firebase.database.DatabaseReference
import com.google.firebase.database.FirebaseDatabase
Expand Down Expand Up @@ -122,7 +123,8 @@ class ScoreAdapter(options: DatabasePagingOptions<ScoreItem>) :
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ScoreViewHolder(parent)

override fun onBindViewHolder(holder: ScoreViewHolder, position: Int, model: ScoreItem) {
(holder.itemView as TextView).text = "${model.name} — score: ${model.score}"
val row = holder.itemView as TextView
row.text = row.context.getString(R.string.demo_score_row, model.name, model.score)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.firebase.ui.firestore.paging.FirestorePagingAdapter
import com.firebase.ui.firestore.paging.FirestorePagingOptions
import com.firebaseui.android.demo.R
import com.google.firebase.auth.FirebaseAuth
import com.google.firebase.firestore.CollectionReference
import com.google.firebase.firestore.FirebaseFirestore
Expand Down Expand Up @@ -129,7 +130,8 @@ class ScoreAdapter(options: FirestorePagingOptions<ScoreItem>) :
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ScoreViewHolder(parent)

override fun onBindViewHolder(holder: ScoreViewHolder, position: Int, model: ScoreItem) {
(holder.itemView as TextView).text = "${model.name} — score: ${model.score}"
val row = holder.itemView as TextView
row.text = row.context.getString(R.string.demo_score_row, model.name, model.score)
}
}

Expand Down
Binary file removed app/src/main/res/drawable-hdpi/firebase_auth.png
Binary file not shown.
Binary file added app/src/main/res/drawable-hdpi/firebase_auth.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/drawable-mdpi/firebase_auth.png
Binary file not shown.
Binary file added app/src/main/res/drawable-mdpi/firebase_auth.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 0 additions & 30 deletions app/src/main/res/drawable-v24/ic_launcher_foreground.xml

This file was deleted.

Binary file removed app/src/main/res/drawable-xhdpi/firebase_auth.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/drawable-xxhdpi/firebase_auth.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/drawable-xxxhdpi/firebase_auth.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
170 changes: 0 additions & 170 deletions app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/values/colors.xml

This file was deleted.

21 changes: 15 additions & 6 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">FirebaseUI Demo</string>

<string name="firebase_web_host" translatable="false">CHANGE-HERE</string>

<!-- Facebook SDK Configuration -->
<string name="facebook_application_id" translatable="false">APP-ID</string>
<string name="facebook_login_protocol_scheme" translatable="false">fbAPP-ID</string>
<string name="facebook_client_token" translatable="false">CHANGE-HERE</string>
</resources>
<!-- One row of the paging demos: %1$s is the player name, %2$d their score. -->
<string name="demo_score_row">%1$s — score: %2$d</string>

<!--
The Facebook SDK reads these through the auth module's manifest and provider
validation, so lint cannot see them being used from this module.
-->
<string name="facebook_application_id" translatable="false"
tools:ignore="UnusedResources">APP-ID</string>
<string name="facebook_login_protocol_scheme" translatable="false"
tools:ignore="UnusedResources">fbAPP-ID</string>
<string name="facebook_client_token" translatable="false"
tools:ignore="UnusedResources">CHANGE-HERE</string>
</resources>
12 changes: 0 additions & 12 deletions auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ android {
}

lint {
// Common lint options across all modules
disable += mutableSetOf(
"IconExpectedSize",
"InvalidPackage", // Firestore uses GRPC which makes lint mad
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
"SelectableText", "SyntheticAccessor" // We almost never care about this
)

// Module specific
disable += mutableSetOf(
"UnusedQuantity",
Expand All @@ -64,10 +56,6 @@ android {
"LogConditional"
)

checkAllWarnings = true
warningsAsErrors = true
abortOnError = true

// Pre-existing debt only: 168 localization findings (CPRN-432) and 12 Compose
// correctness findings (CPRN-436). Every entry is suppressed; new ones still fail.
baseline = file("lint-baseline.xml")
Expand Down
Loading