Commit graph

234 commits

Author SHA1 Message Date
Niklas Schulze afe790775b
[flutter_tools] copy flutter_texture_registrar.h header on Windows (#61098) 2021-01-15 16:20:57 -05:00
Shi-Hao Hong a912030982
[gen_l10n] Use l10n.yaml file instead of command line arguments if it exists (#72950)
* Reorganize files

* Use l10n.yaml instead of command line args
2021-01-05 11:50:32 +08:00
Shi-Hao Hong 4d663472e2
[gen_l10n] Improve status message when untranslated messages are still present (#72944) 2021-01-04 01:54:02 -08:00
Jenn Magder 6118eaa0de
Check for iOS simulator SDK during AOT validation instead of assuming x86 (#72834) 2020-12-23 15:36:20 -08:00
Jenn Magder d6857bc026
Build/copy macOS frameworks to built products instead of ephemeral directory (#72378) 2020-12-17 14:47:05 -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
Shi-Hao Hong 95e444ce9a
[gen-l10n] Fix forwarding of output-dir in l10n.yaml file (#71128) 2020-12-03 16:18:04 -08:00
Ian Hickson bb29c88ae7
Simplify the flutter_web_plugins plugin registration API. (#70337) (#70722)
In principle this is backwards compatible; I just merged all the classes into one and deprecated everything that became redundant as a result.
2020-12-03 15:35:41 -08:00
Martin Kustermann 625ecda083
Remove left-overs from causal async stacks. (#71663) 2020-12-03 11:03:07 -08:00
Jonah Williams 9e5c8771d4
[flutter_tools] wire up native-null-assertions for flutter web (#71618) 2020-12-03 08:59:31 -08:00
Jenn Magder a5ee7f7cfc
Add XCFramework artifacts (#71113) 2020-12-01 10:00:16 -08:00
Jonah Williams 7ab0442868
Add testing shard for release mode guard (#71411) 2020-12-01 09:53:50 -08:00
Jenn Magder 3379435185
iOS aot assembly requires SDK root (#71094) 2020-11-23 14:10:10 -08:00
J-P Nurmi e51183763b
[flutter_tools] deploy version.json asset on Linux (#69920) 2020-11-20 10:23:04 -08:00
Jenn Magder 2529e358b6
Move Flutter.framework to build directory instead of ios/Flutter (#70224) 2020-11-17 10:09:29 -08:00
Jonah Williams 6e84a14294
Revert "Simplify the flutter_web_plugins plugin registration API. (#70337)" (#70505)
This reverts commit 8749d95521.
2020-11-13 16:04:53 -08:00
Ian Hickson 8749d95521
Simplify the flutter_web_plugins plugin registration API. (#70337)
In principle this is backwards compatible; I just merged all the classes into one and deprecated everything that became redundant as a result.
2020-11-13 14:05:34 -08:00
Jenn Magder d11859fee7
Add -miphoneos-version-min=8.0 to App framework stub (#70405) 2020-11-12 15:14:53 -08:00
Jonah Williams 0f80116a63
[flutter_tools] improve hash performance in build_system (#70065) 2020-11-11 15:31:07 -08:00
Jonah Williams 3fb389c75a
[null-safety] implement null-safe autodetection for the web (#70126)
Fixes #69416
Fixes #70121
2020-11-09 16:13:38 -08:00
Shi-Hao Hong a1a096e35a
[gen-l10n] Fix untranslated messages (#68553) 2020-11-05 16:24:02 -08:00
Jenn Magder 1be922c353
Build either iphoneos or iphonesimulator App.framework, not both (#69840) 2020-11-05 14:22:24 -08:00
Jenn Magder 2f3cccc4f5
Run more xcodebuild commands in native arm on Apple Silicon (#69837) 2020-11-04 19:54:02 -08:00
Shi-Hao Hong 0963d72582
Make resource attributes optional for simple cases (#68774) 2020-11-05 08:11:53 +08:00
Jenn Magder 53410c4bb9
Compile snapshot_assembly with sdk root set in Xcode (#69731) 2020-11-04 10:32:01 -08:00
Jonah Williams 183fe75d58
[flutter_tools] reland: drive service (#68887)
Overhaul of flutter drive in order to deliver a better experience, namely:

* flutter run and flutter drive now share more flags, so code paths that were previously only testable on run are now testable on drive.
* Removes web-initialize-platform as this is no longer used
* flutter drive correctly sets up a logger that shows native exceptions, by connecting to the vm service.
* VM service connection now provides access to memory info without launching devtools (only for debug/profile mode)

Web changes

* Passes on the one test in the repo, otherwise the webdriver code has been isolated as much as possible

Additional NNBD related bug fixes:

No longer passes --enable-experiment to the test script. (FYI @blasten ). earlier we might have assumed that the flutter gallery benchmarks would be migrated along side the app and flutter driver, but only the app under test needs to be migrated. The test scripts should never be run with the experiment.
2020-10-26 10:11:30 -07:00
Jonah Williams 1edec6fc20
Revert "[flutter_tools] refactor drive launch into separate service, split by mobile+desktop and web (#68451)" (#68845)
This reverts commit 2e75f52ae4.
2020-10-22 19:39:33 -07:00
Jonah Williams 2e75f52ae4
[flutter_tools] refactor drive launch into separate service, split by mobile+desktop and web (#68451)
Overhaul of flutter drive in order to deliver a better experience, namely:

flutter run and flutter drive now share more flags, so code paths that were previously only testable on run are now testable on drive.
Removes web-initialize-platform as this is no longer used
flutter drive correctly sets up a logger that shows native exceptions, by connecting to the vm service.
VM service connection now provides access to memory info without launching devtools (only for debug/profile mode)
Web changes

Passes on the one test in the repo, otherwise the webdriver code has been isolated as much as possible

Additional NNBD related bug fixes:

No longer passes --enable-experiment to the test script. (FYI @blasten ). earlier we might have assumed that the flutter gallery benchmarks would be migrated along side the app and flutter driver, but only the app under test needs to be migrated. The test scripts should never be run with the experiment.
2020-10-22 15:07:02 -07:00
Jenn Magder f63d56e455
App.framework must support iOS 8 for older Flutter projects (#68729)
* App.framework must support iOS 8 for older Flutter projects

* Fix test
2020-10-22 13:50:54 -07:00
Jonah Williams 21ca1f9ba5
[flutter_tools] use --no-print-incremental-dependencies for non-resident and test compiles (#68678) 2020-10-22 13:34:59 -07:00
Jenn Magder a82807d782
Run Xcode command lines tools in native ARM (#68050) 2020-10-14 15:24:32 -07:00
Jonah Williams 08576cb671
[flutter_tools] HACKTOBERFEST (#67882)
HACKTOBERFEST
2020-10-12 09:31:02 -07:00
Jonah Williams 13bf341584
[flutter_tools] update build rules to depend on subset of package_config contents (#67165)
Split from #66776

Even if pub does not change the packge_config contents, it will still update a timestamp in one of the fields. This causes unnecessary rebuilds. To fix this, generate an additional file when running pub get that only contains the relevant fields and then update the KernelSnapshot rule to depend on it only.
2020-10-07 08:46:11 -07:00
Jonah Williams aa90dbe7f4
[flutter_tools] disable source maps by default for release builds, enable for run and with command line arg (#67331)
Disables source map production by default for build web. For web builds performed as a part of flutter run --release, enable the source maps, or allow force enabling with --source-maps command line flag.

fixes #67328
2020-10-05 13:24:51 -07:00
Jonah Williams ddb01a0c81
[null-safety] add integration tests for sound null safety modes, add support for sound null safety in dart2js (#67171)
Add integration tests to verify that ddc and dart2js can be built and run in sound mode. Updates dart2js compilation to insert a language version comment into the generated entrypoint if necessary.

dart-lang/sdk#42253
2020-10-02 21:52:38 -07:00
Jenn Magder 36fca52c0d
Replace MockArtifacts with Artifacts.test() (#67012) 2020-09-30 16:25:29 -07:00
Jenn Magder e8fbb43aac
Replace MockFile with memory file system files (#66941) 2020-09-29 17:50:33 -07:00
Jonah Williams 51ededb92f
[flutter_tools] reland: map file URIs to a multiroot scheme (#66405)
If a file scheme and one or more roots is provided, fall back to this mapping before the direct file path if the file path cannot be turned into a package URI.

Use URI representation so that the transformation is resilient to the org-dartlang-app scheme used by the web builds.

Fixes #66095
Fixes #66404
2020-09-23 07:03:59 -07:00
Jonah Williams a029e172fe
[flutter_tools] fix bug where last build id parent folder is missing (#66156) 2020-09-21 11:17:13 -07:00
Jonah Williams 84aae22c3e
[flutter_tools] optimize fetch requests and remove main.dart.js bypass (#66069)
The main.dart.js bypass is not needed now that we have skipWaiting. Additionally optimize the fetch handler so that resources not in the cache skip the service worker altogether.

Fixes #66068
2020-09-17 17:05:46 -07:00
Michael Arndt fbc34def01
Fixed typo (subetting -> subsetting) (#62502) 2020-09-17 15:17:08 -07:00
Michael R Fairhurst 7f3c9b6bda
Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
Balvinder Singh Gambhir 3dde3e034c
[flutter_tools] generates version.json for web using flutter tool (#64644)
Generates version.json in web directory of project. version.json can be used in the future version of package_info which will support web. version.json has the following keys : app_name, version and build_number. This file is generated every time a user runs or builds the project.

Co-authored-by: Jonah Williams <jonahwilliams@google.com>
2020-09-15 11:21:54 -07:00
Herbert Poul 8dfd42f6b7
[gen_l10n] Support string list as preferred-supported-locales (#63649)
* [gen_l10n] Support string list as preferred-supported-locales, as documented.

* [gen_l10n] Convert preferredSupportedLocale to a list of strings. 

* [gen_l10n] Accept a multi option instead of a json string in the command line.
2020-09-10 07:32:40 +08:00
Jonah Williams 418681d6f1
[flutter_tools] allow disabling pwa from build command, fix run release build caching (#64587)
Fix run release/profile modes generating a full service worker.
2020-09-03 13:42:47 -07:00
Shi-Hao Hong b80b432555
Move gen_l10n into flutter_tools (#65025) 2020-09-03 09:26:58 -07:00
Jonah Williams 183a653e37
[flutter_tools] adjust index.html caching and insert cache busting URL in to main.dart.js/sw request (#64976)
Attempt to bypass aggressive CDN by requesting main.dart.js/sw.js with a query param and defaulting index.html to online first. This will not stop aggressive CDN caching of the index.html

#64968
2020-08-31 17:22:42 -07:00
Shi-Hao Hong fd22fc3e35
[gen_l10n] Synthetic package generation by default (#62395)
* synthetic packages by default in gen_l10n tool

* Refactor default path for synthetic package

* Remove unused import

* Code cleanup

* Further improvements to help text

* Refactor synthetic package path

* Remove newlines

* Test cleanup

* clean up logic in inputs and outputs list function

* Update l10n.yaml usage

* only add option if value is non-null

* Update stocks app as proof of concept for synthetic package usage

* Address nits

* print pubspec contents

* add print statements

* Do not allow null value for useSyntheticPackage

* +

* +

* +

* +

* Cleanup

* Add test

* Fix text

* Dont parse pubspec directly

* Test using context

* WIP: generate synthetic packages on pub get -- needs tests

* Allow null value

* Update null handling

* Refactor to properly handle null case

* Fix yamlMap condition

* Fix yaml node for real

* WIP: struggling to write tests

* WIP - take absolute path as an option

* Add tests

* Use environment project directory for synthetic package generation pathway

* Fix typo

* Improve help text

* Update defaults

* Remove unauthorized path import

* Fix pathing issues at synthetic package generation

* Fix typo in test

* Use path.join so projectDir matches up based on OS

* Fix Windows pathing in test

* Remove unnecessary replaceApp code for projectDir.path

* Use globals.fs.currentDirectory.path in resident_runner_test.dart

* Fix merge conflict

* Add test to ensure that synthetic package is generated on pub get

* Fix resident_runner_test.dart tests

* Fix tests

* Use package:file instead of dart:io

* WIP - exploration

* Remove synthetic package use from stocks example

* Update integration test to not use synthetic packages

* Remove trailing whitespace

* flutter pub get runs synth package generation

* Remove more print statements

* Add license header

* WIP - minimally working pub.get

* Use own MockBuildSystem

* Modify test and implementation to be a little cleaner

* Fix flutter pub get invocation

* Use synthetic packages in stocks app

* Revert "Use synthetic packages in stocks app"

This reverts commit 45bf24903c.

* Add environment and buildSystem params to flutter test

* Address code review feedback

* +

* Isolate codegen into its own API

* Fix imports

* Slight refactor

* Add one more test for no l10n.yaml file

* Remove unneeded mock class and import in pub_get_test.dart

* More code review feedback

* Remove unnecessary imports

* Remove `return await`s that I missed

* use arrow functions instead
2020-08-31 13:19:41 +08:00
Jonah Williams 059de1537e
[flutter_tools] support code size tooling on iOS, linux, windows, macOS, and Android on Windows (#63610)
Adds support for size analysis on iOS, macOS, linux, and Windows - using an uncompressed directory based approach. The output format is not currently specified.

Adds support for size analysis on android on windows, switching to package:archive

Updates the console format to display as a tree, allowing longer paths. Increases the number of dart libraries shown (to avoid only ever printing the flutter/dart:ui libraries, which dominate the size)
2020-08-25 10:00:24 -07:00