python_binary_host
name
,
srcs
,
exclude_srcs
,
defaults
,
arch
,
auto_gen_config
,
autorun
,
compile_multilib
,
data
,
debug_ramdisk
,
device_common_data
,
device_first_data
,
device_specific
,
dist
,
dists
,
embedded_launcher
,
enabled
,
host_cross_supported
,
host_required
,
init_rc
,
is_internal
,
java_data
,
libs
,
licenses
,
main
,
multilib
,
native_bridge_supported
,
no_full_install
,
odm_dlkm_specific
,
overrides
,
owner
,
pkg_path
,
product_specific
,
product_variables.arc
,
product_variables.debuggable
,
product_variables.malloc_low_memory
,
product_variables.native_coverage
,
product_variables.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
proto
,
ramdisk
,
recovery
,
required
,
shared_libs
,
soc_specific
,
stem
,
suffix
,
system_dlkm_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
team
,
test_suites
,
use_generic_config
,
vendor
,
vendor_dlkm_specific
,
vendor_ramdisk
,
version.py2
,
version.py3
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, list of source (.py) files compatible both with Python2 and Python3 used to compile the
Python module.
srcs may reference the outputs of other modules that produce source files like genrule
or filegroup using the syntax ":module".
Srcs has to be non-empty.
exclude_srcs
list of string, list of source files that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
defaults
list of string
arch
interface
auto_gen_config
bool, Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
explicitly.
autorun
bool, whether to use `main` when starting the executable. The default is true, when set to
false it will act much like the normal `python` executable, but with the sources and
libraries automatically included in the PYTHONPATH.
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).
data
list of string, list of files or filegroup modules that provide data that should be installed alongside
the test. the file extension can be arbitrary except for (.py).
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_common_data
list of string, Same as data, but will add dependencies on modules using the device's os variation and
the common arch variation. Useful for a host test that wants to embed a module built for
device.
device_first_data
list of string, Same as data, but will add dependencies on modules via a device os variation and the
device's first supported arch's variation. Useful for a host test that wants to embed a
module built for device.
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.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended 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 coral-foo.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)
embedded_launcher
bool, whether the binary is required to be built with an embedded python interpreter, defaults to
true. This allows taking the resulting binary outside of the build and running it on machines
that don't have python installed or may have an older version of python.
enabled
configurable 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_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_required
list of string, names of other modules to install on host if this module is installed
init_rc
configurable list of string, init.rc files to be installed if this module is installed
is_internal
bool, true, if the Python module is used internally, eg, Python std libs.
java_data
list of string, list of java modules that provide data that should be installed alongside the test.
libs
list of string, list of the Python libraries compatible both with Python2 and Python3.
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
main
string, the name of the source file that is the main entry point of the program.
this file must also be listed in srcs.
If left unspecified, module name is used instead.
If name doesn’t match any filename in srcs, main must be specified.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
overrides
list of string, List of module names that are prevented from being installed when this module gets
installed.
owner
string, vendor who owns this module
pkg_path
string, the package path prefix within the output artifact at which to place the source/data
files of the current module.
eg. Pkg_path = "a/b/c"; Other packages can reference this module by using
(from a.b.c import ...) statement.
if left unspecified, all the source/data files path is unchanged within zip file.
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.arc
⊕exclude_srcs
⊕shared_libs
⊕srcs
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕shared_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.malloc_low_memory
⊕product_variables.native_coverage
⊕product_variables.release_aidl_use_unfrozen
⊕required
⊕vintf_fragment_modules
⊕product_variables.selinuxignoreneverallows
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
configurable list of string, names of other modules to install if this module is installed
shared_libs
list of string, list of shared libraries that should be packaged with the python code for this module.
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).
stem
string, set the name of the output binary.
suffix
string, append to the name of the output binary.
system_dlkm_specific
bool, Install to partition system_dlkm when set to true.
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
compile_multilib
string
enabled
bool
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
test_suites
list of string, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
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_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
⊕version.py2
VersionProperties
Python2-specific properties, including whether Python2 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
⊕version.py3
VersionProperties
Python3-specific properties, including whether Python3 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable 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/+/main/README.md#visibility for
more details.
python_defaults
name
,
srcs
,
exclude_srcs
,
defaults
,
host_supported
,
device_supported
,
apex_available
,
arch
,
auto_gen_config
,
autorun
,
compile_multilib
,
data
,
debug_ramdisk
,
defaults_visibility
,
device_common_data
,
device_first_data
,
device_specific
,
dist
,
dists
,
embedded_launcher
,
enabled
,
host_required
,
init_rc
,
is_internal
,
java_data
,
libs
,
licenses
,
main
,
multilib
,
native_bridge_supported
,
no_full_install
,
odm_dlkm_specific
,
overrides
,
owner
,
pkg_path
,
product_specific
,
product_variables.arc
,
product_variables.debuggable
,
product_variables.malloc_low_memory
,
product_variables.native_coverage
,
product_variables.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
proto
,
ramdisk
,
recovery
,
required
,
shared_libs
,
soc_specific
,
stem
,
suffix
,
system_dlkm_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
team
,
test_suites
,
use_generic_config
,
vendor
,
vendor_dlkm_specific
,
vendor_ramdisk
,
version.py2
,
version.py3
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, list of source (.py) files compatible both with Python2 and Python3 used to compile the
Python module.
srcs may reference the outputs of other modules that produce source files like genrule
or filegroup using the syntax ":module".
Srcs has to be non-empty.
exclude_srcs
list of string, list of source files that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
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".
Prefix pattern (com.foo.*) can be used to match with any APEX name with the prefix(com.foo.).
Default is ["//apex_available:platform"].
arch
interface
auto_gen_config
bool, Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
explicitly.
autorun
bool, whether to use `main` when starting the executable. The default is true, when set to
false it will act much like the normal `python` executable, but with the sources and
libraries automatically included in the PYTHONPATH.
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).
data
list of string, list of files or filegroup modules that provide data that should be installed alongside
the test. the file extension can be arbitrary except for (.py).
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_common_data
list of string, Same as data, but will add dependencies on modules using the device's os variation and
the common arch variation. Useful for a host test that wants to embed a module built for
device.
device_first_data
list of string, Same as data, but will add dependencies on modules via a device os variation and the
device's first supported arch's variation. Useful for a host test that wants to embed a
module built for device.
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.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended 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 coral-foo.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)
embedded_launcher
bool, whether the binary is required to be built with an embedded python interpreter, defaults to
true. This allows taking the resulting binary outside of the build and running it on machines
that don't have python installed or may have an older version of python.
enabled
configurable 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
configurable list of string, init.rc files to be installed if this module is installed
is_internal
bool, true, if the Python module is used internally, eg, Python std libs.
java_data
list of string, list of java modules that provide data that should be installed alongside the test.
libs
list of string, list of the Python libraries compatible both with Python2 and Python3.
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
main
string, the name of the source file that is the main entry point of the program.
this file must also be listed in srcs.
If left unspecified, module name is used instead.
If name doesn’t match any filename in srcs, main must be specified.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
overrides
list of string, List of module names that are prevented from being installed when this module gets
installed.
owner
string, vendor who owns this module
pkg_path
string, the package path prefix within the output artifact at which to place the source/data
files of the current module.
eg. Pkg_path = "a/b/c"; Other packages can reference this module by using
(from a.b.c import ...) statement.
if left unspecified, all the source/data files path is unchanged within zip file.
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.arc
⊕exclude_srcs
⊕shared_libs
⊕srcs
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕shared_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.malloc_low_memory
⊕product_variables.native_coverage
⊕product_variables.release_aidl_use_unfrozen
⊕required
⊕vintf_fragment_modules
⊕product_variables.selinuxignoreneverallows
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
configurable list of string, names of other modules to install if this module is installed
shared_libs
list of string, list of shared libraries that should be packaged with the python code for this module.
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).
stem
string, set the name of the output binary.
suffix
string, append to the name of the output binary.
system_dlkm_specific
bool, Install to partition system_dlkm when set to true.
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
compile_multilib
string
enabled
bool
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
test_suites
list of string, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
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_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
⊕version.py2
VersionProperties
Python2-specific properties, including whether Python2 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
⊕version.py3
VersionProperties
Python3-specific properties, including whether Python3 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable 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/+/main/README.md#visibility for
more details.
python_library
name
,
srcs
,
exclude_srcs
,
defaults
,
host_supported
,
device_supported
,
arch
,
compile_multilib
,
data
,
debug_ramdisk
,
device_common_data
,
device_first_data
,
device_specific
,
dist
,
dists
,
embedded_launcher
,
enabled
,
host_cross_supported
,
host_required
,
init_rc
,
is_internal
,
java_data
,
libs
,
licenses
,
multilib
,
native_bridge_supported
,
no_full_install
,
odm_dlkm_specific
,
overrides
,
owner
,
pkg_path
,
product_specific
,
product_variables.arc
,
product_variables.debuggable
,
product_variables.malloc_low_memory
,
product_variables.native_coverage
,
product_variables.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
proto
,
ramdisk
,
recovery
,
required
,
shared_libs
,
soc_specific
,
system_dlkm_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
team
,
test_only
,
use_generic_config
,
vendor
,
vendor_dlkm_specific
,
vendor_ramdisk
,
version.py2
,
version.py3
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, list of source (.py) files compatible both with Python2 and Python3 used to compile the
Python module.
srcs may reference the outputs of other modules that produce source files like genrule
or filegroup using the syntax ":module".
Srcs has to be non-empty.
exclude_srcs
list of string, list of source files that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
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.
arch
interface
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).
data
list of string, list of files or filegroup modules that provide data that should be installed alongside
the test. the file extension can be arbitrary except for (.py).
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_common_data
list of string, Same as data, but will add dependencies on modules using the device's os variation and
the common arch variation. Useful for a host test that wants to embed a module built for
device.
device_first_data
list of string, Same as data, but will add dependencies on modules via a device os variation and the
device's first supported arch's variation. Useful for a host test that wants to embed a
module built for device.
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.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended 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 coral-foo.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)
embedded_launcher
bool, whether the binary is required to be built with an embedded python interpreter, defaults to
true. This allows taking the resulting binary outside of the build and running it on machines
that don't have python installed or may have an older version of python.
enabled
configurable 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_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_required
list of string, names of other modules to install on host if this module is installed
init_rc
configurable list of string, init.rc files to be installed if this module is installed
is_internal
bool, true, if the Python module is used internally, eg, Python std libs.
java_data
list of string, list of java modules that provide data that should be installed alongside the test.
libs
list of string, list of the Python libraries compatible both with Python2 and Python3.
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
overrides
list of string, List of module names that are prevented from being installed when this module gets
installed.
owner
string, vendor who owns this module
pkg_path
string, the package path prefix within the output artifact at which to place the source/data
files of the current module.
eg. Pkg_path = "a/b/c"; Other packages can reference this module by using
(from a.b.c import ...) statement.
if left unspecified, all the source/data files path is unchanged within zip file.
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.arc
⊕exclude_srcs
⊕shared_libs
⊕srcs
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕shared_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.malloc_low_memory
⊕product_variables.native_coverage
⊕product_variables.release_aidl_use_unfrozen
⊕required
⊕vintf_fragment_modules
⊕product_variables.selinuxignoreneverallows
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
configurable list of string, names of other modules to install if this module is installed
shared_libs
list of string, list of shared libraries that should be packaged with the python code for this module.
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_dlkm_specific
bool, Install to partition system_dlkm when set to true.
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
compile_multilib
string
enabled
bool
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
test_only
bool, Indicates that the module and its source code are only used in tests, not
production code. Used by coverage reports and potentially other tools.
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
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_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
⊕version.py2
VersionProperties
Python2-specific properties, including whether Python2 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
⊕version.py3
VersionProperties
Python3-specific properties, including whether Python3 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable 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/+/main/README.md#visibility for
more details.
python_library_host
name
,
srcs
,
exclude_srcs
,
defaults
,
arch
,
compile_multilib
,
data
,
debug_ramdisk
,
device_common_data
,
device_first_data
,
device_specific
,
dist
,
dists
,
embedded_launcher
,
enabled
,
host_cross_supported
,
host_required
,
init_rc
,
is_internal
,
java_data
,
libs
,
licenses
,
multilib
,
native_bridge_supported
,
no_full_install
,
odm_dlkm_specific
,
overrides
,
owner
,
pkg_path
,
product_specific
,
product_variables.arc
,
product_variables.debuggable
,
product_variables.malloc_low_memory
,
product_variables.native_coverage
,
product_variables.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
proto
,
ramdisk
,
recovery
,
required
,
shared_libs
,
soc_specific
,
system_dlkm_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
team
,
test_only
,
use_generic_config
,
vendor
,
vendor_dlkm_specific
,
vendor_ramdisk
,
version.py2
,
version.py3
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, list of source (.py) files compatible both with Python2 and Python3 used to compile the
Python module.
srcs may reference the outputs of other modules that produce source files like genrule
or filegroup using the syntax ":module".
Srcs has to be non-empty.
exclude_srcs
list of string, list of source files that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
defaults
list of string
arch
interface
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).
data
list of string, list of files or filegroup modules that provide data that should be installed alongside
the test. the file extension can be arbitrary except for (.py).
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_common_data
list of string, Same as data, but will add dependencies on modules using the device's os variation and
the common arch variation. Useful for a host test that wants to embed a module built for
device.
device_first_data
list of string, Same as data, but will add dependencies on modules via a device os variation and the
device's first supported arch's variation. Useful for a host test that wants to embed a
module built for device.
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.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended 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 coral-foo.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)
embedded_launcher
bool, whether the binary is required to be built with an embedded python interpreter, defaults to
true. This allows taking the resulting binary outside of the build and running it on machines
that don't have python installed or may have an older version of python.
enabled
configurable 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_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_required
list of string, names of other modules to install on host if this module is installed
init_rc
configurable list of string, init.rc files to be installed if this module is installed
is_internal
bool, true, if the Python module is used internally, eg, Python std libs.
java_data
list of string, list of java modules that provide data that should be installed alongside the test.
libs
list of string, list of the Python libraries compatible both with Python2 and Python3.
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
overrides
list of string, List of module names that are prevented from being installed when this module gets
installed.
owner
string, vendor who owns this module
pkg_path
string, the package path prefix within the output artifact at which to place the source/data
files of the current module.
eg. Pkg_path = "a/b/c"; Other packages can reference this module by using
(from a.b.c import ...) statement.
if left unspecified, all the source/data files path is unchanged within zip file.
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.arc
⊕exclude_srcs
⊕shared_libs
⊕srcs
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕shared_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.malloc_low_memory
⊕product_variables.native_coverage
⊕product_variables.release_aidl_use_unfrozen
⊕required
⊕vintf_fragment_modules
⊕product_variables.selinuxignoreneverallows
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
configurable list of string, names of other modules to install if this module is installed
shared_libs
list of string, list of shared libraries that should be packaged with the python code for this module.
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_dlkm_specific
bool, Install to partition system_dlkm when set to true.
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
compile_multilib
string
enabled
bool
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
test_only
bool, Indicates that the module and its source code are only used in tests, not
production code. Used by coverage reports and potentially other tools.
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
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_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
⊕version.py2
VersionProperties
Python2-specific properties, including whether Python2 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
⊕version.py3
VersionProperties
Python3-specific properties, including whether Python3 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable 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/+/main/README.md#visibility for
more details.
python_test
name
,
srcs
,
exclude_srcs
,
defaults
,
host_supported
,
device_supported
,
arch
,
auto_gen_config
,
autorun
,
compile_multilib
,
data
,
data_device_bins_both
,
debug_ramdisk
,
device_common_data
,
device_first_data
,
device_specific
,
dist
,
dists
,
embedded_launcher
,
enabled
,
host_cross_supported
,
host_required
,
init_rc
,
is_internal
,
java_data
,
libs
,
licenses
,
main
,
multilib
,
native_bridge_supported
,
no_full_install
,
odm_dlkm_specific
,
overrides
,
owner
,
pkg_path
,
product_specific
,
product_variables.arc
,
product_variables.debuggable
,
product_variables.malloc_low_memory
,
product_variables.native_coverage
,
product_variables.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
proto
,
ramdisk
,
recovery
,
required
,
shared_libs
,
soc_specific
,
stem
,
suffix
,
system_dlkm_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
team
,
test_config
,
test_config_template
,
test_options
,
test_suites
,
use_generic_config
,
vendor
,
vendor_dlkm_specific
,
vendor_ramdisk
,
version.py2
,
version.py3
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, list of source (.py) files compatible both with Python2 and Python3 used to compile the
Python module.
srcs may reference the outputs of other modules that produce source files like genrule
or filegroup using the syntax ":module".
Srcs has to be non-empty.
exclude_srcs
list of string, list of source files that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
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.
arch
interface
auto_gen_config
bool, Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
explicitly.
autorun
bool, whether to use `main` when starting the executable. The default is true, when set to
false it will act much like the normal `python` executable, but with the sources and
libraries automatically included in the PYTHONPATH.
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).
data
list of string, list of files or filegroup modules that provide data that should be installed alongside
the test
data_device_bins_both
list of string, list of device binary modules that should be installed alongside the test
This property adds 64bit AND 32bit variants of the dependency
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_common_data
list of string, Same as data, but will add dependencies on modules using the device's os variation and
the common arch variation. Useful for a host test that wants to embed a module built for
device.
device_first_data
list of string, Same as data, but will add dependencies on modules via a device os variation and the
device's first supported arch's variation. Useful for a host test that wants to embed a
module built for device.
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.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended 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 coral-foo.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)
embedded_launcher
bool, whether the binary is required to be built with an embedded python interpreter, defaults to
true. This allows taking the resulting binary outside of the build and running it on machines
that don't have python installed or may have an older version of python.
enabled
configurable 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_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_required
list of string, names of other modules to install on host if this module is installed
init_rc
configurable list of string, init.rc files to be installed if this module is installed
is_internal
bool, true, if the Python module is used internally, eg, Python std libs.
java_data
list of string, list of java modules that provide data that should be installed alongside the test.
libs
list of string, list of the Python libraries compatible both with Python2 and Python3.
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
main
string, the name of the source file that is the main entry point of the program.
this file must also be listed in srcs.
If left unspecified, module name is used instead.
If name doesn’t match any filename in srcs, main must be specified.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
overrides
list of string, List of module names that are prevented from being installed when this module gets
installed.
owner
string, vendor who owns this module
pkg_path
string, the package path prefix within the output artifact at which to place the source/data
files of the current module.
eg. Pkg_path = "a/b/c"; Other packages can reference this module by using
(from a.b.c import ...) statement.
if left unspecified, all the source/data files path is unchanged within zip file.
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.arc
⊕exclude_srcs
⊕shared_libs
⊕srcs
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕shared_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.malloc_low_memory
⊕product_variables.native_coverage
⊕product_variables.release_aidl_use_unfrozen
⊕required
⊕vintf_fragment_modules
⊕product_variables.selinuxignoreneverallows
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
configurable list of string, names of other modules to install if this module is installed
shared_libs
list of string, list of shared libraries that should be packaged with the python code for this module.
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).
stem
string, set the name of the output binary.
suffix
string, append to the name of the output binary.
system_dlkm_specific
bool, Install to partition system_dlkm when set to true.
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
compile_multilib
string
enabled
bool
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
test_config
string, the name of the test configuration (for example "AndroidTest.xml") that should be
installed with the module.
test_config_template
string, the name of the test configuration template (for example "AndroidTestTemplate.xml") that
should be installed with the module.
⊕test_options
TestOptions
Test options.
runner
string, Runner for the test. Supports "tradefed" and "mobly" (for multi-device tests). Default is "tradefed".
metadata
list of Metadata, Metadata to describe the test configuration.
unit_test
bool, If the test is a hostside (no device required) unittest that shall be run
during presubmit check.
tags
list of string, Tags provide additional metadata to customize test execution by downstream
test runners. The tags have no special meaning to Soong.
test_suites
list of string, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
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_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
⊕version.py2
VersionProperties
Python2-specific properties, including whether Python2 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
⊕version.py3
VersionProperties
Python3-specific properties, including whether Python3 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable 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/+/main/README.md#visibility for
more details.
python_test_host
name
,
srcs
,
exclude_srcs
,
defaults
,
arch
,
auto_gen_config
,
autorun
,
compile_multilib
,
data
,
data_device_bins_both
,
debug_ramdisk
,
device_common_data
,
device_first_data
,
device_specific
,
dist
,
dists
,
embedded_launcher
,
enabled
,
host_cross_supported
,
host_required
,
init_rc
,
is_internal
,
java_data
,
libs
,
licenses
,
main
,
multilib
,
native_bridge_supported
,
no_full_install
,
odm_dlkm_specific
,
overrides
,
owner
,
pkg_path
,
product_specific
,
product_variables.arc
,
product_variables.debuggable
,
product_variables.malloc_low_memory
,
product_variables.native_coverage
,
product_variables.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
proto
,
ramdisk
,
recovery
,
required
,
shared_libs
,
soc_specific
,
stem
,
suffix
,
system_dlkm_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
team
,
test_config
,
test_config_template
,
test_options
,
test_suites
,
use_generic_config
,
vendor
,
vendor_dlkm_specific
,
vendor_ramdisk
,
version.py2
,
version.py3
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, list of source (.py) files compatible both with Python2 and Python3 used to compile the
Python module.
srcs may reference the outputs of other modules that produce source files like genrule
or filegroup using the syntax ":module".
Srcs has to be non-empty.
exclude_srcs
list of string, list of source files that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
defaults
list of string
arch
interface
auto_gen_config
bool, Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
explicitly.
autorun
bool, whether to use `main` when starting the executable. The default is true, when set to
false it will act much like the normal `python` executable, but with the sources and
libraries automatically included in the PYTHONPATH.
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).
data
list of string, list of files or filegroup modules that provide data that should be installed alongside
the test
data_device_bins_both
list of string, list of device binary modules that should be installed alongside the test
This property adds 64bit AND 32bit variants of the dependency
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_common_data
list of string, Same as data, but will add dependencies on modules using the device's os variation and
the common arch variation. Useful for a host test that wants to embed a module built for
device.
device_first_data
list of string, Same as data, but will add dependencies on modules via a device os variation and the
device's first supported arch's variation. Useful for a host test that wants to embed a
module built for device.
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.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended 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 coral-foo.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)
embedded_launcher
bool, whether the binary is required to be built with an embedded python interpreter, defaults to
true. This allows taking the resulting binary outside of the build and running it on machines
that don't have python installed or may have an older version of python.
enabled
configurable 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_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_required
list of string, names of other modules to install on host if this module is installed
init_rc
configurable list of string, init.rc files to be installed if this module is installed
is_internal
bool, true, if the Python module is used internally, eg, Python std libs.
java_data
list of string, list of java modules that provide data that should be installed alongside the test.
libs
list of string, list of the Python libraries compatible both with Python2 and Python3.
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
main
string, the name of the source file that is the main entry point of the program.
this file must also be listed in srcs.
If left unspecified, module name is used instead.
If name doesn’t match any filename in srcs, main must be specified.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
overrides
list of string, List of module names that are prevented from being installed when this module gets
installed.
owner
string, vendor who owns this module
pkg_path
string, the package path prefix within the output artifact at which to place the source/data
files of the current module.
eg. Pkg_path = "a/b/c"; Other packages can reference this module by using
(from a.b.c import ...) statement.
if left unspecified, all the source/data files path is unchanged within zip file.
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.arc
⊕exclude_srcs
⊕shared_libs
⊕srcs
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕shared_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.malloc_low_memory
⊕product_variables.native_coverage
⊕product_variables.release_aidl_use_unfrozen
⊕required
⊕vintf_fragment_modules
⊕product_variables.selinuxignoreneverallows
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
configurable list of string, names of other modules to install if this module is installed
shared_libs
list of string, list of shared libraries that should be packaged with the python code for this module.
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).
stem
string, set the name of the output binary.
suffix
string, append to the name of the output binary.
system_dlkm_specific
bool, Install to partition system_dlkm when set to true.
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
compile_multilib
string
enabled
bool
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
test_config
string, the name of the test configuration (for example "AndroidTest.xml") that should be
installed with the module.
test_config_template
string, the name of the test configuration template (for example "AndroidTestTemplate.xml") that
should be installed with the module.
⊕test_options
TestOptions
Test options.
runner
string, Runner for the test. Supports "tradefed" and "mobly" (for multi-device tests). Default is "tradefed".
metadata
list of Metadata, Metadata to describe the test configuration.
unit_test
bool, If the test is a hostside (no device required) unittest that shall be run
during presubmit check.
Default: true
tags
list of string, Tags provide additional metadata to customize test execution by downstream
test runners. The tags have no special meaning to Soong.
test_suites
list of string, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
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_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
⊕version.py2
VersionProperties
Python2-specific properties, including whether Python2 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
⊕version.py3
VersionProperties
Python3-specific properties, including whether Python3 is supported for this module
and version-specific sources, exclusions and dependencies.
enabled
bool, whether the module is required to be built with this version.
Defaults to true for Python 3, and false otherwise.
srcs
list of string, list of source files specific to this Python version.
Using the syntax ":module", srcs may reference the outputs of other modules that produce source files,
e.g. genrule or filegroup.
exclude_srcs
list of string, list of source files that should not be used to build the Python module for this version.
This is most useful to remove files that are not common to all Python versions.
libs
list of string, list of the Python libraries used only for this Python version.
embedded_launcher
bool, whether the binary is required to be built with embedded launcher for this version, defaults to true.
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable 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/+/main/README.md#visibility for
more details.