Skip to content
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

Consider turning off corelibrarydesugaring for this lib #541

Open
yogurtearl opened this issue May 8, 2024 · 3 comments
Open

Consider turning off corelibrarydesugaring for this lib #541

yogurtearl opened this issue May 8, 2024 · 3 comments

Comments

@yogurtearl
Copy link

Consider turning off core library desugaring:

coreLibraryDesugaringEnabled true

This forces any app that uses this library to also turn on core library desugaring, which slows down their build.

Most things can be done using the Kotlin standard library and avoiding using JDK apis that require core library desugaring.

If you are open to this, I can look into submitting a PR for this change.

@kizitonwose
Copy link
Owner

Most things can be done using the Kotlin standard library and avoiding using JDK apis that require core library desugaring.

This may be true, but the java.time APIs are much easier to work with. No point reinventing the wheel which will end up making the library usage even more difficult because you have to figure out how to do everything with the standard library. The increased build time is a small price IMO.

@yogurtearl
Copy link
Author

Thoughts on making this library minSdk=26, which would allow using java.time without core library desugaring?

@kizitonwose
Copy link
Owner

kizitonwose commented May 11, 2024

I also use this in some projects, and they are all minSdk=24, I would not bump the min sdk for the sole purpose of dropping desugar. In the future, I'd consider splitting it into a separate module, but it is not a priority right now.

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

No branches or pull requests

2 participants