From bf7e9e9aa1b432dece601ca229b2cc0f8b0511ea Mon Sep 17 00:00:00 2001 From: David Schachter Date: Thu, 23 Jul 2026 14:45:18 -0700 Subject: [PATCH 1/2] ADFA-4551: Exclude verified-unused bundled resource files from APK Removes non-class resource files from three third-party jars that are never referenced by app code: commons-codec's Beider-Morse phonetic rule data, JLine console resources bundled in the Kotlin analysis-api jar, an IntelliJ K2-mode compatibility manifest, and unused bundled .proto well-known-type sources. Co-Authored-By: Claude Sonnet 5 --- app/build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b1a8d310cc..f1da02784d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -117,6 +117,16 @@ android { excludes += "META-INF/DEPENDENCIES" excludes += "META-INF/gradle/incremental.annotation.processors" + // Beider-Morse phonetic rule data (commons-codec); unused, no code calls the phonetic encoders. + excludes += "org/apache/commons/codec/language/bm/**" + // JLine console resources bundled in the Kotlin analysis-api jar; used headlessly, no REPL/console. + excludes += "org/jetbrains/kotlin/org/jline/**" + // IntelliJ plugin K2-mode compatibility manifest; meaningless outside a real IntelliJ session. + excludes += "pluginsCompatibleWithK2Mode.txt" + // Bundled .proto well-known-type sources from protobuf jars; nothing imports them at build time. + excludes += "google/protobuf/**" + excludes += "src/google/protobuf/**" + pickFirsts += "kotlin/internal/internal.kotlin_builtins" pickFirsts += "kotlin/reflect/reflect.kotlin_builtins" pickFirsts += "kotlin/kotlin.kotlin_builtins" From ebd8bd75bea7b5b0ee62efbefd16cd46686164ff Mon Sep 17 00:00:00 2001 From: David Schachter Date: Thu, 23 Jul 2026 15:33:47 -0700 Subject: [PATCH 2/2] ADFA-4551: Remove unused com.google.genai dependency Nothing in the app calls into google-genai - it's dead weight on this branch (belongs to an in-progress, unmerged agent feature elsewhere). Also drops one of the three paths pulling commons-codec's phonetic data into the APK. Co-Authored-By: Claude Sonnet 5 --- app/build.gradle.kts | 1 - gradle/libs.versions.toml | 2 -- 2 files changed, 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f1da02784d..96cbb52540 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -333,7 +333,6 @@ dependencies { // Lifecycle Process for app lifecycle tracking implementation(libs.androidx.lifecycle.process) implementation(libs.androidx.lifecycle.runtime.ktx) - implementation(libs.google.genai) coreLibraryDesugaring(libs.desugar.jdk.libs.v215) // Pebble template engine diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d20e8aeb5c..c8a6aab368 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,6 @@ constraintlayout = "2.1.4" coreKtx = "1.12.0" coreKtxVersion = "1.17.0" desugar_jdk_libs = "2.1.5" -googleGenai = "1.16.0" fragment = "1.8.8" gradle-tooling = "8.6" gson = "2.10.1" @@ -124,7 +123,6 @@ composite-treeview = { module = "com.itsaky.androidide.build:treeview" } # Room desugar_jdk_libs-v215 = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" } -google-genai = { module = "com.google.genai:google-genai", version.ref = "googleGenai" } gson-v2101 = { module = "com.google.code.gson:gson", version.ref = "gson" } koin-android = { module = "io.insert-koin:koin-android", version.ref = "koinAndroid" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }