@@ -333,7 +333,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
333333
334334 const platformData = this . $platformsData . getPlatformData ( platform , projectData ) ;
335335 const forDevice = ! buildConfig || buildConfig . buildForDevice ;
336- outputPath = outputPath || ( forDevice ? platformData . deviceBuildOutputPath ( buildConfig ) : platformData . emulatorBuildOutputPath || platformData . deviceBuildOutputPath ( buildConfig ) ) ;
336+ outputPath = outputPath || ( forDevice ? platformData . getDeviceBuildOutputPath ( buildConfig ) : platformData . emulatorBuildOutputPath || platformData . getDeviceBuildOutputPath ( buildConfig ) ) ;
337337 if ( ! this . $fs . exists ( outputPath ) ) {
338338 return true ;
339339 }
@@ -433,15 +433,15 @@ export class PlatformService extends EventEmitter implements IPlatformService {
433433 this . $fs . writeJson ( buildInfoFile , buildInfo ) ;
434434 }
435435
436- public async shouldInstall ( device : Mobile . IDevice , projectData : IProjectData , release : boolean , outputPath ?: string ) : Promise < boolean > {
436+ public async shouldInstall ( device : Mobile . IDevice , projectData : IProjectData , isRelease : IRelease , outputPath ?: string ) : Promise < boolean > {
437437 const platform = device . deviceInfo . platform ;
438438 if ( ! ( await device . applicationManager . isApplicationInstalled ( projectData . projectId ) ) ) {
439439 return true ;
440440 }
441441
442442 const platformData = this . $platformsData . getPlatformData ( platform , projectData ) ;
443443 const deviceBuildInfo : IBuildInfo = await this . getDeviceBuildInfo ( device , projectData ) ;
444- const localBuildInfo = this . getBuildInfo ( platform , platformData , { buildForDevice : ! device . isEmulator , release : false } , outputPath ) ;
444+ const localBuildInfo = this . getBuildInfo ( platform , platformData , { buildForDevice : ! device . isEmulator , release : isRelease . release } , outputPath ) ;
445445 return ! localBuildInfo || ! deviceBuildInfo || deviceBuildInfo . buildTime !== localBuildInfo . buildTime ;
446446 }
447447
@@ -517,7 +517,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
517517 this . $logger . out ( "Skipping package build. No changes detected on the native side. This will be fast!" ) ;
518518 }
519519
520- if ( deployInfo . deployOptions . forceInstall || shouldBuild || ( await this . shouldInstall ( device , deployInfo . projectData , buildConfig . release ) ) ) {
520+ if ( deployInfo . deployOptions . forceInstall || shouldBuild || ( await this . shouldInstall ( device , deployInfo . projectData , buildConfig ) ) ) {
521521 await this . installApplication ( device , buildConfig , deployInfo . projectData ) ;
522522 } else {
523523 this . $logger . out ( "Skipping install." ) ;
@@ -552,12 +552,12 @@ export class PlatformService extends EventEmitter implements IPlatformService {
552552 await this . $devicesService . execute ( action , this . getCanExecuteAction ( platform , runOptions ) ) ;
553553 }
554554
555- private getBuildOutputPath ( platform : string , platformData : IPlatformData , options : IBuildForDevice ) : string {
555+ private getBuildOutputPath ( platform : string , platformData : IPlatformData , options : IShouldInstall ) : string {
556556 if ( platform . toLowerCase ( ) === this . $devicePlatformsConstants . iOS . toLowerCase ( ) ) {
557- return options . buildForDevice ? platformData . deviceBuildOutputPath ( options ) : platformData . emulatorBuildOutputPath ;
557+ return options . buildForDevice ? platformData . getDeviceBuildOutputPath ( options ) : platformData . emulatorBuildOutputPath ;
558558 }
559559
560- return platformData . deviceBuildOutputPath ( options ) ;
560+ return platformData . getDeviceBuildOutputPath ( options ) ;
561561 }
562562
563563 private async getDeviceBuildInfoFilePath ( device : Mobile . IDevice , projectData : IProjectData ) : Promise < string > {
@@ -577,7 +577,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
577577 }
578578 }
579579
580- private getBuildInfo ( platform : string , platformData : IPlatformData , options : IBuildForDevice , buildOutputPath ?: string ) : IBuildInfo {
580+ private getBuildInfo ( platform : string , platformData : IPlatformData , options : IShouldInstall , buildOutputPath ?: string ) : IBuildInfo {
581581 buildOutputPath = buildOutputPath || this . getBuildOutputPath ( platform , platformData , options ) ;
582582 const buildInfoFile = path . join ( buildOutputPath , buildInfoFileName ) ;
583583 if ( this . $fs . exists ( buildInfoFile ) ) {
@@ -767,11 +767,11 @@ export class PlatformService extends EventEmitter implements IPlatformService {
767767 }
768768
769769 public getLatestApplicationPackageForDevice ( platformData : IPlatformData , buildConfig : IBuildConfig , outputPath ?: string ) : IApplicationPackage {
770- return this . getLatestApplicationPackage ( outputPath || platformData . deviceBuildOutputPath ( buildConfig ) , platformData . getValidPackageNames ( { isForDevice : true , isReleaseBuild : buildConfig . release } ) ) ;
770+ return this . getLatestApplicationPackage ( outputPath || platformData . getDeviceBuildOutputPath ( buildConfig ) , platformData . getValidPackageNames ( { isForDevice : true , isReleaseBuild : buildConfig . release } ) ) ;
771771 }
772772
773773 public getLatestApplicationPackageForEmulator ( platformData : IPlatformData , buildConfig : IBuildConfig , outputPath ?: string ) : IApplicationPackage {
774- return this . getLatestApplicationPackage ( outputPath || platformData . emulatorBuildOutputPath || platformData . deviceBuildOutputPath ( buildConfig ) , platformData . getValidPackageNames ( { isForDevice : false , isReleaseBuild : buildConfig . release } ) ) ;
774+ return this . getLatestApplicationPackage ( outputPath || platformData . emulatorBuildOutputPath || platformData . getDeviceBuildOutputPath ( buildConfig ) , platformData . getValidPackageNames ( { isForDevice : false , isReleaseBuild : buildConfig . release } ) ) ;
775775 }
776776
777777 private async updatePlatform ( platform : string , version : string , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions ) : Promise < void > {
0 commit comments