To verify that facebook/react-native#33611 works correctly on windows, follow those steps:
- Create a new project on RN 0.68.0 with:
npx react-native init RN068 --version 0.68.0 --skip-install
- Install packages with
cd RN068 && yarn
- Opt-in for New Architecture by editing
android/gradle.properties
and settingnewArchEnabled=true
- Verify that build is broken on Android on Windows:
cd android && ./gradlew assembleDebug --scan
- This step will prompt to publish a Gradle Scan at the of the build. Type yes and publish it.
- Make sure that the build actually failed.
- Apply the
fix33611-v3.patch
attached to this Gist to your local environment:cd .. && git apply fix33611.patch
- Verify that build works correctly on Android on Windows now:
cd android && ./gradlew assembleDebug --scan
- Again, publish the resulting build scan to verify that everything works correctly now.
Your gradle commands and cd commands are unix-y, and do not work in powershell because of
/' vs '\' and
./gradlew` vs 'gradlew.bat' because....windows