Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIMOB-16088-3_2_X: Only skip android manifest merge if a custom manifest exists #5186

Merged
merged 1 commit into from
Jan 6, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,13 @@ AndroidBuilder.prototype.checkIfShouldForceRebuild = function checkIfShouldForce
return true;
}

if (this.config.get('android.mergeCustomAndroidManifest', false) != manifest.mergeCustomAndroidManifest) {
this.logger.info(__('Forcing rebuild: mergeCustomAndroidManifest config has changed since last build'));
this.logger.info(' ' + __('Was: %s', manifest.mergeCustomAndroidManifest));
this.logger.info(' ' + __('Now: %s', this.config.get('android.mergeCustomAndroidManifest', false)));
return true;
}

return false;
};

Expand Down Expand Up @@ -3314,7 +3321,7 @@ AndroidBuilder.prototype.generateAndroidManifest = function generateAndroidManif
tiappAndroidManifest = this.tiappAndroidManifest;

// if they are using a custom AndroidManifest and merging is disabled, then write the custom one as is
if (!this.config.get('android.mergeCustomAndroidManifest', false)) {
if (!this.config.get('android.mergeCustomAndroidManifest', false) && this.customAndroidManifest) {
(this.cli.createHook('build.android.writeAndroidManifest', this, function (file, xml, done) {
this.logger.info(__('Writing unmerged custom AndroidManifest.xml'));
fs.writeFileSync(file, xml.toString('xml'));
Expand Down Expand Up @@ -3989,6 +3996,7 @@ AndroidBuilder.prototype.writeBuildManifest = function writeBuildManifest(callba
fullscreen: this.tiapp.fullscreen,
'navbar-hidden': this.tiapp['navbar-hidden'],
skipJSMinification: !!this.cli.argv['skip-js-minify'],
mergeCustomAndroidManifest: this.config.get('android.mergeCustomAndroidManifest', false),
encryptJS: this.encryptJS,
minSDK: this.minSDK,
targetSDK: this.targetSDK,
Expand Down