Commit graph

45 commits

Author SHA1 Message Date
Andrew Kolos cbe0ceafe2
consolidate AssetBundle::entries and AssetBundle::entryKinds into a new type, AssetBundleEntry (#142029)
Part of work on https://github.com/flutter/flutter/pull/141194

The [`AssetBundle`](0833929c99/packages/flutter_tools/lib/src/asset.dart (L80)) class contains two members, `entries` and `entryKinds`. `entries` contains asset data indexed by asset key. `entryKinds` contains the "kinds" of these assets, again indexed by asset key.

**Change.** Rather than have two separate maps, this PR proposes combining these maps into one by wrapping the asset data and kind into a single data type `AssetBundleEntry`.

**Purpose.** In https://github.com/flutter/flutter/pull/141194, I am considering associating more information with an asset. In particular, what transformers are meant to be applied to it when copying it to the build output. Rather than adding another map member onto `AssetBundle` (e.g. `entryTransformers`), I decided to make things neater by introducing the `AssetBundleEntry` type.
2024-01-23 22:00:46 +00:00
Liam Appelbe 9489458650
Reland "Null safety migration of packages/flutter_tools/bin" (#111756)
This reverts commit f8f69575dd.
2022-09-16 12:39:55 -07:00
Zachary Anderson f8f69575dd
Revert "Null safety migration of packages/flutter_tools/bin" (#111506) 2022-09-13 21:55:14 +00:00
Liam Appelbe e3b9223a74
Null safety migration of packages/flutter_tools/bin (#110706)
* Migrate packages/flutter_tools/bin

* Fix NPE

* Fix test

* Fix test

* Fix l10n optionalParameters

* Fix ChromeTab nullability

* Fix another type cast error

* Fix another cast error

* Fix another cast error (copied from #110711)

* Fix NPE

* Fix another NPE

* Assert that testDirectory is not null
2022-09-12 15:52:31 -07:00
Greg Spencer 52ae102f18
Adds tool warning log level and command line options to fail on warning/error output (#92031) 2021-11-10 16:13:04 -08:00
Jenn Magder 9e88fe328e
Remove globals_null_migrated.dart, move into globals.dart (#92861) 2021-11-01 17:18:03 -07:00
Jenn Magder c4a2a3e92d
Migrate project.dart and all dependencies to null safety (#83817) 2021-06-02 18:41:12 -07:00
Jay Zhuang f512ebfd06
[fuchsia_asset_builder] Write depfile (#82469) 2021-05-18 20:24:04 -07:00
Phil Quitslund 96e4b47f5d
sort directives (#81624) 2021-05-02 07:24:01 -07:00
xster ff2dde2c7f
Reland double gzip wrapping NOTICES to reduce on-disk installed space (#80897) 2021-04-26 22:35:45 -07:00
Phil Quitslund 61c30c41b2
fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
Jenn Magder 8ddc27e607
Split globals.dart into null sound and unsound libraries (#79016) 2021-03-31 16:55:20 -07:00
Jonah Williams 74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00
xster ca82c572b7
Revert "let NOTICES be double gzip wrapped to reduce on-disk installed space (#71899)" (#72438) 2020-12-16 10:58:19 -08:00
xster 4ed3432e8f
let NOTICES be double gzip wrapped to reduce on-disk installed space (#71899) 2020-12-15 13:29:14 -08:00
Jonah Williams 8d15fa3936
[flutter_tools] remove unused/deprecated asset flags (#70509) 2020-11-17 11:02:14 -08:00
Michael R Fairhurst 7f3c9b6bda
Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
George Wright 084a7077ce
Revert "Put fuchsia tools into their own directory, and set source_dir to point at them. (#52266)" (#52277)
This reverts commit ffcc776513.
2020-03-09 16:55:58 -07:00
George Wright ffcc776513
Put fuchsia tools into their own directory, and set source_dir to point at them. (#52266)
This worksaround an issue with the latest version of package_config which doesn't handle
multiple dart packages sharing the same source directory. In this case, the fuchsia dart_tool
targets were sharing a directory with their dependency, :flutter_tools
2020-03-09 15:08:57 -07:00
Alexandre Ardhuin 4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Jonah Williams ee7a37f1d3
[flutter_tools] Ensure that global variables are easily identifiable (#47398) 2020-01-06 11:04:20 -08:00
Ian Hickson 449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Alexandre Ardhuin adc7351046
implicit-casts:false on flutter_tools/lib (#44447)
* implicit-casts:false on flutter_tools/lib

* address review comments

* use castStringKeyedMap

* introduce {bool,string,strings}Arg

* fix ci
2019-11-19 07:57:42 +01:00
Zachary Anderson ef146f63bb
[flutter_tool] Clean up usage events and custom dimensions (#36785) 2019-07-29 07:24:02 -07:00
Todd Volkert aa9a115181
Move reporting files to reporting/ (#36017)
Slight cleanup of file locations in flutter_tools
to make it easier to see which files are responsible
for data reporting.
2019-07-16 13:21:06 -07:00
Jonah Williams 27876e09be
Revert "Devfs cleanup and testing (#33374)" (#33673)
This reverts commit 445505d6f2.
2019-05-31 13:17:12 -07:00
Jonah Williams 445505d6f2
Devfs cleanup and testing (#33374) 2019-05-30 16:13:46 -07:00
Keerti Parthasarathy eae67f05df
Make const available for classes that override AssetBundle (#31807) 2019-04-30 09:10:04 -07:00
Alexandre Ardhuin 8b0de38ef8
fix upcoming lint avoid_returning_null_for_void (#23190) 2018-10-17 11:01:37 +02:00
Alexandre Ardhuin 2d3ff10d62
apply lint prefer_void_to_null in packages/flutter_tools (#22686) 2018-10-05 07:54:56 +02:00
Alexandre Ardhuin f62afdcf57
add missing type parameter on methods (#22096) 2018-10-01 21:29:08 +02:00
Alexandre Ardhuin d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
leoylung adafaee0e3 Remove duplicated assets under /pkg/data (#20728)
Require componentName to ensure assets are placed under /pkg/data/<component-name>
2018-08-21 13:14:17 -07:00
leoylung 7762e45115 Check null on componentName (#20560) 2018-08-14 10:24:17 -07:00
leoylung 5311dff1f4 Duplicate assets under data/ to data/componentName (#20534) 2018-08-13 13:35:51 -07:00
Alexandre Ardhuin eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Todd Volkert 00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Todd Volkert 6258f322d4
Make Fuchsia tools Dart 2 clean (#19727) 2018-07-24 16:33:49 -07:00
Alexandre Ardhuin 27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Ian Hickson f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Sarah Zakarias 4443e4d4cf
Cleanup FLX related code (#16416) 2018-04-12 10:12:26 +02:00
Todd Volkert 8d11f5c763
Make AppContext immutable and race-free (#15984)
This updates AppContext per the recommendations in #15352

Fixes #15352
2018-03-28 10:58:28 -07:00
Alexandre Ardhuin 061352918b
enable lint avoid_relative_lib_imports (#15780) 2018-03-22 07:56:18 +01:00
Justin ec76c652bd Add support for assets in Fuchsia packages (#14654)
Pull code out of flx.dart:assemble() to make flx.dart:buildAssets
which creates the AssetBundle. This will allow us to create just
this instead of an entire FLX.
2018-02-14 08:05:05 -08:00