Commit Graph

86 Commits

Author SHA1 Message Date
Jason Simmons
68e71146a7 Run "pub get" if needed in the flutter build command 2016-03-11 14:10:42 -08:00
Jason Simmons
5108a6cc58 Add an option to specify a working directory for the FLX builder
This allows building an FLX without leaving any temporary files in the app's
source directory
2016-03-09 14:59:40 -08:00
Alhaad Gokhale
b8d64ffe68 Add flutter_tools build hooks to also generate depfile.
Fixes #1942.
2016-03-09 11:24:47 -08:00
Devon Carew
b52fa986b6 fix rebase 2016-03-07 10:36:04 -08:00
Steve Messick
2e878746a3 Improve message when target not found 2016-03-04 14:36:32 -08:00
Adam Barth
870894fc68 Switch Material Design icons to using the iconfont
Rather than managing all the Material Design icons manually, we now
manage them using an icon font. The icon font contains glyphs for each
icon in an efficient vector format.

This patch updates the FLX tooling to include the MaterialIcons font and
updates the Icon widget to use the font instead of asset images.

Fixes #2313
Fixes #2218
Fixes #2009
Fixes #994
2016-03-02 09:32:02 -08:00
Devon Carew
d5a6fceee5 add a summary option to the doctor class 2016-02-17 09:33:45 -08:00
Devon Carew
2dbceafbc6 introduce globals scoped to the app's context 2016-02-09 22:03:13 -08:00
Todd Volkert
f0379df5c7 Refactor flx.build() to allow for external toolchain hooks.
This splits flx.build() into two methods, flx.build() and
flx.assemble().  builD() now does the following:
1) constructs the manifest map by reading the manifest from the
   file system
2) "compiles" the dart code into the snapshot file
3) Invokes assemble()

This allows external build toolchains to construct their own
manifest map (possibly using a different manifest syntax)
and create their own snapshot file
2016-02-04 15:44:03 -08:00
Devon Carew
bfb89195c3 add a hidden flag for backwards compatibility 2016-02-03 02:19:10 -08:00
Devon Carew
33874eb71f update arg reference 2016-02-03 01:07:40 -08:00
Devon Carew
b6e8118e2d normalize -t --target option 2016-02-03 00:52:07 -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
Devon Carew
70fb49fb14 refactor build command into two files 2016-01-20 15:45:34 -08:00
Adam Barth
8eb9763569 Improve error messages when build fails
Instead of failing with a cryptic error message about app.flx, we now fail with
an explicit message about the compiler.

Releated to #865
2015-12-10 11:25:19 -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
Devon Carew
e36b07f7b5 print logging timestamps to profile app launch 2015-11-25 12:47:25 -08:00
Adam Barth
18763e5609 Be more specific about what flutter build does
Fixes #512
2015-11-20 09:14:48 -08:00
Adam Barth
7b75d15d46 Improve error message for non-existent asset
Now we print the name of the asset and the base directory where we looked for
the error instead of throwing a null pointer exception.

Fixes #296
2015-11-17 22:56:00 -08:00
Adam Barth
f6bd26a3f3 Make flutter run_mojo imply flutter build
This makes run_mojo more similar to flutter start.
2015-11-17 16:19:55 -08:00
Adam Barth
a8ab3d6934 Add all the icon sizes to the FLX
Adding all the sizes of all the icons adds about 50 KB to the stocks FLX.
That's probably the right trade-off until we get better at pruning the set of
assets.

Fixes #235
2015-11-16 22:55:35 -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
113500206a Remove the --http option 2015-11-06 20:17:24 -08:00
Matt Perry
4ba8a7f077 Seed the RNG before signing the package. 2015-11-04 14:08:24 -05:00
Matt Perry
8ab21d7a9c Depend on the new flx 0.0.5 and remove use of deprecated KeyPair. 2015-11-03 15:28:55 -05:00
Devon Carew
5978f1355d Merge pull request #162 from devoncarew/abstract_os
abstract some OS operations
2015-11-02 13:10:43 -08:00
Devon Carew
5dc4a7cce4 abstract some OS operations 2015-11-02 13:07:56 -08:00
Adam Barth
27118f39ea Add a default maniest path for build 2015-11-02 12:54:31 -08:00
Devon Carew
494d1e0140 verify that we're running from the root of a project
remove an unused import

review comments

rename st --> stack
2015-10-29 11:30:44 -07:00
Matt Perry
828b861fce Change signing code to use shared flx package. 2015-10-26 15:14:01 -04:00
Chinmay Garde
9a67954b66 Avoid script snapshot creation if the --precompiled flag is set during builds 2015-10-20 18:50:19 -07:00
Matt Perry
b458935b84 Support signing flx packages with ECDSA key pair
Adds a --private-key option to the build command, which specifies an ECDSA
private key. When this is provided along with a manifest, the manifest is
prepended to the .flx package and signed with the private key. The manifest
also includes a SHA-256 hash of the zipped content portion of the .flx package.

This is used by the Flutter updater package, to verify that updates are
from the right publisher.
2015-10-19 16:08:53 -04:00
Devon Carew
bb1da703a6 return exit codes on failures 2015-10-17 11:50:23 -07:00
Adam Barth
12f75817ce Refactor the build command so that it can be used internally
Instead of calling through `pub` to invoke build, this patch refactors the
build command so that it can be called directly.
2015-10-13 10:00:06 -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
Adam Barth
287817f224 Move Command subclasses into commands directory
I'm trying to get a feel for the code by writing some simple cleanup patches.
2015-10-09 23:22:20 -07:00