New plugin submission guideline - flutter-tizen/flutter-tizen GitHub Wiki
Please read the following requirements before you submit a new package to flutter-tizen/plugins.
Structure
- Create a subdirectory in
packages
and name it after the name of your package. - If the package name has the
_tizen
suffix, remove the suffix from the directory name. - The following files and directories must be included:
.gitignore
CHANGELOG.md
example/.gitignore
example/lib/
example/pubspec.yaml
example/README.md
example/tizen/
LICENSE
pubspec.yaml
README.md
- The following directories are optional:
example/integration_test/
(if the package has integration tests)example/test_driver/
(if a custom driver script is required to run the integration tests)lib/
(if the package has any Dart implementation)tizen/
(if the package has any native implementation)
- The following files or directories should not be included:
.metadata
android/
or other platform implementations- Any other auto-generated file (e.g.
test/
)
README
- Fill out both
README.md
andexample/README.md
by referring to other packages' READMEs. - If the package has specific device requirements (i.e. depends on a specific device profile or Tizen version), specify all supported devices in README. (example)
- If one or more privileges are required to use the package, list them all in README. (example)
- If any of the privileges is a privacy-related privilege, and it's the developer's responsibility to request a corresponding permission using
permisson_handler_tizen
, document it properly in README. - If your package implements an existing platform interface or other plugin's method channel, and not all APIs are implemented by your package or the APIs are subject to change in the future, list all supported APIs in README. (example)
pubspec.yaml
- The pubspec of your package should contain the following information.
name
description
homepage
(https://github.com/flutter-tizen/plugins
)repository
(https://github.com/flutter-tizen/plugins/tree/master/packages/[package_name]
)version
(either0.1.0
or1.0.0
)
- The name of
pluginClass
must end withPlugin
. fileName
is not required for Dart-only plugins.- If you're implementing an existing federated plugin, add its platform interface package to
dependencies
. (example) - Remove any unused
dependencies
ordev_dependencies
and unnecessary comments frompubspec.yaml
andexample/pubspec.yaml
. - Sort
dependencies
anddev_dependencies
alphabetically. - Prefer double quotes (
""
) over single quotes (''
).
tizen-manifest.xml
- The app label should be in the
[package_name]_example
format. - The package ID and app ID should be in the
org.tizen.[app_label]
format. - If your package supports both watch and TV devices, set the
name
ofprofile
tocommon
. Otherwise, use a specific profile name (e.g.wearable
). - List all required privileges and features if any.
- Do not modify other parts of the file unless there's a special reason. Especially do not change the value of
api-version
.
Implementation details
- Style your code by following the Style guide and Recommended settings for VS Code.
- Remove any unnecessary (auto-generated) code. For example,
// For getPlatformVersion; remove unless needed for your plugin implementation. #include <system_info.h>
Miscellaneous
- Add your package to the package list of the repo's main README.
- Add your package to the
labeler.yml
file. - Add your package to the
recipe.yaml
file.
Final checks
- Perform static analysis (Dart and C++) and resolve any issues. Read Recommended settings for VS Code if you're using VS Code.
- Run
flutter-tizen pub publish --dry-run
and resolve any issues. - Run integration tests on at least one device and make sure all tests pass.
- Start your PR title with
[package_name]
.
If in doubt, contact @swift-kim and ask for help.