use_tools_jar
bool, Add host jdk tools.jar to bootclasspath
uses_libs
list of strings, A list of shared library modules that will be listed in uses-library tags in the AndroidManifest.xml file.
v4_signature
bool, If true, generate the signature file of APK Signing Scheme V4, along side the signed APK file.
Defaults to false.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
android_test_import
android_test_import imports a prebuilt test apk with additional processing specified in the
module. DPI or arch variant configurations can be made as with android_app_import.
name
,
apk
,
arch
,
auto_gen_config
,
certificate
,
compile_multilib
,
data
,
default_dev_cert
,
defaults
,
device_specific
,
dex_preopt
,
dist
,
enabled
,
enforce_uses_libs
,
filename
,
host_required
,
init_rc
,
licenses
,
lineage
,
multilib
,
native_bridge_supported
,
notice
,
optional_uses_libs
,
overrides
,
owner
,
prefer
,
preprocessed
,
presigned
,
privileged
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target
,
target.host
,
target_required
,
test_config
,
test_config_template
,
test_mainline_modules
,
test_suites
,
uses_libs
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
apk
string, A prebuilt apk to import
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.
certificate
string, The name of a certificate in the default certificate directory or an android_app_certificate
module name in the form ":module". Should be empty if presigned or default_dev_cert is set.
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 strings, list of files or filegroup modules that provide data that should be installed alongside
the test
default_dev_cert
bool, Sign with the default system dev certificate. Must be used judiciously. Most imported apps
need to either specify a specific certificate or be presigned.
defaults
list of strings
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`.
⊕dex_preopt
enabled
bool, If false, prevent dexpreopting. Defaults to true.
app_image
bool, If true, generate an app image (.art file) for this module.
profile_guided
bool, If true, use a checked-in profile to guide optimization. Defaults to false unless
a matching profile is set or a profile is found in PRODUCT_DEX_PREOPT_PROFILE_DIR
that matches the name of this module, in which case it is defaulted to true.
profile
string, If set, provides the path to profile relative to the Android.bp file. If not set,
defaults to searching for a file that matches the name of this module in the default
profile location set by PRODUCT_DEX_PREOPT_PROFILE_DIR, or empty if not found.
⊕dist
targets
list of strings, 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).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
enforce_uses_libs
bool, If true, the list of uses_libs and optional_uses_libs modules must match the AndroidManifest.xml file. Defaults
to true if either uses_libs or optional_uses_libs is set. Will unconditionally default to true in the future.
filename
string, Optional name for the installed app. If unspecified, it is derived from the module name.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
licenses
list of strings, Names of the licenses that apply to this module.
lineage
string, Name of the signing certificate lineage file.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
optional_uses_libs
list of strings, A list of shared library modules that will be listed in uses-library tags in the AndroidManifest.xml file with
required=false.
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
prefer
bool, When prefer is set to true the prebuilt will be used instead of any source module with
a matching name.
preprocessed
bool, Whether the prebuilt apk can be installed without additional processing. Default is false.
presigned
bool, Set this flag to true if the prebuilt apk is already signed. The certificate property must not
be set for presigned modules.
privileged
bool, Specifies that this app should be installed to the priv-app directory,
where the system will grant it additional privileges not available to
normal apps.
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
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_mainline_modules
list of strings, Add parameterized mainline modules to auto generated test config. The options will be
handled by TradeFed to do downloading and installing the specified modules on the device.
test_suites
list of strings, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
uses_libs
list of strings, A list of shared library modules that will be listed in uses-library tags in the AndroidManifest.xml file.
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
dex_import
dex_import imports a `.jar` file containing classes.dex files.
A dex_import module cannot be used as a dependency of a java_* or android_* module, it can only be installed
to the device.
name
,
apex_available
,
arch
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
enabled
,
host_required
,
init_rc
,
jars
,
licenses
,
multilib
,
native_bridge_supported
,
notice
,
owner
,
prefer
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
stem
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
apex_available
list of strings, 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".
Default is ["//apex_available:platform"].
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
defaults
list of strings
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
targets
list of strings, 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).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
jars
list of strings
licenses
list of strings, Names of the licenses that apply to this module.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
prefer
bool, When prefer is set to true the prebuilt will be used instead of any source module with
a matching name.
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
stem
string, set the name of the output
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.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
doc_defaults
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
apex_available
,
api_filename
,
arch
,
arg_files
,
args
,
check_api
,
compat_config
,
compile_multilib
,
create_stubs
,
custom_template
,
defaults
,
defaults_visibility
,
device_specific
,
dist
,
dokka_enabled
,
enabled
,
exclude_srcs
,
filter_packages
,
hdf
,
host_required
,
html_dirs
,
init_rc
,
installable
,
java_version
,
knowntags
,
libs
,
licenses
,
local_sourcepaths
,
multilib
,
native_bridge_supported
,
notice
,
out
,
owner
,
product_specific
,
proofread_file
,
proprietary
,
ramdisk
,
recovery
,
removed_api_filename
,
removed_dex_api_filename
,
required
,
resourcesdir
,
resourcesoutdir
,
sandbox
,
sdk_version
,
soc_specific
,
static_doc_index_redirect
,
static_doc_properties
,
system_ext_specific
,
system_modules
,
target
,
target.host
,
target_required
,
todo_file
,
vendor
,
vintf_fragments
,
visibility
,
write_sdk_values
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, list of source files used to compile the Java module. May be .java, .logtags, .proto,
or .aidl files.
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.
⊕aidl
include_dirs
list of strings, Top level directories to pass to aidl tool
local_include_dirs
list of strings, Directories rooted at the Android.bp file to pass to aidl tool
apex_available
list of strings, 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".
Default is ["//apex_available:platform"].
api_filename
string, the generated public API filename by Doclava.
arch
interface
arg_files
list of strings, local files that are used within user customized droiddoc options.
args
string, user customized droiddoc args.
Available variables for substitution:
$(location <label>): the path to the arg_files with name <label>
$$: a literal $
⊕check_api
last_released
ApiToCheck
current
ApiToCheck
ignore_missing_latest_api
bool, do not perform API check against Last_released, in the case that both two specified API
files by Last_released are modules which don't exist.
compat_config
string, Compat config XML. Generates compat change documentation if set.
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
create_stubs
bool, if set to false, don't allow droiddoc to generate stubs source files. Defaults to true.
custom_template
string, directory relative to top of the source tree that contains doc templates files.
defaults
list of strings
defaults_visibility
list of strings, Controls the visibility of the defaults module itself.
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
targets
list of strings, 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).
dokka_enabled
bool, if set to true, generate docs through Dokka instead of Doclava.
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
exclude_srcs
list of strings, list of source files that should not be used to build the Java module.
This is most useful in the arch/multilib variants to remove non-common files
filegroup or genrule can be included within this property.
filter_packages
list of strings, list of package names that should actually be used. If this property is left unspecified,
all the sources from the srcs property is used.
hdf
list of strings, set a value in the Clearsilver hdf namespace.
host_required
list of strings, names of other modules to install on host if this module is installed
html_dirs
list of strings, directories under current module source which contains html/jd files.
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, If set to false, don't allow this module(-docs.zip) to be exported. Defaults to true.
java_version
string, If not blank, set the java version passed to javadoc as -source
knowntags
list of strings, a list of files under current module source dir which contains known tags in Java sources.
filegroup or genrule can be included within this property.
libs
list of strings, list of java libraries that will be in the classpath.
licenses
list of strings, Names of the licenses that apply to this module.
local_sourcepaths
list of strings, list of directories rooted at the Android.bp file that will
be added to the search paths for finding source files when passing package names.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
out
list of strings, names of the output files used in args that will be generated
owner
string, vendor who owns this module
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proofread_file
string, proofread file contains all of the text content of the javadocs concatenated into one file,
suitable for spell-checking and other goodness.
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
removed_api_filename
string, the generated removed API filename by Doclava.
removed_dex_api_filename
string, the generated removed Dex API filename by Doclava.
required
list of strings, names of other modules to install if this module is installed
resourcesdir
string, directory under current module source that provide additional resources (images).
resourcesoutdir
string, resources output directory under out/soong/.intermediates.
sandbox
bool, If set, metalava is sandboxed to only read files explicitly specified on the command
line. Defaults to false.
sdk_version
string, if not blank, set to the version of the sdk to compile against.
Defaults to compiling against the current platform.
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).
static_doc_index_redirect
string, index.html under current module will be copied to docs out dir, if not null.
static_doc_properties
string, source.properties under current module will be copied to docs out dir, if not null.
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).
system_modules
string, When targeting 1.9 and above, override the modules to use with --system,
otherwise provides defaults libraries to add to the bootclasspath.
Defaults to "none"
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
todo_file
string, a todo file lists the program elements that are missing documentation.
At some point, this might be improved to show more warnings.
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
write_sdk_values
bool, if set to true, collect the values used by the Dev tools and
write them in files packaged with the SDK. Defaults to false.
droiddoc
droiddoc converts .java source files to documentation using doclava or dokka.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
api_filename
,
arch
,
arg_files
,
args
,
check_api
,
compat_config
,
compile_multilib
,
create_stubs
,
custom_template
,
defaults
,
device_specific
,
dist
,
dokka_enabled
,
enabled
,
exclude_srcs
,
filter_packages
,
hdf
,
host_required
,
html_dirs
,
init_rc
,
installable
,
java_version
,
knowntags
,
libs
,
licenses
,
local_sourcepaths
,
multilib
,
native_bridge_supported
,
notice
,
out
,
owner
,
product_specific
,
proofread_file
,
proprietary
,
ramdisk
,
recovery
,
removed_api_filename
,
removed_dex_api_filename
,
required
,
resourcesdir
,
resourcesoutdir
,
sandbox
,
sdk_version
,
soc_specific
,
static_doc_index_redirect
,
static_doc_properties
,
system_ext_specific
,
system_modules
,
target
,
target.host
,
target_required
,
todo_file
,
vendor
,
vintf_fragments
,
visibility
,
write_sdk_values
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, list of source files used to compile the Java module. May be .java, .logtags, .proto,
or .aidl files.
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.
⊕aidl
include_dirs
list of strings, Top level directories to pass to aidl tool
local_include_dirs
list of strings, Directories rooted at the Android.bp file to pass to aidl tool
api_filename
string, the generated public API filename by Doclava.
arch
interface
arg_files
list of strings, local files that are used within user customized droiddoc options.
args
string, user customized droiddoc args.
Available variables for substitution:
$(location <label>): the path to the arg_files with name <label>
$$: a literal $
⊕check_api
last_released
ApiToCheck
current
ApiToCheck
ignore_missing_latest_api
bool, do not perform API check against Last_released, in the case that both two specified API
files by Last_released are modules which don't exist.
compat_config
string, Compat config XML. Generates compat change documentation if set.
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
create_stubs
bool, if set to false, don't allow droiddoc to generate stubs source files. Defaults to true.
custom_template
string, directory relative to top of the source tree that contains doc templates files.
defaults
list of strings
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
targets
list of strings, 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).
dokka_enabled
bool, if set to true, generate docs through Dokka instead of Doclava.
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
exclude_srcs
list of strings, list of source files that should not be used to build the Java module.
This is most useful in the arch/multilib variants to remove non-common files
filegroup or genrule can be included within this property.
filter_packages
list of strings, list of package names that should actually be used. If this property is left unspecified,
all the sources from the srcs property is used.
hdf
list of strings, set a value in the Clearsilver hdf namespace.
host_required
list of strings, names of other modules to install on host if this module is installed
html_dirs
list of strings, directories under current module source which contains html/jd files.
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, If set to false, don't allow this module(-docs.zip) to be exported. Defaults to true.
java_version
string, If not blank, set the java version passed to javadoc as -source
knowntags
list of strings, a list of files under current module source dir which contains known tags in Java sources.
filegroup or genrule can be included within this property.
libs
list of strings, list of java libraries that will be in the classpath.
licenses
list of strings, Names of the licenses that apply to this module.
local_sourcepaths
list of strings, list of directories rooted at the Android.bp file that will
be added to the search paths for finding source files when passing package names.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
out
list of strings, names of the output files used in args that will be generated
owner
string, vendor who owns this module
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proofread_file
string, proofread file contains all of the text content of the javadocs concatenated into one file,
suitable for spell-checking and other goodness.
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
removed_api_filename
string, the generated removed API filename by Doclava.
removed_dex_api_filename
string, the generated removed Dex API filename by Doclava.
required
list of strings, names of other modules to install if this module is installed
resourcesdir
string, directory under current module source that provide additional resources (images).
resourcesoutdir
string, resources output directory under out/soong/.intermediates.
sandbox
bool, If set, metalava is sandboxed to only read files explicitly specified on the command
line. Defaults to false.
sdk_version
string, if not blank, set to the version of the sdk to compile against.
Defaults to compiling against the current platform.
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).
static_doc_index_redirect
string, index.html under current module will be copied to docs out dir, if not null.
static_doc_properties
string, source.properties under current module will be copied to docs out dir, if not null.
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).
system_modules
string, When targeting 1.9 and above, override the modules to use with --system,
otherwise provides defaults libraries to add to the bootclasspath.
Defaults to "none"
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
todo_file
string, a todo file lists the program elements that are missing documentation.
At some point, this might be improved to show more warnings.
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
write_sdk_values
bool, if set to true, collect the values used by the Dev tools and
write them in files packaged with the SDK. Defaults to false.
droiddoc_exported_dir
droiddoc_exported_dir exports a directory of html templates or nullability annotations for use by doclava.
name
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
host_required
,
init_rc
,
licenses
,
native_bridge_supported
,
notice
,
owner
,
path
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
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
targets
list of strings, 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).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
licenses
list of strings, Names of the licenses that apply to this module.
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
path
string, path to the directory containing Droiddoc related files.
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
droiddoc_host
droiddoc_host converts .java source files to documentation using doclava or dokka.
name
,
srcs
,
aidl
,
api_filename
,
arch
,
arg_files
,
args
,
check_api
,
compat_config
,
compile_multilib
,
create_stubs
,
custom_template
,
defaults
,
device_specific
,
dist
,
dokka_enabled
,
enabled
,
exclude_srcs
,
filter_packages
,
hdf
,
host_required
,
html_dirs
,
init_rc
,
installable
,
java_version
,
knowntags
,
libs
,
licenses
,
local_sourcepaths
,
multilib
,
native_bridge_supported
,
notice
,
out
,
owner
,
product_specific
,
proofread_file
,
proprietary
,
ramdisk
,
recovery
,
removed_api_filename
,
removed_dex_api_filename
,
required
,
resourcesdir
,
resourcesoutdir
,
sandbox
,
sdk_version
,
soc_specific
,
static_doc_index_redirect
,
static_doc_properties
,
system_ext_specific
,
system_modules
,
target
,
target.host
,
target_required
,
todo_file
,
vendor
,
vintf_fragments
,
visibility
,
write_sdk_values
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, list of source files used to compile the Java module. May be .java, .logtags, .proto,
or .aidl files.
⊕aidl
include_dirs
list of strings, Top level directories to pass to aidl tool
local_include_dirs
list of strings, Directories rooted at the Android.bp file to pass to aidl tool
api_filename
string, the generated public API filename by Doclava.
arch
interface
arg_files
list of strings, local files that are used within user customized droiddoc options.
args
string, user customized droiddoc args.
Available variables for substitution:
$(location <label>): the path to the arg_files with name <label>
$$: a literal $
⊕check_api
last_released
ApiToCheck
current
ApiToCheck
ignore_missing_latest_api
bool, do not perform API check against Last_released, in the case that both two specified API
files by Last_released are modules which don't exist.
compat_config
string, Compat config XML. Generates compat change documentation if set.
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
create_stubs
bool, if set to false, don't allow droiddoc to generate stubs source files. Defaults to true.
custom_template
string, directory relative to top of the source tree that contains doc templates files.
defaults
list of strings
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
targets
list of strings, 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).
dokka_enabled
bool, if set to true, generate docs through Dokka instead of Doclava.
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
exclude_srcs
list of strings, list of source files that should not be used to build the Java module.
This is most useful in the arch/multilib variants to remove non-common files
filegroup or genrule can be included within this property.
filter_packages
list of strings, list of package names that should actually be used. If this property is left unspecified,
all the sources from the srcs property is used.
hdf
list of strings, set a value in the Clearsilver hdf namespace.
host_required
list of strings, names of other modules to install on host if this module is installed
html_dirs
list of strings, directories under current module source which contains html/jd files.
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, If set to false, don't allow this module(-docs.zip) to be exported. Defaults to true.
java_version
string, If not blank, set the java version passed to javadoc as -source
knowntags
list of strings, a list of files under current module source dir which contains known tags in Java sources.
filegroup or genrule can be included within this property.
libs
list of strings, list of java libraries that will be in the classpath.
licenses
list of strings, Names of the licenses that apply to this module.
local_sourcepaths
list of strings, list of directories rooted at the Android.bp file that will
be added to the search paths for finding source files when passing package names.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
out
list of strings, names of the output files used in args that will be generated
owner
string, vendor who owns this module
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proofread_file
string, proofread file contains all of the text content of the javadocs concatenated into one file,
suitable for spell-checking and other goodness.
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
removed_api_filename
string, the generated removed API filename by Doclava.
removed_dex_api_filename
string, the generated removed Dex API filename by Doclava.
required
list of strings, names of other modules to install if this module is installed
resourcesdir
string, directory under current module source that provide additional resources (images).
resourcesoutdir
string, resources output directory under out/soong/.intermediates.
sandbox
bool, If set, metalava is sandboxed to only read files explicitly specified on the command
line. Defaults to false.
sdk_version
string, if not blank, set to the version of the sdk to compile against.
Defaults to compiling against the current platform.
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).
static_doc_index_redirect
string, index.html under current module will be copied to docs out dir, if not null.
static_doc_properties
string, source.properties under current module will be copied to docs out dir, if not null.
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).
system_modules
string, When targeting 1.9 and above, override the modules to use with --system,
otherwise provides defaults libraries to add to the bootclasspath.
Defaults to "none"
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
todo_file
string, a todo file lists the program elements that are missing documentation.
At some point, this might be improved to show more warnings.
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
write_sdk_values
bool, if set to true, collect the values used by the Dev tools and
write them in files packaged with the SDK. Defaults to false.
droidstubs
droidstubs passes sources files through Metalava to generate stub .java files that only contain the API to be
documented, filtering out hidden classes and methods. The resulting .java files are intended to be passed to
a droiddoc module to generate documentation.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
annotations_enabled
,
api_filename
,
api_levels_annotations_dirs
,
api_levels_annotations_enabled
,
api_levels_jar_filename
,
arch
,
arg_files
,
args
,
check_api
,
check_nullability_warnings
,
compile_multilib
,
create_doc_stubs
,
defaults
,
device_specific
,
dist
,
enabled
,
exclude_srcs
,
filter_packages
,
generate_stubs
,
host_required
,
init_rc
,
installable
,
java_version
,
jdiff_enabled
,
libs
,
licenses
,
local_sourcepaths
,
merge_annotations_dirs
,
merge_inclusion_annotations_dirs
,
multilib
,
native_bridge_supported
,
notice
,
out
,
owner
,
previous_api
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
removed_api_filename
,
removed_dex_api_filename
,
required
,
sandbox
,
sdk_member_name
,
sdk_version
,
soc_specific
,
system_ext_specific
,
system_modules
,
target
,
target.host
,
target_required
,
validate_nullability_from_list
,
vendor
,
vintf_fragments
,
visibility
,
write_sdk_values
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, list of source files used to compile the Java module. May be .java, .logtags, .proto,
or .aidl files.
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.
⊕aidl
include_dirs
list of strings, Top level directories to pass to aidl tool
local_include_dirs
list of strings, Directories rooted at the Android.bp file to pass to aidl tool
annotations_enabled
bool, is set to true, Metalava will allow framework SDK to contain annotations.
api_filename
string, the generated public API filename by Metalava.
api_levels_annotations_dirs
list of strings, the dirs which Metalava extracts API levels annotations from.
api_levels_annotations_enabled
bool, is set to true, Metalava will allow framework SDK to contain API levels annotations.
api_levels_jar_filename
string, the filename which Metalava extracts API levels annotations from. Defaults to android.jar.
arch
interface
arg_files
list of strings, local files that are used within user customized droiddoc options.
args
string, user customized droiddoc args.
Available variables for substitution:
$(location <label>): the path to the arg_files with name <label>
$$: a literal $
⊕check_api
last_released
ApiToCheck
current
ApiToCheck
ignore_missing_latest_api
bool, The java_sdk_library module generates references to modules (i.e. filegroups)
from which information about the latest API version can be obtained. As those
modules may not exist (e.g. because a previous version has not been released) it
sets ignore_missing_latest_api=true on the droidstubs modules it creates so
that droidstubs can ignore those references if the modules do not yet exist.
If true then this will ignore module references for modules that do not exist
in properties that supply the previous version of the API.
There are two sets of those:
* Api_file, Removed_api_file in check_api.last_released
* New_since in check_api.api_lint.new_since
The first two must be set as a pair, so either they should both exist or neither
should exist - in which case when this property is true they are ignored. If one
exists and the other does not then it is an error.
⊕api_lint
enabled
bool
new_since
string, If set, performs api_lint on any new APIs not found in the given signature file
baseline_file
string, If not blank, path to the baseline txt file for approved API lint violations.
check_nullability_warnings
string, a file containing expected warnings produced by validation of nullability annotations.
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
create_doc_stubs
bool, if set to true, allow Metalava to generate doc_stubs source files. Defaults to false.
defaults
list of strings
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
targets
list of strings, 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).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
exclude_srcs
list of strings, list of source files that should not be used to build the Java module.
This is most useful in the arch/multilib variants to remove non-common files
filegroup or genrule can be included within this property.
filter_packages
list of strings, list of package names that should actually be used. If this property is left unspecified,
all the sources from the srcs property is used.
generate_stubs
bool, if set to false then do not write out stubs. Defaults to true.
TODO(b/146727827): Remove capability when we do not need to generate stubs and API separately.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, If set to false, don't allow this module(-docs.zip) to be exported. Defaults to true.
java_version
string, If not blank, set the java version passed to javadoc as -source
jdiff_enabled
bool, If set to true, .xml based public API file will be also generated, and
JDiff tool will be invoked to genreate javadoc files. Defaults to false.
libs
list of strings, list of java libraries that will be in the classpath.
licenses
list of strings, Names of the licenses that apply to this module.
local_sourcepaths
list of strings, list of directories rooted at the Android.bp file that will
be added to the search paths for finding source files when passing package names.
merge_annotations_dirs
list of strings, a list of top-level directories containing files to merge qualifier annotations (i.e. those intended to be included in the stubs written) from.
merge_inclusion_annotations_dirs
list of strings, a list of top-level directories containing Java stub files to merge show/hide annotations from.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
out
list of strings, names of the output files used in args that will be generated
owner
string, vendor who owns this module
previous_api
string, user can specify the version of previous released API file in order to do compatibility check.
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
removed_api_filename
string, the generated removed API filename by Metalava.
removed_dex_api_filename
string, the generated removed Dex API filename by Metalava.
required
list of strings, names of other modules to install if this module is installed
sandbox
bool, If set, metalava is sandboxed to only read files explicitly specified on the command
line. Defaults to false.
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_version
string, if not blank, set to the version of the sdk to compile against.
Defaults to compiling against the current platform.
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
system_modules
string, When targeting 1.9 and above, override the modules to use with --system,
otherwise provides defaults libraries to add to the bootclasspath.
Defaults to "none"
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
validate_nullability_from_list
string, a file containing a list of classes to do nullability validation for.
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
write_sdk_values
bool, if set to true, collect the values used by the Dev tools and
write them in files packaged with the SDK. Defaults to false.
droidstubs_host
droidstubs_host passes sources files through Metalava to generate stub .java files that only contain the API
to be documented, filtering out hidden classes and methods. The resulting .java files are intended to be
passed to a droiddoc_host module to generate documentation. Use a droidstubs_host instead of a droidstubs
module when symbols needed by the source files are provided by java_library_host modules.
name
,
srcs
,
aidl
,
annotations_enabled
,
api_filename
,
api_levels_annotations_dirs
,
api_levels_annotations_enabled
,
api_levels_jar_filename
,
arch
,
arg_files
,
args
,
check_api
,
check_nullability_warnings
,
compile_multilib
,
create_doc_stubs
,
defaults
,
device_specific
,
dist
,
enabled
,
exclude_srcs
,
filter_packages
,
generate_stubs
,
host_required
,
init_rc
,
installable
,
java_version
,
jdiff_enabled
,
libs
,
licenses
,
local_sourcepaths
,
merge_annotations_dirs
,
merge_inclusion_annotations_dirs
,
multilib
,
native_bridge_supported
,
notice
,
out
,
owner
,
previous_api
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
removed_api_filename
,
removed_dex_api_filename
,
required
,
sandbox
,
sdk_version
,
soc_specific
,
system_ext_specific
,
system_modules
,
target
,
target.host
,
target_required
,
validate_nullability_from_list
,
vendor
,
vintf_fragments
,
visibility
,
write_sdk_values
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, list of source files used to compile the Java module. May be .java, .logtags, .proto,
or .aidl files.
⊕aidl
include_dirs
list of strings, Top level directories to pass to aidl tool
local_include_dirs
list of strings, Directories rooted at the Android.bp file to pass to aidl tool
annotations_enabled
bool, is set to true, Metalava will allow framework SDK to contain annotations.
api_filename
string, the generated public API filename by Metalava.
api_levels_annotations_dirs
list of strings, the dirs which Metalava extracts API levels annotations from.
api_levels_annotations_enabled
bool, is set to true, Metalava will allow framework SDK to contain API levels annotations.
api_levels_jar_filename
string, the filename which Metalava extracts API levels annotations from. Defaults to android.jar.
arch
interface
arg_files
list of strings, local files that are used within user customized droiddoc options.
args
string, user customized droiddoc args.
Available variables for substitution:
$(location <label>): the path to the arg_files with name <label>
$$: a literal $
⊕check_api
last_released
ApiToCheck
current
ApiToCheck
ignore_missing_latest_api
bool, The java_sdk_library module generates references to modules (i.e. filegroups)
from which information about the latest API version can be obtained. As those
modules may not exist (e.g. because a previous version has not been released) it
sets ignore_missing_latest_api=true on the droidstubs modules it creates so
that droidstubs can ignore those references if the modules do not yet exist.
If true then this will ignore module references for modules that do not exist
in properties that supply the previous version of the API.
There are two sets of those:
* Api_file, Removed_api_file in check_api.last_released
* New_since in check_api.api_lint.new_since
The first two must be set as a pair, so either they should both exist or neither
should exist - in which case when this property is true they are ignored. If one
exists and the other does not then it is an error.
⊕api_lint
enabled
bool
new_since
string, If set, performs api_lint on any new APIs not found in the given signature file
baseline_file
string, If not blank, path to the baseline txt file for approved API lint violations.
check_nullability_warnings
string, a file containing expected warnings produced by validation of nullability annotations.
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
create_doc_stubs
bool, if set to true, allow Metalava to generate doc_stubs source files. Defaults to false.
defaults
list of strings
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
targets
list of strings, 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).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
exclude_srcs
list of strings, list of source files that should not be used to build the Java module.
This is most useful in the arch/multilib variants to remove non-common files
filegroup or genrule can be included within this property.
filter_packages
list of strings, list of package names that should actually be used. If this property is left unspecified,
all the sources from the srcs property is used.
generate_stubs
bool, if set to false then do not write out stubs. Defaults to true.
TODO(b/146727827): Remove capability when we do not need to generate stubs and API separately.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, If set to false, don't allow this module(-docs.zip) to be exported. Defaults to true.
java_version
string, If not blank, set the java version passed to javadoc as -source
jdiff_enabled
bool, If set to true, .xml based public API file will be also generated, and
JDiff tool will be invoked to genreate javadoc files. Defaults to false.
libs
list of strings, list of java libraries that will be in the classpath.
licenses
list of strings, Names of the licenses that apply to this module.
local_sourcepaths
list of strings, list of directories rooted at the Android.bp file that will
be added to the search paths for finding source files when passing package names.
merge_annotations_dirs
list of strings, a list of top-level directories containing files to merge qualifier annotations (i.e. those intended to be included in the stubs written) from.
merge_inclusion_annotations_dirs
list of strings, a list of top-level directories containing Java stub files to merge show/hide annotations from.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
out
list of strings, names of the output files used in args that will be generated
owner
string, vendor who owns this module
previous_api
string, user can specify the version of previous released API file in order to do compatibility check.
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
removed_api_filename
string, the generated removed API filename by Metalava.
removed_dex_api_filename
string, the generated removed Dex API filename by Metalava.
required
list of strings, names of other modules to install if this module is installed
sandbox
bool, If set, metalava is sandboxed to only read files explicitly specified on the command
line. Defaults to false.
sdk_version
string, if not blank, set to the version of the sdk to compile against.
Defaults to compiling against the current platform.
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
system_modules
string, When targeting 1.9 and above, override the modules to use with --system,
otherwise provides defaults libraries to add to the bootclasspath.
Defaults to "none"
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
validate_nullability_from_list
string, a file containing a list of classes to do nullability validation for.
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
write_sdk_values
bool, if set to true, collect the values used by the Dev tools and
write them in files packaged with the SDK. Defaults to false.
global_compat_config
global_compat_config provides access to the merged compat config xml file generated by the build.
name
,
host_supported
,
device_supported
,
arch
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
filename
,
host_required
,
init_rc
,
licenses
,
multilib
,
native_bridge_supported
,
notice
,
owner
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
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
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
targets
list of strings, 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).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
filename
string, name of the file into which the metadata will be copied.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
licenses
list of strings, Names of the licenses that apply to this module.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
hiddenapi_flags
hiddenapi-flags provides access to the hiddenapi-flags.csv file generated during the build.
name
,
host_supported
,
device_supported
,
arch
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
filename
,
host_required
,
init_rc
,
licenses
,
multilib
,
native_bridge_supported
,
notice
,
owner
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
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
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
targets
list of strings, 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).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
filename
string, name of the file into which the flags will be copied.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
licenses
list of strings, Names of the licenses that apply to this module.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
java_binary
java_binary builds a `.jar` file and a shell script that executes it for the device, and possibly for the host
as well.
By default, a java_binary has a single variant that produces a `.jar` file containing `classes.dex` files that were
compiled against the device bootclasspath.
Specifying `host_supported: true` will produce two variants, one compiled against the device bootclasspath and one
compiled against the host bootclasspath.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
arch
,
compile_dex
,
compile_multilib
,
defaults
,
device_specific
,
dex_preopt
,
dist
,
dxflags
,
enabled
,
errorprone
,
exclude_java_resource_dirs
,
exclude_java_resources
,
exclude_srcs
,
exported_plugins
,
host_required
,
hostdex
,
include_srcs
,
init_rc
,
installable
,
jacoco
,
jarjar_rules
,
java_resource_dirs
,
java_resources
,
java_version
,
javac_shard_size
,
javacflags
,
kotlincflags
,
libs
,
licenses
,
lint
,
main_class
,
manifest
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
notice
,
openjdk9
,
optimize
,
owner
,
patch_module
,
permitted_packages
,
platform_apis
,
plugins
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
recovery
,
required
,
sdk_version
,
services
,
soc_specific
,
static_kotlin_stdlib
,
static_libs
,
stem
,
system_ext_specific
,
system_modules
,
target
,
target.host
,
target.hostdex
,
target_required
,
target_sdk_version
,
uncompress_dex
,
use_tools_jar
,
v4_signature
,
vendor
,
vintf_fragments
,
visibility
,
wrapper
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, list of source files used to compile the Java module. May be .java, .logtags, .proto,
or .aidl files.
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.
⊕aidl
include_dirs
list of strings, Top level directories to pass to aidl tool
local_include_dirs
list of strings, Directories rooted at the Android.bp file to pass to aidl tool
export_include_dirs
list of strings, directories that should be added as include directories for any aidl sources of modules
that depend on this module, as well as to aidl for this module.
generate_traces
bool, whether to generate traces (for systrace) for this interface
generate_get_transaction_name
bool, whether to generate Binder#GetTransaction name method.
arch
interface
compile_dex
bool, If set to true, compile dex regardless of installable. Defaults to false.
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
defaults
list of strings
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`.
⊕dex_preopt
enabled
bool, If false, prevent dexpreopting. Defaults to true.
app_image
bool, If true, generate an app image (.art file) for this module.
profile_guided
bool, If true, use a checked-in profile to guide optimization. Defaults to false unless
a matching profile is set or a profile is found in PRODUCT_DEX_PREOPT_PROFILE_DIR
that matches the name of this module, in which case it is defaulted to true.
profile
string, If set, provides the path to profile relative to the Android.bp file. If not set,
defaults to searching for a file that matches the name of this module in the default
profile location set by PRODUCT_DEX_PREOPT_PROFILE_DIR, or empty if not found.
⊕dist
targets
list of strings, 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).
dxflags
list of strings, list of module-specific flags that will be used for dex compiles
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
⊕errorprone
javacflags
list of strings, List of javac flags that should only be used when running errorprone.
exclude_java_resource_dirs
list of strings, list of directories that should be excluded from java_resource_dirs
exclude_java_resources
list of strings, list of files that should be excluded from java_resources and java_resource_dirs
exclude_srcs
list of strings, list of source files that should not be used to build the Java module.
This is most useful in the arch/multilib variants to remove non-common files
exported_plugins
list of strings, List of modules to export to libraries that directly depend on this library as annotation processors
host_required
list of strings, names of other modules to install on host if this module is installed
hostdex
bool, If true, export a copy of the module as a -hostdex module for host testing.
include_srcs
bool, If set to true, include sources used to compile the module in to the final jar
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, If set to true, allow this module to be dexed and installed on devices. Has no
effect on host modules, which are always considered installable.
Default: true
⊕jacoco
include_filter
list of strings, List of classes to include for instrumentation with jacoco to collect coverage
information at runtime when building with coverage enabled. If unset defaults to all
classes.
Supports '*' as the last character of an entry in the list as a wildcard match.
If preceded by '.' it matches all classes in the package and subpackages, otherwise
it matches classes in the package that have the class name as a prefix.
exclude_filter
list of strings, List of classes to exclude from instrumentation with jacoco to collect coverage
information at runtime when building with coverage enabled. Overrides classes selected
by the include_filter property.
Supports '*' as the last character of an entry in the list as a wildcard match.
If preceded by '.' it matches all classes in the package and subpackages, otherwise
it matches classes in the package that have the class name as a prefix.
jarjar_rules
string, if not blank, run jarjar using the specified rules file
java_resource_dirs
list of strings, list of directories containing Java resources
java_resources
list of strings, list of files to use as Java resources
java_version
string, If not blank, set the java version passed to javac as -source and -target
javac_shard_size
int64, The number of Java source entries each Javac instance can process
javacflags
list of strings, list of module-specific flags that will be used for javac compiles
kotlincflags
list of strings, list of module-specific flags that will be used for kotlinc compiles
libs
list of strings, list of of java libraries that will be in the classpath
licenses
list of strings, Names of the licenses that apply to this module.
⊕lint
Controls for running Android Lint on the module.
enabled
bool, If true, run Android Lint on the module. Defaults to true.
flags
list of strings, Flags to pass to the Android Lint tool.
fatal_checks
list of strings, Checks that should be treated as fatal.
error_checks
list of strings, Checks that should be treated as errors.
warning_checks
list of strings, Checks that should be treated as warnings.
disabled_checks
list of strings, Checks that should be skipped.
main_class
string, Name of the class containing main to be inserted into the manifest as Main-Class.
manifest
string, manifest file to be included in resulting jar
min_sdk_version
string, if not blank, set the minimum version of the sdk that the compiled artifacts will run against.
Defaults to sdk_version if not set.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
⊕openjdk9
srcs
list of strings, List of source files that should only be used when passing -source 1.9 or higher
javacflags
list of strings, List of javac flags that should only be used when passing -source 1.9 or higher
⊕optimize
enabled
bool, If false, disable all optimization. Defaults to true for android_app and android_test
modules, false for java_library and java_test modules.
enabledByDefault
bool, True if the module containing this has it set by default.
shrink
bool, If true, optimize for size by removing unused code. Defaults to true for apps,
false for libraries and tests.
optimize
bool, If true, optimize bytecode. Defaults to false.
obfuscate
bool, If true, obfuscate bytecode. Defaults to false.
no_aapt_flags
bool, If true, do not use the flag files generated by aapt that automatically keep
classes referenced by the app manifest. Defaults to false.
proguard_flags
list of strings, Flags to pass to proguard.
proguard_flags_files
list of strings, Specifies the locations of files containing proguard flags.
owner
string, vendor who owns this module
patch_module
string, When compiling language level 9+ .java code in packages that are part of
a system module, patch_module names the module that your sources and
dependencies should be patched into. The Android runtime currently
doesn't implement the JEP 261 module system so this option is only
supported at compile time. It should only be needed to compile tests in
packages that exist in libcore and which are inconvenient to move
elsewhere.
permitted_packages
list of strings, If not empty, classes are restricted to the specified packages and their sub-packages.
This restriction is checked after applying jarjar rules and including static libs.
platform_apis
bool, Whether to compile against the platform APIs instead of an SDK.
If true, then sdk_version must be empty. The value of this field
is ignored when module's type isn't android_app.
plugins
list of strings, List of modules to use as annotation processors
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
output_params
list of strings, List of extra options that will be passed to the proto generator.
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
list of strings, names of other modules to install if this module is installed
sdk_version
string, if not blank, set to the version of the sdk to compile against.
Defaults to compiling against the current platform.
services
list of strings, List of files to include in the META-INF/services folder of the resulting jar.
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).
static_kotlin_stdlib
bool, If true, package the kotlin stdlib into the jar. Defaults to true.
static_libs
list of strings, list of java libraries that will be compiled into the resulting jar
stem
string, set the name of the output
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).
system_modules
string, When targeting 1.9 and above, override the modules to use with --system,
otherwise provides defaults libraries to add to the bootclasspath.
target
interface
⊕target.host, target.android
⊕target.hostdex
required
list of strings, Additional required dependencies to add to -hostdex modules.
target_required
list of strings, names of other modules to install on target if this module is installed
target_sdk_version
string, if not blank, set the targetSdkVersion in the AndroidManifest.xml.
Defaults to sdk_version if not set.
uncompress_dex
bool, Keep the data uncompressed. We always need uncompressed dex for execution,
so this might actually save space by avoiding storing the same data twice.
This defaults to reasonable value based on module and should not be set.
It exists only to support ART tests.
use_tools_jar
bool, Add host jdk tools.jar to bootclasspath
v4_signature
bool, If true, generate the signature file of APK Signing Scheme V4, along side the signed APK file.
Defaults to false.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
wrapper
string, installable script to execute the resulting jar
java_binary_host
java_binary_host builds a `.jar` file and a shell script that executes it for the host.
A java_binary_host has a single variant that produces a `.jar` file containing `.class` files that were
compiled against the host bootclasspath.
name
,
srcs
,
arch
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
enabled
,
errorprone
,
exclude_java_resource_dirs
,
exclude_java_resources
,
exclude_srcs
,
exported_plugins
,
host_required
,
include_srcs
,
init_rc
,
installable
,
jacoco
,
jarjar_rules
,
java_resource_dirs
,
java_resources
,
java_version
,
javac_shard_size
,
javacflags
,
kotlincflags
,
libs
,
licenses
,
main_class
,
manifest
,
multilib
,
native_bridge_supported
,
notice
,
openjdk9
,
owner
,
patch_module
,
permitted_packages
,
plugins
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
recovery
,
required
,
services
,
soc_specific
,
static_kotlin_stdlib
,
static_libs
,
system_ext_specific
,
target
,
target.host
,
target_required
,
use_tools_jar
,
vendor
,
vintf_fragments
,
visibility
,
wrapper
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, list of source files used to compile the Java module. May be .java, .logtags, .proto,
or .aidl files.
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
defaults
list of strings
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
targets
list of strings, 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).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
⊕errorprone
javacflags
list of strings, List of javac flags that should only be used when running errorprone.
exclude_java_resource_dirs
list of strings, list of directories that should be excluded from java_resource_dirs
exclude_java_resources
list of strings, list of files that should be excluded from java_resources and java_resource_dirs
exclude_srcs
list of strings, list of source files that should not be used to build the Java module.
This is most useful in the arch/multilib variants to remove non-common files
exported_plugins
list of strings, List of modules to export to libraries that directly depend on this library as annotation processors
host_required
list of strings, names of other modules to install on host if this module is installed
include_srcs
bool, If set to true, include sources used to compile the module in to the final jar
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, If set to true, allow this module to be dexed and installed on devices. Has no
effect on host modules, which are always considered installable.
Default: true
⊕jacoco
include_filter
list of strings, List of classes to include for instrumentation with jacoco to collect coverage
information at runtime when building with coverage enabled. If unset defaults to all
classes.
Supports '*' as the last character of an entry in the list as a wildcard match.
If preceded by '.' it matches all classes in the package and subpackages, otherwise
it matches classes in the package that have the class name as a prefix.
exclude_filter
list of strings, List of classes to exclude from instrumentation with jacoco to collect coverage
information at runtime when building with coverage enabled. Overrides classes selected
by the include_filter property.
Supports '*' as the last character of an entry in the list as a wildcard match.
If preceded by '.' it matches all classes in the package and subpackages, otherwise
it matches classes in the package that have the class name as a prefix.
jarjar_rules
string, if not blank, run jarjar using the specified rules file
java_resource_dirs
list of strings, list of directories containing Java resources
java_resources
list of strings, list of files to use as Java resources
java_version
string, If not blank, set the java version passed to javac as -source and -target
javac_shard_size
int64, The number of Java source entries each Javac instance can process
javacflags
list of strings, list of module-specific flags that will be used for javac compiles
kotlincflags
list of strings, list of module-specific flags that will be used for kotlinc compiles
libs
list of strings, list of of java libraries that will be in the classpath
licenses
list of strings, Names of the licenses that apply to this module.
main_class
string, Name of the class containing main to be inserted into the manifest as Main-Class.
manifest
string, manifest file to be included in resulting jar
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
⊕openjdk9
srcs
list of strings, List of source files that should only be used when passing -source 1.9 or higher
javacflags
list of strings, List of javac flags that should only be used when passing -source 1.9 or higher
owner
string, vendor who owns this module
patch_module
string, When compiling language level 9+ .java code in packages that are part of
a system module, patch_module names the module that your sources and
dependencies should be patched into. The Android runtime currently
doesn't implement the JEP 261 module system so this option is only
supported at compile time. It should only be needed to compile tests in
packages that exist in libcore and which are inconvenient to move
elsewhere.
permitted_packages
list of strings, If not empty, classes are restricted to the specified packages and their sub-packages.
This restriction is checked after applying jarjar rules and including static libs.
plugins
list of strings, List of modules to use as annotation processors
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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.
output_params
list of strings, List of extra options that will be passed to the proto generator.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
services
list of strings, List of files to include in the META-INF/services folder of the resulting jar.
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).
static_kotlin_stdlib
bool, If true, package the kotlin stdlib into the jar. Defaults to true.
static_libs
list of strings, list of java libraries that will be compiled into the resulting jar
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.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
use_tools_jar
bool, Add host jdk tools.jar to bootclasspath
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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.