History log of /frameworks/base/tools/aapt2/link/Link.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c51562cf5acda7849a34c4ae2a88077c068859c0 28-Apr-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Accept a file with arguments when argument list is too long

Bug:22775504
Change-Id: Ife73d4e4611016c9ee7b56264bc6a765c54beba3
/frameworks/base/tools/aapt2/link/Link.cpp
3524a23edb88f0e67352d55ac6a2919f1edf7b30 02-Apr-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Add option to add JavaDoc annotations to Java classes

Change-Id: I7ee8c20cdd91380927a65c41097ffd3a6ffa2df5
/frameworks/base/tools/aapt2/link/Link.cpp
6cbfb1de493e42d937158ed57495c9656864ccba 31-Mar-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Change how we generate Java classes

Previously we would be writing out the Manifest.java file as we
processed the AndroidManifest.xml. This would lead to empty
Manifest classes if there were no permissions or permission groups
defined in the AndroidManifest.xml.

This would pose problems for processes that checked for public classes
and considered them part of the API (support lib).

Now we collect the structure of the Java class in memory before deciding
if a file should be created.

Change-Id: I6b909f28d74356414c6ef5ad005180d6ea5e44ca
/frameworks/base/tools/aapt2/link/Link.cpp
330c57dbd19a064d1f5a4adb3c8ed014711b473f 11-Mar-2016 Adam Lesinski <adamlesinski@google.com> Merge "AAPT2: Add descriptions of Attributes in Styleables for R.java" into nyc-dev
7656554f91b40bc93bf94c89afcad4a9a8ced884 11-Mar-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Add descriptions of Attributes in Styleables for R.java

Change-Id: I69e7b73cbdfe4baf502348397435c501ae29ff5e
/frameworks/base/tools/aapt2/link/Link.cpp
96917c25f09bb2f33e22f20cdfa4ece8f310b084 09-Mar-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix file::mkdirs when given absolute paths

file::mkdirs would try to extract the first part of the
path '/path' which would be the empty string ''. Mkdir would
fail creating the empty string directory.

Change-Id: Ice8ba92135f145f52f3663499a2c49eebe797328
/frameworks/base/tools/aapt2/link/Link.cpp
626a69f34536d01db0847df0051199beaecce060 03-Mar-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Support --no-version-vectors

Change-Id: I8029b2f9e2f7ab8e37a49565f95210f47a7be609
/frameworks/base/tools/aapt2/link/Link.cpp
64587af8179affd38ee26543b748f2d63b7f67bb 19-Feb-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Support building, linking, and merging static libraries

Android static libraries are like APKs but they contain much more debugging
and source information. We need to treat them differently in 3 ways:

1) When building a static library, we skip things like ID assignment and
product/config stripping. Source information is emitted as well.
2) When building a static library and linking against another
static library, we don't want to merge, we want to simply reference.
3) When building an app that uses static libraries, we want to merge
the static library under the same package with or without mangling.

Bug:25958912
Change-Id: I425e032857936a3e83173c1edc2a6cdc6020b842
/frameworks/base/tools/aapt2/link/Link.cpp
355f285ffd000f6cfe76680eb22d010546d124bb 14-Feb-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Implement density stripping and initial Split support

When a preferred density is supplied, the closest matching densities
will be selected, the rest stripped from the APK.

Split support will be enabled in a later CL. Command line support is still
needed, but the foundation is ready.

Bug:25958912
Change-Id: I56d599806b4ec4ffa24e17aad48d47130ca05c08
/frameworks/base/tools/aapt2/link/Link.cpp
e4bb9eb5af5b0899dc0921d5580220b20e15bd5a 13-Feb-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Introduce notion of 'product' to ResourceTable

This allows us to preserve the various product definitions during the compile
phase, and allows us to select the product in the link phase.

This allows compiled files to remain product-independent, so that they do not need
to be recompiled when switching targets.

Bug:25958912
Change-Id: Iaa7eed25c834b67a39cdc9be43613e8b5ab6cdd7
/frameworks/base/tools/aapt2/link/Link.cpp
59e04c6f92da584b322c87072f18e6cab4de4c60 05-Feb-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Switch to protobuf for intermediate format

Without needing to conform to the runtime data format,
it is much easier to add new features such as debugging symbols
and carrying over product data to link time.

This also simplifies the runtime format parser and serializer,
which will change much less frequently than the protobuf intermediate
format.

Change-Id: I209787bbf087db0a58a534cb8511c51d21133e00
/frameworks/base/tools/aapt2/link/Link.cpp
6a008170cb18666e04c42856f992fc7a0afa1e1f 03-Feb-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Support -c configuration filtering

Change-Id: I1e5855ca73440bdc30c21bcbc1dfdd31a9842363
/frameworks/base/tools/aapt2/link/Link.cpp
8900aa8b44f2dae3ee7b0f53422a4dbcb4fd2903 26-Jan-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Add -x and -z flags to minimize changes in build scripts

The -z flag will be supported soon anyway and -x is legacy.

Change-Id: I710467d35066d267dea8dfe7c521737fc768ede9
/frameworks/base/tools/aapt2/link/Link.cpp
ef9c50120d1535b2133c74f969e74180d3011402 22-Jan-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Allow specifying non-final IDS when building 'legacy' style libraries

Real libraries will be built correctly, but since we are not doing that
yet, support the old way and allow a flag --non-final-ids to remove
the final modifier from R.java.

