Open Bug 2049759 Opened 17 days ago Updated 4 days ago

android-ac lint does not cover the components:samples-* modules

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect)

defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: RyanVM, Assigned: adhingra)

References

Details

Attachments

(1 file)

./mach lint -l android-ac runs :android-components:lint against the repo-root settings.gradle composite. That composite pulls in the android-components modules via SettingsPlugin.loadBuildConfig, but its filter excludes components:samples-*:

rootDir.contains("android-components") || !name.startsWith("components:samples")

The composite's rootDir is the repo root (not android-components), so most sample modules are excluded -- only the four explicitly re-added for the geckoview_example flow (samples-acorn-components, samples-browser, samples-compose-browser, samples-toolbar) are present. android-ac therefore never runs AGP lint on the others (samples/glean, sync, crash, dataprotect, firefox-accounts, firefox-relay, sync-logins), and their lint-baseline.xml files are neither checked nor regenerated.

Observed by deleting all android-components lint-baseline.xml files and running both commands: ./mach lint -l android-ac leaves the sample baselines deleted, while ./mach gradle -p mobile/android/android-components lint (whose rootDir contains android-components, so the filter admits all samples) recreates them.

The exclusion is intentional -- Bug 2016231 added the filter to keep components:sample projects out of the Fenix and Focus app builds. Today the standalone -p mobile/android/android-components build still lints the samples, but under the planned move to top-level-only builds that standalone build goes away, so the samples would lose lint coverage entirely. A fix should give the sample modules a lint home in the top-level build without re-introducing them into the Fenix/Focus app builds.

Assignee: nobody → adhingra
Status: NEW → ASSIGNED

The severity field is not set for this bug.
:polly, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(polly)
Severity: -- → S4
Flags: needinfo?(polly)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: