@@ -11,8 +11,8 @@ export abstract class BuildCommandBase extends ValidatePlatformCommandBase {
11
11
$platformValidationService : IPlatformValidationService ,
12
12
private $buildDataService : IBuildDataService ,
13
13
protected $logger : ILogger ) {
14
- super ( $options , $platformsDataService , $platformValidationService , $projectData ) ;
15
- this . $projectData . initializeProjectData ( ) ;
14
+ super ( $options , $platformsDataService , $platformValidationService , $projectData ) ;
15
+ this . $projectData . initializeProjectData ( ) ;
16
16
}
17
17
18
18
public dashedOptions = {
@@ -65,16 +65,16 @@ export class BuildIosCommand extends BuildCommandBase implements ICommand {
65
65
$logger : ILogger ,
66
66
$buildDataService : IBuildDataService ,
67
67
private $migrateController : IMigrateController ) {
68
- super ( $options , $errors , $projectData , $platformsDataService , $devicePlatformsConstants , $buildController , $platformValidationService , $buildDataService , $logger ) ;
68
+ super ( $options , $errors , $projectData , $platformsDataService , $devicePlatformsConstants , $buildController , $platformValidationService , $buildDataService , $logger ) ;
69
69
}
70
70
71
71
public async execute ( args : string [ ] ) : Promise < void > {
72
72
await this . executeCore ( [ this . $devicePlatformsConstants . iOS . toLowerCase ( ) ] ) ;
73
73
}
74
74
75
75
public async canExecute ( args : string [ ] ) : Promise < boolean | ICanExecuteCommandOutput > {
76
- await this . $migrateController . validate ( { projectDir : this . $projectData . projectDir } ) ;
77
76
const platform = this . $devicePlatformsConstants . iOS ;
77
+ await this . $migrateController . validate ( { projectDir : this . $projectData . projectDir , platforms : [ platform ] } ) ;
78
78
79
79
super . validatePlatform ( platform ) ;
80
80
@@ -103,7 +103,7 @@ export class BuildAndroidCommand extends BuildCommandBase implements ICommand {
103
103
$buildDataService : IBuildDataService ,
104
104
protected $logger : ILogger ,
105
105
private $migrateController : IMigrateController ) {
106
- super ( $options , $errors , $projectData , platformsDataService , $devicePlatformsConstants , $buildController , $platformValidationService , $buildDataService , $logger ) ;
106
+ super ( $options , $errors , $projectData , platformsDataService , $devicePlatformsConstants , $buildController , $platformValidationService , $buildDataService , $logger ) ;
107
107
}
108
108
109
109
public async execute ( args : string [ ] ) : Promise < void > {
@@ -119,8 +119,8 @@ export class BuildAndroidCommand extends BuildCommandBase implements ICommand {
119
119
}
120
120
121
121
public async canExecute ( args : string [ ] ) : Promise < boolean | ICanExecuteCommandOutput > {
122
- await this . $migrateController . validate ( { projectDir : this . $projectData . projectDir } ) ;
123
122
const platform = this . $devicePlatformsConstants . Android ;
123
+ await this . $migrateController . validate ( { projectDir : this . $projectData . projectDir , platforms : [ platform ] } ) ;
124
124
this . $androidBundleValidatorHelper . validateRuntimeVersion ( this . $projectData ) ;
125
125
let result = await super . canExecuteCommandBase ( platform , { notConfiguredEnvOptions : { hideSyncToPreviewAppOption : true } } ) ;
126
126
if ( result . canExecute ) {
0 commit comments