Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/setup-react-native/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ runs:
rm example/macos/Podfile.lock
rm example/visionos/Podfile.lock
npm run set-react-version -- ${{ inputs.version }}
node --eval "require('./android/gradle-wrapper.js').configureGradleWrapper('example/android')"
shell: bash
5 changes: 3 additions & 2 deletions android/gradle-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const INT_MAX = 2 ** 31 - 1;
* @type {[number, [number, string], [number, string]][]}
*/
const GRADLE_VERSIONS = [
[v(0, 76, 0), [v(8, 10, 1), "8.10.1"], [INT_MAX, ""]], // 0.76: [8.10.1, *)
[v(0, 76, 0), [v(8, 10, 2), "8.10.2"], [INT_MAX, ""]], // 0.76: [8.10.2, *)
[v(0, 75, 0), [v(8, 8, 0), "8.8"], [v(8, 9, 0), "8.8"]], // 0.75: [8.8, 8.9)
[v(0, 74, 0), [v(8, 6, 0), "8.6"], [v(8, 9, 0), "8.8"]], // 0.74: [8.6, 8.9)
[v(0, 73, 0), [v(8, 3, 0), "8.3"], [v(8, 9, 0), "8.8"]], // 0.73: [8.3, 8.9)
Expand All @@ -50,7 +50,8 @@ function configureGradleWrapper(sourceDir, fs = nodefs) {
const androidCommands = ["build-android", "run-android"];
if (
process.env["RNTA_CONFIGURE_GRADLE_WRAPPER"] === "0" ||
!process.argv.some((arg) => androidCommands.includes(arg))
(process.argv.length > 1 && // Allow this script to be called directly
!process.argv.some((arg) => androidCommands.includes(arg)))
) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions test/android/gradle-wrapper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe("configureGradleWrapper()", () => {
process.argv.push("run-android");

const cases = [
["8.9", "0.76.0", "gradle-8.10.1-bin.zip"],
["8.9", "0.76.0", "gradle-8.10.2-bin.zip"],
["8.9", "0.75.0", "gradle-8.8-bin.zip"],
["8.7", "0.75.0", "gradle-8.8-bin.zip"],
["8.9", "0.74.0", "gradle-8.8-bin.zip"],
Expand Down Expand Up @@ -190,7 +190,7 @@ describe("configureGradleWrapper()", () => {
process.argv.push("run-android");

const cases = [
["8.10.1", "0.76.0"],
["8.10.2", "0.76.0"],
["8.8", "0.75.0"],
["8.8", "0.74.0"],
["8.8", "0.73.0"],
Expand Down