Adds a ResourceMerger to the AndroidBuilder library.
authorXavier Ducrohet <xav@android.com>
Sat, 1 Dec 2012 01:58:29 +0000 (17:58 -0800)
committerXavier Ducrohet <xav@android.com>
Tue, 11 Dec 2012 00:39:27 +0000 (16:39 -0800)
commit3b49b176fcbfe1bbae0f63f769a39a3cb41c79ef
tree12b5ab771ec4bcbcdf2810a64373abe4fb09a5e5
parentec43c79dad9cae08f059a00b155b334f614a1e1c
Adds a ResourceMerger to the AndroidBuilder library.

This will allow us to manually merge various resource folders.

This supports having multiple non-overlay folders while detecting
duplicates, as well as applying overlays.

The merger then creates a single resource folder that can be
fed to aapt.

This merger should be incremental (not yet) and be as efficient as possible.

Change-Id: I9e9b32954668160f97ff12fa70cd6078386b51c6
26 files changed:
.gitignore
builder/prebuilts/common.jar
builder/prebuilts/layoutlib_api.jar [new file with mode: 0644]
builder/src/main/java/com/android/builder/resources/DuplicateResourceException.java [new file with mode: 0644]
builder/src/main/java/com/android/builder/resources/Resource.java [new file with mode: 0644]
builder/src/main/java/com/android/builder/resources/ResourceFile.java [new file with mode: 0644]
builder/src/main/java/com/android/builder/resources/ResourceMerger.java [new file with mode: 0644]
builder/src/main/java/com/android/builder/resources/ResourceSet.java [new file with mode: 0644]
builder/src/main/java/com/android/builder/resources/ValueResourceParser.java [new file with mode: 0644]
builder/src/test/java/com/android/builder/resources/BaseTestCase.java [new file with mode: 0644]
builder/src/test/java/com/android/builder/resources/ResourceMergerTest.java [new file with mode: 0644]
builder/src/test/java/com/android/builder/resources/ResourceSetTest.java [new file with mode: 0644]
builder/src/test/java/com/android/builder/resources/ValueResourceParserTest.java [new file with mode: 0644]
builder/src/test/resources/testData/baseMerge/overlay/drawable-ldpi/icon.png [new file with mode: 0644]
builder/src/test/resources/testData/baseMerge/overlay/drawable/icon2.png [new file with mode: 0644]
builder/src/test/resources/testData/baseMerge/overlay/layout/alias_replaced_by_file.xml [new file with mode: 0644]
builder/src/test/resources/testData/baseMerge/overlay/layout/main.xml [new file with mode: 0644]
builder/src/test/resources/testData/baseMerge/overlay/values/values.xml [new file with mode: 0644]
builder/src/test/resources/testData/baseResourceSet/drawable/icon.png [new file with mode: 0644]
builder/src/test/resources/testData/baseResourceSet/drawable/patch.9.png [new file with mode: 0644]
builder/src/test/resources/testData/baseResourceSet/layout/file_replaced_by_alias.xml [new file with mode: 0644]
builder/src/test/resources/testData/baseResourceSet/layout/main.xml [new file with mode: 0644]
builder/src/test/resources/testData/baseResourceSet/raw/foo.dat [new file with mode: 0644]
builder/src/test/resources/testData/baseResourceSet/values/values.xml [new file with mode: 0644]
builder/src/test/resources/testData/dupResourceSet/res1/drawable/icon.png [new file with mode: 0644]
builder/src/test/resources/testData/dupResourceSet/res2/drawable/icon.png [new file with mode: 0644]