@@ -130,7 +130,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
130130 }
131131
132132 public async validate ( projectData : IProjectData ) : Promise < void > {
133- this . validatePackageName ( projectData . projectId ) ;
133+ this . validatePackageName ( projectData . projectIdentifiers . android ) ;
134134 this . validateProjectName ( projectData . projectName ) ;
135135
136136 await this . $platformEnvironmentRequirements . checkEnvironmentRequirements ( this . getPlatformData ( projectData ) . normalizedPlatformName ) ;
@@ -256,15 +256,16 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
256256
257257 try {
258258 // will replace applicationId in app/App_Resources/Android/app.gradle if it has not been edited by the user
259- shell . sed ( '-i' , / _ _ P A C K A G E _ _ / , projectData . projectId , projectData . appGradlePath ) ;
259+ //TODO: For compatibility with old templates. Once all templates are updated should delete.
260+ shell . sed ( '-i' , / _ _ P A C K A G E _ _ / , projectData . projectIdentifiers . android , projectData . appGradlePath ) ;
260261 } catch ( e ) {
261- this . $logger . warn ( `\n ${ e } .\nCheck if you're using an outdated template and update it .`) ;
262+ this . $logger . trace ( `Templates updated and no need for replace in app.gradle .`) ;
262263 }
263264 }
264265
265266 public interpolateConfigurationFile ( projectData : IProjectData , platformSpecificData : IPlatformSpecificData ) : void {
266267 const manifestPath = this . getPlatformData ( projectData ) . configurationFilePath ;
267- shell . sed ( '-i' , / _ _ P A C K A G E _ _ / , projectData . projectId , manifestPath ) ;
268+ shell . sed ( '-i' , / _ _ P A C K A G E _ _ / , projectData . projectIdentifiers . android , manifestPath ) ;
268269 if ( this . $androidToolsInfo . getToolsInfo ( ) . androidHomeEnvVar ) {
269270 const sdk = ( platformSpecificData && platformSpecificData . sdk ) || ( this . $androidToolsInfo . getToolsInfo ( ) . compileSdkVersion || "" ) . toString ( ) ;
270271 shell . sed ( '-i' , / _ _ A P I L E V E L _ _ / , sdk , manifestPath ) ;
@@ -273,8 +274,8 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
273274
274275 private getProjectNameFromId ( projectData : IProjectData ) : string {
275276 let id : string ;
276- if ( projectData && projectData . projectId ) {
277- const idParts = projectData . projectId . split ( "." ) ;
277+ if ( projectData && projectData . projectIdentifiers && projectData . projectIdentifiers . android ) {
278+ const idParts = projectData . projectIdentifiers . android . split ( "." ) ;
278279 id = idParts [ idParts . length - 1 ] ;
279280 }
280281
@@ -511,7 +512,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
511512 const filesForInterpolation = this . $fs . enumerateFilesInDirectorySync ( resourcesDestinationDirectoryPath , file => this . $fs . getFsStats ( file ) . isDirectory ( ) || path . extname ( file ) === constants . XML_FILE_EXTENSION ) || [ ] ;
512513 for ( const file of filesForInterpolation ) {
513514 this . $logger . trace ( `Interpolate data for plugin file: ${ file } ` ) ;
514- await this . $pluginVariablesService . interpolate ( pluginData , file , projectData ) ;
515+ await this . $pluginVariablesService . interpolate ( pluginData , file , projectData . projectDir , projectData . projectIdentifiers . android ) ;
515516 }
516517 }
517518
@@ -618,7 +619,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
618619
619620 public async cleanDeviceTempFolder ( deviceIdentifier : string , projectData : IProjectData ) : Promise < void > {
620621 const adb = this . $injector . resolve ( DeviceAndroidDebugBridge , { identifier : deviceIdentifier } ) ;
621- const deviceRootPath = `/data/local/tmp/${ projectData . projectId } ` ;
622+ const deviceRootPath = `/data/local/tmp/${ projectData . projectIdentifiers . android } ` ;
622623 await adb . executeShellCommand ( [ "rm" , "-rf" , deviceRootPath ] ) ;
623624 }
624625
0 commit comments