-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Update the template to use RNGP #35075
Conversation
This pull request was exported from Phabricator. Differential Revision: D40673732 |
Base commit: 745f3ee |
Base commit: 745f3ee |
PR build artifact for 25ac040 is ready. |
PR build artifact for 25ac040 is ready. |
PR build artifact for 57c084f is ready. |
PR build artifact for 57c084f is ready. |
PR build artifact for fc99bca is ready. |
PR build artifact for fc99bca is ready. |
Summary: Pull Request resolved: facebook#35075 This diff updates the New App template for Android to use the React Native Gradle Plugin. With this we can: 1. Get rid of all the C++ code. 2. Remove a lot of New Architecture logic in the build.gradle 3. Reuse the prebuilts of React Native/Hermes via prefab Changelog: [Android] [Changed] - Update the template to use RNGP Reviewed By: cipolleschi Differential Revision: D40673732 fbshipit-source-id: b04db7c42ff552d64ab7eb4dd14daea5884ffe1e
This pull request was exported from Phabricator. Differential Revision: D40673732 |
fc99bca
to
dfa8cd5
Compare
PR build artifact for dfa8cd5 is ready. |
PR build artifact for dfa8cd5 is ready. |
This pull request was successfully merged by @cortinico in c96c76e. When will my fix make it into a release? | Upcoming Releases |
…droid accordingly (#35104) Summary: This PR is a follow up of #35075 and 1546666 to ensure that even in the local e2e testing scenario the new maven approach is followed - without this, RNTestProject on Android won't work, like so: <img width="1905" alt="Screenshot 2022-10-27 at 12 15 38" src="https://user-images.githubusercontent.com/16104054/198334105-30fb2037-4e7c-4814-8c3f-2412ba0bd49f.png"> And iOS will always build everything from source every time. This PR addresses both by generating the artifacts locally, and passing them to RNTestProject as if they were coming from a url (mimicking as closely as possible the behaviour for the final user) In doing so, there's been some refactoring to prep the ground for follow up work. * refactor CI to rely less on scripts directly in the CircleCI config, but invoke .js ones * we should be able to trigger more the "manual" artifacts generation so that it will only happen once between RNTester and RNTestProject, and we can pass existing artifacts to the other flows. * once all of this in place, a very good improvement would be to be able to download the maven artifacts kind of like nightlies and stables do. This will only be viable by checking that there's no local changes, after which there needs to be logic to pull down from CircleCI the artifacts based on git commit <-> circleCI job references. --- While at it, I've also fixed the hermes-engine podspec logic for detecting if it's on CI: basically the local e2e script needs to align with the changes done here: 4b51207 but as you can see there, the condition was actually inconsistent across the various files, so realigned to `CI === 'true'`. We probably didn't catch that so far 'cause the other condition in the hermes podspect (existence of `hermestag_file`) is only true on release branches and this new logic has not been in any release branches yet. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Fixed] - add logic to local e2e script to handle maven local for iOS and Android accordingly Pull Request resolved: #35104 Test Plan: Run ` yarn test-e2e-local -t RNTestProject -p Android` successfully. Run ` yarn test-e2e-local -t RNTestProject -p iOS` successfully. On the pod install stage, you will see `[Hermes] Using pre-built Hermes binaries from local path.` Reviewed By: dmytrorykun Differential Revision: D40893239 Pulled By: cipolleschi fbshipit-source-id: a31217ec4f177383c62292d00fabc4cbe4391cfd
Summary: Pull Request resolved: facebook#35075 This diff updates the New App template for Android to use the React Native Gradle Plugin. With this we can: 1. Get rid of all the C++ code. 2. Remove a lot of New Architecture logic in the build.gradle 3. Reuse the prebuilts of React Native/Hermes via prefab Changelog: [Android] [Changed] - Update the template to use RNGP Reviewed By: cipolleschi Differential Revision: D40673732 fbshipit-source-id: 70935248993d1e24904c982e75f12ad580faa9d8
…droid accordingly (facebook#35104) Summary: This PR is a follow up of facebook#35075 and facebook@1546666 to ensure that even in the local e2e testing scenario the new maven approach is followed - without this, RNTestProject on Android won't work, like so: <img width="1905" alt="Screenshot 2022-10-27 at 12 15 38" src="https://user-images.githubusercontent.com/16104054/198334105-30fb2037-4e7c-4814-8c3f-2412ba0bd49f.png"> And iOS will always build everything from source every time. This PR addresses both by generating the artifacts locally, and passing them to RNTestProject as if they were coming from a url (mimicking as closely as possible the behaviour for the final user) In doing so, there's been some refactoring to prep the ground for follow up work. * refactor CI to rely less on scripts directly in the CircleCI config, but invoke .js ones * we should be able to trigger more the "manual" artifacts generation so that it will only happen once between RNTester and RNTestProject, and we can pass existing artifacts to the other flows. * once all of this in place, a very good improvement would be to be able to download the maven artifacts kind of like nightlies and stables do. This will only be viable by checking that there's no local changes, after which there needs to be logic to pull down from CircleCI the artifacts based on git commit <-> circleCI job references. --- While at it, I've also fixed the hermes-engine podspec logic for detecting if it's on CI: basically the local e2e script needs to align with the changes done here: facebook@4b51207 but as you can see there, the condition was actually inconsistent across the various files, so realigned to `CI === 'true'`. We probably didn't catch that so far 'cause the other condition in the hermes podspect (existence of `hermestag_file`) is only true on release branches and this new logic has not been in any release branches yet. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Fixed] - add logic to local e2e script to handle maven local for iOS and Android accordingly Pull Request resolved: facebook#35104 Test Plan: Run ` yarn test-e2e-local -t RNTestProject -p Android` successfully. Run ` yarn test-e2e-local -t RNTestProject -p iOS` successfully. On the pod install stage, you will see `[Hermes] Using pre-built Hermes binaries from local path.` Reviewed By: dmytrorykun Differential Revision: D40893239 Pulled By: cipolleschi fbshipit-source-id: a31217ec4f177383c62292d00fabc4cbe4391cfd
Summary:
This diff updates the New App template for Android to use the React Native Gradle Plugin.
With this we can:
Changelog:
[Android] [Changed] - Update the template to use RNGP
Differential Revision: D40673732