Skip to content

Commit

Permalink
[TIMOB-25964] Merge AndroidManifest.xml of Android Libraries (#10002)
Browse files Browse the repository at this point in the history
  • Loading branch information
janvennemann authored and hansemannn committed May 11, 2018
1 parent a4d5bc8 commit b7c6a36
Showing 1 changed file with 13 additions and 0 deletions.
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

0 comments on commit b7c6a36

Please sign in to comment.