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-25964] Merge AndroidManifest.xml of Android Libraries #10002

Merged
merged 2 commits into from
May 11, 2018
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
13 changes: 13 additions & 0 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3876,6 +3876,19 @@ AndroidBuilder.prototype.generateAndroidManifest = function generateAndroidManif
}
}, this);

this.androidLibraries.forEach(libraryInfo => {
const libraryManifestPath = path.join(libraryInfo.explodedPath, 'AndroidManifest.xml');
if (fs.existsSync(libraryManifestPath)) {
const libraryManifest = new AndroidManifest();
libraryManifest.load(libraryManifestPath);
// we don't want android libraries to override the <supports-screens> or <uses-sdk> tags
delete libraryManifest.__attr__;
delete libraryManifest['supports-screens'];
delete libraryManifest['uses-sdk'];
finalAndroidManifest.merge(libraryManifest);
}
});

// if the target sdk is Android 3.2 or newer, then we need to add 'screenSize' to
// the default AndroidManifest.xml's 'configChanges' attribute for all <activity>
// elements, otherwise changes in orientation will cause the app to restart
Expand Down