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

[0.71] Android Pick Requests for 0.71.0-rc3 #35510

Merged
merged 12 commits into from
Nov 30, 2022
Merged

Conversation

cortinico
Copy link
Contributor

Summary

This PR contains all the cherry-picks needed to be shipped inside 0.71.0-rc3 for the sake of Android.

The list of commits is:
e108e9e RNGP - Fix DependencyUtils for Windows support (#35508)
89cac88 Rename hermes-* target to don't use dashes (#35506)
67b74e7 RNGP - Various improvements needed for 3rd party libs (#35496)
a7a43f8 Expose jscruntime to be consumed via Prefab
f283877 Move JSCRuntime into its own folder (#35482)
5cffb4f Bump AGP to 7.4.x (#35456)
804d2b5 Allow reactnativejni to be consumed via prefab (#35461)
9628e56 Add missing headers to react_nativemodule_core prefab module (#35460)
f279474 Add prefab for _uimanager _scheduler and _mounting (#35458)
b89efc8 Expose hermes-executor to be consumed via prefab (#35457)
b1bf8c5 Consolidate hermes-executor-debug and -release inside a single target (#35454)
658d7dd RNGP - Correctly Support Gradle Configuration Cache (#35455)

I haven't bumped RNGP, but that is needed.
The only merge conflict I had was on packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj but that shouldn't be a problem for the sake of the release.

I would suggest to just do a plain merge of this stack so the git history will just fast forward.

Changelog

[Internal] - Android Pick Requests for 0.71.0-rc3

cortinico and others added 12 commits November 29, 2022 19:56
Summary:
Pull Request resolved: #35455

This little change allows to support Gradle Configuration cache in user projects:
https://docs.gradle.org/current/userguide/configuration_cache.html

It allows to save several seconds on the build time.
We'll keep it disabled for now, but Gradle plans to enable it by default for everyone
in the future, so this changes makes us ready for it.

Changelog:
[Internal] [Changed] - RNGP - Correctly Support Gradle Configuration Cache

Reviewed By: cipolleschi

Differential Revision: D41519506

fbshipit-source-id: 6252546e811deb0777c0aab5332291368be7fa8f
…#35454)

Summary:
Pull Request resolved: #35454

Historically, we used to have hermes-executor debug and release as separate dynamic libraries.
This makes it impossible to prefab this library, so I have to reconcile it into a single library.

This will also help keep the setup consistent with the internal (BUCK) where we have a single target.

Changelog:
[Internal] [Changed] - Consolidate hermes-executor-debug and -release inside a single target

Reviewed By: cipolleschi

Differential Revision: D41519119

fbshipit-source-id: d9ddc30b72164daa29c735836ea433fd4d917fc8
Summary:
Pull Request resolved: #35457

This exposes `hermes-executor` to be consumed via prefab so that
libraries can depend on it and use its symbols if needed (Expo and Reanimated need it).

Changelog:
[Internal] [Changed] - Expose `hermes-executor` to be consumed via prefab

Reviewed By: cipolleschi

Differential Revision: D41520019

fbshipit-source-id: d590a043ea89fdd8ff41b0ed20900c9cf381a1e4
Summary:
Pull Request resolved: #35458

We're adding prefab support for those modules as they're needed by Reanimated
and we're exposing headers for them as well.

Changelog:
[Internal] [Changed] - Add prefab for _uimanager _scheduler and _mounting

Reviewed By: cipolleschi

Differential Revision: D41520606

fbshipit-source-id: 76f3c81705e99057b92cd9b86d0601a2b1410f95
Summary:
Pull Request resolved: #35460

Reanimated reported that `react_nativemodule_core` was missing some headers.
Specifically the one from ReactAndroid::react_debug, ReactAndroid::react_render_core, ReactAndroid::glog,
and ReactAndroid::react_render_debug.

I'm adding them here so they get included in the shipped headers for `react_nativemodule_core`

Changelog:
[Internal] [Changed] - Add missing headers to `react_nativemodule_core` prefab module

Reviewed By: cipolleschi

Differential Revision: D41520751

fbshipit-source-id: 4627a2d0f880d4bb3ff2f0e43cd735cf9a3f2f9a
Summary:
Pull Request resolved: #35461

This is another library which is adding prefab support as it's needed by
Expo libraries and Reanimated.

Changelog:
[Internal] [Changed] - Allow `reactnativejni` to be consumed via prefab

Reviewed By: cipolleschi

Differential Revision: D41520801

fbshipit-source-id: 91142a5b5051cfba478d93a2475a178eed6fbb29
Summary:
Pull Request resolved: #35456

Fixes #35439

There is a bug in AGP 7.3.x which is causing assets to don't be copied properly inside the
final artifact: issuetracker.google.com/issues/237421684
As AGP 7.4.x is really close to release (is in Beta5, should be released stable in the next weeks)
we should be fine by bumping to beta5.

This also requires a bump of RNGP

Changelog:
[Android] [Changed] - Bump AGP to 7.4.x

allow-large-files

Reviewed By: cipolleschi

Differential Revision: D41519549

fbshipit-source-id: 60d568a3e49798a23f1d7bf4839ab58bd5549aba
Summary:
Pull Request resolved: #35482

This change moves the JSCRuntime.h/cpp into a `jsc` folder.

This change is required for several reasons:
1. on iOS, the new `jsi`, `jsidynamic` and `jsc` setup is breaking the `use_frameworks!` with  `:linkage => :static` option with the old architecture. So it is a regression.
2. JSCRuntime is required by some libraries and needs to be exposed as a prefab and the current setup makes it hard to achieve.

allow-large-files

[General][Changed] - Move JSCRuntime into a separate pod/prefab

Reviewed By: cortinico

Differential Revision: D41533778

fbshipit-source-id: 642240c93a6c124280430d4f196049cb67cb130b
Summary:
This is the last library that we should expose via Prefab.
Thanks to cipolleschi 's work here moving the file to `/ReactCommon/jsc` folder
we can easily expose it to be consumed by third parties.

Changelog:
[Internal] [Changed] - Expose `jscruntime` to be consumed via Prefab

Reviewed By: cipolleschi

Differential Revision: D41534564

fbshipit-source-id: fb4b2d801def8caf71638dcb74eb87f8230984d4
Summary:
Pull Request resolved: #35496

This commit includes a series of fixes needed for better integration with libraries for 0.71:
- I've added an `android/README.md` file as some libraries were failing the build if the folder was missing
- RNGP now applies dep substitution on app and all the libraries project
- RNGP now adds repositories on app and all the libraries project
- I've removed the maven local repo to the `/android` folder as now is empty
- I've fixed the path for the JSC repo for Windows users
- I've added a bit of backward compat by re-adding an empty `project.react.ext` block that libraries might read from.
- I've removed `codegenDir` from the `GenerateCodegenArtifactsTask` which was unused.

Changelog:
[Internal] [Changed] - RNGP - Various improvements needed for 3rd party libs

Reviewed By: cipolleschi

Differential Revision: D41549489

fbshipit-source-id: 2252da0180ac24fd3fe5a55300527da6781f0f8c
Summary:
Pull Request resolved: #35506

In our build we had a mixture of `_` and `-` to separate targets.
Dashes don't play well with Gradle + as we expose them now via Prefab,
let's stick to use only underscores

Changelog:
[Internal] [Changed] - Rename target to don't use dashes

Reviewed By: cipolleschi

Differential Revision: D41578938

fbshipit-source-id: 8aa44aa2dc7bf4822b45e5044532837b989817d2
Summary:
Pull Request resolved: #35508

It turns out that my previous diff hasn't really solved the Windows support.
The problem is that we're not escaping the URI of the Maven Local repository
properly on Windows.

To overcome this, I'll instead use the `toURI()` Api of File to properly
create a valid URI for a given folder.

Changelog:
[Internal] [Changed] - RNGP - Fix DependencyUtils for Windows support

Reviewed By: cipolleschi

Differential Revision: D41581849

fbshipit-source-id: 7905073c6daaf7c6a97405b3e6fb94b8f382234a
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Nov 29, 2022
Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

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

They looks good to me!

@cipolleschi
Copy link
Contributor

There are only a couple of changes in the xcodeproj that I don't think they should be there (i.e.: we don't want to show them in the upgrade helper). They came with this commit: f283877

@cortinico
Copy link
Contributor Author

There are only a couple of changes in the xcodeproj that I don't think they should be there (i.e.: we don't want to show them in the upgrade helper). They came with this commit: f283877

I saw it but that's the RN tester .xcodeproj file so it won't show up at all in the upgrade helper

@kelset kelset merged commit 4ba52ac into 0.71-stable Nov 30, 2022
@kelset kelset deleted the nc/71rc3-pick-requests branch November 30, 2022 11:42
@mikehardy
Copy link
Contributor

the RNGP work to allow for libraries with transient + deps on react-native was a big help to me / react-native-firebase, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants