blob: 05675df205757a657eae28ee4c277cecfcc1ee0c [file] [log] [blame]
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Build the master framework library.
// READ ME: ########################################################
//
// When updating this list of aidl files, consider if that aidl is
// part of the SDK API. If it is, also add it to the list in Android.mk
// that is preprocessed and distributed with the SDK. This list should
// not contain any aidl files for parcelables, but the one below should
// if you intend for 3rd parties to be able to send those objects
// across process boundaries.
//
// READ ME: ########################################################
filegroup {
name: "framework-core-sources",
srcs: [
"core/java/**/*.java",
"core/java/**/*.aidl",
],
path: "core/java",
}
filegroup {
name: "framework-drm-sources",
srcs: [
"drm/java/**/*.java",
],
path: "drm/java",
}
filegroup {
name: "framework-graphics-sources",
srcs: [
"graphics/java/**/*.java",
"graphics/java/**/*.aidl",
],
path: "graphics/java",
}
filegroup {
name: "framework-keystore-sources",
srcs: [
"keystore/java/**/*.java",
"keystore/java/**/*.aidl",
],
path: "keystore/java",
}
filegroup {
name: "framework-location-sources",
srcs: [
"location/java/**/*.java",
"location/java/**/*.aidl",
],
path: "location/java",
}
filegroup {
name: "framework-lowpan-sources",
srcs: [
"lowpan/java/**/*.java",
"lowpan/java/**/*.aidl",
],
path: "lowpan/java",
}
filegroup {
name: "framework-media-sources",
srcs: [
"media/java/**/*.java",
"media/java/**/*.aidl",
],
path: "media/java",
}
filegroup {
name: "framework-mca-effect-sources",
srcs: [
"media/mca/effect/java/**/*.java",
],
path: "media/mca/effect/java",
}
filegroup {
name: "framework-mca-filterfw-sources",
srcs: [
"media/mca/filterfw/java/**/*.java",
],
path: "media/mca/filterfw/java",
}
filegroup {
name: "framework-mca-filterpacks-sources",
srcs: [
"media/mca/filterpacks/java/**/*.java",
],
path: "media/mca/filterpacks/java",
}
filegroup {
name: "framework-mime-sources",
srcs: [
"mime/java/**/*.java",
],
path: "mime/java",
}
filegroup {
name: "framework-opengl-sources",
srcs: [
"opengl/java/**/*.java",
],
path: "opengl/java",
}
filegroup {
name: "framework-rs-sources",
srcs: [
"rs/java/**/*.java",
],
path: "rs/java",
}
filegroup {
name: "framework-sax-sources",
srcs: [
"sax/java/**/*.java",
],
path: "sax/java",
}
filegroup {
name: "framework-telecomm-sources",
srcs: [
"telecomm/java/**/*.java",
"telecomm/java/**/*.aidl",
],
path: "telecomm/java",
}
filegroup {
name: "framework-telephony-sources",
srcs: [
"telephony/java/**/*.java",
"telephony/java/**/*.aidl",
],
path: "telephony/java",
}
filegroup {
name: "framework-wifi-sources",
srcs: [
"wifi/java/**/*.java",
"wifi/java/**/*.aidl",
],
path: "wifi/java",
}
filegroup {
name: "framework-non-updatable-sources",
srcs: [
// Java/AIDL sources under frameworks/base
":framework-core-sources",
":framework-drm-sources",
":framework-graphics-sources",
":framework-keystore-sources",
":framework-location-sources",
":framework-lowpan-sources",
":framework-media-sources",
":framework-mca-effect-sources",
":framework-mca-filterfw-sources",
":framework-mca-filterpacks-sources",
":framework-mime-sources",
":framework-opengl-sources",
":framework-rs-sources",
":framework-sax-sources",
":framework-telecomm-sources",
":framework-telephony-sources",
":framework-wifi-sources",
":PacProcessor-aidl-sources",
":ProxyHandler-aidl-sources",
// AIDL sources from external directories
":dumpstate_aidl",
":framework_native_aidl",
":gatekeeper_aidl",
":gsiservice_aidl",
":incidentcompanion_aidl",
":installd_aidl",
":keystore_aidl",
":libaudioclient_aidl",
":libbinder_aidl",
":libbluetooth-binder-aidl",
":libcamera_client_aidl",
":libcamera_client_framework_aidl",
":libupdate_engine_aidl",
":storaged_aidl",
":vold_aidl",
// For the generated R.java and Manifest.java
":framework-res{.aapt.srcjar}",
// etc.
":framework-javastream-protos",
":framework-statslog-gen",
],
}
filegroup {
name: "framework-all-sources",
srcs: [
":framework-non-updatable-sources",
":updatable-media-srcs",
],
}
java_defaults {
name: "framework-aidl-export-defaults",
aidl: {
export_include_dirs: [
"core/java",
"drm/java",
"graphics/java",
"keystore/java",
"location/java",
"lowpan/java",
"media/java",
"media/apex/java",
"media/mca/effect/java",
"media/mca/filterfw/java",
"media/mca/filterpacks/java",
"opengl/java",
"rs/java",
"sax/java",
"telecomm/java",
"telephony/java",
"wifi/java",
],
},
}
// Collection of classes that are generated from non-Java files that are not listed in
// framework_srcs. These have no or very limited dependency to the framework.
java_library {
name: "framework-internal-utils",
static_libs: [
"apex_aidl_interface-java",
"suspend_control_aidl_interface-java",
"framework-protos",
"game-driver-protos",
"android.hidl.base-V1.0-java",
"android.hardware.cas-V1.1-java",
"android.hardware.cas-V1.0-java",
"android.hardware.contexthub-V1.0-java",
"android.hardware.health-V1.0-java-constants",
"android.hardware.radio-V1.0-java",
"android.hardware.radio-V1.1-java",
"android.hardware.radio-V1.2-java",
"android.hardware.radio-V1.3-java",
"android.hardware.radio-V1.4-java",
"android.hardware.thermal-V1.0-java-constants",
"android.hardware.thermal-V1.0-java",
"android.hardware.thermal-V1.1-java",
"android.hardware.thermal-V2.0-java",
"android.hardware.tv.input-V1.0-java-constants",
"android.hardware.usb-V1.0-java-constants",
"android.hardware.usb-V1.1-java-constants",
"android.hardware.usb-V1.2-java-constants",
"android.hardware.usb.gadget-V1.0-java",
"android.hardware.vibrator-V1.0-java",
"android.hardware.vibrator-V1.1-java",
"android.hardware.vibrator-V1.2-java",
"android.hardware.vibrator-V1.3-java",
"android.hardware.wifi-V1.0-java-constants",
"devicepolicyprotosnano",
"com.android.sysprop.apex",
"PlatformProperties",
],
sdk_version: "core_platform",
installable: false,
}
java_defaults {
name: "framework-defaults",
defaults: ["framework-aidl-export-defaults"],
installable: true,
aidl: {
generate_get_transaction_name: true,
},
srcs: ["core/java/**/*.logtags"],
exclude_srcs: [
// See comment on framework-atb-backward-compatibility module below
"core/java/android/content/pm/AndroidTestBaseUpdater.java",
],
sdk_version: "core_platform",
libs: [
"ext",
"updatable_media_stubs",
],
jarjar_rules: ":framework-jarjar-rules",
static_libs: [
"framework-internal-utils",
"mimemap",
],
required: [
// TODO: remove gps_debug when the build system propagates "required" properly.
"gps_debug.conf",
],
dxflags: [
"--core-library",
"--multi-dex",
],
plugins: ["view-inspector-annotation-processor"],
}
filegroup {
name: "framework-jarjar-rules",
srcs: ["jarjar_rules_hidl.txt"],
}
filegroup {
name: "libincident_aidl",
srcs: [
"core/java/android/os/IIncidentManager.aidl",
"core/java/android/os/IIncidentReportStatusListener.aidl",
],
path: "core/java",
}
filegroup {
name: "statsd_aidl",
srcs: [
"core/java/android/os/IStatsCompanionService.aidl",
"core/java/android/os/IStatsManager.aidl",
"core/java/android/os/IStatsPullerCallback.aidl",
],
path: "core/java",
}
filegroup {
name: "libvibrator_aidl",
srcs: [
"core/java/android/os/IExternalVibrationController.aidl",
"core/java/android/os/IExternalVibratorService.aidl",
],
path: "core/java",
}
java_library {
name: "framework",
defaults: ["framework-defaults"],
srcs: [":framework-non-updatable-sources"],
javac_shard_size: 150,
required: [
"framework-platform-compat-config",
"libcore-platform-compat-config",
"services-platform-compat-config",
],
}
java_library {
name: "framework-all",
defaults: ["framework-defaults"],
srcs: [":framework-all-sources"],
installable: false,
}
java_library {
name: "framework-annotation-proc",
defaults: ["framework-defaults"],
srcs: [":framework-all-sources"],
installable: false,
plugins: [
"unsupportedappusage-annotation-processor",
"compat-changeid-annotation-processor",
],
}
platform_compat_config {
name: "framework-platform-compat-config",
src: ":framework-annotation-proc",
}
// A library including just UnsupportedAppUsage.java classes.
//
// Provided for target so that libraries can use it without depending on
// the whole of framework or the core platform API.
//
// Built for host so that the annotation processor can also use this annotation.
java_library {
name: "unsupportedappusage-annotation",
host_supported: true,
srcs: [
"core/java/android/annotation/IntDef.java",
"core/java/android/annotation/UnsupportedAppUsage.java",
":unsupportedappusage_annotation_files",
],
sdk_version: "core_current",
}
// A temporary build target that is conditionally included on the bootclasspath if
// android.test.base library has been removed and which provides support for
// maintaining backwards compatibility for APKs that target pre-P and depend on
// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
// specified on the build command line.
java_library {
name: "framework-atb-backward-compatibility",
installable: true,
srcs: [
"core/java/android/content/pm/AndroidTestBaseUpdater.java",
],
}
genrule {
name: "framework-statslog-gen",
tools: ["stats-log-api-gen"],
cmd: "$(location stats-log-api-gen) --java $(out)",
out: ["android/util/StatsLogInternal.java"],
}
gensrcs {
name: "framework-javastream-protos",
depfile: true,
tool_files: ["tools/genprotos.sh"],
tools: [
"aprotoc",
"protoc-gen-javastream",
"soong_zip",
],
// TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
// end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
// the way sbox rewrites the command. See b/70221552.
cmd: "$(location tools/genprotos.sh) " +
" $(location aprotoc) " +
" $(location protoc-gen-javastream) " +
" $(location soong_zip) " +
" $(genDir) " +
" $(depfile) " +
" $(in) " +
" $(out)",
srcs: [
"core/proto/**/*.proto",
"libs/incident/**/*.proto",
],
output_extension: "srcjar",
}
filegroup {
name: "framework-annotations",
srcs: [
"core/java/android/annotation/NonNull.java",
"core/java/android/annotation/Nullable.java",
"core/java/android/annotation/IntDef.java",
"core/java/android/annotation/IntRange.java",
"core/java/android/annotation/UnsupportedAppUsage.java",
"core/java/com/android/internal/annotations/GuardedBy.java",
"core/java/com/android/internal/annotations/VisibleForTesting.java",
],
}
filegroup {
name: "framework-networkstack-shared-srcs",
srcs: [
// TODO: remove these annotations as soon as we can use andoid.support.annotations.*
":framework-annotations",
"core/java/android/net/DhcpResults.java",
"core/java/android/util/LocalLog.java",
"core/java/com/android/internal/util/HexDump.java",
"core/java/com/android/internal/util/IndentingPrintWriter.java",
"core/java/com/android/internal/util/IState.java",
"core/java/com/android/internal/util/MessageUtils.java",
"core/java/com/android/internal/util/Preconditions.java",
"core/java/com/android/internal/util/RingBufferIndices.java",
"core/java/com/android/internal/util/State.java",
"core/java/com/android/internal/util/StateMachine.java",
"core/java/com/android/internal/util/TrafficStatsConstants.java",
"core/java/com/android/internal/util/WakeupMessage.java",
"core/java/android/net/shared/*.java",
],
}
// Build ext.jar
// ============================================================
java_library {
name: "ext",
installable: true,
sdk_version: "core_platform",
static_libs: [
"libphonenumber-platform",
"nist-sip",
"tagsoup",
"rappor",
"libtextclassifier-java",
],
required: [
"libtextclassifier",
],
dxflags: ["--core-library"],
}
// ==== java proto host library ==============================
java_library_host {
name: "platformprotos",
srcs: [
"cmds/am/proto/instrumentation_data.proto",
"cmds/statsd/src/**/*.proto",
"core/proto/**/*.proto",
"libs/incident/proto/**/*.proto",
],
proto: {
include_dirs: ["external/protobuf/src"],
type: "full",
},
errorprone: {
javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
},
}
// ==== java proto device library (for test only) ==============================
java_library {
name: "platformprotosnano",
proto: {
type: "nano",
output_params: ["store_unknown_fields=true"],
include_dirs: ["external/protobuf/src"],
},
exclude_srcs: [
"core/proto/android/privacy.proto",
"core/proto/android/section.proto",
],
sdk_version: "current",
srcs: [
"core/proto/**/*.proto",
"libs/incident/proto/android/os/**/*.proto",
],
}
// ==== java proto device library (for test only) ==============================
java_library {
name: "platformprotoslite",
proto: {
type: "lite",
include_dirs: ["external/protobuf/src"],
},
srcs: [
"core/proto/**/*.proto",
"libs/incident/proto/android/os/**/*.proto",
],
exclude_srcs: [
"core/proto/android/privacy.proto",
"core/proto/android/section.proto",
],
// Protos have lots of MissingOverride and similar.
errorprone: {
javacflags: ["-XepDisableAllChecks"],
},
}
// ==== c++ proto device library ==============================
cc_defaults {
name: "libplatformprotos-defaults",
proto: {
export_proto_headers: true,
include_dirs: ["external/protobuf/src"],
},
cflags: [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
],
srcs: [
"core/proto/**/*.proto",
],
}
cc_library {
name: "libplatformprotos",
defaults: ["libplatformprotos-defaults"],
host_supported: true,
target: {
host: {
proto: {
type: "full",
},
},
android: {
proto: {
type: "lite",
},
shared_libs: [
"libprotobuf-cpp-lite",
],
shared: {
enabled: false,
},
},
},
}
// This library is meant for vendor code that needs to output protobuf. It links
// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
// binary compatibility.
cc_library {
name: "libplatformprotos-static",
defaults: ["libplatformprotos-defaults"],
host_supported: false,
// This is okay because this library is only built as a static library. The C++
// API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
// but is not authorized to be used outside of debugging.
vendor_available: true,
target: {
android: {
proto: {
type: "lite",
},
static_libs: [
"libprotobuf-cpp-lite",
],
shared: {
enabled: false,
},
},
},
}
// This is the full proto version of libplatformprotos. It may only
// be used by test code that is not shipped on the device.
cc_library {
name: "libplatformprotos-test",
defaults: ["libplatformprotos-defaults"],
host_supported: false,
target: {
android: {
proto: {
type: "full",
},
shared: {
enabled: false,
},
},
},
}
gensrcs {
name: "gen-platform-proto-constants",
depfile: true,
tools: [
"aprotoc",
"protoc-gen-cppstream",
],
srcs: [
"core/proto/android/os/backtrace.proto",
"core/proto/android/os/batterytype.proto",
"core/proto/android/os/cpufreq.proto",
"core/proto/android/os/cpuinfo.proto",
"core/proto/android/os/data.proto",
"core/proto/android/os/kernelwake.proto",
"core/proto/android/os/pagetypeinfo.proto",
"core/proto/android/os/procrank.proto",
"core/proto/android/os/ps.proto",
"core/proto/android/os/system_properties.proto",
"core/proto/android/util/event_log_tags.proto",
"core/proto/android/util/log.proto",
],
// Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
cmd: "mkdir -p $(genDir) " +
"&& $(location aprotoc) " +
" --plugin=$(location protoc-gen-cppstream) " +
" --dependency_out=$(depfile) " +
" --cppstream_out=$(genDir) " +
" -Iexternal/protobuf/src " +
" -I . " +
" $(in)",
output_extension: "proto.h",
}
subdirs = [
"cmds/*",
"core/*",
"libs/*",
"media/*",
"proto",
"tools/*",
"native/android",
"native/graphics/jni",
]
optional_subdirs = [
"core/tests/utiltests/jni",
]
// TODO(b/77285514): remove this once the last few hidl interfaces have been
// updated to use hwbinder.stubs.
java_library {
name: "hwbinder",
sdk_version: "core_platform",
srcs: [
"core/java/android/os/HidlSupport.java",
"core/java/android/annotation/IntDef.java",
"core/java/android/annotation/NonNull.java",
"core/java/android/annotation/Nullable.java",
"core/java/android/annotation/SystemApi.java",
"core/java/android/annotation/TestApi.java",
"core/java/android/annotation/UnsupportedAppUsage.java",
"core/java/android/os/HwBinder.java",
"core/java/android/os/HwBlob.java",
"core/java/android/os/HwParcel.java",
"core/java/android/os/IHwBinder.java",
"core/java/android/os/IHwInterface.java",
"core/java/android/os/DeadObjectException.java",
"core/java/android/os/DeadSystemException.java",
"core/java/android/os/NativeHandle.java",
"core/java/android/os/RemoteException.java",
"core/java/android/util/AndroidException.java",
],
dxflags: ["--core-library"],
installable: false,
}
python_defaults {
name: "base_default",
version: {
py2: {
enabled: true,
embedded_launcher: true,
},
py3: {
enabled: false,
embedded_launcher: false,
},
},
}
python_binary_host {
name: "fontchain_linter",
defaults: ["base_default"],
main: "tools/fonts/fontchain_linter.py",
srcs: [
"tools/fonts/fontchain_linter.py",
],
libs: [
"fontTools",
],
}
// TODO: Don't rely on this list by switching package.html into package-info.java
frameworks_base_subdirs = [
"core/java",
"graphics/java",
"location/java",
"media/java",
"media/mca/effect/java",
"media/mca/filterfw/java",
"media/mca/filterpacks/java",
"drm/java",
"opengl/java",
"sax/java",
"telecomm/java",
"telephony/java",
"wifi/java",
"lowpan/java",
"keystore/java",
"rs/java",
]
// Make the api/current.txt file available for use by modules in other
// directories.
filegroup {
name: "frameworks-base-api-current.txt",
srcs: [
"api/current.txt",
],
}
// Make the api/system-current.txt file available for use by modules in other
// directories.
filegroup {
name: "frameworks-base-api-system-current.txt",
srcs: [
"api/system-current.txt",
],
}
// Make the api/system-removed.txt file available for use by modules in other
// directories.
filegroup {
name: "frameworks-base-api-system-removed.txt",
srcs: [
"api/system-removed.txt",
],
}
framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
"-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
"-overview $(location core/java/overview.html) " +
// Federate Support Library references against local API file.
"-federate SupportLib https://developer.android.com " +
"-federationapi SupportLib $(location :current-support-api) "
framework_docs_only_libs = [
"voip-common",
"android.test.mock",
"android-support-annotations",
"android-support-compat",
"android-support-core-ui",
"android-support-core-utils",
"android-support-customtabs",
"android-support-design",
"android-support-dynamic-animation",
"android-support-exifinterface",
"android-support-fragment",
"android-support-media-compat",
"android-support-percent",
"android-support-recommendation",
"android-support-transition",
"android-support-tv-provider",
"android-support-v7-cardview",
"android-support-v7-gridlayout",
"android-support-v7-mediarouter",
"android-support-v7-palette",
"android-support-v7-preference",
"android-support-v13",
"android-support-v14-preference",
"android-support-v17-leanback",
"android-support-v17-preference-leanback",
"android-support-wear",
"android-support-vectordrawable",
"android-support-animatedvectordrawable",
"android-support-v7-appcompat",
"android-support-v7-recyclerview",
"android-support-emoji",
"android-support-emoji-appcompat",
"android-support-emoji-bundled",
"android-support-v8-renderscript",
"android-support-multidex",
"android-support-multidex-instrumentation",
]
metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
"--hide-package com.android.okhttp " +
"--hide-package com.android.org.conscrypt --hide-package com.android.server " +
"--error UnhiddenSystemApi " +
"--hide RequiresPermission " +
"--hide MissingPermission --hide BroadcastBehavior " +
"--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
"--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo "
// http://b/129765390 Rewrite links to "platform" or "technotes" folders
// which are siblings (and thus outside of) {@docRoot}.
//
// We have to escape \ as \\ and $ as $$ here because they get resolved by
// different layers of the build tooling. The arguments are wrapped in '' so
// that the shell doesn't add yet another level of escaping.
metalava_framework_docs_args += " --replace-documentation " +
// packages whose descendants to apply replacement to (all packages from
// libcore/ojluni/src/main/java that contribute to documentation).
"com.sun:java:javax:jdk.net:sun " +
// regex of the string to replace
"'(<a\\s+href\\s?=[\\*\\s]*\")(?:(?:\\{@docRoot\\}/\\.\\./)|(?:(?:\\.\\./)+))((?:platform|technotes).+)\">' " +
// replacement (with $1, $2 backreferences to the regex groups)
"'$$1https://docs.oracle.com/javase/8/docs/$$2\">' "
packages_to_document = [
"android",
"dalvik",
"java",
"javax",
"junit",
"org.apache.http",
"org.json",
"org.w3c.dom",
"org.xml.sax",
"org.xmlpull",
]
stubs_defaults {
name: "framework-doc-stubs-default",
srcs: [
":framework-non-updatable-sources",
"core/java/**/*.logtags",
"test-base/src/**/*.java",
":opt-telephony-srcs",
":opt-net-voip-srcs",
":core_public_api_files",
":updatable-media-srcs",
"test-mock/src/**/*.java",
"test-runner/src/**/*.java",
],
libs: framework_docs_only_libs,
local_sourcepaths: frameworks_base_subdirs,
create_doc_stubs: true,
annotations_enabled: true,
api_levels_annotations_enabled: true,
api_levels_annotations_dirs: [
"sdk-dir",
"api-versions-jars-dir",
],
previous_api: ":last-released-public-api",
merge_annotations_dirs: [
"metalava-manual",
"ojluni-annotated-sdk-stubs",
],
}
doc_defaults {
name: "framework-docs-default",
libs: framework_docs_only_libs +
["stub-annotations"],
html_dirs: [
"docs/html",
],
knowntags: [
"docs/knowntags.txt",
":known-oj-tags",
],
custom_template: "droiddoc-templates-sdk",
resourcesdir: "docs/html/reference/images/",
resourcesoutdir: "reference/android/images/",
hdf: [
"dac true",
"sdk.codename O",
"sdk.preview.version 1",
"sdk.version 7.0",
"sdk.rel.id 1",
"sdk.preview 0",
],
arg_files: [
"core/res/AndroidManifest.xml",
"core/java/overview.html",
":current-support-api",
],
create_stubs: false,
}
doc_defaults {
name: "framework-dokka-docs-default",
create_stubs: false,
}
stubs_defaults {
name: "metalava-api-stubs-default",
srcs: [
":framework-non-updatable-sources",
"core/java/**/*.logtags",
":opt-telephony-srcs",
":opt-net-voip-srcs",
":core_public_api_files",
":updatable-media-srcs",
],
libs: ["framework-internal-utils"],
local_sourcepaths: frameworks_base_subdirs,
installable: false,
annotations_enabled: true,
previous_api: ":last-released-public-api",
merge_annotations_dirs: [
"metalava-manual",
"ojluni-annotated-sdk-stubs",
],
api_levels_annotations_enabled: true,
api_levels_annotations_dirs: [
"sdk-dir",
"api-versions-jars-dir",
],
sdk_version: "core_platform",
filter_packages: packages_to_document,
}
droidstubs {
name: "framework-doc-stubs",
defaults: ["framework-doc-stubs-default"],
arg_files: [
"core/res/AndroidManifest.xml",
],
args: metalava_framework_docs_args,
}
droidstubs {
name: "framework-doc-system-stubs",
defaults: ["framework-doc-stubs-default"],
arg_files: [
"core/res/AndroidManifest.xml",
],
args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
}
droiddoc {
name: "doc-comment-check-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-stubs",
],
args: framework_docs_only_args + " -referenceonly -parsecomments",
installable: false,
}
droiddoc {
name: "offline-sdk-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-stubs",
],
hdf: [
"android.whichdoc offline",
],
proofread_file: "offline-sdk-docs-proofrerad.txt",
args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
write_sdk_values: true,
static_doc_index_redirect: "docs/docs-preview-index.html",
}
droiddoc {
// Please sync with android-api-council@ before making any changes for the name property below.
// Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
// See b/116221385 for reference.
name: "offline-sdk-referenceonly-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-stubs",
],
hdf: [
"android.whichdoc offline",
],
proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
write_sdk_values: true,
static_doc_index_redirect: "docs/docs-documentation-redirect.html",
static_doc_properties: "docs/source.properties",
}
droiddoc {
// Please sync with android-api-council@ before making any changes for the name property below.
// Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
// See b/116221385 for reference.
name: "offline-system-sdk-referenceonly-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-system-stubs",
],
hdf: [
"android.whichdoc offline",
],
proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
" -offlinemode -title \"Android System SDK\" -referenceonly",
write_sdk_values: true,
static_doc_index_redirect: "docs/docs-documentation-redirect.html",
static_doc_properties: "docs/source.properties",
}
droiddoc {
name: "online-sdk-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-stubs",
],
hdf: [
"android.whichdoc online",
"android.hasSamples true",
],
proofread_file: "online-sdk-docs-proofrerad.txt",
args: framework_docs_only_args +
" -toroot / -samplegroup Admin " +
" -samplegroup Background " +
" -samplegroup Connectivity " +
" -samplegroup Content " +
" -samplegroup Input " +
" -samplegroup Media " +
" -samplegroup Notification " +
" -samplegroup RenderScript " +
" -samplegroup Security " +
" -samplegroup Sensors " +
" -samplegroup System " +
" -samplegroup Testing " +
" -samplegroup UI " +
" -samplegroup Views " +
" -samplegroup Wearable -samplesdir development/samples/browseable ",
}
droiddoc {
name: "online-system-api-sdk-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-system-stubs",
],
hdf: [
"android.whichdoc online",
"android.hasSamples true",
],
proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
args: framework_docs_only_args +
" -referenceonly " +
" -title \"Android SDK - Including system APIs.\" " +
" -hide 101 " +
" -hide 104 " +
" -hide 108 " +
" -toroot / -samplegroup Admin " +
" -samplegroup Background " +
" -samplegroup Connectivity " +
" -samplegroup Content " +
" -samplegroup Input " +
" -samplegroup Media " +
" -samplegroup Notification " +
" -samplegroup RenderScript " +
" -samplegroup Security " +
" -samplegroup Sensors " +
" -samplegroup System " +
" -samplegroup Testing " +
" -samplegroup UI " +
" -samplegroup Views " +
" -samplegroup Wearable -samplesdir development/samples/browseable ",
installable: false,
}
droiddoc {
name: "ds-docs-java",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-stubs",
],
hdf: [
"android.whichdoc online",
"android.hasSamples true",
],
proofread_file: "ds-docs-proofrerad.txt",
args: framework_docs_only_args +
" -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
" -samplegroup Background " +
" -samplegroup Connectivity " +
" -samplegroup Content " +
" -samplegroup Input " +
" -samplegroup Media " +
" -samplegroup Notification " +
" -samplegroup RenderScript " +
" -samplegroup Security " +
" -samplegroup Sensors " +
" -samplegroup System " +
" -samplegroup Testing " +
" -samplegroup UI " +
" -samplegroup Views " +
" -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
}
droiddoc {
name: "ds-docs-kt",
defaults: ["framework-dokka-docs-default"],
srcs: [
":framework-doc-stubs",
],
args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
"-noStdlibLink",
proofread_file: "ds-dokka-proofread.txt",
dokka_enabled: true,
}
java_genrule {
name: "ds-docs",
tools: [
"zip2zip",
"merge_zips",
],
srcs: [
":ds-docs-java{.docs.zip}",
":ds-docs-kt{.docs.zip}",
],
out: ["ds-docs.zip"],
dist: {
targets: ["docs"],
},
cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
"$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
}
java_genrule {
name: "ds-docs-switched",
tools: [
"switcher4",
"soong_zip",
],
srcs: [
":ds-docs-java{.docs.zip}",
":ds-docs-kt{.docs.zip}",
],
out: ["ds-docs-switched.zip"],
dist: {
targets: ["docs"],
},
cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
"unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
"SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
"(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
"$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
}
droiddoc {
name: "ds-static-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-stubs",
],
hdf: [
"android.whichdoc online",
],
proofread_file: "ds-static-docs-proofrerad.txt",
args: framework_docs_only_args +
" -staticonly " +
" -toroot / " +
" -devsite " +
" -ignoreJdLinks ",
}
droiddoc {
name: "ds-ref-navtree-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-stubs",
],
hdf: [
"android.whichdoc online",
],
proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
args: framework_docs_only_args +
" -toroot / " +
" -atLinksNavtree " +
" -navtreeonly ",
}
droiddoc {
name: "online-sdk-dev-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-stubs",
],
hdf: [
"android.whichdoc online",
"android.hasSamples true",
],
proofread_file: "online-sdk-dev-docs-proofrerad.txt",
args: framework_docs_only_args +
" -toroot / -samplegroup Admin " +
" -samplegroup Background " +
" -samplegroup Connectivity " +
" -samplegroup Content " +
" -samplegroup Input " +
" -samplegroup Media " +
" -samplegroup Notification " +
" -samplegroup RenderScript " +
" -samplegroup Security " +
" -samplegroup Sensors " +
" -samplegroup System " +
" -samplegroup Testing " +
" -samplegroup UI " +
" -samplegroup Views " +
" -samplegroup Wearable -samplesdir development/samples/browseable ",
}
droiddoc {
name: "hidden-docs",
defaults: ["framework-docs-default"],
srcs: [
":framework-doc-stubs",
],
proofread_file: "hidden-docs-proofrerad.txt",
args: framework_docs_only_args +
" -referenceonly " +
" -title \"Android SDK - Including hidden APIs.\"",
}
droidstubs {
name: "hwbinder-stubs-docs",
srcs: [
"core/java/android/os/HidlSupport.java",
"core/java/android/annotation/IntDef.java",
"core/java/android/annotation/NonNull.java",
"core/java/android/annotation/SystemApi.java",
"core/java/android/os/HwBinder.java",
"core/java/android/os/HwBlob.java",
"core/java/android/os/HwParcel.java",
"core/java/android/os/IHwBinder.java",
"core/java/android/os/IHwInterface.java",
"core/java/android/os/DeadObjectException.java",
"core/java/android/os/DeadSystemException.java",
"core/java/android/os/NativeHandle.java",
"core/java/android/os/RemoteException.java",
"core/java/android/util/AndroidException.java",
],
installable: false,
sdk_version: "core_platform",
annotations_enabled: true,
previous_api: ":last-released-public-api",
merge_annotations_dirs: [
"metalava-manual",
"ojluni-annotated-sdk-stubs",
],
args: " --show-annotation android.annotation.SystemApi",
}
java_library_static {
name: "hwbinder.stubs",
sdk_version: "core_current",
srcs: [
":hwbinder-stubs-docs",
],
}
droidstubs {
name: "hiddenapi-lists-docs",
defaults: ["metalava-api-stubs-default"],
arg_files: [
"core/res/AndroidManifest.xml",
],
dex_api_filename: "public-dex.txt",
private_dex_api_filename: "private-dex.txt",
removed_dex_api_filename: "removed-dex.txt",
args: metalava_framework_docs_args +
" --show-unannotated " +
" --show-annotation android.annotation.SystemApi " +
" --show-annotation android.annotation.TestApi ",
}
droidstubs {
name: "hiddenapi-mappings",
defaults: ["metalava-api-stubs-default"],
srcs: [
":non_openjdk_java_files",
":openjdk_java_files",
":opt-telephony-common-srcs",
],
arg_files: [
"core/res/AndroidManifest.xml",
],
dex_mapping_filename: "dex-mapping.txt",
args: metalava_framework_docs_args +
" --hide ReferencesHidden " +
" --hide UnhiddenSystemApi " +
" --show-unannotated " +
" --show-annotation android.annotation.SystemApi " +
" --show-annotation android.annotation.TestApi ",
}
filegroup {
name: "apache-http-stubs-sources",
srcs: [
"core/java/org/apache/http/conn/ConnectTimeoutException.java",
"core/java/org/apache/http/conn/scheme/HostNameResolver.java",
"core/java/org/apache/http/conn/scheme/LayeredSocketFactory.java",
"core/java/org/apache/http/conn/scheme/SocketFactory.java",
"core/java/org/apache/http/conn/ssl/AbstractVerifier.java",
"core/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java",
"core/java/org/apache/http/conn/ssl/AndroidDistinguishedNameParser.java",
"core/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java",
"core/java/org/apache/http/conn/ssl/SSLSocketFactory.java",
"core/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java",
"core/java/org/apache/http/conn/ssl/X509HostnameVerifier.java",
"core/java/org/apache/http/params/CoreConnectionPNames.java",
"core/java/org/apache/http/params/HttpConnectionParams.java",
"core/java/org/apache/http/params/HttpParams.java",
"core/java/android/net/http/SslCertificate.java",
"core/java/android/net/http/SslError.java",
"core/java/com/android/internal/util/HexDump.java",
],
}
droidstubs {
name: "api-stubs-docs",
defaults: ["metalava-api-stubs-default"],
api_filename: "public_api.txt",
private_api_filename: "private.txt",
removed_api_filename: "removed.txt",
arg_files: [
"core/res/AndroidManifest.xml",
],
args: metalava_framework_docs_args,
check_api: {
current: {
api_file: "api/current.txt",
removed_api_file: "api/removed.txt",
},
last_released: {
api_file: ":last-released-public-api",
removed_api_file: "api/removed.txt",
baseline_file: ":public-api-incompatibilities-with-last-released",
},
},
jdiff_enabled: true,
}
droidstubs {
name: "system-api-stubs-docs",
defaults: ["metalava-api-stubs-default"],
api_tag_name: "SYSTEM",
api_filename: "system-api.txt",
private_api_filename: "system-private.txt",
private_dex_api_filename: "system-private-dex.txt",
removed_api_filename: "system-removed.txt",
arg_files: [
"core/res/AndroidManifest.xml",
],
args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
check_api: {
current: {
api_file: "api/system-current.txt",
removed_api_file: "api/system-removed.txt",
},
last_released: {
api_file: ":last-released-system-api",
removed_api_file: "api/system-removed.txt",
baseline_file: ":system-api-incompatibilities-with-last-released"
},
},
jdiff_enabled: true,
}
droidstubs {
name: "test-api-stubs-docs",
defaults: ["metalava-api-stubs-default"],
api_tag_name: "TEST",
api_filename: "test-api.txt",
removed_api_filename: "test-removed.txt",
arg_files: [
"core/res/AndroidManifest.xml",
],
args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
check_api: {
current: {
api_file: "api/test-current.txt",
removed_api_file: "api/test-removed.txt",
},
},
}
filegroup {
name: "framework-annotation-nonnull-srcs",
srcs: [
"core/java/android/annotation/NonNull.java",
],
}
filegroup {
name: "framework-media-annotation-srcs",
srcs: [
"core/java/android/annotation/CallbackExecutor.java",
"core/java/android/annotation/CallSuper.java",
"core/java/android/annotation/DrawableRes.java",
"core/java/android/annotation/IntDef.java",
"core/java/android/annotation/LongDef.java",
"core/java/android/annotation/NonNull.java",
"core/java/android/annotation/Nullable.java",
"core/java/android/annotation/RequiresPermission.java",
"core/java/android/annotation/SdkConstant.java",
"core/java/android/annotation/StringDef.java",
"core/java/android/annotation/SystemApi.java",
"core/java/android/annotation/TestApi.java",
"core/java/android/annotation/UnsupportedAppUsage.java",
"core/java/com/android/internal/annotations/GuardedBy.java",
],
}
// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
// annotations to private apis
aidl_mapping {
name: "framework-aidl-mappings",
srcs: [":framework-all-sources"],
output: "framework-aidl-mappings.txt",
}
genrule {
name: "framework-annotation-proc-index",
srcs: [":framework-annotation-proc"],
cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
out: ["unsupportedappusage_index.csv"],
dist: {
targets: ["droidcore"],
},
}