On React Native version 0.71, the app gradle file template changed.
It now no longer contains the apply from: "../../node_modules/react-native/react.gradle" line, and the our plugin can be applied much earlier in the file.
How?
Check on the version of react native to decide at which point to do the injection.
The implementation leaves the possibility for the script to change even later on.
Review checklist
[x] Feature or bugfix MUST have appropriate tests (unit)
What and why?
On React Native version 0.71, the app gradle file template changed. It now no longer contains the
apply from: "../../node_modules/react-native/react.gradle"
line, and the our plugin can be applied much earlier in the file.How?
Check on the version of react native to decide at which point to do the injection. The implementation leaves the possibility for the script to change even later on.
Review checklist