Skip to content

build: drop the Material Components dependency - #1454

Merged
bmc08gt merged 1 commit into
code/cashfrom
build/drop-material
Sep 11, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
build/drop-material

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

com.google.android.material:material was carried for one thing: Theme.Code extended Theme.MaterialComponents.DayNight.NoActionBar. Nothing else used it. There are no Kotlin or Java imports of it, no XML references beyond that parent, and the project has no layout/ directories at all, so no Material view was ever inflated.

Reparenting onto Theme.AppCompat.DayNight.NoActionBar covers what the theme actually needs. AppCompat is already here — FlipcashApp calls AppCompatDelegate.setDefaultNightMode, and :ui:resources exposes it as api — so this drops a dependency rather than swapping one for another. The app now declares AppCompat directly instead of leaning on the transitive path.

The five MaterialComponents-only attributes go with it: colorPrimaryVariant, colorOnPrimary, colorSecondary, colorSecondaryVariant and colorOnSecondary are not AppCompat attributes and had no reader. colorPrimary, colorPrimaryDark and colorAccent are AppCompat attributes and stay, and the android: window and splash-screen attributes are untouched. purple_background was referenced only by colorSecondaryVariant, so it goes too.

com.google.android.material is no longer on the app's debugRuntimeClasspath.

Supersedes #1452, the 1.4.0 to 1.14.0 bump: with the dependency out of the catalog there is nothing left for Dependabot to raise.

`com.google.android.material:material` was carried for one thing: `Theme.Code`
extended `Theme.MaterialComponents.DayNight.NoActionBar`. Nothing else used it.
There are no Kotlin or Java imports of it, no XML references beyond that parent,
and the project has no `layout/` directories at all, so no Material view was
ever inflated.

Reparenting onto `Theme.AppCompat.DayNight.NoActionBar` covers what the theme
actually needs. AppCompat is already here — `FlipcashApp` calls
`AppCompatDelegate.setDefaultNightMode`, and `:ui:resources` exposes it as
`api` — so this drops a dependency rather than swapping one for another. The app
now declares AppCompat directly instead of leaning on the transitive path.

The five MaterialComponents-only attributes go with it: `colorPrimaryVariant`,
`colorOnPrimary`, `colorSecondary`, `colorSecondaryVariant` and
`colorOnSecondary` are not AppCompat attributes and had no reader.
`colorPrimary`, `colorPrimaryDark` and `colorAccent` are AppCompat attributes and
stay, and the `android:` window and splash-screen attributes are untouched.
`purple_background` was referenced only by `colorSecondaryVariant`, so it goes
too.

`com.google.android.material` is no longer on the app's debugRuntimeClasspath.
@bmc08gt bmc08gt self-assigned this Sep 11, 2026
@github-actions github-actions Bot added area: build-system Gradle, convention plugins, build-logic type: build Build system, Gradle, dependencies labels Sep 11, 2026
@bmc08gt
bmc08gt merged commit b555738 into code/cash Sep 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic type: build Build system, Gradle, dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant