Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): update Gradle version check during build #2149

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Jul 23, 2024

Description

Update Gradle version check during build

Platforms affected

  • Android
  • iOS
  • macOS
  • visionOS
  • Windows

Test plan

This must currently be manually tested by modifying example/android/gradle/wrapper/gradle-wrapper.properties and running ./gradlew clean under example/android.

@tido64 tido64 requested a review from JasonVMo as a code owner July 23, 2024 15:58
@github-actions github-actions bot added the platform: Android This affects Android label Jul 23, 2024
@tido64 tido64 mentioned this pull request Jul 23, 2024
30 tasks
// executed. If it's built with Gradle directly, it's already too late and
// the best we can do is to warn the user.
def gradleVersions = [
[v(0, 76, 0), [v(8, 9, 0), "8.9"], [Integer.MAX_VALUE, ""]], // 0.76: [8.9, *)

Choose a reason for hiding this comment

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

Can you pull json files into .gradle files? If so you could put this table in a .json file and pull it into both places so you don't have to keep two code locations in sync. Otherwise looks good.

Copy link
Member Author

@tido64 tido64 Jul 23, 2024

Choose a reason for hiding this comment

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

v() calculates the numerical value of a version string, which we can't do in a JSON file. We would have to hard-code them, and if the algorithm changes for some reason (it has changed once, though unlikely again), we would also have to manually update the table. Maybe that's fine?

I'll merge this for now and revisit this later.

@tido64 tido64 merged commit 582c67c into trunk Jul 23, 2024
30 checks passed
@tido64 tido64 deleted the tido/android/update-gradle-checks branch July 23, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Android This affects Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants