Skip to content

[MS-732] Fix ProGuard issue causing release build failure with Hilt modules#916

Merged
meladRaouf merged 1 commit into
mainfrom
MS-732-fix-proguard-rules
Sep 26, 2024
Merged

[MS-732] Fix ProGuard issue causing release build failure with Hilt modules#916
meladRaouf merged 1 commit into
mainfrom
MS-732-fix-proguard-rules

Conversation

@meladRaouf
Copy link
Copy Markdown
Collaborator

This PR fixes the release build failure during ProGuard/R8 minification caused by Hilt-generated classes being stripped. The issue is unrelated to KSP, so I will revert the previous PR addressing KSP.

…odules

- Added necessary ProGuard rules to prevent Hilt and Dagger classes from being stripped during minification.
- Ensured that @Installin annotations and generated components are preserved in release builds.
@meladRaouf meladRaouf requested review from a team, BurningAXE, TristramN, alex-vt, alexandr-simprints, luhmirin-s and ybourgery and removed request for a team September 25, 2024 18:10
@cla-bot cla-bot Bot added the ... label Sep 25, 2024
@sonarqubecloud
Copy link
Copy Markdown

Comment thread id/proguard-rules.pro

-keep class retrofit2.** { *; }
-keep interface retrofit2.** { *; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could also apply the common proguard file in AndroidApplicationConventionPlugin similarly to how it is done in AndroidLibraryConventionPlugin to avoid config duplication.

@meladRaouf meladRaouf merged commit a335791 into main Sep 26, 2024
@meladRaouf meladRaouf deleted the MS-732-fix-proguard-rules branch September 26, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants