Skip to content

Commit 23a738a

Browse files
committed
add interpolation for app.gradle applicationId value in android projects
1 parent 2c0d856 commit 23a738a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/services/android-project-service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
211211

212212
let gradleSettingsFilePath = path.join(this.platformData.projectRoot, "settings.gradle");
213213
shell.sed('-i', /__PROJECT_NAME__/, this.getProjectNameFromId(), gradleSettingsFilePath);
214+
215+
// will replace applicationId in app/App_Resources/Android/app.gradle if it has not been edited by the user
216+
let userAppGradleFilePath = path.join(this.$projectData.appResourcesDirectoryPath, this.$devicePlatformsConstants.Android, "app.gradle");
217+
shell.sed('-i', /__PACKAGE__/, this.$projectData.projectId, userAppGradleFilePath);
214218
}).future<void>()();
215219
}
216220

0 commit comments

Comments
 (0)