From f6a89a4df9a90019108baeff9f58148b08cb0b35 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Fri, 11 Sep 2026 11:52:03 -0400 Subject: [PATCH] build: drop the Material Components dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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. --- apps/flipcash/app/build.gradle.kts | 4 ++-- apps/flipcash/app/src/main/res/values-v31/themes.xml | 8 +------- apps/flipcash/app/src/main/res/values/colors.xml | 1 - apps/flipcash/app/src/main/res/values/themes.xml | 8 +------- gradle/libs.versions.toml | 2 -- 5 files changed, 4 insertions(+), 19 deletions(-) diff --git a/apps/flipcash/app/build.gradle.kts b/apps/flipcash/app/build.gradle.kts index 03be09caac..55c03c5791 100644 --- a/apps/flipcash/app/build.gradle.kts +++ b/apps/flipcash/app/build.gradle.kts @@ -295,8 +295,8 @@ dependencies { implementation(libs.androidx.lifecycle.viewmodel) implementation(libs.androidx.work) implementation(libs.androidx.webkit) - // Resources only: Theme.Code in res/values/themes.xml extends Theme.MaterialComponents. - implementation(libs.google.material) + // Resources only: Theme.Code in res/values/themes.xml extends Theme.AppCompat. + implementation(libs.androidx.appcompat) //hilt dependency injection implementation(libs.hilt.android) diff --git a/apps/flipcash/app/src/main/res/values-v31/themes.xml b/apps/flipcash/app/src/main/res/values-v31/themes.xml index ffb7501669..47099970e6 100644 --- a/apps/flipcash/app/src/main/res/values-v31/themes.xml +++ b/apps/flipcash/app/src/main/res/values-v31/themes.xml @@ -1,15 +1,9 @@ -