Default to the newer version path when checking Android Studio Java path#101862
Merged
fluttergithubbot merged 1 commit intoflutter:masterfrom Apr 14, 2022
Merged
Default to the newer version path when checking Android Studio Java path#101862fluttergithubbot merged 1 commit intoflutter:masterfrom
fluttergithubbot merged 1 commit intoflutter:masterfrom
Conversation
…ath. Preview versions of Android Studio has a non-standard version number like `EAP AI-203.7717.56.2031.7557721`, which fails the current version parsing. And it defaults to the older path to look for the Java binary. This commit switches to use the new path by default if the version string can't be parsed.
| final String javaPath = globals.platform.isMacOS ? | ||
| version != null && version.major >= 2020 ? | ||
| globals.fs.path.join(directory, 'jre', 'Contents', 'Home') : | ||
| version != null && version.major < 2020 ? |
Contributor
There was a problem hiding this comment.
So is this change effectively flipping the default when version == null from jre/jdk/Contents/Home to /jre/Contents/Home?
Contributor
There was a problem hiding this comment.
oh right, that's what the description says, lol.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Apr 14, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Apr 14, 2022
auto-submit bot
pushed a commit
that referenced
this pull request
Apr 21, 2023
…droid Studio, assume the version to be the latest (#125247) Fixes #125246 by restoring the intended behavior of #101862. That is, when searching for a JDK and we encounter an Android Studio version we don't recognize, assume it to be the latest version `flutter` is aware of. Also does some light refactoring in the tests, like using test objects instead of referencing `globals`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preview versions of Android Studio has a non-standard version number
like
EAP AI-203.7717.56.2031.7557721, which fails the current versionparsing. And it defaults to the older path to look for the Java binary.
This commit switches to use the new path by default if the version
string can't be parsed.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.