aidl_interface
name
,
srcs
,
defaults
,
host_supported
,
backend.cpp
,
backend.java
,
backend.ndk
,
backend.rust
,
bazel_module
,
compile_multilib
,
debug_ramdisk
,
device_specific
,
dist
,
dists
,
double_loadable
,
dumpapi
,
enabled
,
flags
,
frozen
,
gen_trace
,
headers
,
host_required
,
imports
,
include_dirs
,
init_rc
,
licenses
,
local_include_dir
,
min_sdk_version
,
native_bridge_supported
,
odm_available
,
owner
,
product_available
,
product_specific
,
product_variables.always_use_prebuilt_sdks
,
product_variables.arc
,
product_variables.debuggable
,
product_variables.flatten_apex
,
product_variables.malloc_not_svelte
,
product_variables.native_coverage
,
product_variables.pdk
,
product_variables.unbundled_build
,
proprietary
,
ramdisk
,
recovery
,
recovery_available
,
required
,
soc_specific
,
stability
,
system_ext_specific
,
target.android
,
target.host
,
target_required
,
unstable
,
vendor
,
vendor_available
,
vendor_ramdisk
,
versions
,
versions_with_info
,
vintf_fragments
,
visibility
,
vndk
,
vndk_use_version
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, List of .aidl files which compose this interface.
defaults
list of string
host_supported
bool, Whether the library can be used on host
⊕backend.cpp
Backend of the compiler generating code for C++ clients using
libbinder (unstable C++ interface)
When enabled, this creates a target called "<name>-cpp".
additional_shared_libraries
list of string, Must be NDK libraries, for stable types.
cflags
list of string, cflags to forward to native compilation. This is expected to be
used more for AIDL compiler developers than being actually
practical.
gen_log
bool, Whether to generate additional code for gathering information
about the transactions.
Default: false
enabled
bool, Whether to generate code in the corresponding backend.
Default:
- for Java/NDK/CPP backends - True
- for Rust backend - False
apex_available
list of string
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module.
gen_trace
bool, Whether tracing should be added to the interface.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` and `product_available` must be explicitly
set to either true or false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
private
bool, declared as a VNDK-private module.
This module still creates the vendor and product variants refering
to the `vendor_available: true` and `product_available: true`
properties. However, it is only available to the other VNDK modules
but not to the non-VNDK vendor or product modules.
extends
string, Extending another module
⊕backend.java
Backend of the compiler generating code for Java clients.
When enabled, this creates a target called "<name>-java".
sdk_version
string, Set to the version of the sdk to compile against
Default: system_current
platform_apis
bool, Whether to compile against platform APIs instead of
an SDK.
gen_rpc
bool, Whether RPC features are enabled (requires API level 32)
TODO(b/175819535): enable this automatically?
enabled
bool, Whether to generate code in the corresponding backend.
Default:
- for Java/NDK/CPP backends - True
- for Rust backend - False
apex_available
list of string
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module.
gen_trace
bool, Whether tracing should be added to the interface.
⊕lint
Controls for running Android Lint on the module.
enabled
bool, If true, run Android Lint on the module. Defaults to true.
flags
list of string, Flags to pass to the Android Lint tool.
fatal_checks
list of string, Checks that should be treated as fatal.
error_checks
list of string, Checks that should be treated as errors.
warning_checks
list of string, Checks that should be treated as warnings.
disabled_checks
list of string, Checks that should be skipped.
baseline_filename
string, Name of the file that lint uses as the baseline. Defaults to "lint-baseline.xml".
strict_updatability_linting
bool, If true, baselining updatability lint checks (e.g. NewApi) is prohibited. Defaults to false.
test
bool, Treat the code in this module as test code for @VisibleForTesting enforcement.
This will be true by default for test module types, false otherwise.
If soong gets support for testonly, this flag should be replaced with that.
⊕backend.ndk
Backend of the compiler generating code for C++ clients using libbinder_ndk
(stable C interface to system's libbinder) When enabled, this creates a target
called "<name>-V<ver>-ndk" (for both apps and platform) and
"<name>-V<ver>-ndk_platform" (for platform only).
TODO(b/161456198): remove the ndk_platform backend as the ndk backend can serve
the same purpose.
sdk_version
string, Set to the version of the sdk to compile against, for the NDK
variant.
Default: current
apps_enabled
bool, If set to false, the ndk backend is exclusive to platform and is not
available to applications. Default is true (i.e. available to both
applications and platform).
additional_shared_libraries
list of string, Must be NDK libraries, for stable types.
cflags
list of string, cflags to forward to native compilation. This is expected to be
used more for AIDL compiler developers than being actually
practical.
gen_log
bool, Whether to generate additional code for gathering information
about the transactions.
Default: false
enabled
bool, Whether to generate code in the corresponding backend.
Default:
- for Java/NDK/CPP backends - True
- for Rust backend - False
apex_available
list of string
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module.
gen_trace
bool, Whether tracing should be added to the interface.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` and `product_available` must be explicitly
set to either true or false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
private
bool, declared as a VNDK-private module.
This module still creates the vendor and product variants refering
to the `vendor_available: true` and `product_available: true`
properties. However, it is only available to the other VNDK modules
but not to the non-VNDK vendor or product modules.
extends
string, Extending another module
⊕backend.rust
Backend of the compiler generating code for Rust clients.
When enabled, this creates a target called "<name>-rust".
enabled
bool, Whether to generate code in the corresponding backend.
Default:
- for Java/NDK/CPP backends - True
- for Rust backend - False
apex_available
list of string
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module.
gen_trace
bool, Whether tracing should be added to the interface.
⊕bazel_module
bazelModuleProperties
In "Bazel mixed build" mode, this represents the Bazel target replacing
this Soong module.
label
string, The label of the Bazel target replacing this Soong module. When run in conversion mode, this
will import the handcrafted build target into the autogenerated file. Note: this may result in
a conflict due to duplicate targets if bp2build_available is also set.
bp2build_available
bool, If true, bp2build will generate the converted Bazel target for this module. Note: this may
cause a conflict due to the duplicate targets if label is also set.
This is a bool pointer to support tristates: true, false, not set.
To opt in a module, set bazel_module: { bp2build_available: true }
To opt out a module, set bazel_module: { bp2build_available: false }
To defer the default setting for the directory, do not set the value.
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform).
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
Dist
configuration to distribute output files from this module to the distribution
directory (default: $OUT/dist, configurable with $DIST_DIR)
targets
list of string, Copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
append_artifact_with_product
bool, If true, then the artifact file will be appended with _<product name>. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be foo_coral.apk. If false, there is
no change to the artifact file name.
tag
string, A string tag to select the OutputFiles associated with the tag.
If no tag is specified then it will select the default dist paths provided
by the module type. If a tag of "" is specified then it will return the
default output files provided by the modules, i.e. the result of calling
OutputFiles("").
dists
list of Dist, a list of configurations to distribute output files from this module to the
distribution directory (default: $OUT/dist, configurable with $DIST_DIR)
double_loadable
bool, Whether the library can be loaded multiple times into the same process
⊕dumpapi
DumpApiProperties
--dumpapi options
no_license
bool, Dumps without license header (assuming it is the first comment in .aidl file). Default: false
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
flags
list of string, Optional flags to be passed to the AIDL compiler. e.g. "-Weverything"
frozen
bool, If true, this interface is frozen and does not have any changes since the last
frozen version.
If false, there are changes to this interface between the last frozen version (N) and
the current version (N + 1).
gen_trace
bool, Whether tracing should be added to the interface.
host_required
list of string, names of other modules to install on host if this module is installed
imports
list of string, List of aidl_interface modules that this uses. If one of your AIDL interfaces uses an
interface or parcelable from another aidl_interface, you should put its name here.
It could be an aidl_interface solely or with version(such as -V1)
include_dirs
list of string, Top level directories for includes.
TODO(b/128940869): remove it if aidl_interface can depend on framework.aidl
init_rc
list of string, init.rc files to be installed if this module is installed
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
local_include_dir
string, Relative path for includes. By default assumes AIDL path is relative to current directory.
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module. This can be overridden by
backend.<name>.min_sdk_version.
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
odm_available
bool, Whether the library can be installed on the odm image.
owner
string, vendor who owns this module
product_available
bool, Whether the library can be installed on the product image.
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
⊕product_variables.always_use_prebuilt_sdks
⊕product_variables.arc
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕srcs
⊕product_variables.flatten_apex
⊕product_variables.malloc_not_svelte
⊕product_variables.native_coverage
⊕product_variables.pdk
⊕product_variables.unbundled_build
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Whether the library can be installed on the recovery image.
required
list of string, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
stability
string, Stability promise. Currently only supports "vintf".
If this is unset, this corresponds to an interface with stability within
this compilation context (so an interface loaded here can only be used
with things compiled together, e.g. on the system.img).
If this is set to "vintf", this corresponds to a stability promise: the
interface must be kept stable as long as it is used.
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
⊕target.android
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
unstable
bool, Marks that this interface does not need to be stable. When set to true, the build system
doesn't create the API dump and require it to be updated. Default is false.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vendor_available
bool, Whether the library can be installed on the vendor image.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
versions
list of string, Deprecated: Use `versions_with_info` instead. Don't use `versions` property directly.
⊕versions_with_info
list of
Previous API versions that are now frozen. The version that is last in
the list is considered as the most recent version.
The struct contains both version and imports information per a version.
Until versions property is removed, don't use `versions_with_info` directly.
version
string
imports
list of string
vintf_fragments
list of string, VINTF manifest fragments to be installed if this module is installed
visibility
list of string, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` and `product_available` must be explicitly
set to either true or false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
private
bool, declared as a VNDK-private module.
This module still creates the vendor and product variants refering
to the `vendor_available: true` and `product_available: true`
properties. However, it is only available to the other VNDK modules
but not to the non-VNDK vendor or product modules.
extends
string, Extending another module
vndk_use_version
string, How to interpret VNDK options. We only want one library in the VNDK (not multiple
versions, since this would be a waste of space/unclear, and ultimately we want all
code in a given release to be updated to use a specific version). By default, this
puts either the latest stable version of the library or, if there is no stable
version, the unstable version of the library in the VNDK. When using this field,
explicitly set it to one of the values in the 'versions' field to put that version
in the VNDK or set it to the next version (1 higher than this) to mean the version
that will be frozen in the next update.
aidl_interface_defaults
name
,
srcs
,
defaults
,
host_supported
,
device_supported
,
apex_available
,
arch
,
backend.cpp
,
backend.java
,
backend.ndk
,
backend.rust
,
bazel_module
,
compile_multilib
,
debug_ramdisk
,
defaults_visibility
,
device_specific
,
dist
,
dists
,
double_loadable
,
dumpapi
,
enabled
,
flags
,
frozen
,
gen_trace
,
headers
,
host_required
,
imports
,
include_dirs
,
init_rc
,
licenses
,
local_include_dir
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
odm_available
,
owner
,
product_available
,
product_specific
,
product_variables.always_use_prebuilt_sdks
,
product_variables.arc
,
product_variables.debuggable
,
product_variables.flatten_apex
,
product_variables.malloc_not_svelte
,
product_variables.native_coverage
,
product_variables.pdk
,
product_variables.unbundled_build
,
proprietary
,
ramdisk
,
recovery
,
recovery_available
,
required
,
soc_specific
,
stability
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
unstable
,
vendor
,
vendor_available
,
vendor_ramdisk
,
versions
,
versions_with_info
,
vintf_fragments
,
visibility
,
vndk
,
vndk_use_version
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, List of .aidl files which compose this interface.
defaults
list of string
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
apex_available
list of string, Availability of this module in APEXes. Only the listed APEXes can contain this module. If
the module has stubs then other APEXes and the platform may access it through them
(subject to visibility).
"//apex_available:anyapex" is a pseudo APEX name that matches to any APEX.
"//apex_available:platform" refers to non-APEX partitions like "system.img".
"com.android.gki.*" matches any APEX module name with the prefix "com.android.gki.".
Default is ["//apex_available:platform"].
arch
interface
⊕backend.cpp
Backend of the compiler generating code for C++ clients using
libbinder (unstable C++ interface)
When enabled, this creates a target called "<name>-cpp".
additional_shared_libraries
list of string, Must be NDK libraries, for stable types.
cflags
list of string, cflags to forward to native compilation. This is expected to be
used more for AIDL compiler developers than being actually
practical.
gen_log
bool, Whether to generate additional code for gathering information
about the transactions.
Default: false
enabled
bool, Whether to generate code in the corresponding backend.
Default:
- for Java/NDK/CPP backends - True
- for Rust backend - False
apex_available
list of string
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module.
gen_trace
bool, Whether tracing should be added to the interface.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` and `product_available` must be explicitly
set to either true or false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
private
bool, declared as a VNDK-private module.
This module still creates the vendor and product variants refering
to the `vendor_available: true` and `product_available: true`
properties. However, it is only available to the other VNDK modules
but not to the non-VNDK vendor or product modules.
extends
string, Extending another module
⊕backend.java
Backend of the compiler generating code for Java clients.
When enabled, this creates a target called "<name>-java".
sdk_version
string, Set to the version of the sdk to compile against
Default: system_current
platform_apis
bool, Whether to compile against platform APIs instead of
an SDK.
gen_rpc
bool, Whether RPC features are enabled (requires API level 32)
TODO(b/175819535): enable this automatically?
enabled
bool, Whether to generate code in the corresponding backend.
Default:
- for Java/NDK/CPP backends - True
- for Rust backend - False
apex_available
list of string
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module.
gen_trace
bool, Whether tracing should be added to the interface.
⊕lint
Controls for running Android Lint on the module.
enabled
bool, If true, run Android Lint on the module. Defaults to true.
flags
list of string, Flags to pass to the Android Lint tool.
fatal_checks
list of string, Checks that should be treated as fatal.
error_checks
list of string, Checks that should be treated as errors.
warning_checks
list of string, Checks that should be treated as warnings.
disabled_checks
list of string, Checks that should be skipped.
baseline_filename
string, Name of the file that lint uses as the baseline. Defaults to "lint-baseline.xml".
strict_updatability_linting
bool, If true, baselining updatability lint checks (e.g. NewApi) is prohibited. Defaults to false.
test
bool, Treat the code in this module as test code for @VisibleForTesting enforcement.
This will be true by default for test module types, false otherwise.
If soong gets support for testonly, this flag should be replaced with that.
⊕backend.ndk
Backend of the compiler generating code for C++ clients using libbinder_ndk
(stable C interface to system's libbinder) When enabled, this creates a target
called "<name>-V<ver>-ndk" (for both apps and platform) and
"<name>-V<ver>-ndk_platform" (for platform only).
TODO(b/161456198): remove the ndk_platform backend as the ndk backend can serve
the same purpose.
sdk_version
string, Set to the version of the sdk to compile against, for the NDK
variant.
Default: current
apps_enabled
bool, If set to false, the ndk backend is exclusive to platform and is not
available to applications. Default is true (i.e. available to both
applications and platform).
additional_shared_libraries
list of string, Must be NDK libraries, for stable types.
cflags
list of string, cflags to forward to native compilation. This is expected to be
used more for AIDL compiler developers than being actually
practical.
gen_log
bool, Whether to generate additional code for gathering information
about the transactions.
Default: false
enabled
bool, Whether to generate code in the corresponding backend.
Default:
- for Java/NDK/CPP backends - True
- for Rust backend - False
apex_available
list of string
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module.
gen_trace
bool, Whether tracing should be added to the interface.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` and `product_available` must be explicitly
set to either true or false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
private
bool, declared as a VNDK-private module.
This module still creates the vendor and product variants refering
to the `vendor_available: true` and `product_available: true`
properties. However, it is only available to the other VNDK modules
but not to the non-VNDK vendor or product modules.
extends
string, Extending another module
⊕backend.rust
Backend of the compiler generating code for Rust clients.
When enabled, this creates a target called "<name>-rust".
enabled
bool, Whether to generate code in the corresponding backend.
Default:
- for Java/NDK/CPP backends - True
- for Rust backend - False
apex_available
list of string
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module.
gen_trace
bool, Whether tracing should be added to the interface.
⊕bazel_module
bazelModuleProperties
In "Bazel mixed build" mode, this represents the Bazel target replacing
this Soong module.
label
string, The label of the Bazel target replacing this Soong module. When run in conversion mode, this
will import the handcrafted build target into the autogenerated file. Note: this may result in
a conflict due to duplicate targets if bp2build_available is also set.
bp2build_available
bool, If true, bp2build will generate the converted Bazel target for this module. Note: this may
cause a conflict due to the duplicate targets if label is also set.
This is a bool pointer to support tristates: true, false, not set.
To opt in a module, set bazel_module: { bp2build_available: true }
To opt out a module, set bazel_module: { bp2build_available: false }
To defer the default setting for the directory, do not set the value.
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform).
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
defaults_visibility
list of string, Controls the visibility of the defaults module itself.
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
Dist
configuration to distribute output files from this module to the distribution
directory (default: $OUT/dist, configurable with $DIST_DIR)
targets
list of string, Copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
append_artifact_with_product
bool, If true, then the artifact file will be appended with _<product name>. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be foo_coral.apk. If false, there is
no change to the artifact file name.
tag
string, A string tag to select the OutputFiles associated with the tag.
If no tag is specified then it will select the default dist paths provided
by the module type. If a tag of "" is specified then it will return the
default output files provided by the modules, i.e. the result of calling
OutputFiles("").
dists
list of Dist, a list of configurations to distribute output files from this module to the
distribution directory (default: $OUT/dist, configurable with $DIST_DIR)
double_loadable
bool, Whether the library can be loaded multiple times into the same process
⊕dumpapi
DumpApiProperties
--dumpapi options
no_license
bool, Dumps without license header (assuming it is the first comment in .aidl file). Default: false
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
flags
list of string, Optional flags to be passed to the AIDL compiler. e.g. "-Weverything"
frozen
bool, If true, this interface is frozen and does not have any changes since the last
frozen version.
If false, there are changes to this interface between the last frozen version (N) and
the current version (N + 1).
gen_trace
bool, Whether tracing should be added to the interface.
host_required
list of string, names of other modules to install on host if this module is installed
imports
list of string, List of aidl_interface modules that this uses. If one of your AIDL interfaces uses an
interface or parcelable from another aidl_interface, you should put its name here.
It could be an aidl_interface solely or with version(such as -V1)
include_dirs
list of string, Top level directories for includes.
TODO(b/128940869): remove it if aidl_interface can depend on framework.aidl
init_rc
list of string, init.rc files to be installed if this module is installed
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
local_include_dir
string, Relative path for includes. By default assumes AIDL path is relative to current directory.
min_sdk_version
string, The minimum version of the sdk that the compiled artifacts will run against
For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
Forwarded to generated java/native module. This can be overridden by
backend.<name>.min_sdk_version.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
odm_available
bool, Whether the library can be installed on the odm image.
owner
string, vendor who owns this module
product_available
bool, Whether the library can be installed on the product image.
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
⊕product_variables.always_use_prebuilt_sdks
⊕product_variables.arc
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕srcs
⊕product_variables.flatten_apex
⊕product_variables.malloc_not_svelte
⊕product_variables.native_coverage
⊕product_variables.pdk
⊕product_variables.unbundled_build
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Whether the library can be installed on the recovery image.
required
list of string, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
stability
string, Stability promise. Currently only supports "vintf".
If this is unset, this corresponds to an interface with stability within
this compilation context (so an interface loaded here can only be used
with things compiled together, e.g. on the system.img).
If this is set to "vintf", this corresponds to a stability promise: the
interface must be kept stable as long as it is used.
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.android
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
unstable
bool, Marks that this interface does not need to be stable. When set to true, the build system
doesn't create the API dump and require it to be updated. Default is false.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vendor_available
bool, Whether the library can be installed on the vendor image.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
versions
list of string, Deprecated: Use `versions_with_info` instead. Don't use `versions` property directly.
⊕versions_with_info
list of
Previous API versions that are now frozen. The version that is last in
the list is considered as the most recent version.
The struct contains both version and imports information per a version.
Until versions property is removed, don't use `versions_with_info` directly.
version
string
imports
list of string
vintf_fragments
list of string, VINTF manifest fragments to be installed if this module is installed
visibility
list of string, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` and `product_available` must be explicitly
set to either true or false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
private
bool, declared as a VNDK-private module.
This module still creates the vendor and product variants refering
to the `vendor_available: true` and `product_available: true`
properties. However, it is only available to the other VNDK modules
but not to the non-VNDK vendor or product modules.
extends
string, Extending another module
vndk_use_version
string, How to interpret VNDK options. We only want one library in the VNDK (not multiple
versions, since this would be a waste of space/unclear, and ultimately we want all
code in a given release to be updated to use a specific version). By default, this
puts either the latest stable version of the library or, if there is no stable
version, the unstable version of the library in the VNDK. When using this field,
explicitly set it to one of the values in the 'versions' field to put that version
in the VNDK or set it to the next version (1 higher than this) to mean the version
that will be frozen in the next update.
Modules which provide AIDL sources that are only used to provide "-I" flags to the
aidl tool. No language bindings are generated from these modules. Typically this will
be used to provide includes for UnstructuredParcelable AIDL definitions such as those
coming from framework modules.
name
,
srcs
,
bazel_module
,
compile_multilib
,
debug_ramdisk
,
device_specific
,
dist
,
dists
,
enabled
,
host_required
,
include_dir
,
init_rc
,
licenses
,
native_bridge_supported
,
owner
,
product_specific
,
product_variables.always_use_prebuilt_sdks
,
product_variables.arc
,
product_variables.debuggable
,
product_variables.flatten_apex
,
product_variables.malloc_not_svelte
,
product_variables.native_coverage
,
product_variables.pdk
,
product_variables.unbundled_build
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target.android
,
target.host
,
target_required
,
vendor
,
vendor_ramdisk
,
vintf_fragments
,
visibility
In "Bazel mixed build" mode, this represents the Bazel target replacing
this Soong module.
configuration to distribute output files from this module to the distribution
directory (default: $OUT/dist, configurable with $DIST_DIR)
⊕target.android
name
,
compile_multilib
,
debug_ramdisk
,
device_specific
,
dist
,
dists
,
enabled
,
host_required
,
init_rc
,
licenses
,
native_bridge_supported
,
owner
,
product_specific
,
product_variables.always_use_prebuilt_sdks
,
product_variables.debuggable
,
product_variables.flatten_apex
,
product_variables.pdk
,
product_variables.unbundled_build
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target.android
,
target.host
,
target_required
,
vendor
,
vendor_ramdisk
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform).
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
Dist
configuration to distribute output files from this module to the distribution
directory (default: $OUT/dist, configurable with $DIST_DIR)
targets
list of string, Copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
append_artifact_with_product
bool, If true, then the artifact file will be appended with _<product name>. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be foo_coral.apk. If false, there is
no change to the artifact file name.
tag
string, A string tag to select the OutputFiles associated with the tag.
If no tag is specified then it will select the default dist paths provided
by the module type. If a tag of "" is specified then it will return the
default output files provided by the modules, i.e. the result of calling
OutputFiles("").
dists
list of Dist, a list of configurations to distribute output files from this module to the
distribution directory (default: $OUT/dist, configurable with $DIST_DIR)
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
host_required
list of string, names of other modules to install on host if this module is installed
init_rc
list of string, init.rc files to be installed if this module is installed
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
owner
string, vendor who owns this module
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
⊕product_variables.always_use_prebuilt_sdks
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕product_variables.flatten_apex
⊕product_variables.pdk
⊕product_variables.unbundled_build
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of string, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
⊕target.android
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
vintf_fragments
list of string, VINTF manifest fragments to be installed if this module is installed