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

Java 8+ API desugaring support #2686

Closed
wants to merge 1 commit into from
Closed

Java 8+ API desugaring support #2686

wants to merge 1 commit into from

Conversation

shubham1g5
Copy link
Contributor

Summary

Enable desugaring to support Java 8 APIs like stream() for older devices (Android API 21 - 23)

Reference: https://developer.android.com/studio/write/java8-support#library-desugaring

Safety Assurance

  • If the PR is high risk, "High Risk" label is set
  • I have confidence that this PR will not introduce a regression for the reasons below
  • Do we need to enhance manual QA test coverage ? If yes, "QA Note" label is set correctly

Safety story

Build level change to add support for Java 8+ APIs

@shubham1g5
Copy link
Contributor Author

Causing tests to fail with -

java.lang.NoSuchMethodError: No static method toMap(Ljava/util/function/Function;Ljava/util/function/Function;)Lj$/util/stream/Collector; in class Lj$/util/stream/Collectors; or its super classes (declaration of 'j$.util.stream.Collectors' appears in /data/app/org.commcare.dalvik.test-rb9q8Vi83H-CwA9Zib9YlA==/base.apk:classes2.dex)

I inspected the release apk and java.util.stream.Collectors seems to be missing. I am not sure why. Going to leave it as it is for now and change the code to not use Stream Apis.

@shubham1g5 shubham1g5 closed this Apr 22, 2024
@shubham1g5 shubham1g5 deleted the enableDesugaring branch April 22, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant