@@ -185,7 +185,7 @@ export class PlatformService implements IPlatformService {
185
185
return _ . filter ( this . $platformsData . platformsNames , p => { return this . isPlatformPrepared ( p , projectData ) ; } ) ;
186
186
}
187
187
188
- public async preparePlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData ) : Promise < boolean > {
188
+ public async preparePlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData , provision : any ) : Promise < boolean > {
189
189
this . validatePlatform ( platform , projectData ) ;
190
190
191
191
await this . trackProjectType ( projectData ) ;
@@ -214,7 +214,7 @@ export class PlatformService implements IPlatformService {
214
214
this . $logger . trace ( "Changes info in prepare platform:" , changesInfo ) ;
215
215
216
216
if ( changesInfo . hasChanges ) {
217
- await this . preparePlatformCore ( platform , appFilesUpdaterOptions , projectData , changesInfo ) ;
217
+ await this . preparePlatformCore ( platform , appFilesUpdaterOptions , projectData , provision , changesInfo ) ;
218
218
this . $projectChangesService . savePrepareInfo ( platform , projectData ) ;
219
219
} else {
220
220
this . $logger . out ( "Skipping prepare." ) ;
@@ -242,7 +242,7 @@ export class PlatformService implements IPlatformService {
242
242
}
243
243
244
244
@helpers . hook ( 'prepare' )
245
- private async preparePlatformCore ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , projectData : IProjectData , changesInfo ?: IProjectChangesInfo ) : Promise < void > {
245
+ private async preparePlatformCore ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , projectData : IProjectData , provision : any , changesInfo ?: IProjectChangesInfo ) : Promise < void > {
246
246
this . $logger . out ( "Preparing project..." ) ;
247
247
248
248
let platformData = this . $platformsData . getPlatformData ( platform , projectData ) ;
@@ -252,7 +252,7 @@ export class PlatformService implements IPlatformService {
252
252
}
253
253
if ( ! changesInfo || changesInfo . appResourcesChanged ) {
254
254
this . copyAppResources ( platform , projectData ) ;
255
- await platformData . platformProjectService . prepareProject ( ) ;
255
+ await platformData . platformProjectService . prepareProject ( projectData , provision ) ;
256
256
}
257
257
if ( ! changesInfo || changesInfo . modulesChanged ) {
258
258
await this . copyTnsModules ( platform , projectData ) ;
@@ -360,7 +360,7 @@ export class PlatformService implements IPlatformService {
360
360
@exportedPromise ( "platformService" )
361
361
public async build ( platform : string , platformBuildOptions : IPlatformBuildData , platformTemplate ?: string ) : Promise < void > {
362
362
this . $projectData . initializeProjectData ( platformBuildOptions . projectDir ) ;
363
- await this . preparePlatform ( platform , platformBuildOptions , platformTemplate , this . $projectData ) ;
363
+ await this . preparePlatform ( platform , platformBuildOptions , platformTemplate , this . $projectData , undefined ) ;
364
364
await this . buildPlatform ( platform , platformBuildOptions , this . $projectData ) ;
365
365
}
366
366
@@ -418,8 +418,8 @@ export class PlatformService implements IPlatformService {
418
418
this . $logger . out ( `Successfully installed on device with identifier '${ device . deviceInfo . identifier } '.` ) ;
419
419
}
420
420
421
- public async deployPlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , deployOptions : IDeployPlatformOptions , projectData : IProjectData ) : Promise < void > {
422
- await this . preparePlatform ( platform , appFilesUpdaterOptions , deployOptions . platformTemplate , projectData ) ;
421
+ public async deployPlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , deployOptions : IDeployPlatformOptions , projectData : IProjectData , provision : any ) : Promise < void > {
422
+ await this . preparePlatform ( platform , appFilesUpdaterOptions , deployOptions . platformTemplate , projectData , provision ) ;
423
423
this . $logger . out ( "Searching for devices..." ) ;
424
424
await this . $devicesService . initialize ( { platform : platform , deviceId : deployOptions . device } ) ;
425
425
let action = async ( device : Mobile . IDevice ) : Promise < void > => {
@@ -459,7 +459,7 @@ export class PlatformService implements IPlatformService {
459
459
await this . $devicesService . execute ( action , this . getCanExecuteAction ( platform , runOptions ) ) ;
460
460
}
461
461
462
- public async emulatePlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , emulateOptions : IEmulatePlatformOptions , projectData : IProjectData ) : Promise < void > {
462
+ public async emulatePlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , emulateOptions : IEmulatePlatformOptions , projectData : IProjectData , provision : any ) : Promise < void > {
463
463
if ( emulateOptions . avd ) {
464
464
this . $logger . warn ( `Option --avd is no longer supported. Please use --device instead!` ) ;
465
465
return Promise . resolve ( ) ;
@@ -490,7 +490,7 @@ export class PlatformService implements IPlatformService {
490
490
}
491
491
}
492
492
493
- await this . deployPlatform ( platform , appFilesUpdaterOptions , emulateOptions , projectData ) ;
493
+ await this . deployPlatform ( platform , appFilesUpdaterOptions , emulateOptions , projectData , provision ) ;
494
494
return this . runPlatform ( platform , emulateOptions , projectData ) ;
495
495
}
496
496
0 commit comments