Skip to content

ADFA-4632: Exclude auto-value processor jar from app runtime classpath#1503

Merged
davidschachterADFA merged 3 commits into
stagefrom
adfa-4632
Jul 10, 2026
Merged

ADFA-4632: Exclude auto-value processor jar from app runtime classpath#1503
davidschachterADFA merged 3 commits into
stagefrom
adfa-4632

Conversation

@davidschachterADFA

@davidschachterADFA davidschachterADFA commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 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
  • The -dontshrink rule in app/proguard-rules.pro prevented R8 from removing it, so all 1,475 classes landed in the DEX unchanged (~367KB)
  • Added exclude(group = "com.google.auto.value", module = "auto-value") to the existing configurations.configureEach block in app/build.gradle.kts

Why this is safe

  • The app module has zero @AutoValue usages and no kapt(auto-value-ap) declaration
  • Each module that uses AutoValue (e.g. google-java-format) runs the processor at its own compile time via its own annotationProcessor config — that config is independent of the app module's configuration resolution
  • Mirrors the existing pattern already used to exclude kotlin-android-extensions-runtime

Test plan

  • Release build compiles without errors
  • Verify autovalue.shaded classes absent from DEX (e.g. unzip -p app-release.apk classes*.dex | strings | grep autovalue.shaded)
  • Smoke-test java formatting in the editor (the main consumer of google-java-format)

Closes ADFA-4632

🤖 Generated with Claude Code

davidschachterADFA and others added 2 commits July 7, 2026 17:47
…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>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hal-eisen-adfa hal-eisen-adfa changed the base branch from main to stage July 10, 2026 18:50
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The app build configuration excludes com.google.auto.value:auto-value from the runtime classpath and documents that it is supplied through annotation processing during compilation.

Changes

AutoValue runtime classpath

Layer / File(s) Summary
Exclude the annotation processor from runtime dependencies
app/build.gradle.kts
The app build excludes the AutoValue artifact from runtime configurations and documents its annotation-processor usage.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a bunny with a build,
AutoValue’s runtime path is stilled.
Processors work at compile-time,
While runtime stays neat and prime.
Hop, hop—clean classpaths shine!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: excluding the AutoValue processor jar from the app runtime classpath.
Description check ✅ Passed The description directly matches the change and explains the rationale, safety, and test plan.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch adfa-4632

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@davidschachterADFA davidschachterADFA merged commit 81b6520 into stage Jul 10, 2026
5 checks passed
@davidschachterADFA davidschachterADFA deleted the adfa-4632 branch July 10, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants