Commit Graph

275 Commits

Author SHA1 Message Date
Ben Konyi
08c2e0771f Removed special cases for '.exe'. 2017-12-11 11:13:16 -08:00
Ben Konyi
bf33eb78c5 Enabling 'flutter test' for Windows (woohoo!). 2017-12-11 11:13:16 -08:00
Jason Simmons
eb475bbb80 move dart_io_entries.txt to third_party/dart for AOT builds with a local engine (#12659) 2017-10-20 15:32:27 -07:00
Alexander Aprelev
c5750cd7ea Introduce --preview-dart-2 option to run new frontend compiler in flutter tools. (#11741)
This adds --preview-dart-2 flag that enables use of Dart 2.0 Frontend in Flutter tools.
2017-08-31 13:35:55 -07:00
Jason Simmons
22ccb74ef5 Check all possible output directories to find a locally built gen_snapshot (#11417)
The output location of gen_snapshot differs based on the engine's target
platform, and we don't know the target platform when building a
platform-independent FLX in JIT mode.
2017-07-27 14:22:21 -07:00
Ryan Macnak
1650420db5 Update --local-engine to account for changed host architecture of 32-bit Android debug builds. (#11263)
Roll engine to 03e642bc8940441bbad5c2fb7d3ca868c1fdad54.
2017-07-17 14:56:27 -07:00
Ryan Macnak
fce76bcfd6 Revert "Update --local-engine to account for changed host architecture of 32-bit Android debug builds. (#11251)" (#11259)
This reverts commit 3f514fcfdf.
2017-07-17 13:47:03 -07:00
Ryan Macnak
3f514fcfdf Update --local-engine to account for changed host architecture of 32-bit Android debug builds. (#11251)
Roll engine to 7480e32854606e554ae37f8bd241c050bdc565c4.
2017-07-17 12:20:14 -07:00
Michael Goderbauer
561e7773c2 Fix path to flutter_tester when using local enginde on Mac OS (#11134) 2017-07-10 12:34:04 -07:00
Jason Simmons
91dbb3c91e roll engine and update tools for the removal of dart:jni (#9137) 2017-03-31 16:20:14 -07:00
Jason Simmons
e7f1361681 Update artifact names and remove obsolete artifacts (#9091) 2017-03-29 16:30:41 -07:00
Jason Simmons
72effdd27c Roll the engine and update for new binary names (#9089) 2017-03-29 15:31:36 -07:00
Jakob Andersen
7b2367ed5f Remove legacy .apk build. (#8793)
* Remove legacy .apk build.

Print out an error message telling the user to upgrade the project if
it's not Gradle-based. Removed all the obvious traces of the legacy
build.

Added support for Dart VM kernel snapshots in Gradle builds.

Fixed Android installs to verify that the app is actually installed, and
not just rely on the presence of the .sha1 file.
2017-03-20 11:05:55 +01:00
Zachary Anderson
b6ba37d768 Adds initial support for hot reload for Fuchsia to flutter_tool. (#8764) 2017-03-14 11:12:19 -07:00
Jason Simmons
e44f513e43 Fix the gen_snapshot path for a local_engine FLX build in debug mode (#8754)
gen_snapshot is now used for both JIT and AOT snapshots.  The JIT version
used in debug mode will be a 64-bit binary.
2017-03-14 10:17:59 -07:00
Michael Goderbauer
906103dd10 eliminate sky snapshot (#8631)
* eliminate sky snapshot

* roll engine
2017-03-08 13:33:06 -08:00
Chris Bracken
7a09316cd0 Declare locals final where not reassigned (flutter_tools) (#8570) 2017-03-03 17:50:46 -08:00
Michael Goderbauer
d579d58702 Enable Hot Reload on Windows (backed by gen_snapshot) (#8512)
* Enable Hot Reload on Windows (backed by gen_snapshot)

\o/

Two caveats:
* Hot Reload on Windows is slower than on other platforms because gen_snapshot is slower then sky_snapshot
* We currently cannot hot reload projects with spaces in the path

* enable tests
2017-03-02 10:57:27 -08:00
Michael Goderbauer
cd8434d931 Refactor how Artifacts are located (#8234)
Artifacts are now located in a central place.
This will enable us to downlaod artifacts when we need them (instead of
downloading them all upfront).
This also makes replacing sky_snapshot with gen_snapshot easier.
2017-02-16 23:10:11 -08:00
Jason Simmons
32846de9f8 Remove ArtifactStore and move flutterRoot into Cache (#3883) 2016-05-12 15:54:35 -07:00
Jason Simmons
a590ee2671 Remove BuildConfigurations (#3879)
Artifacts from local engine builds will be found based on the --local-engine flag
2016-05-12 12:22:15 -07:00
Devon Carew
f132acaf1d use the new cache code to locate more artifacts (#3361)
* use the new cache code to locate more artifacts

* add todo

* review comments
2016-04-15 21:08:03 -07:00
Devon Carew
7ad1e38eac Fix windows crash (#3236)
* better messaging about windows support

* fix lints
2016-04-11 08:34:01 -07:00
Devon Carew
1311ae6ffe add a target for android-x64 (#3224)
* add a target for android-x64

* update armeabi-v7a to x86_64
2016-04-08 14:04:46 -07:00
Devon Carew
750796846c move services to using cache.dart (#3211) 2016-04-08 10:23:47 -07:00
Adam Barth
2e062dfab4 Use --packages rather than --package-root
The .packages file is replacing the packages directory of symlinks.
2016-03-28 15:01:25 -07:00
Devon Carew
2fc8e9a110 create a crash report 2016-03-25 13:29:15 -07:00
Chinmay Garde
68a3aa70bf Use the artifacts store for iOS assets 2016-03-21 16:25:58 -07:00
Chinmay Garde
c8377d7428 Dont differentiate between ios_arm and ios_x64 in flutter_tools
All artifacts for iOS are universal.
2016-03-21 14:41:26 -07:00
Adam Barth
e2744e9a30 Stop using a prebuilt APK
Instead, require an AndroidManifest.xml and always build an APK.

Fixes #2517
2016-03-14 13:32:00 -07:00
Ian Hickson
bedd8e9131 Merge pull request #2650 from Hixie/always_always_specify_types
Even more types
2016-03-14 10:44:05 -07:00
Ian Hickson
d745e20853 Even more types 2016-03-14 09:41:54 -07:00
Devon Carew
4daee0cc0d misc tool ui cleanup 2016-03-14 09:41:00 -07:00
Devon Carew
e939b152af rename the platform constants 2016-03-12 11:08:21 -08:00
Adam Barth
4aae718f85 Download sky_engine and sky_services from cloud storage
Downloading these packages from cloud storage simplifies our deployment
story because we can upload to cloud storage automatically from the
buildbot.

This patch also switches the responsibility for downloading the engine
artifacts to update_engine.sh. Centralizing this responsibility ensures
that the packages and the binaries are always in sync.
2016-02-20 13:25:01 -08:00
Devon Carew
d5a6fceee5 add a summary option to the doctor class 2016-02-17 09:33:45 -08:00
Devon Carew
cc72bbc7ec rename list->devices, start->run 2016-02-13 23:50:20 -08:00
Matt Perry
a02d583d02 Refactor service-related code to be shared between android and IOS.
The IOS code is totally untested. Need a Mac to test it.
2016-02-10 14:52:17 -05:00
Devon Carew
2dbceafbc6 introduce globals scoped to the app's context 2016-02-09 22:03:13 -08:00
Collin Jackson
beaffecb7b fix #1443 ensure engine is the correct version 2016-02-01 13:11:30 -08:00
Devon Carew
864b7f47d7 add the engine revision to --version 2016-01-29 10:45:59 -08:00
Devon Carew
d7fbf5302d use status(), error(), and trace() for logging
rename to printTrace(), printStatus(), and printError()
2016-01-28 12:44:17 -08:00
Matt Perry
6610b7ea04 Support local paths to third-party jars in flutter apk.
Also improve the error message a bit if a download fails.
2016-01-25 15:05:06 -05:00
Matt Perry
dcbb4960eb 'flutter apk' now supports dynamically registered services.
Third-party libraries can now provide their own mojo services. They do
so by adding a config.yaml file to their pub package which contains
- a list of service names and java classes which handles that service's
  registration.
- a list of pre-built .jar files to statically link with the app's shell
  when building the app.
2016-01-22 13:20:54 -05:00
Devon Carew
87e6b9a082 name and grammar tweaks 2016-01-20 08:38:50 -08:00
Devon Carew
386c351884 improve the failure mode when run from a non-flutter project
fix an issue where errors were printed twice
2016-01-19 20:56:23 -08:00
Adam Barth
2b6b781c7a Switch over to the Travis-built artifacts
We've been bulding these binaries using Travis for a while. We can start using
them now.
2015-12-08 15:01:44 -08:00
Adam Barth
9662d49e12 Clean up code organization in flutter_tools
1) Moved basic utility code into base/ directory to make it clear which code
   doesn't depend on Flutter-specific knowldge.
2) Move the CommandRunner subclasses into a runner/ directory because these
   aren't commands themselves.
2015-11-28 21:16:55 -08:00
Adam Barth
c7e00449a8 Make it possible to run tests outside the Flutter repo
This patch still requires a locally built engine. I'll remove the need for a
locally built engine in a future patch.

Fixes #278
2015-11-23 13:42:04 -08:00
Jason Simmons
854db78466 Build APKs without a local copy of the engine sources 2015-11-20 16:22:18 -08:00
Jason Simmons
1f83018f86 Download build artifacts from a zip file
This updates the Flutter tools to match the proposed new packaging of artifacts
in the engine release script.
* The GCS URL for artifacts is now gs://mojo/flutter/$revision/$platform
* Categories have been removed from the Artifact class
* All artifacts for a given platform now live in a zip file.  If an artifact
  is not present in the local cache, then the zip will be downloaded and
  extracted.

Note that darwin-x64 artifacts go through a different process that (for now)
continues to use the old format.
2015-11-20 10:27:18 -08:00
Adam Barth
b8e16d7c09 Switch flutter run_mojo over to flutter.mojo
The new flutter.mojo is ready for use.
2015-11-17 14:16:20 -08:00
Hixie
a0227cab15 flutter analyze command
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
  pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
  changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
  things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
  upon further reflexion it was determined it didn't work anyway.
  We'll probably have to add better diagnostics here and say to run the
  updater script.
- Remove the native velocity tracker script, since it was testing code
  that has since been removed.

Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
  in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
  strong mode because even though it's not really relevant to our needs,
  it does (more or less accidentally) catch a few things that are
  helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
  platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
  where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
  files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
  identifiers using lowerCamelCase.' lint, to allow one-letter variables
  that use capital letters (e.g. for physics expressions) and to allow
  multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
  incantation and a "#" character:
    // analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
    // analyzer says "..."
  ...then we ignore any errors that have that "..." string in them.
2015-11-12 12:23:29 -08:00
Adam Barth
da0a12c611 Rename sky_tools to flutter_tools 2015-11-10 13:20:35 -08:00
Ian Hickson
3419068cb3 Port test logic to Dart. 2015-11-09 09:00:49 -08:00
Adam Barth
2710e0f468 Teach flutter init how to depend on flutter using a relative path 2015-11-07 21:30:26 -08:00
Adam Barth
b4fa3fbbf0 Return to the mojo artifacts for Linux 2015-11-04 14:25:47 -08:00
Adam Barth
3804107e2d Enable --no-http by default
We still have the --http option as a fallback for now. Once we're confident the
--no-http version works, we'll drop the --http support.

Also, create the FLX in a temp directory and then delete the temp directory
when we're done. Finally, pull the Linux artifacts from the cloud storage
bucket that the buildbot is uploading to.
2015-11-03 19:39:47 -08:00
Devon Carew
5dc4a7cce4 abstract some OS operations 2015-11-02 13:07:56 -08:00
Adam Barth
94b472ff67 Add a --no-http flag to start command
This flag builds a local FLX file and pushes that to the device instead of
using an HTTP server.
2015-10-31 12:18:03 -07:00
Adam Barth
d9af939995 Improve error message when missing the package-root 2015-10-12 14:01:05 -07:00
Adam Barth
0e06feee01 Add some print statements to smooth first run
This patch adds a couple print statements to explain why the first run of
`flutter start` takes a while. (We need to download the APK and install it on
the device.)
2015-10-12 01:33:03 -07:00
Adam Barth
bdd20661d7 Teach sky_tools about prebuilt artifacts
This patch makes `flutter start` work without a clone of the engine git
repository. Making this work pulled a relatively large refactor of how the
commands interact with application packages and devices. Now commands that want
to interact with application packages or devices inherit from a common base
class that holds stores of those objects as members.

In production, the commands download and connect to devices based on the build
configuration stored on the FlutterCommandRunner. In testing, these fields are
used to mock out the real application package and devices.
2015-10-12 00:03:55 -07:00
James Robinson
f7e20f4a46 Check that the platform is linux before downloading linux-x64 binaries 2015-09-25 17:42:28 -07:00
James Robinson
9996d4255e Configure ArtifactStore for all commands and make 'package-root' universal
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.
2015-09-25 15:56:20 -07:00
James Robinson
b7fc56eb31 Make cached artifact location mirror local builds more closely 2015-09-25 11:27:07 -07:00
James Robinson
f735604aca Add cache command to sky_tools with subcommands for populating/clearing
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.
2015-09-22 20:35:31 -07:00
James Robinson
0758c5922f Instantiate ArtifactStore explicit with packageRoot
This teaches commands that need binary artifacts to explicitly instantiate an
instance of the ArtifactStore with the appropriate packageRoot string. The
ArtifactStore can then remember the package root and compute the engine
revision when created and remember those for subsequence calls.
2015-09-22 17:17:01 -07:00
James Robinson
20e5355239 Teach sky_tools mojo_run to run on Android (using mojo devtools)
This teaches sky_tools mojo_run --android to invoke mojo's devtool's mojo_run
script with the right flags for invoking sky_viewer on android. This tells the
devtools script to load sky_viewer.mojo from https://storage.googleapis.com/...
and to load app.flx (or whatever the developer specifies as --app) from the
filesystem using the devtools http server.
2015-09-22 15:25:42 -07:00
James Robinson
542da8ccd5 Adds a run_mojo command that downloads sky_viewer.mojo and runs an flx in it
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.
2015-09-21 22:06:05 -07:00
Devon Carew
a4ff100408 check all the dart code in the project, not just selected libraries 2015-09-18 20:59:32 -07:00
James Robinson
a320e712de Address review feedback from pull request #30 2015-09-18 17:03:51 -07:00
James Robinson
cbc35dfacb Download sky_snapshot from the cloud
This adds logic to download and use the sky_snapshot binary from
Google cloud storage when running the 'sky_tools build' command.
The downloaded binary is put into lib/cache/... The binary is
chosen to match the REVISION in the sky_engine package in the
packages directory of whichever package the user wishes to
build a flx from.

Known issues:
*) Assumes linux-x64 host
*) Assumes download will always produce valid executable
*) No clearing of stale cache entries
2015-09-18 16:58:57 -07:00
Adam Barth
a75e79f0ce Address review comments from @iansf 2015-09-17 14:02:55 -07:00
Adam Barth
cf41a63396 Add a build command to sky_tools
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.
2015-09-17 13:37:53 -07:00