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

Migrate to java 7 to support Android below sdk 26 #39

Closed
wants to merge 2 commits into from
Closed

Migrate to java 7 to support Android below sdk 26 #39

wants to merge 2 commits into from

Conversation

tszpinda
Copy link

@tszpinda tszpinda commented Sep 5, 2018

No description provided.

@lanusau
Copy link
Collaborator

lanusau commented Sep 10, 2018

Thank you very much for this pull request. Sorry for the delay, I will review now


dependencies {
implementation("com.google.guava:guava:20.0") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be really nice to have this library without any external dependencies. Can you see if you can use javax.xml.bind.DatatypeConverter (see https://stackoverflow.com/questions/14413169/which-java-library-provides-base64-encoding-decoding)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started with DatatypeConverter but there were couple tricky bits with it. It does not support omitting padding and url safe encoding, when second one can be done, first is a bit of a issue.

*/
Instant getConsentRecordCreated();
Date getConsentRecordCreated();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course this in unavoidable, since Instant is not in Java 7. But now we are breaking API contract which means anybody who updates to latest version will probably have to change their code that uses this library. So we would need to bump the major version number for this release.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, bumped version to 3.0.0 in gradle file

@@ -85,7 +84,11 @@ public int getVendorListVersion() {

@Override
public Set<Purpose> getAllowedPurposes() {
return getAllowedPurposeIds().stream().map(Purpose::valueOf).collect(Collectors.toSet());
Set<Purpose> purposes = new HashSet<Purpose>(getAllowedPurposeIds().size());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be final

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@andresilveirah
Copy link

Hey guys, is there a plan to merge this PR?

@lanusau
Copy link
Collaborator

lanusau commented Mar 5, 2019

See #21 . So far there was no consensus on whether we keep separate fork for Android or downgrade Java version here.

@tszpinda tszpinda closed this Jan 7, 2021
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

Successfully merging this pull request may close these issues.

3 participants