@@ -332,7 +332,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
332
332
333
333
const platformData = this . $platformsData . getPlatformData ( platform , projectData ) ;
334
334
const forDevice = ! buildConfig || buildConfig . buildForDevice ;
335
- outputPath = outputPath || ( forDevice ? platformData . deviceBuildOutputPath ( buildConfig ) : platformData . emulatorBuildOutputPath || platformData . deviceBuildOutputPath ( buildConfig ) ) ;
335
+ outputPath = outputPath || ( forDevice ? platformData . getDeviceBuildOutputPath ( buildConfig ) : platformData . emulatorBuildOutputPath || platformData . getDeviceBuildOutputPath ( buildConfig ) ) ;
336
336
if ( ! this . $fs . exists ( outputPath ) ) {
337
337
return true ;
338
338
}
@@ -431,15 +431,15 @@ export class PlatformService extends EventEmitter implements IPlatformService {
431
431
this . $fs . writeJson ( buildInfoFile , buildInfo ) ;
432
432
}
433
433
434
- public async shouldInstall ( device : Mobile . IDevice , projectData : IProjectData , release : boolean , outputPath ?: string ) : Promise < boolean > {
434
+ public async shouldInstall ( device : Mobile . IDevice , projectData : IProjectData , isRelease : IRelease , outputPath ?: string ) : Promise < boolean > {
435
435
const platform = device . deviceInfo . platform ;
436
436
if ( ! ( await device . applicationManager . isApplicationInstalled ( projectData . projectId ) ) ) {
437
437
return true ;
438
438
}
439
439
440
440
const platformData = this . $platformsData . getPlatformData ( platform , projectData ) ;
441
441
const deviceBuildInfo : IBuildInfo = await this . getDeviceBuildInfo ( device , projectData ) ;
442
- const localBuildInfo = this . getBuildInfo ( platform , platformData , { buildForDevice : ! device . isEmulator , release : false } , outputPath ) ;
442
+ const localBuildInfo = this . getBuildInfo ( platform , platformData , { buildForDevice : ! device . isEmulator , release : isRelease . release } , outputPath ) ;
443
443
return ! localBuildInfo || ! deviceBuildInfo || deviceBuildInfo . buildTime !== localBuildInfo . buildTime ;
444
444
}
445
445
@@ -512,7 +512,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
512
512
this . $logger . out ( "Skipping package build. No changes detected on the native side. This will be fast!" ) ;
513
513
}
514
514
515
- if ( deployInfo . deployOptions . forceInstall || shouldBuild || ( await this . shouldInstall ( device , deployInfo . projectData , buildConfig . release ) ) ) {
515
+ if ( deployInfo . deployOptions . forceInstall || shouldBuild || ( await this . shouldInstall ( device , deployInfo . projectData , buildConfig ) ) ) {
516
516
await this . installApplication ( device , buildConfig , deployInfo . projectData ) ;
517
517
} else {
518
518
this . $logger . out ( "Skipping install." ) ;
@@ -547,12 +547,12 @@ export class PlatformService extends EventEmitter implements IPlatformService {
547
547
await this . $devicesService . execute ( action , this . getCanExecuteAction ( platform , runOptions ) ) ;
548
548
}
549
549
550
- private getBuildOutputPath ( platform : string , platformData : IPlatformData , options : IBuildForDevice ) : string {
550
+ private getBuildOutputPath ( platform : string , platformData : IPlatformData , options : IShouldInstall ) : string {
551
551
if ( platform . toLowerCase ( ) === this . $devicePlatformsConstants . iOS . toLowerCase ( ) ) {
552
- return options . buildForDevice ? platformData . deviceBuildOutputPath ( options ) : platformData . emulatorBuildOutputPath ;
552
+ return options . buildForDevice ? platformData . getDeviceBuildOutputPath ( options ) : platformData . emulatorBuildOutputPath ;
553
553
}
554
554
555
- return platformData . deviceBuildOutputPath ( options ) ;
555
+ return platformData . getDeviceBuildOutputPath ( options ) ;
556
556
}
557
557
558
558
private async getDeviceBuildInfoFilePath ( device : Mobile . IDevice , projectData : IProjectData ) : Promise < string > {
@@ -572,7 +572,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
572
572
}
573
573
}
574
574
575
- private getBuildInfo ( platform : string , platformData : IPlatformData , options : IBuildForDevice , buildOutputPath ?: string ) : IBuildInfo {
575
+ private getBuildInfo ( platform : string , platformData : IPlatformData , options : IShouldInstall , buildOutputPath ?: string ) : IBuildInfo {
576
576
buildOutputPath = buildOutputPath || this . getBuildOutputPath ( platform , platformData , options ) ;
577
577
const buildInfoFile = path . join ( buildOutputPath , buildInfoFileName ) ;
578
578
if ( this . $fs . exists ( buildInfoFile ) ) {
@@ -762,11 +762,11 @@ export class PlatformService extends EventEmitter implements IPlatformService {
762
762
}
763
763
764
764
public getLatestApplicationPackageForDevice ( platformData : IPlatformData , buildConfig : IBuildConfig , outputPath ?: string ) : IApplicationPackage {
765
- return this . getLatestApplicationPackage ( outputPath || platformData . deviceBuildOutputPath ( buildConfig ) , platformData . getValidPackageNames ( { isForDevice : true , isReleaseBuild : buildConfig . release } ) ) ;
765
+ return this . getLatestApplicationPackage ( outputPath || platformData . getDeviceBuildOutputPath ( buildConfig ) , platformData . getValidPackageNames ( { isForDevice : true , isReleaseBuild : buildConfig . release } ) ) ;
766
766
}
767
767
768
768
public getLatestApplicationPackageForEmulator ( platformData : IPlatformData , buildConfig : IBuildConfig , outputPath ?: string ) : IApplicationPackage {
769
- return this . getLatestApplicationPackage ( outputPath || platformData . emulatorBuildOutputPath || platformData . deviceBuildOutputPath ( buildConfig ) , platformData . getValidPackageNames ( { isForDevice : false , isReleaseBuild : buildConfig . release } ) ) ;
769
+ return this . getLatestApplicationPackage ( outputPath || platformData . emulatorBuildOutputPath || platformData . getDeviceBuildOutputPath ( buildConfig ) , platformData . getValidPackageNames ( { isForDevice : false , isReleaseBuild : buildConfig . release } ) ) ;
770
770
}
771
771
772
772
private async updatePlatform ( platform : string , version : string , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions ) : Promise < void > {
0 commit comments