Skip to content

Commit d09930a

Browse files
committed
Touch app.gradle file only if __PACKAGE__ placeholder exists
1 parent 2faf235 commit d09930a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/services/android-project-service.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,10 @@ 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', /__PACKAGE__/, projectData.projectId, projectData.appGradlePath);
259+
const appGradleContent = this.$fs.readText(projectData.appGradlePath);
260+
if (appGradleContent.indexOf('__PACKAGE__') !== -1) {
261+
shell.sed('-i', /__PACKAGE__/, projectData.projectId, projectData.appGradlePath);
262+
}
260263
} catch (e) {
261264
this.$logger.warn(`\n${e}.\nCheck if you're using an outdated template and update it.`);
262265
}

0 commit comments

Comments
 (0)