Skip to content

Commit 870ed53

Browse files
ADFA-4551: Remove unused bundled dependency files (#1569)
* 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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent ae8136f commit 870ed53

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎app/build.gradle.kts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@ android {
117117
excludes += "META-INF/DEPENDENCIES"
118118
excludes += "META-INF/gradle/incremental.annotation.processors"
119119

120+
// Beider-Morse phonetic rule data (commons-codec); unused, no code calls the phonetic encoders.
121+
excludes += "org/apache/commons/codec/language/bm/**"
122+
// JLine console resources bundled in the Kotlin analysis-api jar; used headlessly, no REPL/console.
123+
excludes += "org/jetbrains/kotlin/org/jline/**"
124+
// IntelliJ plugin K2-mode compatibility manifest; meaningless outside a real IntelliJ session.
125+
excludes += "pluginsCompatibleWithK2Mode.txt"
126+
// Bundled .proto well-known-type sources from protobuf jars; nothing imports them at build time.
127+
excludes += "google/protobuf/**"
128+
excludes += "src/google/protobuf/**"
120129
// httpclient's public-suffix cookie-domain data; unused, no code touches Apache HttpClient directly.
121130
excludes += "mozilla/public-suffix-list.txt"
122131

@@ -326,7 +335,6 @@ dependencies {
326335
// Lifecycle Process for app lifecycle tracking
327336
implementation(libs.androidx.lifecycle.process)
328337
implementation(libs.androidx.lifecycle.runtime.ktx)
329-
implementation(libs.google.genai)
330338
coreLibraryDesugaring(libs.desugar.jdk.libs.v215)
331339

332340
// Pebble template engine

‎gradle/libs.versions.toml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ constraintlayout = "2.1.4"
1313
coreKtx = "1.12.0"
1414
coreKtxVersion = "1.17.0"
1515
desugar_jdk_libs = "2.1.5"
16-
googleGenai = "1.16.0"
1716
fragment = "1.8.8"
1817
gradle-tooling = "8.6"
1918
gson = "2.10.1"
@@ -124,7 +123,6 @@ composite-treeview = { module = "com.itsaky.androidide.build:treeview" }
124123

125124
# Room
126125
desugar_jdk_libs-v215 = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" }
127-
google-genai = { module = "com.google.genai:google-genai", version.ref = "googleGenai" }
128126
gson-v2101 = { module = "com.google.code.gson:gson", version.ref = "gson" }
129127
koin-android = { module = "io.insert-koin:koin-android", version.ref = "koinAndroid" }
130128
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }

0 commit comments

Comments
 (0)