This change adds a top-level getBuildDirectory func and funcs for
android, aot, asset, ios build products.
Developers may now add a "build-dir" mapping to their
~/.flutter_settings (JSON format) config file. Output directory is
relative to the main flutter application directory.
This change also changes the default build directory for iOS builds to a
subdirectory of the configured build directory, 'build/ios' by default.
Expose the main entry point for the tools via the library lets us run the tools
from the Flutter package, which simplifies the setup for end developers because
they don't need to declare a dependency on sky_tools directly.
This makes the 'package-root' option universal for sky_tools and configures the
ArtifactStore with it statically at startup. The actual sky_engine revision
is computed on demand.
This adds the following commands to sky_tools:
sky_tools cache clear: Nukes all local artifacts in the cache
sky_tools cache populate: Populates the cache with all known artifacts
This is useful both to fix busted caches and to make sure that the cache is
fully populated so that subsequent operations can proceed without needing
network access.
This initial version assumes the developer has mojo_shell and all other services
sitting on disk somewhere and that they're on linux and only want to run on
linux. This can be generalized down the line to support more use cases. This
downloads the sky_viewer.mojo corresponding to the packages/sky_engine/REVISION
in the developer's directory, so they can specify whatever revision they want.
sky_tools run_mojo downloads sky_viewer.mojo into its cache directory if it is
not present and constructs a command line to pass to mojo_shell that maps the
shebang stamped into the flx to the downloaded sky_viewer.mojo.
Since sky_viewer.mojo lives in the cloud and mojo_shell can load from the cloud
this could also map to an https URL. This should likely be an option.
This command will produce an flx package. Currently, this command doesn't work
because we don't have the Flutter compiler downloaded from Google storage yet.
A future patch will make that happen.
This command uses package:test to run Dart tests with sky_shell. For this to
work, we need https://github.com/dart-lang/test/tree/hacky-loader-hook to land.
We're also not smart enough to find sky_shell ourselves yet. Instead, we take
the path as input using an environment variable. Eventually, we'll be able to
get the sky_shell executable from package:sky_engine, but we don't yet ship
that executable.