very_good_cli
very_good_cli copied to clipboard
Platform flags not working
Description
when creating new project the platform flags is not working ,, so when running
very_good create test --windows false --macos false --ios false --linux false --web false
it is expected to have android platform related files only but this is what is really generated :
Steps To Reproduce
run very_good create test --windows false --macos false --ios false --linux false --web false
Additional Context os: win 11 ver: 0.7.11
Confirms the issue. version 0.7.11
cc @wolfenrain are you able to reproduce?
Facing the same issue
I started a new project with all platform flags on (due to the bug), and I need to use only Android and IOS. Will it be hard to eliminate the other platform integrations? How will it effect my development process and my IOS and Android apps?
It might be related, but using 0.7.13
does not generate the macOS
platform folder, even when the flag is set to true.
In the documentation : https://github.com/VeryGoodOpenSource/very_good_cli/blob/main/README.md
It is specified that these flags are for the Flutter plugins. It means that it only applies if we we use the plugin template, like this :
very_good create my_project -t flutter_plugin --windows false --macos false --linux false
But I agree that it is a problem that we can't choose the platforms for the creation of standard Flutter projects. It is the case with the basic command flutter create --platforms=android,ios
So I suppose that it should also be a possibility with very_good create
Meanwhile, the only option that you have is to manually delete the folders that you don't want : web/
, windows/
, ios/
.
In the documentation : https://github.com/VeryGoodOpenSource/very_good_cli/blob/main/README.md
It is specified that these flags are for the Flutter plugins. It means that it only applies if we we use the plugin template, like this :
very_good create my_project -t flutter_plugin --windows false --macos false --linux false
But I agree that it is a problem that we can't choose the platforms for the creation of standard Flutter projects. It is the case with the basic command
flutter create --platforms=android,ios
So I suppose that it should also be a possibility withvery_good create
Meanwhile, the only option that you have is to manually delete the folders that you don't want :
web/
,windows/
,ios/
.
At the moment platform flags are only supported for the plugin template. We can expand this to other templates in future releases but we've been focusing on refactoring the create command recently to make the flags/options per template more obvious.
After version 0.10.0, these flags were transformed into a multi-option that only exists under flutter_plugin
subcommand. More details are found here.
New usage:
- very_good create my_flutter_plugin -t flutter_plugin --desc "My new Flutter plugin" --windows false --macos false --linux false
+ very_good create flutter_plugin my_flutter_plugin --desc "My new Flutter plugin" --platforms android,ios,web
+ very_good create flutter_plugin my_flutter_plugin --desc "My new Flutter plugin" --platforms=android,ios,web
+ very_good create flutter_plugin my_flutter_plugin --desc "My new Flutter plugin" --platforms android --platforms ios --platforms web
This should sort out the confusion on "not working" on the core template.
Also, created https://github.com/VeryGoodOpenSource/very_good_cli/issues/630 to track the addition of flags in the creation of a flutter app