Calendar
Calendar copied to clipboard
Consider turning off corelibrarydesugaring for this lib
Consider turning off core library desugaring: https://github.com/kizitonwose/Calendar/blob/14991af8c3ba9eeec5b2fba6a4c7fc8d22e2943f/core/build.gradle#L18
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.
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.
Thoughts on making this library minSdk=26
, which would allow using java.time
without core library desugaring?
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.
FYI: In version 2.6.0, I will remove desugar requirement from the library (while keeping the current min sdk). All the calendar logic live in the core
and data
modules which are pure java/kotlin modules hence no need for desugar there. I have also seen that I can remove the requirement from the view
and compose
library modules as well, without changes to the min sdk.
There is already a snapshot published with this feature if you'd like to test that everything works as expected:
repositories {
google()
mavenCentral()
// Add the snapshot repository
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
implementation("com.kizitonwose.calendar:view:2.6.0-SNAPSHOT")
implementation("com.kizitonwose.calendar:compose:2.6.0-SNAPSHOT")
}
The latest 2.6.0-SNAPSHOT
worked for me without enabling coreLibraryDesugaringEnabled true
(minSdk 34), thanks for the fix! Tested with compose compiler gradle plugin 2.0.0
on compose-bom:2024.05.00
. I was getting build failures with com.kizitonwose.calendar:compose:2.5.1
and com.kizitonwose.calendar:compose:2.6.0-beta01
.
@kizitonwose Any timeline/estimate for a beta/stable release with not desugar requirement? :)
@MarcLFJ I was thinking to release it in version 2.6.0 with Compose UI 1.7, so I don't have to do a version bump twice. But maybe it makes sense to release it already.
This is now released in version 2.5.2 for Compose UI 1.6, and version 2.6.0-beta02 for Compose UI 1.7 beta.
Thanks a bunch! 🙏