Commit Graph

181 Commits

Author SHA1 Message Date
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
Lau Ching Jun
dbed10bb59
Pass 'assume-initialize-from-dill-up-to-date' flag to the frontend server (#99791) 2022-03-09 00:30:17 -08:00
Michael Tamm
1fcb076eb7
[flutter_tools] Fix bundle file not found when flavor contains upperc… (#92660) 2022-02-04 11:55:20 -08: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
Gary Qian
0407aa4480
Reland "Add multidex flag and automatic multidex support (#90944)" (#92049) 2021-10-19 02:20:39 -07:00
Zachary Anderson
a9c31eca48
Revert "Add multidex flag and automatic multidex support (#90944)" (#91791)
This reverts commit 1d9edde079.
2021-10-13 23:09:50 -07:00
Gary Qian
1d9edde079
Add multidex flag and automatic multidex support (#90944) 2021-10-13 17:48:04 -07:00
Ian Hickson
7b01346c5c
Enable no_default_cases lint (#91530) 2021-10-11 10:23:04 -07:00
Jenn Magder
afbfc1f33a
Migrate assets, common, icon_tree_shaker to null safety (#91309) 2021-10-06 15:16:33 -07:00
Jonah Williams
fa0782b696
reassign jonahwilliams todos (#88707) 2021-08-23 12:27:07 -07:00
Jenn Magder
f76b292626
Support iOS arm64 simulator (#85642) 2021-06-30 14:31:04 -07:00
Zachary Anderson
407916d44f
Revert "Support iOS arm64 simulator (#85059)" (#85641)
This reverts commit a1020512ef.
2021-06-30 12:44:49 -07:00
Jenn Magder
a1020512ef
Support iOS arm64 simulator (#85059) 2021-06-30 11:56:17 -07:00
Alexandre Ardhuin
34059eec2c
enable lint prefer_interpolation_to_compose_strings (#83407) 2021-06-01 11:14:06 -07:00
Lau Ching Jun
a9d6131df8
Allow passing --initialize-from-dill to flutter run and flutter attach (#83454)
To specify the dill file that will be used to initialize the resident
compiler, instead of the default cached version.
2021-05-26 23:06:38 -07:00
Jenn Magder
cbc7ce0884
Clean up null assumptions for Xcode and CocoaPods classes (#83442) 2021-05-26 16:04:03 -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
Matej Knopp
f6726b425d
Add support for DarwinArchs when assembling macOS App.framework (#81243) 2021-04-28 11:33:36 -07:00
Jonah Williams
be2c68c85c
[flutter_tools] cache for UWP artifacts (#80069) 2021-04-09 10:59:01 -07:00
Jonah Williams
3bec9c2a57
[flutter_tools] allow winuwp build to setup generated Cmake (#79676) 2021-04-02 22:44:02 -07:00
Jenn Magder
66af44c9fe
Migrate build_info to null safety (#79469) 2021-04-01 10:22:37 -07:00
Chris Bracken
3e7e06512c
Correct misspellings throughout the codebase (#79500) 2021-04-01 10:04:03 -07:00
Jenn Magder
8ddc27e607
Split globals.dart into null sound and unsound libraries (#79016) 2021-03-31 16:55:20 -07:00
Jenn Magder
d165ea5c42
Migrate os to null safety (#78901) 2021-03-23 17:28:09 -07:00
Jonah Williams
acda272cf2
[flutter_tools] add tool feature/scaffold for UWP (#77399) 2021-03-08 08:09:04 -08:00
Hidenori Matsubayashi
4cc0ab2d19
[flutter_tools] Add ARM64 Linux host and cross-building option support (#61221) 2021-02-12 14:25:30 -08: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
Emmanuel Garcia
8dd0de7f58
Relands: Migrate template to Gradle 6.7 and AGP 4.1.0 (#71446) 2020-12-01 19:01:09 -08:00
Jenn Magder
3a479e7efd
Rename SdkType -> EnvironmentType (#71095) 2020-11-23 14:03:03 -08:00
Amir Hardon
7df04fdbd3
Revert "Migrate template to Gradle 6.7 and AGP 4.1.0 (#70808)" (#71096)
This reverts commit 8e73bab94c.
2020-11-23 12:27:36 -08:00
Emmanuel Garcia
8e73bab94c
Migrate template to Gradle 6.7 and AGP 4.1.0 (#70808) 2020-11-20 13:05:35 -08:00
Jonah Williams
0a73ecf6df
[flutter_tools] use initially parsed package config for language version, sound mode determination (#70323) 2020-11-13 09:41:11 -08:00
Jonah Williams
a40ee8a3fb
[flutter_tools] migrate .packages to package_config, partial (#70200) 2020-11-11 13:50:41 -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
e422d5c724
[flutter_tools] reland: --no-android-gradle-daemon in devicelab (#68491)
Remove devicelab specific code for shutting down gradle daemon, add --android-gradle-daemon option to build/run/drive`. Avoids need for un-tested devicelab specific handler. There are also some feature requests for this, so 2 birds one stone.

Example:

flutter build apk --no-android-gradle-daemon will pass --no-daemon on to gradle
2020-10-19 10:27:58 -07:00
Jonah Williams
ed5482de19
Revert "[flutter_tools] add --android-gradle-daemon option, use in devicelab (#68409)" (#68489)
This reverts commit ddab72e79f.
2020-10-19 09:33:52 -07:00
Jonah Williams
ddab72e79f
[flutter_tools] add --android-gradle-daemon option, use in devicelab (#68409)
Remove devicelab specific code for shutting down gradle daemon, add --android-gradle-daemon option to build/run/drive`. Avoids need for un-tested devicelab specific handler. There are also some feature requests for this, so 2 birds one stone.

Example:

flutter build apk --no-android-gradle-daemon will pass --no-daemon on to gradle
2020-10-19 09:12:21 -07:00
Jenn Magder
4dffc851bc
Detect ARM macOS arch with sysctl hw.optional.arm64 (#67970) 2020-10-13 12:05:04 -07:00
Jonah Williams
08576cb671
[flutter_tools] HACKTOBERFEST (#67882)
HACKTOBERFEST
2020-10-12 09:31:02 -07:00
knaeckeKami
8e9e13449b
Teach the flutter tool how to find android output files if the flavor contains uppercase letters (#66687)
This changes the name of the generated output files on android in case a flavor with uppercase letters is used.
Previously, the lowercased flavor name would be used for the apk/aab file. Now, the flavor name is used as-is.
2020-09-25 15:54:55 -07: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
Nolan Scobie
43c1b34cf5
Add punctuation for unterminated sentences in doc comments (#62755)
* Add punctuation for unterminated sentences in doc comments

* Addressing review nit
2020-08-06 19:18:52 -04:00
Jonah Williams
a0745e23bf
[flutter_tools] add --analyze-size flag (#62697) 2020-08-03 14:21:05 -07:00
Jonah Williams
1c1ef133ee
[flutter_tools] remove globals from device manager, flutter tester (#61139)
Remove global variables from device manager, flutter tester devices and update tests
2020-07-10 11:52:09 -07:00
Jonah Williams
7ca324ac01
[flutter_tools] support sound null-safety mode for the web (#60570)
In web debug mode, infer sound null safety by default. When sound null safety is enabled, provide a separate dill and precompiled Dart SDK. Release builds do not need this setting since we run dart2js from source.

Fixes #59873
2020-06-30 12:29:42 -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