Skip to content

Conversation

@tido64
Copy link
Member

@tido64 tido64 commented Mar 25, 2024

Description

Automatically configure Gradle wrapper. To disable this behavior, set RNTA_CONFIGURE_GRADLE_WRAPPER=0.

Basically, this is what the script does:

  • If 0.74 or greater (including nightlies), set Gradle version to 8.6 if the current version is lower
  • If 0.73, set Gradle version to 8.3 if the current version is lower
  • If 0.72, set Gradle version to 8.1.1 if the current version is lower
  • Else, set Gradle version to 7.6.4 if the current version is <7.5.1 or >=8.0.0

Platforms affected

  • Android
  • iOS
  • macOS
  • visionOS
  • Windows

Test plan

  1. Switch to 0.71: npm run set-react-version 0.71 -- --core-only
  2. Verify that example/android/gradle/wrapper/gradle-wrapper.properties is unmodified
  3. Install npm dependencies: yarn
  4. Build the Android app: cd example && yarn android
  5. In a separate terminal, verify that the Gradle version changed to 7.6.4 (in example/android/gradle/wrapper/gradle-wrapper.properties)
  6. Switch to 0.73: npm run set-react-version 0.73 -- --core-only
  7. Verify that the Gradle version is still 7.6.4
  8. Install npm dependencies: yarn
  9. Build the Android app: cd example && yarn android
  10. In a separate terminal, verify that the Gradle version changed to 8.3
  11. Switch to 0.72: npm run set-react-version 0.72 -- --core-only
  12. Verify that the Gradle version is still 8.3
  13. Install npm dependencies: yarn
  14. Build the Android app: cd example && yarn android
  15. In a separate terminal, verify that the Gradle version is still 8.3
  16. Switch to 0.71: npm run set-react-version 0.71 -- --core-only
  17. Verify that the Gradle version is still 8.3
  18. Install npm dependencies: yarn
  19. Build the Android app but disable the behavior: cd example && RNTA_CONFIGURE_GRADLE_WRAPPER=0 yarn android
  20. Verify that the Gradle version is still 8.3

@tido64 tido64 requested a review from kelset as a code owner March 25, 2024 23:22
@github-actions github-actions bot added platform: Android This affects Android platform: iOS This affects iOS platform: macOS This affects macOS platform: Windows This affects Windows platform: visionOS labels Mar 25, 2024
@tido64 tido64 force-pushed the tido/manage-gradle-version branch from 1c7cc3a to 1687f97 Compare March 26, 2024 08:18
@tido64 tido64 mentioned this pull request Mar 26, 2024
6 tasks
To disable this behavior, set `RNTA_CONFIGURE_GRADLE_WRAPPER=0`.
@tido64 tido64 force-pushed the tido/manage-gradle-version branch from 1687f97 to 5d788b8 Compare March 26, 2024 10:14
@kelset kelset removed platform: iOS This affects iOS platform: macOS This affects macOS platform: Windows This affects Windows platform: visionOS labels Mar 26, 2024
Copy link
Contributor

@kelset kelset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff!

Tested the whole flow locally and it works great.

Let's :shipit:

@github-actions github-actions bot added platform: iOS This affects iOS platform: macOS This affects macOS platform: Windows This affects Windows platform: visionOS labels Mar 26, 2024
@tido64 tido64 enabled auto-merge (squash) March 26, 2024 16:16
@tido64 tido64 merged commit 7a85942 into trunk Mar 26, 2024
@tido64 tido64 deleted the tido/manage-gradle-version branch March 26, 2024 16:30
@tido64 tido64 mentioned this pull request Jul 17, 2024
33 tasks
@tido64 tido64 mentioned this pull request Nov 12, 2024
24 tasks
@tido64 tido64 mentioned this pull request Jan 22, 2025
20 tasks
@tido64 tido64 mentioned this pull request Feb 5, 2025
23 tasks
@tido64 tido64 mentioned this pull request Apr 2, 2025
25 tasks
@tido64 tido64 mentioned this pull request Jul 21, 2025
25 tasks
@tido64 tido64 mentioned this pull request Aug 8, 2025
20 tasks
@tido64 tido64 mentioned this pull request Nov 7, 2025
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: Android This affects Android platform: iOS This affects iOS platform: macOS This affects macOS platform: visionOS platform: Windows This affects Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants