Commit Graph

21 Commits

Author SHA1 Message Date
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Danny Tuppeny
567a4b9cb6
Switch asset_bundle_test.dart to use memory file system (#21425) 2018-09-05 19:30:32 +01:00
Ian Hickson
3dec6a6930
Clean up usage of temporary directories (#20682)
All temporary directory start with `flutter_` and have their random component separated from the name by a period, as in `flutter_test_bundle.YFYQMY`.

I've tried to find some of the places where we didn't cleanly delete temporary directories, too. This greatly reduces, though it does not entirely eliminate, the directories we leave behind when running tests, especially `flutter_tools` tests.

While I was at it I standardized on `tempDir` as the variable name for temporary directories, since it was the most common, removing occurrences of `temp` and `tmp`, among others.

Also I factored out some common code that used to catch exceptions that happen on Windows, and made more places use that pattern.
2018-08-17 13:17:23 -07:00
Ian Hickson
686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Jason Simmons
466d15433f
Use Dart 2 camel case constants (#15360) 2018-03-12 11:06:32 -07:00
Todd Volkert
1686b6d56d
Remove fixed asset bundles - they're no longer used. (#14729) 2018-02-16 10:22:52 -08:00
Alexandre Ardhuin
c02b6a8bcf
some whitespace cleanup (#14443) 2018-02-02 23:27:29 +01:00
Alexandre Ardhuin
841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
Todd Volkert
1859e82a3d
Extensibility improvements to flutter_tools (#14299)
* 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.
2018-01-29 09:40:28 -08:00
Michael Goderbauer
84580b545a
Make Assets more robust across platforms (#14246) 2018-01-24 13:16:23 -08:00
Sarah Zakarias
3cbbbf0617 Allow empty pubspec file when building asset bundle (#12269) 2017-09-26 23:14:20 +02:00
Hans Muller
b55441a027 Do not require main asset files if variants are provided (#10901) 2017-06-22 16:45:57 -07:00
Todd Volkert
83d411f979 Change flutter_tools tests to run via pub (#8698)
`all.dart` is no longer needed. Furthermore, it causes tests to
be skipped, or to silently fail to run anything.

Fixes #7941
2017-03-10 09:39:01 -08:00
Chris Bracken
7a09316cd0 Declare locals final where not reassigned (flutter_tools) (#8570) 2017-03-03 17:50:46 -08:00
Alexandre Ardhuin
2888139c6b prefer const constructor (#8292) 2017-02-20 14:07:16 -08:00
Michael Goderbauer
5e54fd54d9 Ban package:path from Flutter Tools (#8119) 2017-02-13 17:45:50 -08:00
Dan Rubel
0295def2a9 Refactor DevFS for kernel code (#7529)
Refactor DevFS so that it's easier to add new types of content such as kernel code
* add tests for DevFS package scanning
* add tests for DevFS over VMService protocol
* which covers _DevFSHttpWriter and ServiceProtocolDevFSOperations
* replace AssetBundleEntry and DevFSEntry with DevFSContent
* refactor to cleanup common code and replace some fields with locals
* rework .package file generation refactor away DevFSOperations.writeSource
* only update .package file if it has changed
* only write/delete/evict assets that have been changed/removed
2017-01-22 10:37:10 -05:00
Todd Volkert
8bb270342e Update flutter_tools to use package:file throughout (#7385)
This removes direct file access from within flutter_tools
in favor of using `package:file` via a `FileSystem` that's
accessed via the `ApplicationContext`.

This lays the groundwork for us to be able to easily swap
out the underlying file system when running Flutter tools,
which will be used to provide a record/replay file system,
analogous to what we have for process invocations.
2017-01-06 16:51:44 -08:00
Jason Simmons
f2342a6141 Provide an empty asset manifest if the FLX does not contain any assets (#7243)
Without this, an FLX with no assets may be completely empty in AOT mode.
This will result in a warning when the engine's unzip library tries to
parse the FLX.

Fixes https://github.com/flutter/flutter/issues/7060
2016-12-13 13:43:28 -08:00
John McCutchan
ae1881e4c7 Fix handling of empty --project-assets option (#6873) 2016-11-15 13:47:57 -08:00
John McCutchan
d54bed45f3 Support specifying a fixed list of assets on the command line (#6857) 2016-11-15 07:01:00 -08:00