JakeWharton / ThreeTenABP

An adaptation of the JSR-310 backport for Android.
Apache License 2.0
3.54k stars 132 forks source link

Will we still need this library after java.time will be desugared? #124

Closed kamerok closed 4 years ago

kamerok commented 4 years ago

One of the features of Android Studio 4.0 is desugaring a subset of java.time It's mistery for me what subset is being desugared exactly. But if it will be enough to replace ThreeTen will we still need a different way of loading timezone information?

kamerok commented 4 years ago

Sorry, found the answer https://github.com/JakeWharton/ThreeTenABP/issues/92

vinaysshenoy commented 4 years ago

One of the features of Android Studio 4.0 is desugaring a subset of java.time It's mistery for me what subset is being desugared exactly. But if it will be enough to replace ThreeTen will we still need a different way of loading timezone information?

@kamerok I was having trouble finding the exact feature set being desugared. Found it over here: https://developer.android.com/studio/write/java8-support-table.

kamerok commented 4 years ago

@vinaysshenoy thank you that's helpful!

Offtopic question: have you tried migrating from ThreeTen? If so, how was your experience?

vinaysshenoy commented 4 years ago

@vinaysshenoy thank you that's helpful!

Offtopic question: have you tried migrating from ThreeTen? If so, how was your experience?

We haven't migrated yet. We added desugaring support very recently and we're just working on migrating our internal Optional implementation to the Java 8 Optional. We will think of migrating threetenbp after.

vinaysshenoy commented 4 years ago

@kamerok We migrated here: https://github.com/simpledotorg/simple-android/pull/1479

Was pretty much painless, only required a search and replace. All tests were green, on both API 21 (min SDK) and latest.

kamerok commented 4 years ago

@vinaysshenoy thank you for reaching out! We are waiting until fixed lint will reach stable android studio. As I can see you were not affected by this because you don't have pure kotlin modules with java.time