[TIMOB-23872] Enable android.mergeCustomAndroidManifest by default
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-09-07T03:31:55.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 6.0.0 |
| Components | Android, Tooling |
| Labels | cb-tooling |
| Reporter | Chris Barber |
| Assignee | Chris Barber |
| Created | 2016-09-06T22:16:14.000+0000 |
| Updated | 2016-09-09T22:35:48.000+0000 |
Description
When the Android build was rewritten for Node.js, a flaw was purposely ported from the old Python code. For iOS,
<plist> overrides a custom Info.plist and a custom Info.plist overrides the default Info.plst. However with Android, if a custom AndroidManifest.xml is present, the <manifest> section of the tiapp.xml does NOT override the custom AndroidManifest.xml by default. To enable this behavior, you must set ti config android.mergeCustomAndroidManifest true.
We should set this flag to true so that Android's behavior is in parity with iOS.
Ti SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8320 Ti SDK 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8321
To test:
Create a new Titanium app
Create
platform/androidin the project dirBuild the app for Android... you can do a build-only build
Copy
build/android/AndroidManifest.xmlintoplatform/androidEdit the
tiapp.xmland set the following in the<android>section:Build the app again and verify that the
* Before the fix, it will not merge theminSdkVersionin thebuild/android/AndroidManifest.xmlis correctminSdkVersionunless the Titanium CLI config containsandroid.mergeCustomAndroidManifestis set totrue* After the fix, it will always override the customAndroidManifest.xmljust like theInfo.plistfor iOSCR and FT passed. PRs merged.
Verified the fix. The
AndroidManifest.xmlgets overidden bytiapp.xmlsuccessfully. Closing. Environment: Appc Studio : 4.8.0.201609061702 Ti SDK : 6.0.0.v20160909001132 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.6 Appc NPM : 4.2.8-6 Appc CLI : 6.0.0-38 Node: 4.4.4 Nexus 6 - Android 6.0.1