11import { ANDROID_RELEASE_BUILD_ERROR_MESSAGE , AndroidAppBundleMessages } from "../constants" ;
22import { ValidatePlatformCommandBase } from "./command-base" ;
3- import { BuildController } from "../controllers/build-controller" ;
4- import { BuildDataService } from "../services/build-data-service" ;
53
64export abstract class BuildCommandBase extends ValidatePlatformCommandBase {
75 constructor ( $options : IOptions ,
86 protected $errors : IErrors ,
97 $projectData : IProjectData ,
108 $platformsDataService : IPlatformsDataService ,
119 protected $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
12- protected $buildController : BuildController ,
10+ protected $buildController : IBuildController ,
1311 $platformValidationService : IPlatformValidationService ,
1412 private $bundleValidatorHelper : IBundleValidatorHelper ,
15- private $buildDataService : BuildDataService ,
13+ private $buildDataService : IBuildDataService ,
1614 protected $logger : ILogger ) {
1715 super ( $options , $platformsDataService , $platformValidationService , $projectData ) ;
1816 this . $projectData . initializeProjectData ( ) ;
@@ -25,7 +23,7 @@ export abstract class BuildCommandBase extends ValidatePlatformCommandBase {
2523 public async executeCore ( args : string [ ] ) : Promise < string > {
2624 const platform = args [ 0 ] . toLowerCase ( ) ;
2725 const buildData = this . $buildDataService . getBuildData ( this . $projectData . projectDir , platform , this . $options ) ;
28- const outputPath = await this . $buildController . prepareAndBuildPlatform ( buildData ) ;
26+ const outputPath = await this . $buildController . prepareAndBuild ( buildData ) ;
2927
3028 return outputPath ;
3129 }
@@ -64,16 +62,16 @@ export class BuildIosCommand extends BuildCommandBase implements ICommand {
6462 $projectData : IProjectData ,
6563 $platformsDataService : IPlatformsDataService ,
6664 $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
67- $buildController : BuildController ,
65+ $buildController : IBuildController ,
6866 $platformValidationService : IPlatformValidationService ,
6967 $bundleValidatorHelper : IBundleValidatorHelper ,
7068 $logger : ILogger ,
71- $buildDataService : BuildDataService ) {
69+ $buildDataService : IBuildDataService ) {
7270 super ( $options , $errors , $projectData , $platformsDataService , $devicePlatformsConstants , $buildController , $platformValidationService , $bundleValidatorHelper , $buildDataService , $logger ) ;
7371 }
7472
7573 public async execute ( args : string [ ] ) : Promise < void > {
76- await this . executeCore ( [ this . $platformsDataService . availablePlatforms . iOS ] ) ;
74+ await this . executeCore ( [ this . $devicePlatformsConstants . iOS . toLowerCase ( ) ] ) ;
7775 }
7876
7977 public async canExecute ( args : string [ ] ) : Promise < boolean | ICanExecuteCommandOutput > {
@@ -98,19 +96,19 @@ export class BuildAndroidCommand extends BuildCommandBase implements ICommand {
9896 constructor ( protected $options : IOptions ,
9997 protected $errors : IErrors ,
10098 $projectData : IProjectData ,
101- $ platformsDataService : IPlatformsDataService ,
99+ platformsDataService : IPlatformsDataService ,
102100 $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
103- $buildController : BuildController ,
101+ $buildController : IBuildController ,
104102 $platformValidationService : IPlatformValidationService ,
105103 $bundleValidatorHelper : IBundleValidatorHelper ,
106104 protected $androidBundleValidatorHelper : IAndroidBundleValidatorHelper ,
107- $buildDataService : BuildDataService ,
105+ $buildDataService : IBuildDataService ,
108106 protected $logger : ILogger ) {
109- super ( $options , $errors , $projectData , $ platformsDataService, $devicePlatformsConstants , $buildController , $platformValidationService , $bundleValidatorHelper , $buildDataService , $logger ) ;
107+ super ( $options , $errors , $projectData , platformsDataService , $devicePlatformsConstants , $buildController , $platformValidationService , $bundleValidatorHelper , $buildDataService , $logger ) ;
110108 }
111109
112110 public async execute ( args : string [ ] ) : Promise < void > {
113- await this . executeCore ( [ this . $platformsDataService . availablePlatforms . Android ] ) ;
111+ await this . executeCore ( [ this . $devicePlatformsConstants . Android . toLowerCase ( ) ] ) ;
114112
115113 if ( this . $options . aab ) {
116114 this . $logger . info ( AndroidAppBundleMessages . ANDROID_APP_BUNDLE_DOCS_MESSAGE ) ;
0 commit comments