Skip to content

When searching for the JDK bundled with an unrecognized version of Android Studio, assume the version to be the latest - #125247

Merged
auto-submit[bot] merged 10 commits into
flutter:masterfrom
andrewkolos:fix-jdk-search
Apr 21, 2023
Merged

auto-submit[bot] merged 10 commits into
flutter:masterfrom
andrewkolos:fix-jdk-search

Conversation

@andrewkolos

@andrewkolos andrewkolos commented Apr 20, 2023 •

Copy link
Copy Markdown
Contributor

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.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 20, 2023
@andrewkolos
andrewkolos marked this pull request as ready for review April 20, 2023 22:01
Comment thread packages/flutter_tools/lib/src/android/android_studio.dart
Co-authored-by: Christopher Fujino <[email protected]>

@christopherfujino christopherfujino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are you testing if version.major = 2023?

@andrewkolos

Copy link
Copy Markdown
Contributor Author

Are you testing if version.major = 2023?

No. Instead of this, I could add a "version next" case (e.g. version 999999).

Comment thread packages/flutter_tools/test/general.shard/android/android_studio_test.dart Outdated
Co-authored-by: Christopher Fujino <[email protected]>
Comment thread packages/flutter_tools/test/general.shard/android/android_studio_test.dart Outdated

@christopherfujino christopherfujino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@andrewkolos andrewkolos added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 21, 2023
@auto-submit
auto-submit Bot merged commit cf76b24 into flutter:master Apr 21, 2023
@andrewkolos
andrewkolos deleted the fix-jdk-search branch April 21, 2023 01:13
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 21, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 21, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 22, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 22, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 23, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 23, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 25, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 25, 2023
…on of Android Studio, assume the version to be the latest (flutter/flutter#125247)
auto-submit Bot pushed a commit that referenced this pull request May 1, 2023
…nfigured installation directory (`flutter config --android-studio-dir`) (#125596)

Fixes #121468 (when considered along with #125247).

This applies the pre-existing Android Studio version detection logic to the install configured with `flutter config android-studio-dir`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tools] Tool will likely not find the JDK bundled with the next major version of AndroidStudio (e.g. 2023)

2 participants