-
Notifications
You must be signed in to change notification settings - Fork 110
Issue with R8 minification #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Strange. We are not doing anything fancy with |
@adesentenac, we have a reply from Google: https://issuetracker.google.com/issues/351858994#comment2 Could you obtain the dump and send it either here (I'll resend relay it to the Android issue tracker) or directly there? I suppose a self-contained project where the issue reproduces is fine, too. |
@adesentenac, I am still interested in this issue. Can you provide a small reproduction (or share a dump of a failing project). If I just add this code to a Kotlin app and build a release version with val formatter = DateTimeComponents.Format { date(LocalDate.Formats.ISO) }
val value = "2024-10-10"
val date = formatter.parseOrNull(value)?.apply {
setOffset(TimeZone.UTC.offset)
dayOfMonth = 1
}
println("Test: " + date?.dayOfMonth) |
Hi @dkhalanskyjb, I've run into the same issue while trying to update to new AGP my project (https://github.com/prof18/feed-flow/tree/date-time-r8-issue) I've build up an easier reproducer, you can find it here: https://github.com/prof18/DateTimeR8IssueRepro I left the same comment in the Google Tracker, lemme know if you prefer that I open a new issue. Thanks! |
Uh oh!
There was an error while loading. Please reload this page.
We're using the datetime library 0.6.0 in an internal multiplatform library we use in our app.
The app is minified with R8 (AGP 8.4.2, Gradle 8.6).
If we set
dayOfMonth
on aDateTimeComponents
like this:in our library, our application crashes on launch with the following stacktrace:
Adding:
in our
proguard-rules.pro
file fixed the issue, so I'm sharing this here in case someone else encounter this issue, since it's really not obvious what the issue is from the logs. I have also no idea why R8 fails to keep TwoDigitNumber without the rule.I'm not sure if anything can be done in the datetime library about this, so if that's the case feel free to close this issue.
The text was updated successfully, but these errors were encountered: