Reword documentation

Test: N/A, documentation change only.

Bug: 267208956
Change-Id: Iadc04f771560ed080a0f93338aef8459c9ddb3c8
This commit is contained in:
Cody Heiner
2023-03-23 14:54:52 -07:00
parent 1530719278
commit 27fc19d71d

View File

@@ -105,31 +105,35 @@ Android.bp files can contain C-style multiline `/* */` and C++ style single-line
### Types ### Types
Variables and properties are strongly typed, variables dynamically based on the Variables and properties are strongly typed. Variables are dynamically typed
first assignment, and properties statically by the module type. The supported based on the first assignment, and properties are statically typed by the
types are: module type. The supported types are:
* Bool (`true` or `false`) * Bool (`true` or `false`)
* Integers (`int`) * Integers (`int`)
* Strings (`"string"`) * Strings (`"string"`)
* Lists of strings (`["string1", "string2"]`) * Lists of strings (`["string1", "string2"]`)
* Maps (`{key1: "value1", key2: ["value2"]}`) * Maps (`{key1: "value1", key2: ["value2"]}`)
Maps may values of any type, including nested maps. Lists and maps may have Maps may contain values of any type, including nested maps. Lists and maps may
trailing commas after the last value. have trailing commas after the last value.
Strings can contain double quotes using `\"`, for example `"cat \"a b\""`. Strings can contain double quotes using `\"`, for example `"cat \"a b\""`.
### Operators ### Operators
Strings, lists of strings, and maps can be appended using the `+` operator. The `+` operator:
Integers can be summed up using the `+` operator. Appending a map produces the * Sums integers.
union of keys in both maps, appending the values of any keys that are present * Concatenates strings and lists.
in both maps. * Produces the union of maps.
Concatenating maps produces a map whose keys are the union of the given maps'
keys, and whose mapped values are the union of the given maps' corresponding
mapped values.
### Defaults modules ### Defaults modules
A defaults module can be used to repeat the same properties in multiple modules. A `defaults` module can be used to repeat the same properties in multiple
For example: modules. For example:
``` ```
cc_defaults { cc_defaults {