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(cli): Don't downgrade gradle version on migrate #7385

Merged
merged 3 commits into from
Apr 5, 2024
Merged

Conversation

jcesarmobile
Copy link
Member

@jcesarmobile jcesarmobile commented Apr 5, 2024

Since latest Android Studio prompts to update Gradle to 8.4 some users might have updated their apps already.
Capacitor 6 will use 8.2.1 by default, the migrate command is downgrading the Gradle version if the user already updated.

This PR checks the Gradle wrapper version and avoids the update if the existing version is newer than 8.2.1.

Removed the updateGradleWrapper function because it's not needed, updateGradleWrapperFiles already updates it, but moved it to be run first as updating the Gradle plugin before the Gradle wrapper it can cause update failures if the plugin version is incompatible with the wrapper version.

@jcesarmobile jcesarmobile merged commit c79211e into main Apr 5, 2024
6 checks passed
@jcesarmobile jcesarmobile deleted the no-downgrade branch April 5, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants