11import { ANDROID_RELEASE_BUILD_ERROR_MESSAGE , AndroidAppBundleMessages } from "../constants" ;
22import { ValidatePlatformCommandBase } from "./command-base" ;
3- import { BundleWorkflowService } from "../services/bundle-workflow-service " ;
3+ import { MainController } from "../controllers/main-controller " ;
44
55export abstract class BuildCommandBase extends ValidatePlatformCommandBase {
66 constructor ( $options : IOptions ,
77 protected $errors : IErrors ,
88 $projectData : IProjectData ,
99 $platformsData : IPlatformsData ,
1010 protected $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
11- protected $bundleWorkflowService : BundleWorkflowService ,
11+ protected $mainController : MainController ,
1212 $platformValidationService : IPlatformValidationService ,
1313 private $bundleValidatorHelper : IBundleValidatorHelper ,
1414 protected $logger : ILogger ) {
@@ -18,7 +18,7 @@ export abstract class BuildCommandBase extends ValidatePlatformCommandBase {
1818
1919 public async executeCore ( args : string [ ] ) : Promise < string > {
2020 const platform = args [ 0 ] . toLowerCase ( ) ;
21- const outputPath = await this . $bundleWorkflowService . buildPlatform ( platform , this . $projectData . projectDir , this . $options ) ;
21+ const outputPath = await this . $mainController . buildPlatform ( platform , this . $projectData . projectDir , this . $options ) ;
2222
2323 return outputPath ;
2424 }
@@ -57,11 +57,11 @@ export class BuildIosCommand extends BuildCommandBase implements ICommand {
5757 $projectData : IProjectData ,
5858 $platformsData : IPlatformsData ,
5959 $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
60- $bundleWorkflowService : BundleWorkflowService ,
60+ $mainController : MainController ,
6161 $platformValidationService : IPlatformValidationService ,
6262 $bundleValidatorHelper : IBundleValidatorHelper ,
6363 $logger : ILogger ) {
64- super ( $options , $errors , $projectData , $platformsData , $devicePlatformsConstants , $bundleWorkflowService , $platformValidationService , $bundleValidatorHelper , $logger ) ;
64+ super ( $options , $errors , $projectData , $platformsData , $devicePlatformsConstants , $mainController , $platformValidationService , $bundleValidatorHelper , $logger ) ;
6565 }
6666
6767 public async execute ( args : string [ ] ) : Promise < void > {
@@ -92,12 +92,12 @@ export class BuildAndroidCommand extends BuildCommandBase implements ICommand {
9292 $projectData : IProjectData ,
9393 $platformsData : IPlatformsData ,
9494 $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
95- $bundleWorkflowService : BundleWorkflowService ,
95+ $mainController : MainController ,
9696 $platformValidationService : IPlatformValidationService ,
9797 $bundleValidatorHelper : IBundleValidatorHelper ,
9898 protected $androidBundleValidatorHelper : IAndroidBundleValidatorHelper ,
9999 protected $logger : ILogger ) {
100- super ( $options , $errors , $projectData , $platformsData , $devicePlatformsConstants , $bundleWorkflowService , $platformValidationService , $bundleValidatorHelper , $logger ) ;
100+ super ( $options , $errors , $projectData , $platformsData , $devicePlatformsConstants , $mainController , $platformValidationService , $bundleValidatorHelper , $logger ) ;
101101 }
102102
103103 public async execute ( args : string [ ] ) : Promise < void > {
0 commit comments