fix(proguard): Fix compatibility with Kotlin/Compose 2.3.0#1054
Merged
fix(proguard): Fix compatibility with Kotlin/Compose 2.3.0#1054
Conversation
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛Proguard
Documentation 📚
Internal Changes 🔧Deps
Release
Other
🤖 This preview updates automatically when you update the PR. |
runningcode
approved these changes
Jan 23, 2026
|
|
||
| @get:Internal abstract val proguardMappingFiles: ConfigurableFileCollection | ||
| // Used by AGP < 8.3 with conventional file paths | ||
| @get:Internal abstract val fallbackMappingFiles: ConfigurableFileCollection |
Contributor
There was a problem hiding this comment.
is it still correct that these are internal? i guess better to do this in a separate PR if we need to change this.
Member
Author
There was a problem hiding this comment.
Yeah, still needs to be internal for this test to pass, otherwise it'll trigger minify task in robolectric tests unfortunately
Contributor
There was a problem hiding this comment.
strange! is that true for 8.3+ as well?
Member
Author
There was a problem hiding this comment.
I actually haven't tried, but will give it a shot!
plugin-build/src/main/kotlin/io/sentry/android/gradle/AGP83Compat.kt
Outdated
Show resolved
Hide resolved
plugin-build/src/main/kotlin/io/sentry/android/gradle/AGP74Compat.kt
Outdated
Show resolved
Hide resolved
markushi
approved these changes
Jan 23, 2026
…pat.kt Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Kotlin/Compose 2.3.0 introduced a new task that modifies the mapping file (and also recalculates its SHA-hash) and this breaks our existing hooks. We have been hooking into the minify task before, but now this does not work anymore because the Kotlin task can run after/in-parallel with our task and modify the mapping file, so we'd be essentially looking at an empty mapping file location, or an outdated mapping file.
This PR introduces a new method to hook into the mapping file generation:
minifyTask.finalizedBy) but in addition we also add amustRunAfterto our task so it runs after the compose one.💡 Motivation and Context
Fixes getsentry/sentry-java#5045
💚 How did you test it?
Manually + a new test + existing tests should cover too
📝 Checklist
🔮 Next steps