summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceParser_test.cpp
AgeCommit message (Collapse)Author
2016-01-06AAPT2: Fix product supportAdam Lesinski
Previously the default product wasn't tried if 'default' wasn't specified on the command line. Also adds support for multiple products. Change-Id: I1e4872b34bb8d609b6444841a4e7e4dbb3bbb76b
2015-12-17AAPT2: Fix references to private parentAdam Lesinski
Change-Id: Id4697551b6c8cb6167f562de593006ae3c6158c0
2015-12-17AAPT2: Respect format attribute of <item> tagAdam Lesinski
An <item> is a general tag that can override certain behavior. For instance, this is allowed: <item name="foo" type="integer" format="float">0.4</item> Even though without the format attribute, this would be illegal. Change-Id: I8133ce59e14719a70d7476a1464c3f564c435289
2015-12-10AAPT2: Fix overlay supportAdam Lesinski
Supports the <add-resource> tag and mimics old AAPT behavior of not allowing new resources defined unless <add-resource> was used or --auto-add-overlay was specified. Change-Id: I9b461137357617ade37fd7045b418b8e6450b9c4
2015-11-23AAPT2: Verify min/max attr fieldsAdam Lesinski
Integers are now checked to see if they fall in the range of min/max for the attribute they are assigned. Change-Id: I42c435b15fd3f0bd23691c83efccce4ad5973276
2015-11-19AAPT2: Fail compiling when private symbols are referencedAdam Lesinski
Also moved some XML specific stuff into its own directory, and refactored ReferenceLinker a bit. Change-Id: I912247a82023c1bbf72dc191fbdaf62858cbec0c
2015-11-07AAPT2: Accept aliases defined for external resource typesAdam Lesinski
Resource types that are typically stored outside of the resource table (like layout, xml, drawable) can only have aliases (reference to another resource). Change-Id: Idb768801f02bb142e5be5e438904f221499bd756
2015-11-06AAPT2: Add support for clearer in-progress public attributesAdam Lesinski
Before, the ID assigned to a public resource without an explicitly set id was more difficult to figure out. It would be the next available ID. AAPT2 introduces a new way to specify public attributes in progress. <public-group type="attr" first-id="0x0101047f"> <public name="foo" /> <public name="bar" /> ... </public-group> The IDs assigned to each resource is auto-incremented starting from `first-id`. This also keeps resource's with the same type grouped together so that the auto-incrementing nature is evident. Also, due to how AAPT2 was implemented, this is required :P Change-Id: I95ea92ad0405e87ed0b1766879bb2f1d9d0b636e
2015-11-05AAPT2: Fix small issue with detecting translatable resourcesAdam Lesinski
Change-Id: Idd21b5de4d20be06c6f8c8eb5a22ccd68afc4927
2015-10-30AAPT2: Support generating Manifest.javaAdam Lesinski
This includes comments from AndroidManifest.xml. Change-Id: I412d9ecb12bad20a49a683d6b3bea4a0be1235ae
2015-10-22AAPT2: Move comments and source into ValueAdam Lesinski
Values are closely related to where they were defined, so this information should live inside the Value. This also enables comments to be attached to nested Values. Change-Id: Ic7481b5a5f26d0ef248d638e2e29252f88154581
2015-10-16Filter products during compile phaseAdam Lesinski
Unfortunately there is no good way to deal with products in the link phase. Products are like preprocessor defines in that they are processed early and change the composition of the compiled unit. Change-Id: I6d5e15ef60d29df8e83e059ba857c09333993779
2015-10-16AAPT2: Separate out the various stepsAdam Lesinski
An early refactor. Some ideas became clearer as development continued. Now the various phases are much clearer and more easily reusable. Also added a ton of tests! Change-Id: Ic8f0a70c8222370352e63533b329c40457c0903e
2015-05-12AAPT2: Fix issue where @null was wrongly encodedAdam Lesinski
@null must be encoded as TYPE_REFERENCE with a value of 0. TYPE_NULL is used by the runtime as a placeholder when resolving style attributes. If we set a style attribute to TYPE_NULL, the runtime will throw. The runtime will convert a TYPE_REFERENCE with value 0 to a proper null value. Change-Id: Id983ca7e1fbee3124dddafe32f1b5741b824225b
2015-05-12AAPT2: inferred style parent processingAdam Lesinski
Change-Id: I8fbc4feef16b6039cf4c526fcfb767dc75a9c131
2015-05-04Add namespace handling in attribute valuesAdam Lesinski
Previously, you could only reference namespace prefixes in attribute names: <View xmlns:appcompat="http://schemas.android.com/apk/res/android.support.v7.appcompat" appcompat:name="hey" ... Now you can also reference them in resource names within an attribute value: ... android:text="@appcompat:string/confirm" ... Which will be treated as "@android.support.v7.appcompat:string/confirm". Change-Id: Ib076e867a990c80cf877a704eb77cd1ef0b23b52
2015-04-15AAPT2: Add library supportAdam Lesinski
Change-Id: I307f56d9631784ab29ee4156d94886f9b2f25b30
2015-04-02AAPT2Adam Lesinski
First checking of AAPT2. The individual phases of AAPT2 work, but there are some missing pieces. For early testing we are missing: - Need to properly mark file references and include them in package - Need to package into zip Final AAPT for apps we are missing: - Need to crush PNGs - Need to parse 9-patches - Need to validate all of AndroidManifest.xml - Need to write align method to align resource tables for splits. Final AAPT for apps + system we are missing: - Need to handle overlays - Need to store comments for R file - Need to handle --shared-lib (dynamic references too). New AAPT features coming: - Need to import compiled libraries - Name mangling - R file generation for library code Change-Id: I95f8a63581b81a1f424ae6fb2c373c883b72c18d