Commit graph

44 commits

Author SHA1 Message Date
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
xster 9eb9ea0ffa
Let the tool warn about all old API plugins (#48282) 2020-01-13 21:30:42 -08:00
Alexandre Ardhuin 4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01: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
Michael Klimushyn 901eb0fc81
Add a note to generated plugins files (#45557)
There has been some confusion about whether or not
.flutter-plugins-dependencies should be tracked in version control or
not. Added a comment to both it and .flutter-plugins explaining that
it's generated and shouldn't be.

.flutter-plugins-dependencies is parsed through JSON, and the JSON spec
doesn't support comments. So unfortunately the note is living in an
arbitrary "_info" key instead of an obvious top level comment.
2019-11-25 11:47:20 -08:00
Emmanuel Garcia b6e92003c8
Add .flutter-plugins-dependencies to the project, which contains the app's plugin dependency graph (#45379) 2019-11-22 15:02:20 -08:00
xster 9e0df259df
Show a warning when a module uses a v1 only plugin (#44499) 2019-11-11 15:56:43 -08:00
Emmanuel Garcia cb614d1339
Fix v1 embedding support heuristic for plugins (#44214) 2019-11-07 08:24:19 -08:00
Michael Klimushyn 02aac5072c
Revert "Exit tool if a plugin supports the embedding v2 but the app doesn't (#44026)"
This missed some plugins that _do_ support the v1 embedding
(shared_preferences as one known case) so caused unexpected breakages.

This reverts commit b94c1a41ca.
2019-11-05 14:38:09 -08:00
xster ba26f926c7
Add Android embedding version analytics (#44043) 2019-11-05 12:38:42 -08:00
Emmanuel Garcia b94c1a41ca Exit tool if a plugin supports the embedding v2 but the app doesn't (#44026) 2019-11-04 13:37:51 -08:00
Emmanuel Garcia ade8dfac3d
Move the plugin registrant to io.flutter.plugins and add the @Keep annotation (#44011) 2019-11-01 16:58:26 -07:00
Emmanuel Garcia 7e60a65ff0
Don't read AndroidManifest.xml if it doesn't exit (#43669) 2019-10-29 16:05:13 -07:00
Harry Terkelsen eba69caf97
Don't html-escape in the plugin registrant templates. (#43448)
* Don't html-escape in the plugin registrant templates.

Fixes #43382

* Add test
2019-10-25 15:00:05 -07:00
Jonah Williams 4c677e4148
Extra defensive programming for pub modification time assert (#43315) 2019-10-22 22:05:00 -07:00
Jonah Williams 46ea99122b
Revert "Extra defensive programming for pub modification time assert (#42491)" (#43235)
This reverts commit 3597bae6a0.
2019-10-21 20:54:02 -07:00
Ian Hickson 3597bae6a0 Extra defensive programming for pub modification time assert (#42491) 2019-10-21 20:15:20 -07:00
Emmanuel Garcia 0a93f4eb75
Remove isNewAndroidEmbeddingEnabled flag when reading an existing pro… (#42684) 2019-10-16 12:47:04 -07:00
Ian Hickson 08643c41d7
Always fake ProcessManager when you fake Filesystem in tests (#42369)
...because otherwise, processes that think they're manipulating your
filesystem will be doing crazy things the test is ignoring, leading to
(at best) failures and (at worst) flakes or disk corruption.
2019-10-11 11:23:12 -07:00
Ian Hickson cdc2d9901d
More consistent temp directory naming (#42063)
Applying our style guide:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#have-good-hygiene-when-using-temporary-directories
2019-10-07 16:43:04 -07:00
Emmanuel Garcia 5961bcc505
Generate projects using the new Android embedding (#41666)
* Generate projects using the new Android embedding

* Add comment about usesNewEmbedding:true

* Feedback

* Rework way to detect new embedding in new apps
2019-10-04 06:23:03 -07:00
stuartmorgan c32e543207
Invalidate macOS pods on plugin changes (#40730)
When the plugin list changes, iOS pods are invalidated, but that was
never wired up for macOS.

Should fix #39327
2019-09-18 21:42:57 -07:00