diff --git a/lib/src/commands/create/commands/docs_site.dart b/lib/src/commands/create/commands/docs_site.dart index 9f05ad7ef..d05060785 100644 --- a/lib/src/commands/create/commands/docs_site.dart +++ b/lib/src/commands/create/commands/docs_site.dart @@ -4,7 +4,7 @@ import 'package:very_good_cli/src/commands/create/templates/templates.dart'; /// {@template very_good_create_docs_site} /// A [CreateSubCommand] for creating Dart command line interfaces. /// {@endtemplate} -class CreateDocsSite extends CreateSubCommand { +class CreateDocsSite extends CreateSubCommand with Publishable { /// {@macro very_good_create_docs_site} CreateDocsSite({ required super.logger, diff --git a/lib/src/commands/create/commands/flame_game.dart b/lib/src/commands/create/commands/flame_game.dart index dfee2a92c..599180092 100644 --- a/lib/src/commands/create/commands/flame_game.dart +++ b/lib/src/commands/create/commands/flame_game.dart @@ -4,7 +4,7 @@ import 'package:very_good_cli/src/commands/create/templates/templates.dart'; /// {@template very_good_create_flame_game_command} /// A [CreateSubCommand] for creating Flame games. /// {@endtemplate} -class CreateFlameGame extends CreateSubCommand with OrgName { +class CreateFlameGame extends CreateSubCommand with OrgName, Publishable { /// {@macro very_good_create_flame_game_command} CreateFlameGame({ required super.logger, diff --git a/lib/src/commands/create/commands/flutter_app.dart b/lib/src/commands/create/commands/flutter_app.dart index d916b3f2e..58aae79dc 100644 --- a/lib/src/commands/create/commands/flutter_app.dart +++ b/lib/src/commands/create/commands/flutter_app.dart @@ -4,7 +4,8 @@ import 'package:very_good_cli/src/commands/create/templates/templates.dart'; /// {@template very_good_create_flutter_app_command} /// A [CreateSubCommand] for creating Flutter apps. /// {@endtemplate} -class CreateFlutterApp extends CreateSubCommand with OrgName, MultiTemplates { +class CreateFlutterApp extends CreateSubCommand + with OrgName, MultiTemplates, Publishable { /// {@macro very_good_create_flutter_app_command} CreateFlutterApp({ required super.logger, diff --git a/test/src/commands/create/commands/docs_site_test.dart b/test/src/commands/create/commands/docs_site_test.dart index ce726f9e2..3ddbb6f6a 100644 --- a/test/src/commands/create/commands/docs_site_test.dart +++ b/test/src/commands/create/commands/docs_site_test.dart @@ -33,6 +33,7 @@ Usage: very_good create docs_site [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.") + --publishable Whether the generated project is intended to be published. --org-name The organization for this new project. (defaults to "my-org") @@ -187,6 +188,7 @@ void main() { vars: { 'project_name': 'my_docs_site', 'description': '', + 'publishable': false, 'org_name': 'VeryGoodOpenSource', }, onVarsChanged: any(named: 'onVarsChanged'), @@ -198,6 +200,7 @@ void main() { vars: { 'project_name': 'my_docs_site', 'description': '', + 'publishable': false, 'org_name': 'VeryGoodOpenSource', }, logger: logger, diff --git a/test/src/commands/create/commands/flame_game_test.dart b/test/src/commands/create/commands/flame_game_test.dart index 918f483c4..5e451c766 100644 --- a/test/src/commands/create/commands/flame_game_test.dart +++ b/test/src/commands/create/commands/flame_game_test.dart @@ -38,6 +38,7 @@ final expectedUsage = [ ' (defaults to "A Very Good Project created by Very Good CLI.")\n' ' --org-name The organization for this new project.\n' ' (defaults to "com.example.verygoodcore")\n' + ' --publishable Whether the generated project is intended to be published.\n' ' --platforms The platforms supported by the game. By default, all platforms are enabled. Example: --platforms=android,ios\n' '\n' ' [android] (default) The game supports the Android platform.\n' @@ -200,6 +201,7 @@ void main() { 'project_name': 'my_app', 'description': '', 'org_name': 'com.example.verygoodcore', + 'publishable': false, 'platforms': ['android', 'ios', 'web', 'macos', 'windows'], }, onVarsChanged: any(named: 'onVarsChanged'), @@ -212,6 +214,7 @@ void main() { 'project_name': 'my_app', 'description': '', 'org_name': 'com.example.verygoodcore', + 'publishable': false, 'platforms': ['android', 'ios', 'web', 'macos', 'windows'], }, logger: logger, diff --git a/test/src/commands/create/commands/flutter_app_test.dart b/test/src/commands/create/commands/flutter_app_test.dart index 170c5dc9d..bd0b10f01 100644 --- a/test/src/commands/create/commands/flutter_app_test.dart +++ b/test/src/commands/create/commands/flutter_app_test.dart @@ -37,6 +37,7 @@ Usage: very_good create flutter_app [arguments] --org-name The organization for this new project. (defaults to "com.example.verygoodcore") + --publishable Whether the generated project is intended to be published. --application-id The bundle identifier on iOS or application id on Android. (defaults to .) --platforms The platforms supported by the app. By default, all platforms are enabled. Example: --platforms=android,ios @@ -188,6 +189,7 @@ void main() { 'project_name': 'my_app', 'description': '', 'org_name': 'com.example.verygoodcore', + 'publishable': false, 'application_id': 'xyz.app.my_app', 'platforms': const [ 'android', @@ -219,6 +221,7 @@ void main() { 'project_name': 'my_app', 'description': '', 'org_name': 'com.example.verygoodcore', + 'publishable': false, 'application_id': 'xyz.app.my_app', 'platforms': const ['android', 'ios'], }, @@ -254,6 +257,7 @@ void main() { 'project_name': 'my_app', 'description': '', 'org_name': 'com.example.verygoodcore', + 'publishable': false, 'application_id': 'xyz.app.my_app', 'platforms': const [ 'android',