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

[Android] Fix Android build failures with RN 0.72 #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fabioh8010
Copy link

Description

RN projects starting from 0.72 are going to use Gradle 8.x to build the Android app. This library is using a enabled flag in build.gradle that is already deprecated in Gradle 7.x and was removed in Gradle 8.x. This PR aims to solve this by using the new flag required.

Test Plan

  1. Setup a RN project with the 0.72 release candidate.
  2. Add @onfido/react-native-sdk library to project.
  3. Run the Android build.
  4. Verify if the build succeeds.
  5. Repeat the steps above for a previous RN release, e.g 0.71, 0.70.

@fcaldarelli
Copy link

@fabioh8010 Are these changes compatible with RN < 0.72 ?

@sekoyo
Copy link

sekoyo commented Jun 29, 2023

0.71 was on 7.6 and the property was deprecated since at least 6.1 which was released in Jan 15, 2020

https://docs.gradle.org/6.1/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:enabled

Although for some time it was replaced by "activated" before "required" in 7.1 (these guys really love breaking changes for subtle semantics...):

https://docs.gradle.org/7.1/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:enabled

v7.1 was released in Jun 14, 2021 so it should still be compat with pretty old versions of RN

@fabioh8010
Copy link
Author

@vlimag
Copy link

vlimag commented Jul 17, 2023

any updates on this?

@fior-seibold
Copy link

any update on the issue? This is currently a blocker.

@fcaldarelli
Copy link

fcaldarelli commented Sep 13, 2023

Same for me. I can't update react-native to last 0.72.4 because this error.

@fabioh8010
Copy link
Author

fabioh8010 commented Sep 14, 2023

You can use patch-package as a temporary workaround while this PR is not merged yet, we are using in Expensify project -> https://github.com/Expensify/App/blob/main/patches/@onfido+react-native-sdk+7.4.0.patch

@fcaldarelli
Copy link

@fabioh8010 thank you, but temporary I solved with these 2 changes:

android/build.gradle
Screenshot 2023-09-14 alle 10 42 44

android/gradle/wrapper/gradle-wrapper.properties
Screenshot 2023-09-14 alle 10 42 54

Now OnFido package is building on RN 0.72.4

@fabioh8010
Copy link
Author

I would recommend you to use patch-package for this case, it's safer than downgrading Gradle to 7.x (it can cause issues with other libraries or RN itself).

@fcaldarelli
Copy link

I would recommend you to use patch-package for this case, it's safer than downgrading Gradle to 7.x (it can cause issues with other libraries or RN itself).

I downgraded gradle and all libraries are working fine.

@omerkarakose
Copy link

We've also facing this issue and downgrading gradle wrapper version is not the ideal solution.

Can we please fix this and release a new version ?

@sekoyo
Copy link

sekoyo commented Nov 7, 2023

Why is this still not merged. Are you stil actively maintaining Onfido support for RN? :/

@lbuljan
Copy link

lbuljan commented Nov 20, 2023

Would somebody finally merge this?

@onfido-sdk-ci
Copy link
Collaborator

onfido-sdk-ci commented Feb 15, 2024

We have migrated to Gradle 8 and are including this change in our upcoming quarterly release targeted for March 13.

@onfido-sdk-ci
Copy link
Collaborator

This requested change however (using required instead of enabled) was already included in 10.5.0 released on November 29, 2023.

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.

9 participants