Change-Id: Iad55fb9140e55dbb0f41d0d55f2e2bd958294c8e
/frameworks/base/tools/aapt2/link/Link.cpp
c446a733b82872ce25dcba2c4185f924aa766349 21-Jan-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Accept empty zip files

The libziparchive returns an error on empty zip files.
Work around this by checking for that error condition and
returning an empty ZipFileCollection.

Change-Id: I9edaf2e089456b6ccb4bb099b20ede10331bd352
/frameworks/base/tools/aapt2/link/Link.cpp
656a577a34bfbb68d4f1557bfdaa8c2f2b6f8723 15-Jan-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Accept zip, jack, jar, and flata extensions as archives

Change-Id: I3a4db129998e2351e8221f9d72a4b40d2c7a8cf9
/frameworks/base/tools/aapt2/link/Link.cpp
52364f7ae31716d7827ea8f8566f4a28bd30a921 11-Jan-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Variety of small fixes to get the build working

- Add option to rename package in AndroidManifest.xml
- Support default versionName and versionCode
- Accept True and False as valid booleans

Change-Id: I400e350b9dcd0fd1c197d1929144299c7823617d
/frameworks/base/tools/aapt2/link/Link.cpp
979ccb2e6f3f1f7f00a448eb440a85daf033dc9e 11-Jan-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Warn when positional arguments exist and --legacy is on

This is normally an error, but old AAPT didn't check for it correctly,
so many projects violate this. With --legacy, this becomes a warning.

Change-Id: I23647e029930e11b719591cd38609e1b43247e20
/frameworks/base/tools/aapt2/link/Link.cpp
a6fe345be955368a13aea76aefb4db821aad11df 10-Dec-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix overlay support

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
/frameworks/base/tools/aapt2/link/Link.cpp
a40e972fdaa68fc486ff90a319195515819068b2 25-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Support compiling a res/ directory and output to zip

This allows us to compile an entire directory and output to a single
file. This is important to support generated resources in the make
build, since we may not know what resources get generated.

The link step will accept the zip and read the contents of it as if they
were passed in on the command line.

Change-Id: If1a51b0abe772350c24074353eb4989953c2e0cb
/frameworks/base/tools/aapt2/link/Link.cpp
467f171315f9c2037fcd3eb5edcfabc40671bf7b 17-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Fail compiling when private symbols are referenced

Also moved some XML specific stuff into its own directory,
and refactored ReferenceLinker a bit.

Change-Id: I912247a82023c1bbf72dc191fbdaf62858cbec0c
/frameworks/base/tools/aapt2/link/Link.cpp
fc9570e6b0a6304abe6e6c52613516e93cf9251f 17-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix a bug where files would only show up for one config

The set of files to build was only comparing resource name and
not configuration.

Also support --extra-packages as a colon separated list of packages.

Change-Id: I36b65cd15299cdc722b785a7891a24ca1bc4fb45
/frameworks/base/tools/aapt2/link/Link.cpp
fb48d292d9eb78a73f9473d90911ecb81da5fffd 08-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Add support for overlays when merging resources

Change-Id: Iea9e41123cf89e3cfba7eb6bea89def56dee8093
/frameworks/base/tools/aapt2/link/Link.cpp
83f2255f69729e0e97539e96e5e6161843e85823 07-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Disambiguate merging of resources

Merging local app resources is slightly different than merging
resources from a static library.

Local app resources may not have a package name set, but we do take interest in the
ID set for the package (should be 0x0 or match the ID of the app we're building).

Static library resources have an explicit package name defined for them, so we
only merge resources from that package.

Change-Id: I95e559ae94cc1df6972e77a347b1b37a93674c4d
/frameworks/base/tools/aapt2/link/Link.cpp
2ae4a877d1623f851040ce69239552c873f1abf0 03-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Add Manifest fixing/validation

Change-Id: I7f6d8b74d1c590adc356b4da55cb6cb777cdf1da
/frameworks/base/tools/aapt2/link/Link.cpp
ca5638fd85098c3d0a699492751043545f75553a 21-Oct-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Support generating Manifest.java

This includes comments from AndroidManifest.xml.

Change-Id: I412d9ecb12bad20a49a683d6b3bea4a0be1235ae
/frameworks/base/tools/aapt2/link/Link.cpp
e78fd617ec60139a973a01925fa7adad31febb39 22-Oct-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Move comments and source into Value

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
/frameworks/base/tools/aapt2/link/Link.cpp
9e10ac70155c993e7053323ad36beaea7bf7d54f 16-Oct-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Process <java-symbols> and private symbol package

Need to introduce the idea of multiple levels of visibility to support <java-symbol>.

Public, Private, Undefined.

Public means it is accessible from outside and requires an ID assigned.
Private means that we explicitly want this to be a symbol (show up in R.java), but not visible
to other packages. No ID required.

Undefined is any normal resource. When --private-symbols is specified in the link phase,
these resources will not show up in R.java.

Change-Id: Icba89221e08e685dee7683786aa7112baf28c856
/frameworks/base/tools/aapt2/link/Link.cpp
9ba47d813075fcb05c5e1532c137c93b394631cb 13-Oct-2015 Adam Lesinski <adamlesinski@google.com> Filter products during compile phase

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
/frameworks/base/tools/aapt2/link/Link.cpp
1ab598f46c3ff520a67f9d80194847741f3467ab 14-Aug-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Separate out the various steps

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
/frameworks/base/tools/aapt2/link/Link.cpp