* Adding a setup function for hot restart that can be overwritten to perform any necessary initialization before a restart is started.
* Adding a test for setupHotRestart
* Removing local pubspec change
* Fixing some type annotation errors
* Responding to comments
This test was designed to ensure flutter_tester keeps running (previously it would quit immediately). However it's turned out ot be rather flaky and we have new tests on the way that supersede this by actually testing real things (debug stepping, reloading, expression evaluation).
* Remove the 'app' domain from flutter daemon
By default the daemon won't register the "app" domain, you need to opt-in (which the 'run' command does, as well as the tests for the app functionality).
Fixes#6658.
* Tweak text
* Put restart/callServiceExtension/stop back into daemon mode
* Add a comment about removing discoverApps
After landing the un-skip this test failed with a timeout. It then passed on the next build (!). I think it's too flaky to leave running until we can better diagnose what's happening.
* 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
* Improve update checking
This change emables pinging the server to check for updates regardless of whether the local version is "out of date". The server code already has a 7-day cache so the result is that we can now ping the server once every 7 days instead of waiting for the local install to be 4 weeks out of date before pinging.
The original 4 week period is still used for when we'll start warning the user they're out of date if we could not confirm with the server whether there's a new version.
* Improve message when we know there's a new version available
* Fix bnullable bool checks
* Switch nullable bool to enum
* Fix casing of enum values
* Remove stale comment
The names are now descriptive so doesn't need additional explanation.
* Improve name of function
* Remove note:
* Rename kPauseToLetUserReadTheMessage -> timeToPauseToLetUserReadTheMessage
* Change kVersionAgeConsideredUpToDate to 5 weeks from 4
* Inline the isNewerFrameworkVersionAvailable check
* Fix indenting (?)
* Fix more indenting
* Rename function to be clearer it's getting the commit date
* Formating tweaks
* Update stamp when connection failed, and reduce time before we'll try again
Previously we would hit the server on every command if we thought we might be out of date and we never successfully connected (eg. if you're offline). This makes the stamp update even when there's a conneciton failure so that this won't happen, but reduces the time till we check again from 7 days to 3 days to compensate a little in case it was a one-off.
https://github.com/flutter/flutter/pull/18193#issuecomment-399222269
* Fix comment
* Don't perform update checks if not on an official channel
This test is failing on mac_bot (but passing elsewhere) because flutter-tester is apparently quitting earlier than expected. Locally it fails with an even weirder error and almost all tests are failing with "Compilation failed" (this isn't happening on the builds, so something is bad on my MacBook). Marking as skip to fix build while investigating; there's no real impact of this test not running; it's testing a tool that its itself used for testing (and not currently in any way that should be affected by this failure).
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.
Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.
This also reverts migration to Dart 2 typedef syntax.
This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.
Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.
No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
* It's time to #deleteDart1 (#18293)
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.
Eliminates --preview-dart-2 / --no-preview-dart-2 support.
* Fix indentation, remove no longer necessary .toList()
* Only push udpated kernel if >0 invalidated srcs
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.
Eliminates --preview-dart-2 / --no-preview-dart-2 support.
Now that we have thousands of tests, it doesn't make sense to display a separate line for each test. The result is just megabytes of logs that you have to scrub through to find error messages.
Uses the `version` property from the `pubspec.yaml` file to set the corresponding fields in the `local.properties` file respectively in the `Generated.xcconfig` file.
The `--build-name` and `--build-number` options have changed. Now they trump the `version` property from the `pubspec.yaml` file.
If the `version` property is not set and the `--build-name` and `--build-number` options are not provided, the build command will not change the `local.properties` / `Generated.xcconfig` file.
* Send an event at startup with the protocol version and pid
The pid will help with some of the issues of terminate the process when launched through a shell script and the version will allow clients to make decisions about supported features.
I've also bumped the protocol version number for two reasons:
1. This change
2. We didn't increase it when we added the previous emulator commands
When running with --local-engine, build single-architecture apps, rather
than what's declared in the Xcode project.
By default, Flutter creates Xcode projects that generate universal
binaries supporting both armv7 and arm64 processors. Since local engine builds
are all single-architecture, override the Xcode project's ARCHS setting
with the appropriate value for the specific engine.
NOTE: this assumes engine paths consistent with those used in the engine
repo: 32-bit iOS engine builds end in _arm, 64-bit builds do not.
Previously, Flutter did not support iOS devices with armv7 or armv7s
CPUs. We now support these devices. This eliminates the previous
hardcoded checks that prevented running on simulators of older devices.
We maintain the existing restriction on running on watchOS or tvOS
simulators.
Previously, in non-release (i.e. profile) AOT builds, we were setting
--no-checked and --conditional_directives flags. --no-checked is the
default, and we don't make use of conditional directives in Flutter.
Allows users of Fingerprinter to filter the set of paths collected from
the explicitly-specified paths and those collected from depfiles.
In some cases, depfiles are emitted with files that are not present on
the local disk (e.g. the frontend compiler currently emits buildbot
paths for the dart core libraries and dart:ui). These files will not
materially affect whether we need to re-run a build action for which
they are inputs, since they're not present in the filesystem and
therefore cannot change.
This replaces the --prefer-shared-library flag, which falls back to
regular (non-shared-lib) compile if the NDK is not found, with the
--build-shared-library flag, which exits with an error message if the
NDK is not found.
This simplifies the set of allowed code paths through AOT compile,
resulting in better testability and easier-to-follow logic. It also
results in more predictable behaviour for continuous integration and
other scenarios.
This change adds support for armv7, arm64, and universal iOS apps.
This change eliminates iOS target architecture hardcoding (previously
arm64 only) and uses the target architecture(s) specified in Xcode's
ARCHS setting ('Architectures' in Xcode Build Settings).
For universal binaries, set ARCHS to its default value, $(ARCHS_STANDARD).
Note that after changing the architecture in Xcode, developers should
run 'pod install' from the ios subdirectory of their project. A separate
change (that will land before this one) will add support for
automatically detecting project file and Podfile changes and re-running
pod install if necessary.
This change also adds an --ios-arch option to flutter build aot. In iOS
AOT builds (in profile and release mode), this dictates which
architectures are built into App.framework. This flag should generally
be unnecessary to set manually since flutter build aot is typically only
invoked internally by flutter itself.
If the developer changes their Xcode build settings and their project
has plugins, pod install is required, (e.g. to pick up changes to the
target architecture).
Similarly, manual edits to the Podfile should trigger a pod install.
Adds a Fingerprinter utility class that can be used to compute unique
fingerprints for a set of input paths and build options, compare to the
output of a previous run, and skip the build action if no inputs or
options have changed. The existing Fingerprint class still does all the
heavy lifting. Fingerprinter adds common operations such as
reading/writing/comparing fingerprints and parsing depfiles.
This migrates existing uses of Fingerprint over to Fingerprinter.
This also adds better fingerprinting to AOT snapshotting, which
previously failed to include several options in its fingerprint
(--preview-dart-2, --prefer-shared-library).
Previously, we were incorrectly passing --vm_snapshot_data and
--isolate_snapshot_data options to gen_snapshot in assembly AOT builds.
These only make sense in AOT blob snapshot mode (alongside
--vm_snapshot_instructions and --isolate_snapshot_instructions).
There's very little code-sharing between the two, and what little there
is is concentrated in the GenSnapshotClass and the fingerprint
reading/writing utility methods.
iOS debug builds always run in interpreted mode whether on device or on
simulator. In both cases, we can skip snapshotting and link against an
empty App.framework. Previously, we did this for iOS simulator builds.
This does the same for device builds.
Previously, debug iOS builds used gen_snapshot to generate a core
snapshot, then used 'xxd' to generate C files containing the snapshot
data in buffers named kDartVmSnapshotData and kDartIsolateSnapshotData,
which are then compiled/linked into App.framework. This is unnecessary
since the VM compiled into Flutter.framework already contains this data.
Bugfix: Moves AOT snapshot input verification past where the last input
is added to the inputs list.
Cleanup:
* Extracts _isValidAotPlatform method.
* Moves non-platform-specific logic to the top.
* Moves variable declaration closer to first use, and inlines to a
narrower scope where possible.
This relands #17136, which was reverted in #17142 due to breakage in
on-device iOS debug builds.
Bugfix: Moves AOT snapshot input verification past where the last input
is added to the inputs list.
Cleanup:
* Extracts _isValidAotPlatform method.
* Moves non-platform-specific logic to the top.
* Moves variable declaration closer to first use, and inlines to a
narrower scope where possible.
Moves the kernel compile step to the beginning of the AOT build in a
separate method. This is pre-factoring for iOS universal builds where
the kernel build happens once, but we then snapshot twice: once for
armv7 and once for arm64.
This also writes dependencies to build/kernel_compile.d rather than
build/aot/snapshot.d, since that is immediately overwritten by
gen_snapshot.
This is required for iOS debug builds, but unused otherwise. In theory,
Android debug builds could be run in this mode, but this is historically
untested and adds unnecessary complexity to the code. If ad-hoc testing
is required, it can be patched in when necessary.
This re-lands 8c4f0c0d21 with a fix to
xcode_backend.sh to eliminate the use of --interpreter.
This is required for iOS debug builds, but unused otherwise. In theory,
Android debug builds could be run in this mode, but this is historically
untested and adds unnecessary complexity to the code. If ad-hoc testing
is required, it can be patched in when necessary.
This simplifies tests by allowing the test author to express the outputs
they'd like the snapshotter to generate without creating a whole new
instance and context with the additional overrides.
Also sets the default set of outputs to none, setting them instead in
the setUp function for script snapshotting.
Wraps the compile function in a class injected via the global context,
which makes it easier to mock in unit tests -- specifically tests for
AOT snapshotting, which already require pretty significant amounts of
mock inputs.
This moves --vm_snapshot_data and --isolate_snapshot_data argument
hardcoding from GenSnapshot (a minimal wrapper around gen_snapshot
invocations) to Snapshotter.buildScriptSnapshot(). These arguments are
present in both AOT and script snapshots, but differ semantically: for
script snapshots they're inputs from the host engine artifacts
directory, for AOT snapshots they're outputs to the build directory.
* Handle error count reported by frontend.
Extend compilation result from single string to a structure(string filename and integer error count).
* Use ?.
* Include engine roll with dart sdk roll.
* parse(onError) -> tryParse
* Make '?? throw' more readable and avoid issue with analyzer
* Fix test so it mocks compiler output including errors count
* Revert "Revert "Move mockito to 3.0.0-alpha. (#15949)" (#15979)"
This reverts commit e59651f925.
* More thenReturn to thenAnswer when mocking Futures
* Revert "More thenReturn to thenAnswer when mocking Futures"
This reverts commit 194d2cf417 as we are reverting engine roll.
* Revert "Revert "More thenReturn to thenAnswer when mocking Futures""
This reverts commit 52c9e96b30.
* Add dependency override
* Fix issue
* Move mockito to 3.0.0-alpha.
This is needed so it matches mockito version used internally.
* Pick up +2 for the fixes
* Fix whenReturn in fuchsia_remote_debug_protocol
* more thenReturn becomes thenAnswer
* more thenReturn becomes thenAnswer
* more thenReturn becomes thenAnswer
* traverse dependencies and dev dependencies separately
* separate dev and reg deps
* update pubspecs
* add checksum string and update transitive dep string. Add additional verify command to check checksum
* cleanup comments
* add missing space, quote, run verify-onlu from bot script
* rerun tool with fixed string
* ensure correct working directory and bump versions
* flutter not flutterRoot
Some file I/O is piped from OS processes and never completes,
so without havign a timeout on the recording serialzation, we
end up waiting forever on that I/O to complete.
* Pass entry points JSON files to front-end server (#15180)
* Fix ios/debug build which uses 'flutter build aot': do not require entry points files and disable AOT transformations in this mode
* Revert "Revert "Add android license verification to doctor and some refactoring" (#14727)"
This reverts commit d260294752.
* Add tests, fix sdkManagerEnv and use it consistently, and rearrange Status object model
* AnsiSpinner needs to leave the cursor where it found it.
* fix tests
* Const constructor warning only shows up on windows...?
* Avoid crash if we can't find the home directory
* Make pathVarSeparator return a string in the mock
* Implement review comments
* Fix out-of-order problem on stop
Reports from that commit included:
* Doctor hanging
* Doctor prompting to install JDK
* AnsiStatus.cancel() printing elapsed time and extra newline
* Printing extra spinner character at the end of each line
* Use already downloaded dart sdk for frontend_server.
This is follow-up to https://github.com/flutter/flutter/pull/14610
* Remove reference to engine dart-sdk from artifacts
* Remove unused imports
* WIP to switch back to solution where dart sdk is downloaded into bin/cache/dart-sdk, but it is 'flutter precache -a' that can download all dart sdks for other platforms under bin/cache/artifacts/engine/<platform>/dart-sdk
* Download all dart sdks when 'flutter precache -a'
* Initial version, seems to work
* Unit test for android license checker
* Cleanups
* Windows analyzer wants const.
* Refinements to timeout
* review comments
* Forgot a nit
* Use engine-built dart sdk
* Download dart-sdk from engine
* Move up deps to fix dart sdk constraint problem
* Update update_dart_sdk.ps1 for Windows
* Fix tests so they pass analysis
* More types for tests
* Roll engine
* Update dart sdk stamp location in flutter.bat
* Add newline
* Revert "Revert "Reduce xcodebuild noise #2" (#14641)"
This reverts commit 2d47481f1e.
* Stop scrapping xcodebuild output, get the right build settings
* clone the command params first
In getFlutterRoot(), scripts loaded via data: URIs are URI encoded.
getFlutterRoot() scans the contents of the data for the file:// URI path
of the Flutter SDK, which itself is URI-encoded. The end result is that
if the SDK path contains a space, the embedded file:// URI will contain
a %20. When this is encoded in a data: URI, the contents are
URI-encoded, resulting in %2520, since the % is encoded to %25.
This patch decodes the data: URI before extracting the SDK file:// URI.
The Flutter engine now supports package: and file: imports that resolve
to paths on disk that include spaces and other URI-escaped characters.
This patch eliminates the restriction that Dart source paths not include
%20 (or other URI-escaped characters) in their paths in flutter_tool
tests.
Looks in default install locations on Mac, Linux and Windows for VS Code. If found, looks in default extension location to see if Dart Code is installed.
If VS Code is not installed, nothing is reported. If VS Code is installed without Dart Code, a warning is shown.
* Flatten change out from lots of merges and temporary hacks for #7224
* Expand fakes to cover cases where doctor passes
* -v != --verbose
* Cosmetic touchups
* delint
* Clean up summary line, add a switch for review comments
* Review comments
* nit
* review comment
* review comments
* Make the current command injected into the AppContext, allowing
other classes to inject the current command.
* Introduce `AssetBundleFactory`, an injected factory class for
spawning instances of `AssetBundle`. This allows other run contexts
to use custom asset bundling logic.
* Clean up RunCommand by removing a 'packages' argument that duplicated
a global argument by the same name (and for the same purpose).
Duplicate arguments are confusing and error-prone.
* Unpin package:test and upgrade packages
* Update packages/flutter/test/foundation/stack_trace_test.dart
* Also add packages/flutter_tools/test/data/asset_test/font/.dartignore to ensure that update-packages --force-upgrade does not crash.
AndroidSdk and AndroidStudio depends relatively heavily on filesystem
access to locate installed tools. Testing code that relies on either of
these classes benefits from a utility method to generate a
legitimate-looking Android SDK directory layout for testing.
Moves MockProcess, MockStdio and a few other useful mocks from
packages_test.dart to common/mocks.dart. These are useful for testing
code with interactive IO.
This adds a new constructor to MockProcess to provide additional flexibility.
Convenience getters for the the path to the Android SDK manager and the
currently installed version of the tool.
Pre-factoring to support better checks around the --android-licenses
command, which uses a feature of the SDK manager that is unsupported in
older versions of the tool.
Apple encodes syslog entries using a 7-bit encoding where input UTF-8 bytes
are encoded as follows:
1. 0x00 to 0x19: non-printing range. Some ignored, some encoded as <...>.
2. 0x20 to 0x7f: as-is, with the exception of 0x5c (backslash).
3. 0x5c (backslash): octal representation \134.
4. 0x80 to 0x9f: \M^x (using control-character notation for range 0x00 to 0x40).
5. 0xa0: octal representation \240.
6. 0xa1 to 0xf7: \M-x (where x is the input byte stripped of its high-order bit).
7. 0xf8 to 0xff: unused in 4-byte UTF-8.
As there doesn't appear to be a system tool to decode these strings, we
implement here in Dart. If we're unable to decode a string (e.g.
decoding results in an invalid UTF-8 string), we fall back to emitting
the log line as-is.
* Reland 9534082fc0 with fix for incremental compilation.
When in incremental mode, awaiting exitCode won't work because compiler is not expected to exit after compilation.
Instead listen for stdout stream closing and report error if outputFilename has not been received.
* Fix lints
* First version
* Prevent modification of .flutter during analytics test
* Pass in directory and override analyzer warning due to conditional import
* Review comments
* Revert "Revert "Enable developers to run pod from terminal directly and skip pod install if possible. (#13374)" (#13770)"
This reverts commit 0759043e47.
* some nits on cocoapods code
* put back the FLUTTER_FRAMEWORK_DIR env variable
* Change async stubbing to use thenAnswer.
Mockito now prohibits calling thenReturn with Futures and Streams. dart-lang/mockito#79
* Update all Mockito deps to 3.0.0.
* Revert "Update all Mockito deps to 3.0.0."
This reverts commit e8ab9d37c3.
I did not correctly update the mockito dep, and there's no easy way to update to 3.0 alpha right now.
* Change thenAnswer((_) => to thenAnswer((invocation) =>
* Add Invocation type to thenAnswer lambdas
We now require Xcode 9.0, which ships with the iOS 11 SDK, for iOS
builds. This change does not affect the minimum supported iOS deployment
target, which remains iOS 8.
The iOS 11 SDK adds support for safe area insets, which model the status
bar, iPhone X home indicator, and symmetric horizontal insets to avoid
the iPhone X sensor housing when in landscape mode.
This re-lands flutter/flutter#13608 now that the devicelab Macs have
been updated to Xcode 9.
We now require Xcode 9.0, which ships with the iOS 11 SDK, for iOS
builds. This change does not affect the minimum supported iOS deployment
target, which remains iOS 8.
The iOS 11 SDK adds support for safe area insets, which model the status
bar, iPhone X home indicator, and symmetric horizontal insets to avoid
the iPhone X sensor housing when in landscape mode.
We thought it would be OK to call the create command offline-only, but it turns out that isn't a great idea because not all of the create template dependencies are cached by running flutter_tool.
This PR makes it go online by default when running pub get after creating a project, and adds an "--offline" flag to the create command so that offline users can use it offline if their cache is warm.
In order to allow offline usage of the create command we need to be able to tell pub not to try and contact the server to see if new versions are available. Since all the versions that create could want are pinned, it shouldn't need to check for new versions.
Adds a class `PubContext` with a fixed set of allowed values
Make it clear these values should not be changed casually
Fixed one inconsistency already: update_packages vs update_pkgs
Provide more information for verify calls
Eliminate `ctx_` prefix.
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.
The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.
Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.
This is an attempt to re-land: #13248. Includes a fix for the test that makes it work on bots in the presence of PUB_CACHE being set, and no other changes.
* Revert "Add tests."
This reverts commit 31bad961ff.
* Revert "Use .pub-cache from Flutter root, if it exists. (#13248)"
This reverts commit 72d6bcc3f7.
It turns out that when a PR build clones the flutter repo, it puts it into a directory called "flutter", and when the "real" build clones the flutter repo, it puts it into a directory called "build". This allowed the tests to succeed in my PR, but fail when I committed it.
This fixes the test so it doesn't depend on the cloned directory name.
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.
The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.
Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.
Add support for IOS_SIMULATOR_HOME environment variable in IOSSimulator.logFilePath
flutter_tools can be run on environments where the user's HOME directory
is not the root of the iOS simulators' configs. This change adds support
for such environments by allowing the caller to set the simulator root
directory via an environment variable.
This consolidates all of the non-template .gitignore rules into the top level .gitignore, to ignore common things more broadly, with less maintenance needed for the .gitignore files. Does not touch the templates, so that they still produce needed .gitignores as part of flutter create.
* Add support for NDK discovery and add --prefer-shared-library option
We would like to be able to use native tools (e.g. simpleperf, gdb) with
precompiled flutter apps. The native tools work much better with *.so
files instead of the custom formats the Dart VM uses by default.
The reason for using blobs / instruction snapshots is that we do not
want to force flutter users to install the Android NDK.
This CL adds a `--prefer-shared-library` flag to e.g. `flutter build
apk` which will use the NDK compiler (if available) to turn the
precompiled app assembly file to an `*.so` file. If the NDK compiler is
not available it will default to the default behavior.
* Rebase, add test for NDK detection, augment flutter.gradle with @Input for flag
* Use InMemoryFileSystem for test
* Remove unused import
* Address some analyzer warnings
Previously, we were mapping certain named platforms
(e.g. `android-stable`) to their corresponding version.
this had two problems:
1. The version could become out of date. For instance, we had
mapped `android-stable` to version 24, but the stable version
is now 27.
2. The list of possible named versions wasn't comprehensive.
Some Android SDKs just list the platform as `stable`, or
`experimental`, etc.
This change updates the platform version detection to use
the `build.prop` file that exists in the platform directory
(only for cases where the version number is not encoded into
the directory name).
Creates a new (hidden) flutter command 'ide-config' that will create and/or update
existing .iml files and some files under the .idea directory, as well as
removing existing *.iml files and the .idea directory.
It also:
* Adds *.iml to the .gitignore
* Removes existing .iml files from the repo, and moves them to the
packages/flutter_tools/ide_templates/intellij directory.
* Adds a flag to ide-config ('--update-templates') that will take any new .iml
files in the flutter tree and add them to the existing templates.
- If --overwrite is also specified, then all existing templates will also
be overwritten with the contents from the flutter tree, and any that have
been deleted from the flutter tree will also be removed from the
templates.
* Added new run configurations for all existing app targets that will now also
be automatically added to IntelliJ.
* Setting up the environment also includes setting the coding style guidelines
and the git VCS.
* Note that after this PR lands, Flutter developers will need to run it once to
re-create the .iml files and configuration files that have been removed.
After this PR lands, .iml files will no longer appear in the untracked files
section for git.
* Get rid of static version methods which ignore the AppContext
* Review comments
* Review Comments
* Make branch behave the same as original implementation
* Fix tests