build: drop the Material Components dependency - #1454
Merged
Merged
Conversation
`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.
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.
com.google.android.material:materialwas carried for one thing:Theme.CodeextendedTheme.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 nolayout/directories at all, so no Material view was ever inflated.Reparenting onto
Theme.AppCompat.DayNight.NoActionBarcovers what the theme actually needs. AppCompat is already here —FlipcashAppcallsAppCompatDelegate.setDefaultNightMode, and:ui:resourcesexposes it asapi— 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,colorSecondaryVariantandcolorOnSecondaryare not AppCompat attributes and had no reader.colorPrimary,colorPrimaryDarkandcolorAccentare AppCompat attributes and stay, and theandroid:window and splash-screen attributes are untouched.purple_backgroundwas referenced only bycolorSecondaryVariant, so it goes too.com.google.android.materialis no longer on the app'sdebugRuntimeClasspath.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.