Reword documentation
Test: N/A, documentation change only. Bug: 267208956 Change-Id: Iadc04f771560ed080a0f93338aef8459c9ddb3c8
This commit is contained in:
26
README.md
26
README.md
@@ -105,31 +105,35 @@ Android.bp files can contain C-style multiline `/* */` and C++ style single-line
|
||||
|
||||
### Types
|
||||
|
||||
Variables and properties are strongly typed, variables dynamically based on the
|
||||
first assignment, and properties statically by the module type. The supported
|
||||
types are:
|
||||
Variables and properties are strongly typed. Variables are dynamically typed
|
||||
based on the first assignment, and properties are statically typed by the
|
||||
module type. The supported types are:
|
||||
* Bool (`true` or `false`)
|
||||
* Integers (`int`)
|
||||
* Strings (`"string"`)
|
||||
* Lists of strings (`["string1", "string2"]`)
|
||||
* Maps (`{key1: "value1", key2: ["value2"]}`)
|
||||
|
||||
Maps may values of any type, including nested maps. Lists and maps may have
|
||||
trailing commas after the last value.
|
||||
Maps may contain values of any type, including nested maps. Lists and maps may
|
||||
have trailing commas after the last value.
|
||||
|
||||
Strings can contain double quotes using `\"`, for example `"cat \"a b\""`.
|
||||
|
||||
### Operators
|
||||
|
||||
Strings, lists of strings, and maps can be appended using the `+` operator.
|
||||
Integers can be summed up using the `+` operator. Appending a map produces the
|
||||
union of keys in both maps, appending the values of any keys that are present
|
||||
in both maps.
|
||||
The `+` operator:
|
||||
* Sums integers.
|
||||
* Concatenates strings and lists.
|
||||
* 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
|
||||
|
||||
A defaults module can be used to repeat the same properties in multiple modules.
|
||||
For example:
|
||||
A `defaults` module can be used to repeat the same properties in multiple
|
||||
modules. For example:
|
||||
|
||||
```
|
||||
cc_defaults {
|
||||
|
Reference in New Issue
Block a user