Skip to content

Commit 72f8e35

Browse files
authored
fix(android): bump Gradle wrapper version for 0.76 (#2275)
1 parent 33182c2 commit 72f8e35

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/actions/setup-react-native/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ runs:
1313
rm example/macos/Podfile.lock
1414
rm example/visionos/Podfile.lock
1515
npm run set-react-version -- ${{ inputs.version }}
16+
node --eval "require('./android/gradle-wrapper.js').configureGradleWrapper('example/android')"
1617
shell: bash

android/gradle-wrapper.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const INT_MAX = 2 ** 31 - 1;
3434
* @type {[number, [number, string], [number, string]][]}
3535
*/
3636
const GRADLE_VERSIONS = [
37-
[v(0, 76, 0), [v(8, 10, 1), "8.10.1"], [INT_MAX, ""]], // 0.76: [8.10.1, *)
37+
[v(0, 76, 0), [v(8, 10, 2), "8.10.2"], [INT_MAX, ""]], // 0.76: [8.10.2, *)
3838
[v(0, 75, 0), [v(8, 8, 0), "8.8"], [v(8, 9, 0), "8.8"]], // 0.75: [8.8, 8.9)
3939
[v(0, 74, 0), [v(8, 6, 0), "8.6"], [v(8, 9, 0), "8.8"]], // 0.74: [8.6, 8.9)
4040
[v(0, 73, 0), [v(8, 3, 0), "8.3"], [v(8, 9, 0), "8.8"]], // 0.73: [8.3, 8.9)
@@ -50,7 +50,8 @@ function configureGradleWrapper(sourceDir, fs = nodefs) {
5050
const androidCommands = ["build-android", "run-android"];
5151
if (
5252
process.env["RNTA_CONFIGURE_GRADLE_WRAPPER"] === "0" ||
53-
!process.argv.some((arg) => androidCommands.includes(arg))
53+
(process.argv.length > 1 && // Allow this script to be called directly
54+
!process.argv.some((arg) => androidCommands.includes(arg)))
5455
) {
5556
return;
5657
}

test/android/gradle-wrapper.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe("configureGradleWrapper()", () => {
135135
process.argv.push("run-android");
136136

137137
const cases = [
138-
["8.9", "0.76.0", "gradle-8.10.1-bin.zip"],
138+
["8.9", "0.76.0", "gradle-8.10.2-bin.zip"],
139139
["8.9", "0.75.0", "gradle-8.8-bin.zip"],
140140
["8.7", "0.75.0", "gradle-8.8-bin.zip"],
141141
["8.9", "0.74.0", "gradle-8.8-bin.zip"],
@@ -190,7 +190,7 @@ describe("configureGradleWrapper()", () => {
190190
process.argv.push("run-android");
191191

192192
const cases = [
193-
["8.10.1", "0.76.0"],
193+
["8.10.2", "0.76.0"],
194194
["8.8", "0.75.0"],
195195
["8.8", "0.74.0"],
196196
["8.8", "0.73.0"],

0 commit comments

Comments
 (0)