very_good_cli icon indicating copy to clipboard operation
very_good_cli copied to clipboard

Platform flags not working

Open egyleader opened this issue 2 years ago • 5 comments

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 :

image

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

egyleader avatar Jul 20 '22 14:07 egyleader

Confirms the issue. version 0.7.11

saveKenny avatar Jul 26 '22 08:07 saveKenny

cc @wolfenrain are you able to reproduce?

felangel avatar Jul 26 '22 17:07 felangel

Facing the same issue

CartmanGD avatar Jul 27 '22 14:07 CartmanGD

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?

CartmanGD avatar Jul 27 '22 15:07 CartmanGD

It might be related, but using 0.7.13 does not generate the macOS platform folder, even when the flag is set to true.

jorgecoca avatar Aug 17 '22 22:08 jorgecoca

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/.

icodeyou avatar Jan 11 '23 23:01 icodeyou

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/.

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.

felangel avatar Jan 11 '23 23:01 felangel

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

renancaraujo avatar Jan 23 '23 20:01 renancaraujo