summaryrefslogtreecommitdiff
path: root/tools/aapt2/SdkConstants.cpp
AgeCommit message (Collapse)Author
2020-05-02Updating platform SDK version for RSvet Ganov
* Finalize resources * Update appt/aapt2 constants * Update R and SDK constants * Fix a crashloop bug Test: build + boot bug:150281259 Exempt-From-Owner-Approval: merge conflict resolution Change-Id: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d Merged-In: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d
2020-04-08Master is now SDan Willemsen
Bug: 150754986 Test: treehugger Change-Id: I44d1b5a0fea74e2bb9e332dcb8486fd30fbd2f07
2019-04-11qt-dev-plus-aosp designated for R. Update MAX_PLATFORM_VERSION, etc.Ryan Mitchell
Test: aapt2_tests Bug: 128934651 Change-Id: I179f7b92dcf65e77f039e6cd42d91bf5b1461e35
2018-08-14AAPT2: Update SDK development codename to QRyan Mitchell
Test: aapt2_tests Change-Id: I815e0bfc786660d6ad70897287fb5fb21023068c
2017-10-13AAPT2: Update SDK development codename to PAdam Lesinski
Also deleted unused method of finding attribute API levels. Test: none Change-Id: I92c1dd398bde3b19da2d274b6abda12636aa3d4f
2017-05-24AAPT2: Implement attribute compat versioningAdam Lesinski
This change defines some hardcoded rules to degrade attributes in newer SDKs to specific older attributes. An attribute with a degrade rule will generate a new XML for the API in which the attribute resulting from the degradation was introduced. Since API 22 (Lollipop MR1), attributes are correctly ignored and do not need to be versioned. In XML files defined for APIs 22+, the original and degraded attributes coexist in the same XML file. One such example is paddingHorizontal, introduced in API 26. paddingHorizontal degrades to paddingLeft and paddingRight, which were both introduced in API 1. Bug: 35763493 Test: make aapt2_tests Change-Id: I4aa8755a9ee2c0cc5afdc55c3d30093fd3a47f3d
2017-01-17Move StringPiece to libandroidfwAdam Lesinski
libandroidfw needs to make use of StringPiece, so move it to libandroidfw and update all code referencing StringPiece in aapt2. Test: make libandroidfw_tests libaapt2_tests Change-Id: I68d7f0fc7c651b048d9d1f5e7971f10ef5349fa1
2016-10-26AAPT2: Rename to match new styleAdam Lesinski
Use Google3 naming style to match new projects' and open source google projects' style. Preferred to do this in a massive CL so as to avoid style inconsistencies that plague legacy code bases. This is a relatively NEW code base, may as well keep it up to date. Test: name/style refactor - existing tests pass Change-Id: Ie80ecb78d46ec53efdfca2336bb57d96cbb7fb87
2016-10-19Use Google3 style guide with .clang-formatAdam Lesinski
Test: style change only, builds ok Change-Id: I885180e24cb2e7b58cfb4967c3bcb40058ce4078
2016-08-11Fix clang-tidy warnings in aapt and aapt2.Chih-Hung Hsieh
* Add explicit keyword to conversion constructors. * Add NOLINT(implicit) comments for implicit conversion constructors. Bug: 28341362 * Use const reference type for read-only parameters. Bug: 30407689 * Use const reference type to avoid unnecessary copy. Bug: 30413862 Test: build with WITH_TIDY=1 Change-Id: Id6d21961f313a1ad92b15a37fdaa5be9e8ab48e1
2016-07-13AAPT2: Remove usage of u16stringAdam Lesinski
For legacy reasons, we kept around the use of UTF-16 internally in AAPT2. We don't need this and this CL removes all instances of std::u16string and StringPiece16. The only places still needed are when interacting with the ResTable APIs that only operate in UTF16. Change-Id: I492475b84bb9014fa13bf992cff447ee7a5fe588
2016-06-29AAPT2: Add version collapsingAdam Lesinski
When an app specifies (or imports) resources with various configurations for different SDK versions, specifying a minSdk will make many of those resources unreachable. Version collapsing will prune out the resources specified for SDK versions less than the minSdk. If, however, there is no exact matching resource for the minSdk version, the next smallest SDK version is kept. Change-Id: Ic7bcab6c59d65c97c67c8767358abb57cdec60a4
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-06-04AAPT2: Change xml file parsing to DOM basedAdam Lesinski
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
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