From 08a0a599252d4bd5c33732bf4844039979bda950 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 01:13:10 -0700 Subject: [PATCH] Workaround Phonegap's inability to distinguish when to rebuild the apk --- tools/commands-cordova.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 91c443d26c..40ca46f321 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -797,13 +797,17 @@ var buildCordova = function (localPath, buildCommand, options) { // depending on the debug mode build the android part in different modes if (_.contains(project.getPlatforms(), 'android')) { - var manifestPath = - path.join(cordovaPath, 'platforms', 'android', 'AndroidManifest.xml'); + var androidBuildPath = path.join(cordovaPath, 'platforms', 'android'); + var manifestPath = path.join(androidBuildPath, 'AndroidManifest.xml'); + // XXX a hack to reset the debuggable mode var manifest = fs.readFileSync(manifestPath, 'utf8'); manifest = manifest.replace(/android:debuggable=.(true|false)./g, ''); manifest = manifest.replace(/