From b92dabbdf709b505ba2d89e0a0a0efa057f7c4f5 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 5 Nov 2026 12:46:01 +0100 Subject: build: remove Material Components and the AppCompat dependency Co-Authored-By: Claude Sonnet 5.5 --- AGENTS.md | 17 +++++---- TODO.md | 6 ++-- app/build.gradle.kts | 4 +-- app/src/main/res/values/colors_material3.xml | 54 ---------------------------- gradle/libs.versions.toml | 2 -- 5 files changed, 14 insertions(+), 69 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 952af633..01f4a392 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,6 +25,9 @@ Debug"), so it installs next to upstream's `app.passwordstore` and never updates Kotlin package stays `app.passwordstore`; renaming it is churn with no user-visible effect. Keep "GrapheneOS" out of the app name: it is that project's trademark. +minSdk is 31: GrapheneOS runs current Android only, and Android 12 has +`UiModeManager.setApplicationNightMode`. + ## Repository layout and remotes - `master` is the only branch. Upstream's `develop` was renamed; do not recreate it. @@ -144,13 +147,13 @@ cached passphrase) and Pixel 6 Pro on Android 17 (fill, save), all passed. - `LaunchActivity` is exported and forwards `FILE_PATH` to `MainActivity` (not exported) only after `isFileInRepo` checks it canonically resolves inside the store; `MainActivity` opens it as `EntryRoute`, whose destination checks it again before decrypting. -- Material Components (Views) stays after the Compose overhaul: the window themes derive from - `Theme.Material3.DayNight` (the AppCompat activities need it), and the git operations' View - dialogs (`BaseGitActivity`, `GitOperation`, `CredentialFinder` with - `git_credential_layout.xml`, `BreakOutOfDetached`, `StoreActions`), `DynamicColors` and the - `snackbar` helper use it. `oreo_autofill_dataset.xml` stays a layout: fill suggestions are - `RemoteViews` drawn by the system. `fragment-ktx` is declared only to pin `androidx.fragment` - (appcompat alone resolves an older one). +- Window themes derive from the platform `android:Theme.Material.*.NoActionBar`, activities from + `FragmentActivity` (`BiometricPrompt` needs it). Git operations and store actions show dialogs and + snackbars through the activity-scoped `Prompts` ViewModel (`activity.prompts`), drawn by + `PromptHost`, which only `MainActivity` and `AutofillSaveActivity` host. AppCompat stays in the + APK through zxing (`CaptureManager`, `zxing_CaptureTheme`) and `androidx.biometric`; + `oreo_autofill_dataset.xml` stays a layout: fill suggestions are `RemoteViews` drawn by the + system. - sshj gets Ed25519 keys from Bouncy Castle: `SshjConfig.kt` pins `KeyFactory.Ed25519` to it at provider position 1. Conscrypt from Android 14 mainline updates serves that factory with keys sshj maps to `KeyType.UNKNOWN` ("Don't know how to encode key"), breaking every Ed25519 host diff --git a/TODO.md b/TODO.md index 2dd6f365..f9832c0e 100644 --- a/TODO.md +++ b/TODO.md @@ -4,6 +4,6 @@ Open work after 0.2.0. Remove an item in the commit that finishes it. ## Features and UI -- Git dialogs to Compose: the git operations' View dialogs (`BaseGitActivity`, `GitOperation`, - `CredentialFinder`, `BreakOutOfDetached`, `StoreActions`) and the `snackbar` helper still use - Material Components (Views). Moving them lets that dependency go. +- QR scanner: `zxing-android-embedded` is the last thing keeping AppCompat in the APK + (`androidx.biometric` references it only on the fingerprint dialog path, unused at minSdk 31). + Replacing it would let AppCompat go. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cad899f9..9ad30d32 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -57,18 +57,16 @@ dependencies { implementation(projects.ui.compose) implementation(libs.androidx.activity) implementation(libs.androidx.activity.compose) - implementation(libs.androidx.appcompat) implementation(libs.androidx.autofill) implementation(libs.androidx.biometricKtx) implementation(libs.androidx.core.ktx) implementation(libs.androidx.documentfile) - // Pins androidx.fragment (FragmentActivity, BiometricPrompt): appcompat alone resolves 1.5.4. + // FragmentActivity, which BiometricPrompt needs. implementation(libs.androidx.fragment.ktx) implementation(libs.androidx.hilt.navigation.compose) implementation(libs.bundles.androidxLifecycle) implementation(libs.androidx.lifecycle.viewmodel.compose) implementation(libs.androidx.lifecycle.runtime.compose) - implementation(libs.androidx.material) implementation(libs.androidx.navigation.compose) implementation(libs.compose.ui.tooling) implementation(libs.dagger.hilt.android) diff --git a/app/src/main/res/values/colors_material3.xml b/app/src/main/res/values/colors_material3.xml index ecd34921..47ffbc6a 100644 --- a/app/src/main/res/values/colors_material3.xml +++ b/app/src/main/res/values/colors_material3.xml @@ -5,59 +5,5 @@ #006591 - #FFFFFF - #C7E6FF - #001E30 - #4F606E - #FFFFFF - #D3E5F5 - #0B1D29 - #006494 - #FFFFFF - #C8E6FF - #001E31 - #BA1B1B - #FFDAD4 - #FFFFFF - #410001 - #FCFCFF - #1A1C1E - #FCFCFF - #1A1C1E - #DDE3EA - #41474D - #72787E - #F0F0F3 - #2E3133 - #85CEFF - #85CEFF - #00344E - #004C6F - #C7E6FF - #B7C9D9 - #21323E - #384956 - #D3E5F5 - #8ACEFF - #003450 - #004B70 - #C8E6FF - #FFB4A9 - #930006 - #680003 - #FFDAD4 - #1A1C1E - #E1E2E5 - #1A1C1E - #E1E2E5 - #41474D - #C1C7CE - #8B9197 - #1A1C1E - #E1E2E5 - #006591 - #003E5B - #BA1B1B - diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c0a37319..3439f128 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,7 +14,6 @@ android-desugarJdkLibs = "com.android.tools:desugar_jdk_libs:2.0.4" androidx-activity = { module = "androidx.activity:activity", version.ref = "androidxActivity" } androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidxActivity" } androidx-annotation = "androidx.annotation:annotation:1.8.2" -androidx-appcompat = "androidx.appcompat:appcompat:1.7.0" androidx-autofill = "androidx.autofill:autofill:1.3.0" androidx-biometricKtx = "androidx.biometric:biometric-ktx:1.2.0-alpha05" androidx-core-ktx = "androidx.core:core-ktx:1.13.1" @@ -27,7 +26,6 @@ androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-ru androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" } androidx-lifecycle-viewmodelKtx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" } androidx-navigation-compose = "androidx.navigation:navigation-compose:2.8.9" -androidx-material = "com.google.android.material:material:1.12.0" aps-sublimeFuzzy = "com.github.android-password-store:sublime-fuzzy:2.3.4" aps-zxingAndroidEmbedded = "com.github.android-password-store:zxing-android-embedded:4.2.1" build-agp = { module = "com.android.tools.build:gradle", version.ref = "agp" } -- cgit v1.2.3