Commit Graph

71 Commits

Author SHA1 Message Date
Jonah Williams
8041a2e5d5
[flutter_tools] remove all mocks from plugins_test (#81485) 2021-04-29 22:40:44 -07:00
Ian Hickson
6beafa7b16
Apply style guide regarding createTempSync pattern (#81090) 2021-04-27 14:59:03 -07:00
Emmanuel Garcia
b0a63c4ffe
Reland the Dart plugin registry (#79669) 2021-04-23 15:34:04 -07:00
Jenn Magder
a99fba01f1
Move FakeOperatingSystemUtils from context.dart to fakes.dart (#80916) 2021-04-22 10:44:02 -07:00
Jenn Magder
d40cc5af8f
Migrate flutter_tool plugins.dart to null safety (#80304) 2021-04-13 13:52:58 -07:00
Alan Trope
bd96a8f9d5
Catch errors during android plugin registration (#78964) 2021-04-09 09:44:03 -07:00
Sam Rawlins
68492c5b69
Remove "unnecessary" imports. (#78664) 2021-04-06 11:19:02 -07:00
Jenn Magder
8ddc27e607
Split globals.dart into null sound and unsound libraries (#79016) 2021-03-31 16:55:20 -07:00
Zachary Anderson
5efc7169eb
Reverts "Implement dartPluginClass support for plugins #74469" (#78623)
* Revert "Enable dart_plugin_registry_test (#76645)"

This reverts commit 109e0bb9f5.

* Revert "Apply changes caused by https://github.com/flutter/flutter/pull/76662 (#77093)"

This reverts commit cdca6485f0.

* Revert "Disable clang format in the plugin registrants (#76662)"

This reverts commit dadbd47d09.

* Revert "Disable warnings for the dart plugin registrant (#76561)"

This reverts commit 098ece522d.

* Revert "Remove dart_plugin_registry_test timeouts (#76838)"

This reverts commit 1610a27476.

* Revert "Implement dartPluginClass support for plugins (#74469)"

This reverts commit b7d4806243.

Kick.
2021-03-23 14:28:11 -07:00
Michael Goderbauer
197b440e96
Migrate out custom ignore syntax to flutter_ignore (#78497) 2021-03-19 15:33:05 -07:00
Jenn Magder
75da995fbc
MockOperatingSystemUtils -> FakeOperatingSystemUtils (#77988) 2021-03-15 11:38:03 -07:00
Jonah Williams
721702717d
[flutter_tools] replace MockFlutterVersion usage with fake where possible, move from context (#77390) 2021-03-05 14:04:03 -08:00
Jonah Williams
2951363dc8
[flutter_tools] switch FakeCache to cache.test and NoopUsage to TestUsage (#76802) 2021-02-26 11:13:32 -08:00
Emmanuel Garcia
098ece522d
Disable warnings for the dart plugin registrant (#76561) 2021-02-23 11:45:33 -08:00
Emmanuel Garcia
b7d4806243
Implement dartPluginClass support for plugins (#74469) 2021-02-19 09:22:45 -08:00
Jonah Williams
bad5df55cb
[flutter_tools] remove MockFeatureFlags (#75259) 2021-02-02 12:10:30 -08:00
Jonah Williams
e53c48968f
[flutter_tools] remove mock SystemClock (#74994) 2021-01-29 14:28:08 -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
Claire Davis
546b521f33
[flutter_tools] Sort plugins alphabetically when refreshed (#73803) 2021-01-13 09:41:16 -08:00
Alexandre Ardhuin
17cdf5559d
enable unnecessary_string_escapes and use_raw_strings (#68302) (#69025) 2020-10-26 12:42:05 -07:00
Zachary Anderson
cbcd1321ed
Revert "enable unnecessary_string_escapes and use_raw_strings (#68302)" (#68714)
This reverts commit ae06c19a37.
2020-10-21 08:16:13 -07:00
Alexandre Ardhuin
ae06c19a37
enable unnecessary_string_escapes and use_raw_strings (#68302) 2020-10-21 16:34:24 +02:00
Jenn Magder
5e17a240bd
Generate only requested platform directories on create (#68376) 2020-10-19 14:17:43 -07:00
stuartmorgan
be6a368801
Improve Windows symlink instructions (#67029)
When the developer doesn't have permission to create symlinks, we
display specific instructions, but they were only correct for recent
versions of Windows 10. This improves them by:
- Giving the correct instructions for older versions.
- For recent versions, adds a command that will deep-link into the
  settings application so that developers don't have to figure out
  where/how to enable developer mode.

Fixes https://github.com/flutter/flutter/issues/66973
2020-10-06 08:32:54 -07:00
Jenn Magder
e8fbb43aac
Replace MockFile with memory file system files (#66941) 2020-09-29 17:50:33 -07:00
stuartmorgan
bcd0959ac3
Sort generated plugin file content by plugin name (#65509) 2020-09-14 17:57:11 -07:00
stuartmorgan
6d1c244b79
Always use POSIX paths for generated CMake files (#65493)
The Windows plugin CMake generation had code to ensure that the paths
written to it used POSIX separators, but the Linux version didn't; that
meant that plugin updates run on Windows machines would corrupt the
generated (but checked in) Linux CMake file.

This change shares that code so that both will use POSIX paths
regardless of what OS they are generated on.

Fixes https://github.com/flutter/flutter/issues/64591
2020-09-09 16:08:19 -07:00
xster
e1ae4dfcae
Move v1 embedding migration warning from plugin consumers to all apps (#64181) 2020-08-19 22:32:08 -07:00
Jonah Williams
16df32b1eb
[flutter_tools] handle invalid yaml in plugin dependency (#63526) 2020-08-11 19:31:03 -07:00
xster
8bd2e6585b
Remove v1 Android create templates (#61203) 2020-07-11 12:15:19 -07:00
stuartmorgan
4b12050112
Switch Windows to CMake (#60629)
* First pass at CMake files; untested

* First pass of adding CMake generation logic on Windows

* Misc fixes

* Get bundling working, start incoprorating CMake build into tool

* Fix debug, exe name.

* Add resources

* Move cmake.dart

* Rip out all the vcxproj/solution plumbing

* Fix plugin cmake generation

* Build with cmake rather than calling VS directly

* Adjust Windows plugin template to match standard header directory structure

* Pass config selection when building

* Partially fix multi-config handling

* Rev template version

* Share the CMake generation instead of splitting it out

* VS build/run cycle works, with slightly awkward requirement to always build all

* Update manifest

* Plugin template fixes

* Minor adjustments

* Build install as part of build command, instead of separately

* Test cleanup

* Update Linux test for adjusted generated CMake approach

* Plugin test typo fix

* Add missing stub file for project test

* Add a constant for VS generator
2020-07-06 12:59:16 -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
Chris Yang
2e63b7d4f8
Add --platforms to flutter create -t plugin command (#59507) 2020-06-23 17:38:03 -07:00
stuartmorgan
61c198e766
Switch Linux to the GTK embedding (#59287)
Updates the tooling to use the GTK embedding, rather than the GLFW embedding:
- Adds new requirements to `doctor`
- Updates the app and plugin templates to make GTK-based runners and plugins
- Stops downloading and installing the GLFW artifacts

Final part of #54860, other than cleanup.
2020-06-16 13:31:24 -07:00
Marcus Tomlinson
1fe0f22645
Remove use of BundleUtilities in Linux build (#59080)
* Explicitly install the Flutter library

* Publish ${FLUTTER_LIBRARY} to parent scope

* Bundle plugin libraries

* Bundle <plugin_name>_bundled_libraries too

* BUNDLED_LIBRARIES -> PLUGIN_BUNDLED_LIBRARIES

* Update Linux plugin test

* Address review comments
2020-06-11 22:00:28 +01:00
stuartmorgan
30d405c794
Temporarily allow pluginClass: none on desktop (#57498)
Treats 'pluginClass: none' as equivalent to having no 'pluginClass'
entry on the desktop platforms, to satisy stable channel plugin
validation of Dart-only desktop plugin implementations. See
issue for full details.

Part of https://github.com/flutter/flutter/issues/57497
2020-05-18 09:26:37 -07:00
stuartmorgan
8abf0a6d8c
Switch to CMake for Linux desktop (#57238)
Updates the Linux templates to use CMake+ninja, rather than Make, and updates the tooling to generate CMake support files rather than Make support files, and to drive the build using cmake and ninja.

Also updates doctor to check for cmake and ninja in place of make.

Note: While we could use CMake+Make rather than CMake+ninja, in testing ninja handled the tool_backend.sh call much better, calling it only once rather than once per dependent target. While it does add another dependency that people are less likely to already have, it's widely available in package managers, as well as being available as a direct download. Longer term, we could potentially switch from ninja to Make if it's an issue.

Fixes #52751
2020-05-16 15:07:34 -07:00
Jonah Williams
d46da3ae11
[flutter_tools] remove PackageMap and finish PackageConfig migration (#55244) 2020-04-21 19:55:15 -07:00
Francisco Magdaleno
e012752634
[flutter_tools] Don't generate native registrant classes if no pluginClass is defined (#53785) 2020-04-03 11:51:01 -07:00
Dan Field
6ad807e3a0
More fixes for randomizing test order (#52060) 2020-03-05 17:14:27 -08:00
Alexandre Ardhuin
c2ae654ddf
enable avoid_single_cascade_in_expression_statements (#51944) 2020-03-05 08:03:26 +01:00
stuartmorgan
dd2756c36a
Generate a makefile for Linux plugins (#51520)
When generating the plugin registrant for Linux, also generate a
makefile that can be included in the app-level Makefile to manage all of
the plugin targets and flags, exporting them in a few known variables
for use in the outer makefile.

Part of #32720
2020-02-27 09:45:22 -08:00
stuartmorgan
22c807773a
Automatically add plugin projects to Windows .sln (#51246)
Adds utility code for managing list of plugin projects within a solution file, updating them as the plugins change.

This is a prototype of an approach to solution-level portion of Windows plugin tooling; it may not be what the final plugin handling on Windows uses, but it makes things much better in the short term, and gives us a baseline to evaluate other possible solution management systems against.

Part of #32719
2020-02-25 14:16:27 -08:00
stuartmorgan
f4177a6dde
Generate a Property Sheet for Windows plugins (#50740)
Generates a Property Sheet for Windows builds containing link and include path
information for any included plugins. This allows automating part of the process
of integrating plugins into the build that is currently manual.

To support this change, refactored msbuild_utils into a PropertySheet class so that
it can be used to make different property sheets.
2020-02-13 12:53:28 -08:00
stuartmorgan
7bdd4757ec
Create plugin symlinks for Windows and Linux (#50599)
This makes ephemeral symlinks to each plugin, for use by build systems.
This is similar to the logic implemented in the Podfile on iOS and
macOS, but managed internally to the Flutter tool.

Exploration for addressing #32719 and #32720
Related to #41146
2020-02-12 16:23:27 -08:00
Alexandre Ardhuin
f15c887c63
change quote to avoid escapes (#50368) 2020-02-11 20:58:27 +01:00
Emmanuel Garcia
466681cad8
Improve error message when a plugin sets an invalid android package (#48104) 2020-01-28 17:48:26 -08:00
Francisco Magdaleno
fcf341e4f3
Reland "[flutter_tools] Removes the need of a no-op plugin implementations #48614" (#49085) 2020-01-17 14:43:34 -08:00
Jenn Magder
b225cb8d53
Revert "[flutter_tools] Removes the need of a no-op plugin implementations (#48614)" (#49005)
This reverts commit 5eb394e084.
2020-01-16 16:19:54 -08:00
Francisco Magdaleno
5eb394e084
[flutter_tools] Removes the need of a no-op plugin implementations (#48614) 2020-01-16 12:42:05 -08:00