blob: f08da2710f29298619c02051f8855f57fa13c441 [file] [log] [blame] [view]
clementbera1764a862019-08-20 15:26:46 +02001# Description of the core library configuration file
2
3## Version
4
Søren Gjesse6e5e5842019-09-03 08:48:30 +02005The first field `configuration_format_version` encodes a versioning number internal to R8/D8
6in the form of an unsigned integer. It allows R8/D8 to know if the file given is supported.
clementbera1764a862019-08-20 15:26:46 +02007Non-backward compatible changes to the desugared library increase the version number, and such
8library cannot be compiled without upgrading R8/D8 to the latest version.
9
Søren Gjesse6e5e5842019-09-03 08:48:30 +020010The second field `version` holds the version of the content for the configuration. This number
11must be updated each time the configuration is changed.
12
clementbera1764a862019-08-20 15:26:46 +020013## Required compilation API level
14
Søren Gjesse6e5e5842019-09-03 08:48:30 +020015The third field `required_compilation_api_level` encodes the minimal Android API level required for
clementbera1764a862019-08-20 15:26:46 +020016the desugared library to be compiled correctly. If the API of library used for compilation of the
17library or a program using the library is lower than this level, one has to upgrade the SDK version
18used to be able to use desugared libraries.
19
20## Library and program flags
21
clementbera3c2bf4f2019-11-08 09:55:40 +010022The fourth and fifth fields are `library_flags` and `program_flags`. They include the set of flags
clementbera1764a862019-08-20 15:26:46 +020023required for respectively the library and the program using the desugared library compilation. The
24sets of flags are different depending on the min API level used. The flags are in a list, where
25each list entry specifies up to which min API level the set of flags should be applied. During
26compilation, R8/D8 adds up all the required flags for the min API level specified at compilation.
27
28For example, let's say the `program_flags` have entries for `api_level_below_or_equal` 20, 24 and 26.
29If compiling the program for min API 24, R8/D8 will use both the set of flags for API 24 and 26
30(24 <= 24, 24 <= 26 but !(24 <= 20)).
31
clementbera3c2bf4f2019-11-08 09:55:40 +010032## Extra keep rules
33
34The last field is `extra_keep_rules`, it includes keep rules that are appended by L8 when shrinking
35the desugared library. It includes keep rules related to reflection inside the desugared library,
36related to enum to have EnumSet working and to keep the j$ prefix.
37
clementbera1764a862019-08-20 15:26:46 +020038## Copyright
39
40Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
41for details. All rights reserved. Use of this source code is governed by a
42BSD-style license that can be found in the LICENSE file.