summaryrefslogtreecommitdiffstats
path: root/tools/aapt2
Commit message (Collapse)AuthorAgeFilesLines
* Add bound checks to utf16_to_utf8Sergio Giro2016-07-211-1/+3
| | | | | | | Test: ran libaapt2_tests64 Bug: 29250543 Change-Id: I1ebc017af623b6514cf0c493e8cd8e1d59ea26c3 (cherry picked from commit 4781057e78f63e0e99af109cebf3b6a78f4bfbb6)
* AAPT2: Remove the need for specifying package name in compile phaseAdam Lesinski2015-06-127-62/+74
| | | | | | | | | | | | The compile phase doesn't use the AndroidManifest, so we had to specify the package name on the command line. We can omit the package name, since we don't resolve external references in the compile phase. Packages that reference the current package will be encoded with no package name. When loaded by the link phase, the package name will be supplied and all the references with no package name will use that one. Change-Id: I9fe4902b747b06899b45c968f30ba1aa05c5cd69
* AAPT2: Proguard rules generation added.Adam Lesinski2015-06-0911-6/+458
| | | | Change-Id: Ifbe79516cd9a1ade471e211a259301c63b62ac67
* AAPT2: Add manifest mergingAdam Lesinski2015-06-046-16/+599
| | | | | | | | Now that AAPT2 is library-aware, it needs to take care of all library related work, including merging manifests. The logic was taken from the current Java ManifestMerger. Change-Id: Id93f713f27ae8617922bf89e325e45be9f863c06
* AAPT2: Change xml file parsing to DOM basedAdam Lesinski2015-06-0412-830/+1272
| | | | | | | | We modify the XML of layouts and AndroidManifest enough that it warrants we operate on the tree in memory. These files are never very large so this should be fine. Change-Id: I5d597abdb3fca2a203cf7c0b40fcd926aecb3137
* AAPT2: Fix layout versioningAdam Lesinski2015-05-142-14/+58
| | | | Change-Id: I37190cf8a1f0a81c068aeb2b5326b3b3080f75a5
* AAPT2: Fix issue where @null was wrongly encodedAdam Lesinski2015-05-123-9/+34
| | | | | | | | | | @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
* AAPT2: Debug: Dump only targetted styleAdam Lesinski2015-05-125-27/+79
| | | | Change-Id: Id7c5a4b5d0880520e1fea05e5a31d398946c5f05
* AAPT2: inferred style parent processingAdam Lesinski2015-05-128-19/+48
| | | | Change-Id: I8fbc4feef16b6039cf4c526fcfb767dc75a9c131
* AAPT2: Support static lib referencing static libAdam Lesinski2015-05-1220-457/+751
| | | | | | | | | | | | When a static library A references static library B, and app C references both A and B, we get the following symbol merging, symbols from library B get imported twice. We must only check that symbol references to library B are valid when building library A. We should only merge all the symbols when building final app C. Change-Id: I23cba33b0901dcbb5328d9c9dfaa6a979c073c36
* Merge changes from topic 'mwd-merge-050415' into mnc-devPrerepa Viswanadham2015-05-051-1/+2
|\ | | | | | | | | | | | | | | | | | | | | * changes: Merge commit 'b6f59f4' into master_merge Merge commit 'f6db0ce' into master_merge Merge commit '17455a3' into master_merge Merge commit 'b4d5b32' into master_merge Merge commit 'a1a2fa7' into master_merge Merge commit '8dfdb98' into master_merge Merge commit 'eba66c3' into master_merge
| * Add a libbase static depedency for aapt2.Narayan Kamath2015-04-291-1/+2
| | | | | | | | | | | | Required by libziparchive. Change-Id: Ifa33c9e44ebd583cf58b8a1239061c613fde92bc
* | AAPT2: Add option to generate static libraryAdam Lesinski2015-05-042-3/+25
| | | | | | | | | | | | | | | | Difference between normal app and static library is that the R file uses non-final fields, and the extra chunks added by AAPT2 remain in the final APK. Change-Id: I61416387ca9bb3c21857ff7cfab5847ac3edf57a
* | AAPT2: Include package name of attributes in styleable from another packageAdam Lesinski2015-05-047-69/+143
| | | | | | | | Change-Id: I44f902e297238e7ee4ae27c02aaaf9e148652d2a
* | AAPT2: Record public status in a more robust wayAdam Lesinski2015-05-0410-83/+148
| | | | | | | | | | | | | | | | | | This allows us to store the source and comments of a resource's public declaration and avoids issues where there is no default configuration for a publicly declared resource (like with drawables of various densities) and AAPT2 mistakenly took this as an error. Change-Id: I07a2fe9f551daefcce842f205fb219d2fa453ebc
* | Add namespace handling in attribute valuesAdam Lesinski2015-05-0442-438/+1063
|/ | | | | | | | | | | | | | | | | | 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
* Properly mangle file namesAdam Lesinski2015-04-2212-183/+280
| | | | Change-Id: I49c0f82e8c06f056198eb64b8369d83403b74321
* Fix up the command line, add flags.Adam Lesinski2015-04-153-14/+34
| | | | Change-Id: I420bd0212fc7541668bd095b88295564d3d11f6c
* AAPT2: Add library supportAdam Lesinski2015-04-1545-729/+4178
| | | | Change-Id: I307f56d9631784ab29ee4156d94886f9b2f25b30
* AAPT2: Create MakefileAdam Lesinski2015-04-102-4/+122
| | | | | | | | | | Makefile that uses zip for assembling the final APK. This is temporary and helps speed up the rest of development. Has to add a new 'manifest' phase that simply compiles the AndroidManifest.xml. Manifests are handled differently and must be validated. Change-Id: I0d8255b3ad0d0b0a322683077e3331ca93e37fa0
* AAPT2: Adding basic binding supportAdam Lesinski2015-04-1012-21/+540
| | | | | | | | | | This is incomplete. Still requires: - filling in layout information in the resulting .bind.xml - processing elements with <view class=""/> - processing imports Change-Id: Ie5d4c5e6435591bbed3248129a548736244894eb
* Add PNG and 9-patch supportAdam Lesinski2015-04-098-719/+1792
| | | | Change-Id: I9ecdfdf82b82d59084490da518e167e256afd5f2
* AAPT2 statically link libz on Windows buildsAdam Lesinski2015-04-031-1/+7
| | | | Change-Id: I2abf47273173c470c04e00a54aa619fe1ce0e745
* Fix windows build of AAPT2Adam Lesinski2015-04-0317-76/+76
| | | | Change-Id: Ib8e1a4322510b582e9600a08d3118842c9abc73c
* aapt2: fix definition of G in Util.hGreg Hackmann2015-04-021-1/+1
| | | | | Change-Id: Icbefa425cf543f130deabab9e2e2e6c13ab672d3 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* AAPT2Adam Lesinski2015-04-0286-0/+16143
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