run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
Future<void> run() async {
final cliHandler = CliHandler();
cliHandler.clearScreen();
cliHandler
.printBoltCyanText('Making your app publish ready with quickfire :');
print('\n');
final osChoice = ['windows', 'linux', 'mac'];
final osChoiceSelector = ChoiceSelector(osChoice);
cliHandler.printBoltCyanText('Choose your operating system : ');
osChoiceSelector.printOptions();
osChoiceSelector.handleArrowKeys();
int osChoiceIndex = osChoiceSelector.selectedIndexForOptions;
// windows
if (osChoiceIndex == 0) {
KeystoreHandler.generateWndowsKeystore();
}
// linux
else if (osChoiceIndex == 1) {
KeystoreHandler.generateLinuxMacUploadKeystore();
}
// mac
else if (osChoiceIndex == 2) {
KeystoreHandler.generateLinuxMacUploadKeystore();
}
cliHandler.stopLoadingAnimation();
await KeystoreHandler.generateKeyProperties();
await GradleHandler.referenceKeyStoreInGradle();
await GradleHandler.updateBuildGradle();
}