pubspec.yaml.tmpl 4.23 KB
Newer Older
1 2
name: {{projectName}}
description: {{description}}
3 4
version: 0.0.1
homepage:
5

6
environment:
7
  sdk: {{dartSdkVersionBounds}}
8
  flutter: '>=3.3.0'
9

10 11 12
dependencies:
  flutter:
    sdk: flutter
13 14 15 16
{{#web}}
  flutter_web_plugins:
    sdk: flutter
{{/web}}
17
  plugin_platform_interface: ^2.0.2
18

19
dev_dependencies:
20
{{#withFfi}}
21
  ffi: ^2.1.0
22
  ffigen: ^11.0.0
23
{{/withFfi}}
24 25
  flutter_test:
    sdk: flutter
26
  flutter_lints: ^3.0.0
27

28
# For information on the generic Dart part of this file, see the
29
# following page: https://dart.dev/tools/pub/pubspec
30

31
# The following section is specific to Flutter packages.
32
flutter:
33
  # This section identifies this Flutter project as a plugin project.
Daco Harkes's avatar
Daco Harkes committed
34 35 36 37 38 39 40 41
  # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
  # which should be registered in the plugin registry. This is required for
  # using method channels.
  # The Android 'package' specifies package in which the registered class is.
  # This is required for using method channels on Android.
  # The 'ffiPlugin' specifies that native code should be built and bundled.
  # This is required for using `dart:ffi`.
  # All these are used by the tooling to maintain consistency when
42
  # adding or updating assets for this project.
Daco Harkes's avatar
Daco Harkes committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
{{#withFfiPluginHook}}
  #
  # Please refer to README.md for a detailed explanation.
  plugin:
    platforms:
{{#no_platforms}}
    # This FFI plugin project was generated without specifying any
    # platforms with the `--platform` argument. If you see the `some_platform` map below, remove it and
    # then add platforms following the instruction here:
    # https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms
    # -------------------
      some_platform:
        ffiPlugin: true
    # -------------------
{{/no_platforms}}
{{#android}}
      android:
        ffiPlugin: true
{{/android}}
{{#ios}}
      ios:
        ffiPlugin: true
{{/ios}}
{{#linux}}
      linux:
        ffiPlugin: true
{{/linux}}
{{#macos}}
      macos:
        ffiPlugin: true
{{/macos}}
{{#windows}}
      windows:
        ffiPlugin: true
{{/windows}}
{{/withFfiPluginHook}}
{{#withPlatformChannelPluginHook}}
80 81
  plugin:
    platforms:
82 83
{{#no_platforms}}
    # This plugin project was generated without specifying any
84
    # platforms with the `--platform` argument. If you see the `some_platform` map below, remove it and
85 86 87 88 89 90 91 92
    # then add platforms following the instruction here:
    # https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms
    # -------------------
      some_platform:
        pluginClass: somePluginClass
    # -------------------
{{/no_platforms}}
{{#android}}
93 94 95
      android:
        package: {{androidIdentifier}}
        pluginClass: {{pluginClass}}
96 97
{{/android}}
{{#ios}}
98 99
      ios:
        pluginClass: {{pluginClass}}
100
{{/ios}}
101 102 103 104
{{#linux}}
      linux:
        pluginClass: {{pluginClass}}
{{/linux}}
105
{{#macos}}
106 107
      macos:
        pluginClass: {{pluginClass}}
108
{{/macos}}
109 110
{{#windows}}
      windows:
111
        pluginClass: {{pluginClass}}CApi
112
{{/windows}}
113 114 115 116 117
{{#web}}
      web:
        pluginClass: {{pluginDartClass}}Web
        fileName: {{projectName}}_web.dart
{{/web}}
Daco Harkes's avatar
Daco Harkes committed
118
{{/withPlatformChannelPluginHook}}
119

120 121
  # To add assets to your plugin package, add an assets section, like this:
  # assets:
122 123
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg
124 125
  #
  # For details regarding assets in packages, see
126
  # https://flutter.dev/assets-and-images/#from-packages
127 128
  #
  # An image asset can refer to one or more resolution-specific "variants", see
129
  # https://flutter.dev/assets-and-images/#resolution-aware
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148

  # To add custom fonts to your plugin package, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts in packages, see
149
  # https://flutter.dev/custom-fonts/#from-packages