Fixed manifest merging when activity-alias are used.

Summary:
If `activity-alias` is used in application's AndroidManifest.xml and
activity mentioned in 'android:targetActivity' comes from library
manifest, application will fail to install.

The reason for this is that `activity-alias` requires target activity
to be declared before `activity-alias` element. Since we always merge
stuff from libraries at the end we always would get activity
from library be after `activity-alias` in the app.

This diff fixes this issues by introducing "normalization" step
after all libraries' elements were merged into main manifest. This
step simply moves all `activity-alias` elements to the very end
of `application` element.

This is fine since none of the other elements in manifest are order
sensitive.
4 files changed
tree: 43f0cb7fee915d71b031a160d7f09a3547522e2d
  1. .idea/
  2. bin/
  3. config/
  4. docs/
  5. lib/
  6. plugin/
  7. pmd/
  8. scripts/
  9. src/
  10. test/
  11. testdata/
  12. third-party/
  13. .buckconfig
  14. .classpath
  15. .gitignore
  16. .project
  17. buck.iml
  18. build.xml
  19. DEFS
  20. LICENSE
  21. README.md
README.md

Buck

Buck is an Android build tool. To see what Buck can do for you, check out the documentation at http://facebook.github.io/buck/.

Installation

To build Buck, run the following:

git clone git@github.com:facebook/buck.git
cd buck
ant
./bin/buck --help

License

Apache License 2.0