From 98982564412bff8e2f4aa15af1630cdb57638908 Mon Sep 17 00:00:00 2001 From: Renan <6718144+renancaraujo@users.noreply.github.com> Date: Thu, 14 Sep 2023 13:43:29 +0100 Subject: [PATCH] fix: pass `org_name` to the plugin template (#777) * fix: pass `org_name` to the plugin template * test --- lib/src/commands/create/commands/flutter_plugin.dart | 2 +- test/src/commands/create/commands/flutter_plugin_test.dart | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/commands/create/commands/flutter_plugin.dart b/lib/src/commands/create/commands/flutter_plugin.dart index 163f5c41..b244d9b8 100644 --- a/lib/src/commands/create/commands/flutter_plugin.dart +++ b/lib/src/commands/create/commands/flutter_plugin.dart @@ -4,7 +4,7 @@ import 'package:very_good_cli/src/commands/create/templates/templates.dart'; /// {@template very_good_create_flutter_plugin_command} /// A [CreateSubCommand] for creating Flutter plugins. /// {@endtemplate} -class CreateFlutterPlugin extends CreateSubCommand with Publishable { +class CreateFlutterPlugin extends CreateSubCommand with Publishable, OrgName { /// {@macro very_good_create_flutter_plugin_command} CreateFlutterPlugin({ required super.logger, diff --git a/test/src/commands/create/commands/flutter_plugin_test.dart b/test/src/commands/create/commands/flutter_plugin_test.dart index 41d18fd7..5f5176a5 100644 --- a/test/src/commands/create/commands/flutter_plugin_test.dart +++ b/test/src/commands/create/commands/flutter_plugin_test.dart @@ -31,6 +31,8 @@ Usage: very_good create flutter_plugin [arguments] -o, --output-directory The desired output directory when creating a new project. --description The description for this new project. (defaults to "A Very Good Project created by Very Good CLI.") + --org-name The organization for this new project. + (defaults to "com.example.verygoodcore") --publishable Whether the generated project is intended to be published. --platforms The platforms supported by the plugin. By default, all platforms are enabled. Example: --platforms=android,ios @@ -187,6 +189,7 @@ void main() { vars: { 'project_name': 'my_plugin', 'description': '', + 'org_name': 'com.example.verygoodcore', 'publishable': false, 'platforms': ['android', 'ios', 'windows'], }, @@ -199,6 +202,7 @@ void main() { vars: { 'project_name': 'my_plugin', 'description': '', + 'org_name': 'com.example.verygoodcore', 'publishable': false, 'platforms': ['android', 'ios', 'windows'], },