tradefed_binary_host
tradefedBinaryFactory creates an empty module for the tradefed_binary module type,
which is a java_binary with some additional processing in tradefedBinaryLoadHook.
name
,
srcs
,
exclude_srcs
,
defaults
,
aconfig_Cache_files
,
arch
,
associates
,
common_srcs
,
compile_data
,
compile_multilib
,
debug_ramdisk
,
device_common_java_resources
,
device_first_java_resources
,
device_specific
,
dist
,
dists
,
enabled
,
enforce_uses_libs
,
errorprone
,
exclude_common_srcs
,
exclude_java_resource_dirs
,
exclude_java_resources
,
exclude_uses_libs
,
exported_plugins
,
full_name
,
generated_srcjars
,
header_jar_override
,
headers_only
,
hiddenapi_additional_annotations
,
host_cross_supported
,
host_required
,
include_srcs
,
init_rc
,
installable
,
is_stubs_module
,
jacoco
,
jarjar_prefix
,
jarjar_rename
,
jarjar_rules
,
jarjar_shards
,
java_resource_dirs
,
java_resources
,
java_version
,
javac_shard_size
,
javacflags
,
jni_libs
,
kotlin_incremental
,
kotlin_lang_version
,
kotlin_plugins
,
kotlincflags
,
libs
,
licenses
,
main_class
,
manifest
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
no_full_install
,
odm_dlkm_specific
,
openjdk9
,
optional_uses_libs
,
overrides
,
owner
,
patch_module
,
permitted_packages
,
plugins
,
prepend_platform_version_name
,
product_specific
,
product_variables.arc
,
product_variables.build_from_text_stub
,
product_variables.debuggable
,
product_variables.malloc_low_memory
,
product_variables.native_coverage
,
product_variables.platform_sdk_version_or_codename
,
product_variables.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
proto
,
provides_uses_lib
,
ramdisk
,
ravenizer
,
recovery
,
required
,
services
,
short_name
,
soc_specific
,
static_kotlin_stdlib
,
static_libs
,
stem
,
suite_arch
,
system_dlkm_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
team
,
use_generic_config
,
use_tools_jar
,
uses_libs
,
vendor
,
vendor_dlkm_specific
,
vendor_ramdisk
,
version
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
,
wrapper
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, list of source files used to compile the Java module. May be .java, .kt, .logtags, .proto,
or .aidl files.
exclude_srcs
list of string, 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
defaults
list of string
aconfig_Cache_files
list of *ast.SelectorExpr, intermediate aconfig cache file tacked in by GeneratedJavaLibraryModule
arch
interface
associates
list of string, List of Kotlin libraries whose `internal` members are accessible to this library
common_srcs
list of string, list Kotlin of source files containing Kotlin code that should be treated as common code in
a codebase that supports Kotlin multiplatform. See
https://kotlinlang.org/docs/reference/multiplatform.html. May be only be .kt files.
compile_data
list of string, A list of files or dependencies to make available to the build sandbox. This is
useful if source files are symlinks, the targets of the symlinks must be listed here.
Note that currently not all actions implemented by android_apps are sandboxed, so you
may only see this being necessary in lint builds.
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform).
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_common_java_resources
configurable list of string, Same as java_resources, but modules added here will use the device variant. Can be useful
for making a host test that tests the contents of a device built app.
device_first_java_resources
configurable list of string, Same as java_resources, but modules added here will use the device's os variant and the
device's first architecture variant. Can be useful for making a host test that tests the
contents of a native device built app.
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
Dist
configuration to distribute output files from this module to the distribution
directory (default: $OUT/dist, configurable with $DIST_DIR)
targets
list of string, Copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
append_artifact_with_product
bool, If true, then the artifact file will be appended with _<product name>. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be foo_coral.apk. If false, there is
no change to the artifact file name.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended with <product name>-. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be coral-foo.apk. If false, there is
no change to the artifact file name.
tag
string, A string tag to select the OutputFiles associated with the tag.
If no tag is specified then it will select the default dist paths provided
by the module type. If a tag of "" is specified then it will return the
default output files provided by the modules, i.e. the result of calling
OutputFiles("").
dists
list of Dist, a list of configurations to distribute output files from this module to the
distribution directory (default: $OUT/dist, configurable with $DIST_DIR)
enabled
configurable bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
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.
⊕errorprone
javacflags
list of string, List of javac flags that should only be used when running errorprone.
enabled
bool, This property can be in 3 states. When set to true, errorprone will
be run during the regular build. When set to false, errorprone will
never be run. When unset, errorprone will be run when the RUN_ERROR_PRONE
environment variable is true. Setting this to false will improve build
performance more than adding -XepDisableAllChecks in javacflags.
exclude_common_srcs
list of string, list of Kotlin source files that should excluded from the list of common_srcs.
exclude_java_resource_dirs
list of string, list of directories that should be excluded from java_resource_dirs
exclude_java_resources
list of string, list of files that should be excluded from java_resources and java_resource_dirs
exclude_uses_libs
list of string, A list of shared library names to exclude from the classpath of the APK. Adding a library here
will prevent it from being used when precompiling the APK and prevent it from being implicitly
added to the APK's manifest's <uses-library> elements.
Care must be taken when using this as it could result in runtime errors if the APK actually
uses classes provided by the library and which are not provided in any other way.
This is primarily intended for use by various CTS tests that check the runtime handling of the
android.test.base shared library (and related libraries) but which depend on some common
libraries that depend on the android.test.base library. Without this those tests will end up
with a <uses-library android:name="android.test.base"/> in their manifest which would either
render the tests worthless (as they would be testing the wrong behavior), or would break the
test altogether by providing access to classes that the tests were not expecting. Those tests
provide the android.test.base statically and use jarjar to rename them so they do not collide
with the classes provided by the android.test.base library.
exported_plugins
list of string, List of modules to export to libraries that directly depend on this library as annotation
processors. Note that if the plugins set generates_api: true this will disable the turbine
optimization on modules that depend on this module, which will reduce parallelism and cause
more recompilation.
full_name
string
generated_srcjars
list of *ast.SelectorExpr, Additional srcJars tacked in by GeneratedJavaLibraryModule
hiddenapi_additional_annotations
list of string, A list of java_library instances that provide additional hiddenapi annotations for the library.
host_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_required
list of string, names of other modules to install on host if this module is installed
include_srcs
bool, If set to true, include sources used to compile the module in to the final jar
init_rc
configurable list of string, 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
is_stubs_module
bool, Property signifying whether the module compiles stubs or not.
Should be set to true when srcs of this module are stub files.
This property does not need to be set to true when the module depends on
the stubs via libs, but should be set to true when the module depends on
the stubs via static libs.
⊕jacoco
include_filter
list of string, 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 string, 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_prefix
string, if not blank, used as prefix to generate repackage rule
jarjar_rename
list of string, java class names to rename with jarjar when a reverse dependency has a jarjar_prefix
property.
jarjar_rules
string, if not blank, run jarjar using the specified rules file
jarjar_shards
configurable string, Number of shards for jarjar. It needs to be an integer represented as a string.
TODO(b/383559945) change it to int, once Configurable supports the type.
java_resource_dirs
list of string, list of directories containing Java resources
java_resources
configurable list of string, 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 string, list of module-specific flags that will be used for javac compiles
jni_libs
list of string, Names of modules containing JNI libraries that should be installed alongside the binary.
kotlin_incremental
bool, Whether this target supports compilation with the kotlin-incremental-client.
kotlin_lang_version
string, Kotlin language version to target. Currently only 1.9 and 2 are supported.
See kotlinc's `-language-version` flag.
kotlin_plugins
list of string, List of modules to use as kotlin plugin
kotlincflags
list of string, list of module-specific flags that will be used for kotlinc compiles
libs
list of string, list of java libraries that will be in the classpath
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
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. See sdk_version for possible values.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
⊕openjdk9
srcs
list of string, List of source files that should only be used when passing -source 1.9 or higher
javacflags
list of string, List of javac flags that should only be used when passing -source 1.9 or higher
optional_uses_libs
configurable list of string, 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 string, List of module names that are prevented from being installed when this module gets
installed.
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 string, 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 string, List of modules to use as annotation processors
prepend_platform_version_name
bool
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
⊕product_variables.arc
⊕exclude_srcs
⊕static_libs
⊕srcs
⊕product_variables.build_from_text_stub
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕static_libs
⊕jni_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.malloc_low_memory
⊕product_variables.native_coverage
⊕product_variables.platform_sdk_version_or_codename
⊕product_variables.release_aidl_use_unfrozen
⊕required
⊕vintf_fragment_modules
⊕product_variables.selinuxignoreneverallows
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
output_params
list of string, 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 string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
provides_uses_lib
string, Optional name of the <uses-library> provided by this module. This is needed for non-SDK
libraries, because SDK ones are automatically picked up by Soong. The <uses-library> name
normally is the same as the module name, but there are exceptions.
ramdisk
bool, Whether this module is installed to ramdisk
⊕ravenizer
enabled
bool, If true, enable the "Ravenizer" tool on the output jar.
"Ravenizer" is a tool for Ravenwood tests, but it can also be enabled on other kinds
of java targets.
strip_mockito
bool, If true, the "Ravenizer" tool will remove all Mockito and DexMaker
classes from the output jar.
flags
list of string, Extra arguments passed to Ravenizer
recovery
bool, Whether this module is installed to recovery partition
required
configurable list of string, names of other modules to install if this module is installed
services
list of string, List of files to include in the META-INF/services folder of the resulting jar.
short_name
string
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
configurable list of string, list of java libraries that will be compiled into the resulting jar
stem
string, set the name of the output. If not set, `name` is used.
To override a module with this property set, overriding module might need to set this as well.
Otherwise, both the overridden and the overriding modules will have the same output name, which
can cause the duplicate output error.
suite_arch
string
system_dlkm_specific
bool, Install to partition system_dlkm when set to true.
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.android
compile_multilib
string
enabled
bool
⊕target.host
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
use_tools_jar
bool, Add host jdk tools.jar to bootclasspath
uses_libs
configurable list of string, 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.
vendor_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
version
string
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable list of string, VINTF manifest fragments to be installed if this module is installed
visibility
list of string, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/main/README.md#visibility for
more details.
wrapper
string, installable script to execute the resulting jar