Skip to content

Conversation

@eamonnmcmanus
Copy link
Member

Some Google libraries that rely on Gson require Android 23 without desugaring, because otherwise their clients would be forced to enable desugaring too. So revert to the standard animal-sniffer configuration, and reinstate the local toIntExact implementation.

Also, catch LinkageError in addition to ReflectiveOperationException when trying to load the new JavaTimeTypeAdapters class.

Some Google libraries that rely on Gson require Android 23 *without*
desugaring, because otherwise their clients would be forced to enable
desugaring too. So revert to the standard animal-sniffer configuration,
and reinstate the local `toIntExact` implementation.
Copy link
Member

@cpovirk cpovirk left a comment

Choose a reason for hiding this comment

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

I suspect that the tests are wrong, as I don't believe there's any way to build an Android app that doesn't support toIntExact nowadays, since that's covered by a separate system ("backporting?") that is separate from opt-in desugaring. But making the tests correct is likely shockingly difficult, so I see no need to fight them.

@eamonnmcmanus eamonnmcmanus merged commit 7878ee2 into google:main Dec 24, 2025
16 checks passed
@eamonnmcmanus eamonnmcmanus deleted the timetweaks branch December 24, 2025 20:26
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