diff options
Diffstat (limited to 'Android.bp')
| -rw-r--r-- | Android.bp | 334 |
1 files changed, 243 insertions, 91 deletions
diff --git a/Android.bp b/Android.bp index 9e838b3efcc1..5250dc5895c8 100644 --- a/Android.bp +++ b/Android.bp @@ -112,6 +112,14 @@ filegroup { } filegroup { + name: "framework-mime-sources", + srcs: [ + "mime/java/**/*.java", + ], + path: "mime/java", +} + +filegroup { name: "framework-opengl-sources", srcs: [ "opengl/java/**/*.java", @@ -154,6 +162,23 @@ filegroup { } filegroup { + name: "framework-telephony-common-sources", + srcs: [ + "telephony/common/**/*.java", + ], + path: "telephony/common", +} + +filegroup { + name: "framework-mms-sources", + srcs: [ + "mms/java/**/*.java", + "mms/java/**/*.aidl", + ], + path: "mms/java", +} + +filegroup { name: "framework-wifi-sources", srcs: [ "wifi/java/**/*.java", @@ -162,49 +187,65 @@ filegroup { path: "wifi/java", } -framework_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-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", - - // etc. - "core/java/**/*.logtags", - ":framework-javastream-protos", - ":framework-statslog-gen", -] +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-mms-sources", + ":framework-opengl-sources", + ":framework-rs-sources", + ":framework-sax-sources", + ":framework-telecomm-sources", + ":framework-telephony-common-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", @@ -221,6 +262,7 @@ java_defaults { "media/mca/effect/java", "media/mca/filterfw/java", "media/mca/filterpacks/java", + "mms/java", "opengl/java", "rs/java", "sax/java", @@ -229,34 +271,19 @@ java_defaults { "wifi/java", ], }, -} - -java_defaults { - name: "framework-defaults", - defaults: ["framework-aidl-export-defaults"], - installable: true, - - srcs: framework_srcs, - - aidl: { - generate_get_transaction_name: true, - }, - 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", + required: [ + // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly. + "gps_debug.conf", + "protolog.conf.json.gz", ], +} - jarjar_rules: ":framework-jarjar-rules", - +// 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: [ - "mimemap", "apex_aidl_interface-java", "suspend_control_aidl_interface-java", "framework-protos", @@ -290,10 +317,37 @@ java_defaults { "com.android.sysprop.apex", "PlatformProperties", ], + sdk_version: "core_platform", + installable: false, +} - required: [ - // TODO: remove gps_debug when the build system propagates "required" properly. - "gps_debug.conf", +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", ], dxflags: [ @@ -343,6 +397,7 @@ filegroup { java_library { name: "framework-minus-apex", defaults: ["framework-defaults"], + srcs: [":framework-non-updatable-sources"], javac_shard_size: 150, } @@ -363,8 +418,16 @@ java_library { } 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", @@ -374,7 +437,6 @@ java_library { platform_compat_config { name: "framework-platform-compat-config", - prefix: "framework", src: ":framework-annotation-proc", } @@ -487,7 +549,6 @@ java_library { sdk_version: "core_platform", static_libs: [ "libphonenumber-platform", - "nist-sip", "tagsoup", "rappor", "libtextclassifier-java", @@ -760,7 +821,7 @@ python_binary_host { ], } -// TODO: Don't rely on this list once droiddoc can take a list of packages to document +// TODO: Don't rely on this list by switching package.html into package-info.java frameworks_base_subdirs = [ "core/java", "graphics/java", @@ -770,9 +831,11 @@ frameworks_base_subdirs = [ "media/mca/filterfw/java", "media/mca/filterpacks/java", "drm/java", + "mms/java", "opengl/java", "sax/java", "telecomm/java", + "telephony/common", "telephony/java", "wifi/java", "lowpan/java", @@ -780,13 +843,6 @@ frameworks_base_subdirs = [ "rs/java", ] -packages_to_document = [ - "android", - "javax/microedition/khronos", - "org/apache/http/conn", - "org/apache/http/params", -] - // Make the api/current.txt file available for use by modules in other // directories. filegroup { @@ -876,20 +932,33 @@ metalava_framework_docs_args += " --replace-documentation " + // 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-without-aidls", + ":updatable-media-srcs", "test-mock/src/**/*.java", "test-runner/src/**/*.java", ":jobscheduler-framework-source", ], - srcs_lib: "framework-minus-apex", - srcs_lib_whitelist_pkgs: packages_to_document, libs: framework_docs_only_libs, local_sourcepaths: frameworks_base_subdirs, create_doc_stubs: true, @@ -899,7 +968,7 @@ stubs_defaults { "sdk-dir", "api-versions-jars-dir", ], - previous_api: ":last-released-public-api", + previous_api: ":last-released-public-api-for-metalava-annotations", merge_annotations_dirs: [ "metalava-manual", "ojluni-annotated-sdk-stubs", @@ -936,21 +1005,27 @@ doc_defaults { 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-without-aidls", + ":updatable-media-srcs", ":jobscheduler-framework-source", ], - srcs_lib: "framework-minus-apex", - srcs_lib_whitelist_pkgs: packages_to_document, + libs: ["framework-internal-utils"], local_sourcepaths: frameworks_base_subdirs, installable: false, annotations_enabled: true, - previous_api: ":last-released-public-api", + previous_api: ":last-released-public-api-for-metalava-annotations", merge_annotations_dirs: [ "metalava-manual", "ojluni-annotated-sdk-stubs", @@ -960,6 +1035,8 @@ stubs_defaults { "sdk-dir", "api-versions-jars-dir", ], + sdk_version: "core_platform", + filter_packages: packages_to_document, } droidstubs { @@ -1109,7 +1186,7 @@ droiddoc { } droiddoc { - name: "ds-docs", + name: "ds-docs-java", defaults: ["framework-docs-default"], srcs: [ ":framework-doc-stubs", @@ -1138,6 +1215,58 @@ droiddoc { } 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: [ @@ -1232,7 +1361,7 @@ droidstubs { installable: false, sdk_version: "core_platform", annotations_enabled: true, - previous_api: ":last-released-public-api", + previous_api: ":last-released-public-api-for-metalava-annotations", merge_annotations_dirs: [ "metalava-manual", "ojluni-annotated-sdk-stubs", @@ -1271,6 +1400,7 @@ droidstubs { ":openjdk_java_files", ":opt-telephony-common-srcs", ], + arg_files: [ "core/res/AndroidManifest.xml", ], @@ -1405,7 +1535,7 @@ filegroup { // annotations to private apis aidl_mapping { name: "framework-aidl-mappings", - srcs: framework_srcs, + srcs: [":framework-all-sources"], output: "framework-aidl-mappings.txt", } @@ -1418,3 +1548,25 @@ genrule { targets: ["droidcore"], }, } + +// Avoid including Parcelable classes as we don't want to have two copies of +// Parcelable cross the process. +filegroup { + name: "framework-telephony-stack-shared-srcs", + srcs: [ + "core/java/android/os/RegistrantList.java", + "core/java/android/os/Registrant.java", + "core/java/android/util/LocalLog.java", + "core/java/android/util/Slog.java", + "core/java/android/util/TimeUtils.java", + "core/java/com/android/internal/os/SomeArgs.java", + "core/java/com/android/internal/util/Preconditions.java", + "core/java/com/android/internal/util/State.java", + "core/java/com/android/internal/util/StateMachine.java", + "core/java/com/android/internal/util/XmlUtils.java", + "core/java/com/android/internal/util/HexDump.java", + "core/java/com/android/internal/util/IndentingPrintWriter.java", + "core/java/com/android/internal/util/DumpUtils.java" + ], +} + |