-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
[tool] Move Java functions to their own file #126086
Merged
auto-submit
merged 25 commits into
flutter:master
from
andrewkolos:move-java-functions-simple
May 11, 2023
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
ea4bc2a
introduce Java class and have AndroidSdk use it for java related things
andrewkolos 6654a91
fix tests
andrewkolos b592b88
fix test
andrewkolos fc34192
make java global
andrewkolos 42c5992
oops
andrewkolos f6320c9
lint
andrewkolos 0d75603
add todo docs
andrewkolos 6576e71
analyzer lint
andrewkolos 0c2b7fc
migrate existing androidSdk.java* callers
andrewkolos 681c97e
move java construction to context_runner.dart
andrewkolos 053cdea
use absolute paths in FakeJava
andrewkolos 47481a5
add dart doc for JavaVersion members; rename shortText->number
andrewkolos fcb51c8
analyze lints
andrewkolos 04ed942
fix some indentation
andrewkolos fad8da7
Update proxied_devices_test.dart
andrewkolos 63b0077
remove try-catch in _findJavaBinary
andrewkolos f0da7c7
tweak docstring
andrewkolos 42ceaf0
tweak docstring
andrewkolos fcaddc2
experiment: use lazily-initialization for version property
andrewkolos f9f0d57
Update android_project_migration_test.dart
andrewkolos 0b5d0fc
remove non-warning traces
andrewkolos f9e97a0
Update packages/flutter_tools/lib/src/globals.dart
andrewkolos b289b44
Merge branch 'master' into move-java-functions-simple
andrewkolos 3884d3b
Merge branch 'master' into move-java-functions-simple
andrewkolos 71f0099
Merge branch 'master' into move-java-functions-simple
andrewkolos File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the canRun check we do on the next line, should we not do that during
Java.find()
and if you can't run it, keep falling back?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, or should we tool exit because maybe the user should fix their JDK setup? I'm not sure, legitimately asking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean here, though I probably should further migrate this code by using the
canRun
andversion
methods/properties onJava
.Hmm...I haven't looked at this code critically before. If we can't find the java version (or a well-formed Android SDK), we returned a
ValidationResult
with aValidationType
ofmissing
, so I wonder what thedoctor
output would look like here. I'm just thinking out loud.I can play around with this once I get home, where I have some a VM set up to test this kind of stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To unblock this PR you can add a TODO for this, if you like.