10 Commits

Author SHA1 Message Date
Adam Lesinski
6d8e4c48f9 AAPT2: Add option to generate static library
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
2015-05-04 16:43:24 -07:00
Adam Lesinski
24aad163bc Add namespace handling in attribute values
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-05-04 16:43:24 -07:00
Adam Lesinski
d5c4f8723c Properly mangle file names
Change-Id: I49c0f82e8c06f056198eb64b8369d83403b74321
2015-04-22 17:34:55 -07:00
Adam Lesinski
5886a92eb6 Fix up the command line, add flags.
Change-Id: I420bd0212fc7541668bd095b88295564d3d11f6c
2015-04-15 20:29:48 -07:00
Adam Lesinski
769de98f2d AAPT2: Add library support
Change-Id: I307f56d9631784ab29ee4156d94886f9b2f25b30
2015-04-15 19:56:59 -07:00
Adam Lesinski
c7e2432dec AAPT2: Create Makefile
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
2015-04-10 19:07:51 -07:00
Adam Lesinski
4d3a987694 AAPT2: Adding basic binding support
This is incomplete. Still requires:

- filling in layout information in the resulting .bind.xml
- processing elements with <view class=""/>
- processing imports

Change-Id: Ie5d4c5e6435591bbed3248129a548736244894eb
2015-04-10 15:25:39 -07:00
Adam Lesinski
98aa3ad6e4 Add PNG and 9-patch support
Change-Id: I9ecdfdf82b82d59084490da518e167e256afd5f2
2015-04-09 17:19:06 -07:00
Adam Lesinski
ca2fc353c2 Fix windows build of AAPT2
Change-Id: Ib8e1a4322510b582e9600a08d3118842c9abc73c
2015-04-03 12:33:02 -07:00
Adam Lesinski
6f6ceb7e14 AAPT2
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
2015-04-02 17:02:48 -07:00