flutter/packages/flutter_tools/templates
Bartek Pacia 51251f2e57
Refactor Flutter Gradle Plugin so it can be applied using the declarative plugins {} block (#123511)
This PR aims to resolve #121552.

Resources used:
- [Developing Plugins](https://docs.gradle.org/current/userguide/custom_plugins.html)
- [Using Gradle Plugins](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block)
- [Composite Builds Plugin Development Sample](https://docs.gradle.org/current/samples/sample_composite_builds_plugin_development.html)

This PR also paves way for #121541, because apps will no longer have:

```groovy
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
```

hardcoded. Instead, they'll use:

```groovy
plugins {
    // ...
    id "dev.flutter.flutter-gradle-plugin" // the exact name is tentative
}
```
2023-04-19 17:56:22 +00:00
..
app Update the counter app to enable Material 3 (#118835) 2023-02-02 00:08:11 +00:00
app_integration_test/integration_test Add an integration test to plugin template example (#117062) 2022-12-15 19:49:14 +00:00
app_shared Refactor Flutter Gradle Plugin so it can be applied using the declarative plugins {} block (#123511) 2023-04-19 17:56:22 +00:00
app_test_widget/test [flutter_tools] Use proper project name in templates (#96373) 2022-02-02 06:50:14 -08:00
cocoapods Add native unit tests to iOS and macOS templates (#117147) 2022-12-21 19:10:22 +00:00
module Add Info.plist from build directory as input path to Thin Binary build phase (#118209) 2023-01-13 13:41:08 -06:00
package Remove .pub directories from iml templates (#109622) 2022-09-09 22:20:12 +00:00
plugin Deprecate these old APIs (#116793) 2023-04-06 19:53:50 +00:00
plugin_ffi Set plugin template minimum iOS version to 11.0 (#122625) 2023-03-21 16:40:50 +00:00
plugin_shared Set plugin template minimum iOS version to 11.0 (#122625) 2023-03-21 16:40:50 +00:00
skeleton Use super parameters in templates (#101157) 2022-04-14 13:26:38 -07:00
README.md FFI plugins (#96225) 2022-01-26 23:44:45 +01:00
template_manifest.json Add Linux unit tests to plugin template (#120814) 2023-02-15 19:13:11 +00:00

This directory contains templates for flutter create.

The *_shared subdirectories provide files for multiple templates.

  • app_shared for app and skeleton.
  • plugin_shared for (method channel) plugin and plugin_ffi.

For example, there are two app templates: app (the counter app) and skeleton (the more advanced list view/detail view app).

  ┌────────────┐
  │ app_shared │
  └──┬──────┬──┘
     │      │
     │      │
     ▼      ▼
┌─────┐    ┌──────────┐
│ app │    │ skeleton │
└─────┘    └──────────┘

Thanks to app_shared, the templates for app and skeleton can contain only the files that are specific to them alone, and the rest is automatically kept in sync.