mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Workaround Phonegap's inability to distinguish when to rebuild the apk
This commit is contained in:
@@ -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(/<application /g, '<application android:debuggable="' + !!options.debug + '" ');
|
||||
fs.writeFileSync(manifestPath, manifest, 'utf8');
|
||||
|
||||
// XXX workaround the problem of cached apk invalidation
|
||||
files.rm_recursive(path.join(androidBuildPath, 'ant-build'));
|
||||
}
|
||||
|
||||
if (! options.debug) {
|
||||
|
||||
Reference in New Issue
Block a user