@@ -131,7 +131,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
131
131
}
132
132
133
133
public async validate ( projectData : IProjectData ) : Promise < void > {
134
- this . validatePackageName ( projectData . projectId ) ;
134
+ this . validatePackageName ( projectData . projectIdentifiers . android ) ;
135
135
this . validateProjectName ( projectData . projectName ) ;
136
136
137
137
this . $androidToolsInfo . validateAndroidHomeEnvVariable ( { showWarningsAsErrors : true } ) ;
@@ -254,16 +254,17 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
254
254
// will replace applicationId in app/App_Resources/Android/app.gradle if it has not been edited by the user
255
255
const userAppGradleFilePath = path . join ( projectData . appResourcesDirectoryPath , this . $devicePlatformsConstants . Android , "app.gradle" ) ;
256
256
257
+ //TODO: kddimitrov: For compatability with old templates. Once all templates are updated should delete.
257
258
try {
258
- shell . sed ( '-i' , / _ _ P A C K A G E _ _ / , projectData . projectId , userAppGradleFilePath ) ;
259
+ shell . sed ( '-i' , / _ _ P A C K A G E _ _ / , projectData . projectIdentifiers . android , userAppGradleFilePath ) ;
259
260
} catch ( e ) {
260
- this . $logger . warn ( `\n ${ e } .\nCheck if you're using an outdated template and update it.` ) ;
261
+ // Ignore
261
262
}
262
263
}
263
264
264
265
public interpolateConfigurationFile ( projectData : IProjectData , platformSpecificData : IPlatformSpecificData ) : void {
265
266
const manifestPath = this . getPlatformData ( projectData ) . configurationFilePath ;
266
- shell . sed ( '-i' , / _ _ P A C K A G E _ _ / , projectData . projectId , manifestPath ) ;
267
+ shell . sed ( '-i' , / _ _ P A C K A G E _ _ / , projectData . projectIdentifiers . android , manifestPath ) ;
267
268
if ( this . $androidToolsInfo . getToolsInfo ( ) . androidHomeEnvVar ) {
268
269
const sdk = ( platformSpecificData && platformSpecificData . sdk ) || ( this . $androidToolsInfo . getToolsInfo ( ) . compileSdkVersion || "" ) . toString ( ) ;
269
270
shell . sed ( '-i' , / _ _ A P I L E V E L _ _ / , sdk , manifestPath ) ;
@@ -272,8 +273,8 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
272
273
273
274
private getProjectNameFromId ( projectData : IProjectData ) : string {
274
275
let id : string ;
275
- if ( projectData && projectData . projectId ) {
276
- const idParts = projectData . projectId . split ( "." ) ;
276
+ if ( projectData && projectData . projectIdentifiers && projectData . projectIdentifiers . android ) {
277
+ const idParts = projectData . projectIdentifiers . android . split ( "." ) ;
277
278
id = idParts [ idParts . length - 1 ] ;
278
279
}
279
280
@@ -427,7 +428,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
427
428
const filesForInterpolation = this . $fs . enumerateFilesInDirectorySync ( resourcesDestinationDirectoryPath , file => this . $fs . getFsStats ( file ) . isDirectory ( ) || path . extname ( file ) === constants . XML_FILE_EXTENSION ) || [ ] ;
428
429
for ( const file of filesForInterpolation ) {
429
430
this . $logger . trace ( `Interpolate data for plugin file: ${ file } ` ) ;
430
- await this . $pluginVariablesService . interpolate ( pluginData , file , projectData ) ;
431
+ await this . $pluginVariablesService . interpolate ( pluginData , file , projectData , projectData . projectIdentifiers . android ) ;
431
432
}
432
433
}
433
434
@@ -534,7 +535,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
534
535
535
536
public async cleanDeviceTempFolder ( deviceIdentifier : string , projectData : IProjectData ) : Promise < void > {
536
537
const adb = this . $injector . resolve ( DeviceAndroidDebugBridge , { identifier : deviceIdentifier } ) ;
537
- const deviceRootPath = `/data/local/tmp/${ projectData . projectId } ` ;
538
+ const deviceRootPath = `/data/local/tmp/${ projectData . projectIdentifiers . android } ` ;
538
539
await adb . executeShellCommand ( [ "rm" , "-rf" , deviceRootPath ] ) ;
539
540
}
540
541
0 commit comments