Commit dd1f83e
fix: RNGP CCache compatibility (#54829)
Summary:
Invoking `Runtime.getRuntime().exec()` is not compatible with Gradle Configuration Cache and providers should be used instead.
This error hasn't surfaced yet due to fact that this branch of code is rarely hit as the users usually provide correct path to the CLI in their `app/build.gradle` file. I stumbled upon it accidentally when bumping RN in monorepo and the CLI path was no longer valid.
Re-opened due to failing tests in the previous PR #54801
## Changelog:
[ANDROID] [FIXED] - RNGP using node invocation non-compatible with Gradle Compilation Cache
Pull Request resolved: #54829
Test Plan:
I tested it in a rnc-cli app, where I provided an invalid path for `cliFile` - the error was fixed after applying this patch.
`./gradlew -p packages/gradle-plugin/ test` now works properly.
Reviewed By: mdvacca
Differential Revision: D88757054
Pulled By: cortinico
fbshipit-source-id: 07b86f8cf4d242dee30b97b7768602ff9b60ed541 parent 41c50fd commit dd1f83e
2 files changed
Lines changed: 14 additions & 10 deletions
File tree
- packages/gradle-plugin/react-native-gradle-plugin/src
- main/kotlin/com/facebook/react/utils
- test/kotlin/com/facebook/react/utils
Lines changed: 12 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| |||
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
0 commit comments