David Iglesias
c7c9d8eea6
[web] Encode AssetManifest.bin as JSON and use that on the web. ( #131382 )
...
This PR modifies the web build slightly to create an `AssetManifest.json`, that is a JSON(base64)-encoded version of the `AssetManifest.bin` file.
_(This should enable all browsers to download the file without any interference, and all servers to serve it with the correct headers.)_
It also modifies Flutter's `AssetManifest` class so it loads and uses said file `if (kIsWeb)`.
### Issues
* Fixes https://github.com/flutter/flutter/issues/124883
### Tests
* Unit tests added.
* Some tests that run on the Web needed to be informed of the new filename, but their behavior didn't have to change (binary contents are the same across all platforms).
* I've deployed a test app, so users affected by the BIN issue may take a look at the PR in action:
* https://dit-tests.web.app
2023-09-19 22:38:51 +00:00
Andrew Kolos
cfe4fedca2
rename generated asset manifest file back to AssetManifest.bin
(from AssetManifest.smcbin
) ( #128529 )
...
Closes https://github.com/flutter/flutter/issues/128456 , which is now linked to in a code comment in this change.
Reopens https://github.com/flutter/flutter/issues/124883 .
This effectively reverts https://github.com/flutter/flutter/pull/126077 and is intended to be cherry-picked into stable.
2023-06-09 21:20:50 +00:00
Andrew Kolos
d3e0e03e2e
rename AssetManifest.bin ( #126077 )
...
Fixes #124883 . Will require a g3fix.
Renames `AssetManifest.bin` to `AssetManifest.smcbin` (madeup extension for "Standard Message Codec binary").
2023-05-15 15:45:09 +00:00
Andrew Kolos
4a9660881e
Reland "Stop recursively including assets from asset directories" ( #120312 )
...
* stop recursively including assets from asset directories
* remove unused imports
* lint
2023-02-08 21:41:19 +00:00
Mouad Debbar
7f578fb01f
Revert "Stop recursively including assets from asset folders ( #120167 )" ( #120283 )
...
This reverts commit da36bd6fc0
.
2023-02-08 10:42:02 -05:00
Andrew Kolos
da36bd6fc0
Stop recursively including assets from asset folders ( #120167 )
...
* add test
* fix
* use preexisting testFileSystem
* fix variant tests
* Revert "use preexisting testFileSystem"
This reverts commit b6df288ef4
.
* nit: grammar
2023-02-07 16:20:23 +00:00
Jonah Williams
4dbb573ff0
[flutter_tools] remove usage of remap samplers arg ( #119346 )
2023-01-27 18:49:49 +00:00
Jonah Williams
2fd8250285
[flutter_tools] re-enable web shader compilation ( #118461 )
...
* [flutter_tools] re-enable web shader compilation
* update test cases
2023-01-13 19:43:27 +00:00
Andrew Kolos
5630d531b1
[tool] Generate a binary version of the asset manifest ( #117233 )
...
* initial
* update asset_bundle_package_test
* Update asset_bundle_test.dart
* Update asset_bundle_package_fonts_test.dart
* update pubspec checksum for smc dependency
* flutter update-packages --force-upgrade
* prefer += 1 over ++
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
* add regexp comment
* rescope int list comparison function
* update packages
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
2023-01-12 19:33:30 +00:00
Jonah Williams
84ed058b42
[flutter_tools] Add remap sampler support ( #116861 )
2022-12-12 17:44:32 +00:00
Casey Hillers
7673108d7e
Revert "Speed up first asset load by encoding asset manifest in binary rather than JSON ( #113637 )" ( #116662 )
...
This reverts commit 56cad89b1e
.
2022-12-07 17:29:05 +00:00
Andrew Kolos
56cad89b1e
Speed up first asset load by encoding asset manifest in binary rather than JSON ( #113637 )
2022-12-05 10:39:10 -08:00
Jonah Williams
f777c9f651
[flutter_tools] use absolute path for shader lib ( #116123 )
...
* [flutter_tools] use absolute path for shader lib
* update tests
2022-11-29 01:57:26 +00:00
Brandon DeRosier
e9c6212da0
[Impeller] Add shader include with FlutterFragCoord for use by FragmentProgram ( #114214 )
2022-11-14 21:38:46 -08:00
Jonah Williams
4f19a9fa46
[flutter_tools] Add support for compiling shaders to JSON bundle for web ( #114295 )
2022-10-31 16:52:09 +00:00
Mouad Debbar
2dd87fbdf2
Fix --local-engine for the new web/wasm mode ( #113759 )
2022-10-24 20:43:09 +00:00
Jonah Williams
99fb2d36e8
[flutter_tools] cache more directories ( #112651 )
2022-09-30 08:52:29 +00:00
Andrew Kolos
cb5b5c3459
Tighten asset variant detection criteria to only include device-pixel-ratio variants ( #110721 )
2022-09-27 20:57:33 +00:00
Zachary Anderson
dd20919ad6
[flutter_tool] Build shaders as .iplr and use FragmentProgram.fromAsset for ink_sparkle ( #108071 )
2022-07-21 20:50:08 -07:00
Zachary Anderson
e9529e2512
[flutter_tool] Allow includes relative to shader path ( #107862 )
2022-07-18 18:38:32 -07:00
Zachary Anderson
b005a34790
[flutter_tool] Pass --input-type to impellerc ( #106845 )
2022-06-30 07:12:24 -07:00
Zachary Anderson
9c0f239947
Put shaders under a 'shaders' section in the manifest ( #106752 )
2022-06-28 19:31:27 -07:00
Jonah Williams
db829c1e20
[flutter_tools] migrate more unit tests to null safety ( #106153 )
2022-06-17 21:34:27 -07:00
Zachary Anderson
577919dbfe
Don't hardcode ink sparkle spir-v ( #102674 )
2022-05-04 09:28:45 -07:00
Pierre-Louis
9644aa8d76
Fixes documentation inconsistencies around 'material' and 'material design' ( #102632 )
2022-04-27 09:29:06 -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
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint ( #91409 ) ( #91462 )
2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint ( #91409 )" ( #91461 )
...
This reverts commit 5fd259be24
.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint ( #91409 )
2021-10-07 20:13:02 -07:00
Jenn Magder
c4a2a3e92d
Migrate project.dart and all dependencies to null safety ( #83817 )
2021-06-02 18:41:12 -07:00
Jenn Magder
8ddc27e607
Split globals.dart into null sound and unsound libraries ( #79016 )
2021-03-31 16:55:20 -07:00
Gary Qian
2f05751973
Record deferred components assets in AssetManifest.json ( #78824 )
2021-03-24 02:57:01 -07:00
Gary Qian
ee41782732
[flutter_tools] Deferred components build system ( #76192 )
2021-03-04 18:09:02 -08:00
Jonah Williams
d65c98b4a2
[flutter_tools] replace some mock file/directories with new op handle ( #76268 )
2021-02-17 21:26:03 -08: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
Jonah Williams
dbcd7868a4
[flutter_tools] remove most globals from asset system and remove Cache manipulation in unit tests ( #70011 )
2020-11-09 18:01:04 -08:00
Jonah Williams
741608a261
[flutter_tools] fix recursive asset variant issue ( #61129 )
...
Fixes #45075
Fixes #57210
If an asset was included directly from the project root directory, then the same asset when copied to various output or ephemeral directories would also be picked up as an asset variant. This could cause assets to be recursively copied into asset/build/ephemeral directories, as each time it would run it would pick up all of the previous "variants".
The solution is to include project ephemeral directories, in addition to the build directory.
2020-07-08 18:07:27 -07:00
Jonah Williams
82a6f9bf0b
[flutter_tools] remove most use of global packages path ( #60231 )
...
The global packages path could cause tests to fail when it would be overriden to unexpected (in test setup) values. Remove most usage and make it a configuration on buildInfo, along with most other build information. Cleanup the asset builder to require the .packages path and the resident runners to no longer require it, since they already have the information in build_info.
It needs to stick around for the fuchsia deps we do not control.
Filled #60232 for remaining work.
2020-06-25 12:52:14 -07:00
Jonah Williams
4845df906a
[flutter_tools] do not include material icon incorrectly ( #58335 )
...
If a dependency specified uses-material-design: true and the main pubspec specifies uses-material-design: false, then the MaterialIcons font would be included in the font manifest, but not in the AssetManifest or final bundle. Remove it from the FontManifest if this occurs
2020-06-01 16:30:43 -07:00
Jonah Williams
d9144bf8fc
[flutter_tools] rename output LICENSE file to NOTICES and support loading either ( #57871 )
...
Work towards #16723
This is only safe to land after #58131 lands in google3. Only build NOTICES in asset manfiest, and load either LICENSE or NOTICES from pubspec dependencies.
2020-05-29 11:55:02 -07:00
Jonah Williams
d0d9da832b
[flutter_tools] prevent wildcard assets from causing build invalidation issues ( #56472 )
2020-05-19 12:37:04 -07:00
Jonah Williams
afdc440840
[flutter_tools] surface missing assets originating package ( #55701 )
2020-05-16 14:52:04 -07:00
Zachary Anderson
6f0ed5e142
[flutter_tools] Restore base/platform.dart ( #56410 )
2020-05-06 08:15:39 -07:00
Jonah Williams
6d1966efcc
[flutter_tools] make gallery hot reload 5x faster with one neat trick ( #56224 )
2020-05-04 11:32:30 -07:00
Jonah Williams
d6cbf2591a
[flutter_tools] don't recreate license, manifest, asset if unchanged ( #56107 )
...
Avoid syncing unchanged versions of these files during hot restart/reload. This happens if the asset bundle needs to be built but produces identical manifests/licenses due to only asset contents changing
2020-05-01 12:03:31 -07:00
Alexandre Ardhuin
c2ae654ddf
enable avoid_single_cascade_in_expression_statements ( #51944 )
2020-03-05 08:03:26 +01:00
Jonah Williams
f7b8d62cbc
[flutter_tool] Refactor Logger and Terminal to (mostly) no longer depend directly on context ( #47269 )
2020-01-08 12:35:12 -08:00
Jonah Williams
ee7a37f1d3
[flutter_tools] Ensure that global variables are easily identifiable ( #47398 )
2020-01-06 11:04:20 -08:00
Dan Field
24f39d40a4
Revert "Revert "Add many more global analyses. ( #47875 )" ( #48080 )" ( #48081 )
...
This reverts commit 04ea3183ce
.
2020-01-02 11:47:28 -08:00