Adam Lesinski | 0368ebf | 2016-07-26 12:55:51 -0700 | [diff] [blame] | 1 | # Android Asset Packaging Tool 2.0 (AAPT2) release notes |
| 2 | |
Adam Lesinski | f34b6f4 | 2017-03-03 16:33:26 -0800 | [diff] [blame^] | 3 | ## Version 2.10 |
| 4 | ### `aapt2 link ...` |
| 5 | - Add ability to specify package ID to compile with for regular apps (not shared or static libs). |
| 6 | This package ID is limited to the range 0x7f-0xff inclusive. Specified with the --package-id |
| 7 | flag. |
| 8 | - Fixed issue with <plurals> resources being stripped for locales and other configuration. |
| 9 | - Fixed issue with escaping strings in XML resources. |
| 10 | |
Adam Lesinski | d48944a | 2017-02-21 14:22:30 -0800 | [diff] [blame] | 11 | ## Version 2.9 |
| 12 | ### `aapt2 link ...` |
| 13 | - Added sparse resource type encoding, which encodes resource entries that are sparse with |
| 14 | a binary search tree representation. Only available when minSdkVersion >= API O or resource |
| 15 | qualifier of resource types is >= v26 (or whatever API level O becomes). Enabled with |
| 16 | `--enable-sparse-encoding` flag. |
| 17 | ### `aapt2 optimize ...` |
| 18 | - Adds an optimization pass that supports: |
| 19 | - stripping out any density assets that do not match the `--target-densities` list of |
| 20 | densities. |
| 21 | - resource deduping when the resources are dominated and identical (already happens during |
| 22 | `link` phase but this covers apps built with `aapt`). |
| 23 | - new sparse resource type encoding with the `--enable-sparse-encoding` flag if possible |
| 24 | (minSdkVersion >= O or resource qualifier >= v26). |
| 25 | |
Adam Lesinski | ceb9b2f | 2017-02-16 12:05:42 -0800 | [diff] [blame] | 26 | ## Version 2.8 |
| 27 | ### `aapt2 link ...` |
| 28 | - Adds shared library support. Build a shared library with the `--shared-lib` flag. |
| 29 | Build a client of a shared library by simply including it via `-I`. |
| 30 | |
Adam Lesinski | 7542162 | 2017-01-06 15:20:04 -0800 | [diff] [blame] | 31 | ## Version 2.7 |
Adam Lesinski | ceb9b2f | 2017-02-16 12:05:42 -0800 | [diff] [blame] | 32 | ### `aapt2 compile ...` |
Adam Lesinski | 7542162 | 2017-01-06 15:20:04 -0800 | [diff] [blame] | 33 | - Fixes bug where psuedolocalization auto-translated strings marked 'translateable="false"'. |
| 34 | |
Adam Lesinski | 86d67df | 2017-01-31 13:47:27 -0800 | [diff] [blame] | 35 | ## Version 2.6 |
| 36 | ### `aapt2` |
| 37 | - Support legacy `configVarying` resource type. |
| 38 | - Support `<bag>` tag and treat as `<style>` regardless of type. |
| 39 | - Add `<feature-group>` manifest tag verification. |
| 40 | - Add `<meta-data>` tag support to `<instrumentation>`. |
| 41 | |
Yuichi Araki | 4d35cca | 2017-01-18 20:42:17 +0900 | [diff] [blame] | 42 | ## Version 2.5 |
| 43 | ### `aapt2 link ...` |
| 44 | - Transition XML versioning: Adds a new flag `--no-version-transitions` to disable automatic |
| 45 | versioning of Transition XML resources. |
| 46 | |
Adam Lesinski | 5119e51 | 2016-12-05 19:48:20 -0800 | [diff] [blame] | 47 | ## Version 2.4 |
| 48 | ### `aapt2 link ...` |
| 49 | - Supports `<meta-data>` tags in `<manifest>`. |
| 50 | |
Adam Lesinski | c0c3663 | 2016-10-19 18:37:53 -0700 | [diff] [blame] | 51 | ## Version 2.3 |
| 52 | ### `aapt2` |
| 53 | - Support new `font` resource type. |
| 54 | |
Adam Lesinski | 5cb0530 | 2016-09-06 17:34:06 -0700 | [diff] [blame] | 55 | ## Version 2.2 |
| 56 | ### `aapt2 compile ...` |
| 57 | - Added support for inline complex XML resources. See |
| 58 | https://developer.android.com/guide/topics/resources/complex-xml-resources.html |
Alexandria Cornwall | 77788eb | 2016-09-06 15:16:49 -0700 | [diff] [blame] | 59 | ### `aapt link ...` |
| 60 | - Duplicate resource filtering: removes duplicate resources in dominated configurations |
| 61 | that are always identical when selected at runtime. This can be disabled with |
| 62 | `--no-resource-deduping`. |
Adam Lesinski | 5cb0530 | 2016-09-06 17:34:06 -0700 | [diff] [blame] | 63 | |
Adam Lesinski | 36c73a5 | 2016-08-11 13:39:24 -0700 | [diff] [blame] | 64 | ## Version 2.1 |
| 65 | ### `aapt2 link ...` |
| 66 | - Configuration Split APK support: supports splitting resources that match a set of |
| 67 | configurations to a separate APK which can be loaded alongside the base APK on |
| 68 | API 21+ devices. This is done using the flag |
| 69 | `--split path/to/split.apk:<config1>[,<config2>,...]`. |
| 70 | - SDK version resource filtering: Resources with an SDK version qualifier that is unreachable |
| 71 | at runtime due to the minimum SDK level declared by the AndroidManifest.xml are stripped. |
| 72 | |
Adam Lesinski | 0368ebf | 2016-07-26 12:55:51 -0700 | [diff] [blame] | 73 | ## Version 2.0 |
| 74 | ### `aapt2 compile ...` |
| 75 | - Pseudo-localization: generates pseudolocalized versions of default strings when the |
| 76 | `--pseudo-localize` option is specified. |
| 77 | - Legacy mode: treats some class of errors as warnings in order to be more compatible |
| 78 | with AAPT when `--legacy` is specified. |
| 79 | - Compile directory: treats the input file as a directory when `--dir` is |
| 80 | specified. This will emit a zip of compiled files, one for each file in the directory. |
| 81 | The directory must follow the Android resource directory structure |
| 82 | (res/values-[qualifiers]/file.ext). |
| 83 | |
| 84 | ### `aapt2 link ...` |
| 85 | - Automatic attribute versioning: adds version qualifiers to resources that use attributes |
| 86 | introduced in a later SDK level. This can be disabled with `--no-auto-version`. |
| 87 | - Min SDK resource filtering: removes resources that can't possibly be selected at runtime due |
| 88 | to the application's minimum supported SDK level. |