This program will create a flutter mono repository.
Note, this script uses FVM and relies on "Set Global Version". https://pub.dev/packages/fvm
Command line parameters
Usage: create_flutter_mono_repo [arguments]
- --root-path
The directory where the project will be created. Defaults to the current directory. - --customer-id
Unique id of the customer, only used for the name of the project folder. Convention: numeric, fixed 7 positions.
Defaults to "0000000" - --project-name
Used for the project folder and as the id of the app. Convention: lowercase and underscores.
Defaults to "flutter_sample_app" - --customer-name
Name of the customer, only used for the name of the project folder. Convention: lowercase and underscores.
Defaults to "rubigo" - --org
Name of the company in reverse domain name notation.
Defaults to "com.example" - --ios-language
[objc, swift] Defaults to swift - --android-language
[java, kotlin] Default to kotlin - --flutter-version
The flutter version to use for this project
Defaults to "1.22.6" - --[no-]verbose
Verbose output - -d, --[no-]dry-run
Dry run, show only the commands. - -h, --help
Print this usage information
It does the following steps:
- It checks the current Flutter version against the requested Flutter version
- Create a project folder with a name that has a standardized layout
- Change directory to the project folder
- Git init
- Create a folder with the name 'packages'
- Change directory to the packages folder
- Call fvm flutter create with the supplied command line options
- Commit original .gitignore
- Make changes to .gitignore, to include some important IntelliJ Idea files
- Commit altered .gitignore
- Commit the newly created flutter project
- Call fvm init with the supplied flutter version to use
- Make changes to .gitignore, to exclude the FVM symbolic link
- Make changes to .iml file to exclude .fvm/flutter_sdk symbolic link in IntelliJ Idea
- Commit changes for FVM
- Remove _android.iml reference from .idea/modules.xml, as it is not needed
- Commit changes made to .idea/modules.xml