• Danny Tuppeny's avatar
    Add --create option to `flutter emulators` command (#18235) · cdb01187
    Danny Tuppeny authored
    * Add --create option to flutter emulators
    
    * Tweaks to error message
    
    * Simplify emulator search logic
    
    * Make name optional
    
    * Add a note about this option being used with --create
    
    * Tweaks to help information
    
    * Switch to processManager for easier testing
    
    * Don't crash on missing files or missing properties in Android Emulator
    
    * Move name suffixing into emulator manager
    
    This allows it to be tested in the EmulatorManager tests and also used by daemon later if desired.
    
    * Pass the context's android SDK through so it can be mocked by tests
    
    * Misc fixes
    
    * Add tests around emulator creation
    
    Process calls are mocked to avoid needing a real SDK (and to be fast). Full integration tests may be useful, but may require ensuring all build environments etc. are set up correctly.
    
    * Simplify avdManagerPath
    
    Previous changes were to emulatorPath!
    
    * Fix lint errors
    
    * Fix incorrect file exgtension for Windows
    
    * Fix an issue where no system images would crash
    
    reduce throws on an empty collection.
    
    * Fix "null" appearing in error messages
    
    The name we attempted to use will now always be returned, even in the case of failure.
    
    * Add additional info to missing-system-image failure message
    
    On Windows after installing Andriod Studio I didn't have any of these and got this message. Installing with sdkmanager fixed the issue.
    
    * Fix thrown errors
    
    runResult had a toString() but we moved to ProcessResult when switching to ProcessManager to this ended up throwing "Instance of ProcessResult".
    
    * Fix package import
    
    * Fix more package imports
    
    * Move mock implementation into Mock class
    
    There seemed to be issues using Lists in args with Mockito that I couldn't figure out (docs say to use typed() but I couldn't make this compile with these lists still)..
    
    * Rename method that's ambigious now we have create
    
    * Handle where there's no avd path
    
    * Add another toList() :(
    
    * Remove comment that was rewritten
    
    * Fix forbidden import
    
    * Make optional arg more obviously optional
    
    * Reformat doc
    
    * Note that we create a pixel device in help text
    
    * Make this a named arg
    cdb01187
Name
Last commit
Last update
..
android Loading commit data...
base Loading commit data...
commands Loading commit data...
dart Loading commit data...
fuchsia Loading commit data...
intellij Loading commit data...
ios Loading commit data...
runner Loading commit data...
test Loading commit data...
tester Loading commit data...
vscode Loading commit data...
application_package.dart Loading commit data...
artifacts.dart Loading commit data...
asset.dart Loading commit data...
build_info.dart Loading commit data...
bundle.dart Loading commit data...
cache.dart Loading commit data...
compile.dart Loading commit data...
context_runner.dart Loading commit data...
crash_reporting.dart Loading commit data...
dependency_checker.dart Loading commit data...
devfs.dart Loading commit data...
device.dart Loading commit data...
disabled_usage.dart Loading commit data...
doctor.dart Loading commit data...
emulator.dart Loading commit data...
flutter_manifest.dart Loading commit data...
globals.dart Loading commit data...
plugins.dart Loading commit data...
project.dart Loading commit data...
protocol_discovery.dart Loading commit data...
resident_runner.dart Loading commit data...
run_cold.dart Loading commit data...
run_hot.dart Loading commit data...
services.dart Loading commit data...
template.dart Loading commit data...
tracing.dart Loading commit data...
usage.dart Loading commit data...
version.dart Loading commit data...
vmservice.dart Loading commit data...
vmservice_record_replay.dart Loading commit data...