build method

Future<bool> build()

Implementation

Future<bool> build() async {
  var flutter = 'flutter';
  final jsonFile = File(join(root, '.fvm', 'fvm_config.json'));
  if (await jsonFile.exists()) {
    flutter = 'fvm flutter';
  }
  var script =
      '$flutter build ${platform.name} --build-name=$buildName --build-number=$buildNumber --split-debug-info=build/flutter_debug_info';
  for (var args in dartDefineArgs) {
    script = '$script $args';
  }
  logger.log('πŸ‘‰εΌ€ε§‹θΏ›θ‘Œζ‰“εŒ…......');
  final result = await runCommand(root, script).then((value) => value.first);
  if (result.exitCode != 0) {
    logger.log('ζ‰“εŒ…ε€±θ΄₯:${result.stderr}', status: LogStatus.error);
    return false;
  }
  logger.log('ζ‰“εŒ…ζˆεŠŸ!', status: LogStatus.success);
  return true;
}