Skip to content

ci: bring :app and :e2eTest under the Android Lint gate - #2500

Closed
demolaf wants to merge 1 commit into
ci/run-android-lint-in-the-buildfrom
feature/cprn-433-app-e2etest-lint
Closed

ci: bring :app and :e2eTest under the Android Lint gate#2500
demolaf wants to merge 1 commit into
ci/run-android-lint-in-the-buildfrom
feature/cprn-433-app-e2etest-lint

Conversation

@demolaf

@demolaf demolaf commented Sep 9, 2026

Copy link
Copy Markdown
Member

No description provided.

@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 configures Android Lint for the :app and :e2eTest modules, updates CI documentation to reflect that all 10 modules are now gated, cleans up unused resources, and adds a monochrome layer to the adaptive launcher icons. Feedback points out that the <monochrome> layer incorrectly references a raster image instead of a vector drawable, which will break themed icons on Android 13+. Additionally, it is recommended to centralize the duplicated lint configurations across modules to adhere to DRY principles.

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_foreground"/>

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.

high

The <monochrome> layer of an adaptive icon must be a vector drawable so that the system can dynamically tint it according to the user's theme. Since @mipmap/ic_launcher_foreground is a webp (raster) image, using it here will prevent themed icons from rendering correctly on Android 13+ devices. Consider providing a flat vector drawable for the monochrome layer instead.

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_foreground"/>

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.

high

The <monochrome> layer of an adaptive icon must be a vector drawable so that the system can dynamically tint it according to the user's theme. Since @mipmap/ic_launcher_foreground is a webp (raster) image, using it here will prevent themed icons from rendering correctly on Android 13+ devices. Consider providing a flat vector drawable for the monochrome layer instead.

Comment thread app/build.gradle.kts
Comment on lines +43 to +50
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
)

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.

medium

The common lint options are duplicated across multiple modules (e.g., :app and :e2eTest). This violates the DRY (Don't Repeat Yourself) principle and increases maintenance overhead when adding or removing global lint rules. Consider centralizing these common lint options in the root build.gradle.kts file using subprojects or by creating a custom Gradle convention plugin.

Comment thread e2eTest/build.gradle.kts
Comment on lines +17 to +24
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
)

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.

medium

The common lint options are duplicated across multiple modules (e.g., :app and :e2eTest). This violates the DRY (Don't Repeat Yourself) principle and increases maintenance overhead when adding or removing global lint rules. Consider centralizing these common lint options in the root build.gradle.kts file using subprojects or by creating a custom Gradle convention plugin.

@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 feature/cprn-433-app-e2etest-lint branch 2 times, most recently from 0027ad3 to b18edc9 Compare September 9, 2026 13:23
@demolaf
demolaf force-pushed the ci/run-android-lint-in-the-build branch 2 times, most recently from 64ce7cf to 4f2b154 Compare September 9, 2026 13:35
@demolaf
demolaf force-pushed the feature/cprn-433-app-e2etest-lint branch from b18edc9 to 5b326ae Compare September 9, 2026 13:44
@demolaf demolaf closed this Sep 9, 2026
@demolaf
demolaf deleted the feature/cprn-433-app-e2etest-lint branch September 9, 2026 13:48
@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.

1 participant