Removed Oreo requirement for components #15
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there - first and foremost, thank you for your work on this library, it's quite well done and great and it's exactly what I need for my project :)
I noticed that since the library is using the java.time library, it's basically not possible to use for apps that don't support versions less than Oreo (even though the minSdk in the build gradle is 23 and not 26). In production and published apps, there'll be still plenty of users who will still use the old versions. So i decided to make some changes to remove this constraint and add a layer of compatibility.
So the library will now use java.time APIs if Version >= 26, and Calendar if < 26.
The library for now seems to work with the new changes, although i'm not sure if i'll have time to address further comments or requests for this PR. so i hope this code can be a starting point to extend the library :)
Changes
Removed constraint of needing to have Oreo to use this component (because of LocalDate/LocalDateTime etc)
Cheers