Skip to content

Conversation

@skydoves
Copy link
Owner

@skydoves skydoves commented Nov 13, 2025

Loosely apply the R8 optimizations.

Summary by CodeRabbit

  • Bug Fixes

    • Resolved critical APK size bloat in release builds. Optimized build configuration to dramatically reduce package size when the plugin is used.
  • Chores

    • Released version 0.5.2.

@skydoves skydoves self-assigned this Nov 13, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR releases version 0.5.2 with APK size optimization and API naming updates. ProGuard consumer-rules are narrowed to retain only runtime classes and public APIs required by the plugin, while compile-time classes are conditionally removed. Documentation and tests are updated to reference the ComposeStabilityAnalyzer API instead of LoggerProvider.

Changes

Cohort / File(s) Summary
Version bump
gradle.properties, stability-gradle/src/main/kotlin/com/skydoves/compose/stability/gradle/StabilityAnalyzerGradlePlugin.kt
Updated VERSION_NAME from 0.5.1 to 0.5.2; updated plugin version constant to match.
Release notes
compose-stability-analyzer-idea/CHANGELOG.md, compose-stability-analyzer-idea/build.gradle.kts
Added v0.5.2 entry documenting APK size optimizations (Issue #39) via narrowed ProGuard rules; added IntelliJ plugin changeNotes for 0.5.2.
ProGuard optimization
stability-runtime/consumer-rules.pro
Replaced broad class retention with targeted keeps for RecompositionTracker, ComposeStabilityAnalyzer, RecompositionLogger, RecompositionEvent, and ParameterChange; removed broad retention of compile-time classes (StabilityInfo, ComposableInfo, ParameterInfo) and unused annotation keeps.
API documentation updates
app/src/main/kotlin/com/skydoves/myapplication/ExampleRecompositionTracking.kt, stability-runtime/src/commonMain/kotlin/com/skydoves/compose/stability/runtime/RecompositionLogger.kt
Updated code examples and comments to use ComposeStabilityAnalyzer.setEnabled() instead of LoggerProvider.setEnabled().
Test refactoring
stability-runtime/src/commonTest/kotlin/com/skydoves/compose/stability/runtime/ComposeStabilityAnalyzerTest.kt
Renamed test class from LoggerProviderTest to ComposeStabilityAnalyzerTest; updated all 9 test method names to reflect new class name.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Extra attention required: stability-runtime/consumer-rules.pro — The ProGuard rule changes involve removing broad retention patterns and introducing narrow, targeted keeps. Careful verification is needed to ensure that: (1) all necessary runtime APIs remain accessible, (2) the conditional Logger retention via ComposeStabilityAnalyzer.setLogger() is correctly expressed, and (3) no unintended stripping occurs for classes required at runtime.

Possibly related PRs

  • PR #7 — Modifies documentation examples to replace LoggerProvider.setEnabled() with ComposeStabilityAnalyzer.setEnabled() in API references.
  • PR #38 — Updates release/version metadata (gradle.properties VERSION_NAME and StabilityAnalyzerGradlePlugin.kt version constant).
  • PR #15 — Modifies the plugin version constant in StabilityAnalyzerGradlePlugin.kt as part of version management.

Suggested labels

Runtime Analyzer

Poem

🐰 A spellcheck of bunnyish delight:

ProGuard rules trimmed clean and tight,
APK shrinks through the night,
LoggerProvider bows to the new light,
Tests renamed, all unified in sight—
v0.5.2 hops into production's height! 🎉

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve/r8-optimizations

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b53d880 and f81b88c.

📒 Files selected for processing (8)
  • app/src/main/kotlin/com/skydoves/myapplication/ExampleRecompositionTracking.kt (2 hunks)
  • compose-stability-analyzer-idea/CHANGELOG.md (1 hunks)
  • compose-stability-analyzer-idea/build.gradle.kts (1 hunks)
  • gradle.properties (1 hunks)
  • stability-gradle/src/main/kotlin/com/skydoves/compose/stability/gradle/StabilityAnalyzerGradlePlugin.kt (1 hunks)
  • stability-runtime/consumer-rules.pro (1 hunks)
  • stability-runtime/src/commonMain/kotlin/com/skydoves/compose/stability/runtime/RecompositionLogger.kt (3 hunks)
  • stability-runtime/src/commonTest/kotlin/com/skydoves/compose/stability/runtime/ComposeStabilityAnalyzerTest.kt (8 hunks)

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 and usage tips.

@skydoves skydoves merged commit d5425ce into main Nov 13, 2025
3 checks passed
@skydoves skydoves deleted the improve/r8-optimizations branch November 13, 2025 01:14
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