ADFA-4632: Exclude auto-value processor jar from app runtime classpath#1503
Conversation
…ration Deletes layout_tooltip.xml (the original 3-tier prototype layout, unused since the WebView-based popup replaced it). Aligns WebServer.kt's package declaration with its directory (com.itsaky.androidide.localWebServer) and updates the two imports in MainActivity.kt to match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
com.google.auto.value:auto-value is an annotation processor fat jar that shades ASM, JavaPoet, Guava, and EscapeVelocity under the autovalue.shaded.* prefix. It was leaking onto the app's runtime classpath (via the google-java-format composite build module's annotationProcessor config) and surviving R8 intact due to the -dontshrink rule, adding ~367KB and 1,475 dead classes to the DEX. Each module that needs it runs it at compile time via its own annotationProcessor/kapt configuration; the app module itself has no @autovalue usages and does not need the processor at runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
186d1a7 to
fc1839b
Compare
📝 WalkthroughWalkthroughThe app build configuration excludes ChangesAutoValue runtime classpath
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
com.google.auto.value:auto-valueis an annotation processor fat jar that shades ASM, JavaPoet, Guava, and EscapeVelocity under theautovalue.shaded.*prefixgoogle-java-formatcomposite build module'sannotationProcessorconfig-dontshrinkrule inapp/proguard-rules.proprevented R8 from removing it, so all 1,475 classes landed in the DEX unchanged (~367KB)exclude(group = "com.google.auto.value", module = "auto-value")to the existingconfigurations.configureEachblock inapp/build.gradle.ktsWhy this is safe
@AutoValueusages and nokapt(auto-value-ap)declarationgoogle-java-format) runs the processor at its own compile time via its ownannotationProcessorconfig — that config is independent of the app module's configuration resolutionkotlin-android-extensions-runtimeTest plan
autovalue.shadedclasses absent from DEX (e.g.unzip -p app-release.apk classes*.dex | strings | grep autovalue.shaded)google-java-format)Closes ADFA-4632
🤖 Generated with Claude Code