Commit Graph

40 Commits

Author SHA1 Message Date
Kevin Moore
f9d455134a
tool: replace top-level functions with enum properties (#126167) 2023-05-05 19:10:07 +00:00
Kevin Moore
76e587bf78
flutter-tool: enum cleanup (#124760)
flutter-tool: enum cleanup
2023-04-14 01:55:05 +00:00
blendthink
229b39eda5
[flutter_tools] Fix so that the value set by --dart-define-from-file can be passed to Gradle (#114297)
* Add dartDefineConfigJsonMap to the checklist

* Fix typo

* Align formatting with other code

* Fix toGradleConfig method
2022-11-11 18:48:01 +00:00
haizhu
cbfe5a5226
[tool] Proposal to support dart define config from a json file (#108098) 2022-09-26 21:47:27 +00:00
Jenn Magder
5f5d4802fe
Support single arch local engines for 'build macos-framework' and 'ios-framework' (#110564) 2022-08-30 17:44:14 +00:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
Yang Chao
343713727a
Enable track widget creation when generating Generated.xcconfig (#101123) 2022-04-11 14:29:11 -07:00
Janko Djuric
78ae72b0b2
[flutter_tools] Add --build-number and --build-name support to web and linux (#100377) 2022-04-10 11:42:39 -07:00
Sigurd Meldgaard
66ed64be4f
Migrate .packages -> package_config.json (#99677) 2022-03-30 13:56:03 +02:00
Chris Bracken
fd3c34c9d4
[macOS] Use arm64 snapshot in arm64 App.framework (#100504)
Previously, https://github.com/flutter/flutter/pull/100271 enabled
building universal macOS binaries by default, but included a bug causing
the arm64 App.framework to be built such that the TEXT section
containing the app instructions built by gen_snapshot incorrectly
contained x86_64 instructions rather than arm64 instructions.

When building macOS (and iOS) apps, Flutter builds them in three
components:
* The Runner application: built by Xcode
* The bundled App.framework: built from assembly code generated by
  gen_snapshot from the application's Dart sources.
* The bundled FlutterMacOS.framework: built as part of the engine build
  and packaged by copying the distributed binary framework from our
  artifacts cache.

Building App.framework consists of the following steps:
* For each architecture, invoke gen_snapshot to generate
  architecture-specific assembly code, which is then built to object
  code and linked into an architecture-specific App.framework.
* Use the `lipo` tool to generate a universal binary that includes both
  x86_64 and arm64 architectures.

Previously, we were building architecture specific App.framework
binaries. However, for all architectures we were (mistakenly) invoking
the general `gen_snapshot` tool (which emitted x64 instructions, and
which is now deprecated) instead of the architecture-specific
`gen_snapshot_x86` and `gen_snapshot_arm64` builds which emit
instructions for the correct architecture.

This change introduces a small refactoring, which is to split the
`getNameForDarwinArch` function into two functions:
* `getDartNameForDarwinArch`: the name for the specified architecture as
  used in the Dart SDK, for example as the suffix of `gen_snapshot`.
* `getNameForDarwinArch`: the name for the specified architecture
  as used in Apple tools, for example as an argument to `lipo`. For
  consistency, and to match developer expectations on Darwin platforms,
  this is also the name used in Flutter's build outputs.

Issue: https://github.com/flutter/flutter/issues/100348
2022-03-21 20:36:57 -07:00
Anis Alibegić
a753d09cc9
Fixed several typos (#89485) 2021-09-07 14:56:04 -07:00
Jonah Williams
24bfc46d89
[flutter_tools] allow passing properties directly to gradle (#82941) 2021-05-20 16:19:03 -07:00
Jenn Magder
783e1dd22c
Standardize build system environment defines derived from build info (#81879) 2021-05-07 17:04:02 -07:00
Jenn Magder
ec14cef060
Migrate more tool unit tests to null safety (#80002) 2021-04-08 15:18:52 -07:00
Jonah Williams
44d5950d27
[flutter_tools] switch dart defines to base64 to avoid windows control characters (#75027)
= gets escaped into %3D which seems to be tripping up cmake on windows since % is a control character. Switch to base64 encoding, since this does not have % nor , in the output character set.

This change is not trivially cherry pickable, and isn't tested on windows aside from my local, manual tests due to the planned CI work not being complete yet.

Fixes #75017
Fixes #74705
2021-02-02 09:10:48 -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
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
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
ec4049e781
[flutter_tools] support bundle-sksl-path on all desktop and mobile targets (#58879)
Adds support for --bundle-sksl-path to windows, linux, macOS, and iOS.

Fixes #53115
2020-06-09 11:15:52 -07:00
Jonah Williams
b1d75fc99d
[flutter_tools] add flag for sound-null-safety, unify with experiments (#58533)
Also combines experiments into extraGenSnapshot/ExtraFrontEndOptions. Allows providing --no-sound-null-safety to allow out of order migration and running.
2020-06-03 21:02:07 -07:00
Jonah Williams
a926715dac
[flutter_tools] URI encode dart-define values (#57873) 2020-05-27 10:11:04 -07:00
Jenn Magder
90233746b7
BuildInfo tests without context (#56329) 2020-05-04 18:37:44 -07:00
Jonah Williams
dd88b20435
[flutter_tools] quality pass on Linux build (#55556)
- Update the Linux build to support most of the build configuration, though like windows most only make sense for profile/release.
- Ensure VERBOSE_SCRIPT_LOGGING is set when the logger is verbose
- Automatically run pub get like other build commands
2020-04-25 19:02:03 -07:00
Zachary Anderson
6c408a0567
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#52021)
* Reland: [flutter_tool] Where possible, catch only subtypes of Exception

* Add armv7f to getIOSArchForName
2020-03-06 10:22:12 -08:00
Jenn Magder
cbbb7ec5a7
Revert "Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51774)" (#51960)
This reverts commit 57c6721cd5.
2020-03-04 12:40:15 -08:00
Flutter GitHub Bot
57c6721cd5
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51774) 2020-03-04 11:41:02 -08:00
Zachary Anderson
b32ee2f15c
Revert "Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51567)" (#51616)
This reverts commit 9de7787f25.
2020-02-27 22:57:13 -08:00
Zachary Anderson
9de7787f25
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51567) 2020-02-27 22:46:23 -08:00
Zachary Anderson
483f49962c
Revert "[flutter_tool] Where possible, catch only subtypes of Exception (#51440)" (#51539)
This reverts commit f1cd47ef5c.
2020-02-26 23:42:19 -08:00
Zachary Anderson
f1cd47ef5c
[flutter_tool] Where possible, catch only subtypes of Exception (#51440) 2020-02-26 21:45:02 -08:00
Jenn Magder
7c24ebc79b
Map arm64e devices to arm64 devices (#50612) 2020-02-11 19:43:43 -08:00
Jonah Williams
da4b5d68c4
[flutter_tools] support --split-debug-info option in android builds (#49650) 2020-02-05 17:45:24 -08:00
Dan Field
8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Anthony
b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00
Alexandre Ardhuin
003541499b use isA<Xxx>() matcher (#48482) 2020-01-16 12:43:03 -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
Jonah Williams
ab260bacd2
Refactor BuildMode into class, add jit_release configuration (#42476) 2019-10-28 09:37:29 -07:00
Jenn Magder
9a68b0df3e
Warn when build number and version can't be parsed on iOS (#40611) 2019-09-17 17:07:41 -07:00
Jenn Magder
dd1fb3bcb7
Build number (part after +) is documented as optional, use entire app version if not present (#37036) 2019-07-31 16:18:09 -07:00
Ian Hickson
d919e694b8
Move tools tests into a general.shard directory in preparation to changing how we shard tools tests (#36108) 2019-07-13 11:51:44 -07:00