Closed Jaehwa-Noh closed 4 weeks ago
We use desugaring in a lot more places than just that one with our usage of kotlinx-datetime
for time APIs on older SDK versions. This PR will crashes at startup on an API 21 device.
Using desugaring adds size to the APK (like any library), but for our minified release it is around 0.2 MB, which seems well worth it to be able to use much better time APIs.
What I have done and why
We can remove desugaring from this project. The only usage of desugar API is just here. https://github.com/android/nowinandroid/blob/85129e4660f7a27c7081f4ac21169d19db89fbb6/core/ui/src/main/kotlin/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt#L242-L247
When we remove the desugaring, we can remove![image](https://github.com/android/nowinandroid/assets/48680511/e9fa227f-17e2-45fa-834e-6d78487efa79)
androidDesugarJdkLibs
dependency. Output APK's size is reduced 1MB.And there's no need to use JAVA 11 whether even use the desugaring, the JAVA version bumped at #1392 PR