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

Removing threetenabp by replacing it with java.time.* (Android Gradle plugin 4.0) #3

Open
postfixNotation opened this issue Jun 5, 2020 · 0 comments

Comments

@postfixNotation
Copy link

Since Android Studio 4.0 and Android Gradle plugin 4.0 have been released recently I'd suggest removing com.jakewharton.threetenabp:threetenabp for CalendarView or DateTimePickerDialog and replacing it with java.time.*.

The benefits: I'd only have to include the pure FluentUI dependency.

Jake Whartons statement

Attention: Development on this library is winding down. Please consider switching to Android Gradle plugin 4.0, java.time.*, and its core library desugaring feature in the coming months.

Similar to the problems with using Joda-Time on Android, the threetenbp uses a JAR resource for loading timezone information. This is an extremely inefficient mechanism on Android.

Android Studio release notes

Java 8 library desugaring in D8 and R8
Android Studio now includes support for using a number of Java 8 language APIs without requiring a minimum API level for your app.

In Android Studio 4.0, the desugaring engine has been extended to be able to desugar Java language APIs. This means that you can now include standard language APIs that were available only in recent Android releases (such as java.util.streams) in apps that support older versions of Android.

The following set of APIs is supported in this release:

Sequential streams (java.util.stream)
A subset of java.time

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

1 participant