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

fix(auth,android): fix exception syntax breaks in lower jdk versions #7862

Closed
wants to merge 1 commit into from

Conversation

zxcpoiu
Copy link

@zxcpoiu zxcpoiu commented Jun 25, 2024

Description

As issue, the newly introduced exception syntax breaks the some versions of jdk.
(ex: JDK11, zulu@1.17.0-0)

Related issues

fix #7816

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

use jdk 11, 17, 21 to build android


Think react-native-firebase is great? Please consider supporting the project with any of the below:

🔥

Copy link

vercel bot commented Jun 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 4:14pm

@CLAassistant
Copy link

CLAassistant commented Jun 25, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

I have seen this before - sorry for the breakage, we're generally testing on the newest versions of all the ecosystem components so sometimes this slips through
In general we attempt to support current + last 2 versions of react-native and I'm not sure JDK11 will still work on those, but the patch is small so I'm fine with it to help improve compatibility

@mikehardy mikehardy added the Workflow: Pending Merge Waiting on CI or similar label Jul 15, 2024
@mikehardy
Copy link
Collaborator

there is no reason android should have run that slow and/or timed out - rebased on to current main which has larger runners / updated test rig and pushed that, it will kick CI again and this should go green I think

@mikehardy
Copy link
Collaborator

mikehardy commented Jul 16, 2024

Okay - got CI to pass (it uses JDK17), but also had a moment to look at this more closely and I cannot see JDK11 as a viable development platform - I am unable to get it to work for a tangle of reasons despite trying to work through them:

1- crashlytics gradle plugin requires JDK17 or higher --> okay, so I commented that out, perhaps someone on JDK11 doesn't need it?
2- android gradle plugin 8.x is required to use compileSdk 34 and targetSdk 34 (which is a Play store requirement in 2 weeks time!) and it requires JDK17 --> Okay, so use android gradle plugin 7.x and just accept the warnings
3- android gradle plugin is not able to successfully dex the compile output of the firebase-android-sdk auth AARs and their transitive deps even if you apply this patch so that it compiles

Note that all this testing was done on react-native 0.72 since it is the oldest supported version and higher versions start requiring android gradle plugin 8.x which requires JDK17 (and JDK17 is recommended for react-native per docs at reactnative.dev)

1 and 2 are issues enough, but issue 3 here is a showstopper for me.

I don't believe this patch is valid then - as I do not believe we can support JDK11. I'm going to close it and instead propose a PR that updates our docs to indicate that JDK17 is a requirement for react-native-firebase

If for some reason staying on JDK11 is a hard requirement for your project vs adopting JDK17 (or 21...) then I can highly recommend patch-package as a way to apply this patch in your local environment

@mikehardy mikehardy closed this Jul 16, 2024
@mikehardy mikehardy removed the Workflow: Pending Merge Waiting on CI or similar label Jul 16, 2024
@zxcpoiu
Copy link
Author

zxcpoiu commented Jul 26, 2024

No worries, I just happened to see it and created a PR.
Your points are well-taken. Thanks for breaking it down :)

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.

[🐛] Android build failed
4 participants