diff options
Diffstat (limited to 'api')
| -rw-r--r-- | api/Android.bp | 203 | ||||
| -rw-r--r-- | api/ApiDocs.bp | 309 | ||||
| -rw-r--r-- | api/OWNERS | 5 | ||||
| -rw-r--r-- | api/StubLibraries.bp | 473 | ||||
| -rw-r--r-- | api/api.go | 162 | ||||
| -rw-r--r-- | api/api_test.go | 68 | ||||
| -rw-r--r-- | api/coverage/tools/Android.bp | 32 | ||||
| -rw-r--r-- | api/coverage/tools/ExtractFlaggedApis.kt | 66 | ||||
| -rw-r--r-- | api/coverage/tools/extract_flagged_apis.proto | 37 | ||||
| -rwxr-xr-x | api/gen_combined_removed_dex.sh | 2 | ||||
| -rw-r--r-- | api/go.mod | 10 | ||||
| -rw-r--r-- | api/go.work | 17 | ||||
| -rw-r--r-- | api/go.work.sum | 66 | ||||
| -rw-r--r-- | api/javadoc-lint-baseline | 0 |
14 files changed, 1035 insertions, 415 deletions
diff --git a/api/Android.bp b/api/Android.bp index f5bafe8bf8da..53988cd373b8 100644 --- a/api/Android.bp +++ b/api/Android.bp @@ -31,12 +31,10 @@ bootstrap_go_package { "blueprint", "soong", "soong-android", - "soong-bp2build", "soong-genrule", "soong-java", ], srcs: ["api.go"], - testSrcs: ["api_test.go"], pluginFor: ["soong_build"], } @@ -60,14 +58,14 @@ python_test_host { metalava_cmd = "$(location metalava)" // Silence reflection warnings. See b/168689341 metalava_cmd += " -J--add-opens=java.base/java.util=ALL-UNNAMED " -metalava_cmd += " --quiet --no-banner --format=v2 " +metalava_cmd += " --quiet " genrule { name: "current-api-xml", tools: ["metalava"], srcs: [":frameworks-base-api-current.txt"], out: ["current.api"], - cmd: metalava_cmd + "-convert2xmlnostrip $(in) $(out)", + cmd: metalava_cmd + "signature-to-jdiff $(in) $(out)", visibility: ["//visibility:public"], } @@ -86,9 +84,12 @@ combined_apis { "framework-devicelock", "framework-graphics", "framework-healthfitness", + "framework-location", "framework-media", "framework-mediaprovider", + "framework-nfc", "framework-ondevicepersonalization", + "framework-pdf", "framework-permission", "framework-permission-s", "framework-scheduling", @@ -259,7 +260,201 @@ java_genrule { cmd: "cat $(in) | md5sum | cut -d' ' -f1 > $(out)", } +packages_to_document = [ + "android", + "dalvik", + "java", + "javax", + "junit", + "org.apache.http", + "org.json", + "org.w3c.dom", + "org.xml.sax", + "org.xmlpull", +] + +// Defaults for all stubs that include the non-updatable framework. These defaults do not include +// module symbols, so will not compile correctly on their own. Users must add module APIs to the +// classpath (or sources) somehow. +stubs_defaults { + name: "android-non-updatable-stubs-defaults", + srcs: [":android-non-updatable-stub-sources"], + sdk_version: "none", + system_modules: "none", + java_version: "1.8", + arg_files: [":frameworks-base-core-AndroidManifest.xml"], + aidl: { + include_dirs: [ + "frameworks/av/aidl", + "frameworks/base/media/aidl", + "frameworks/base/telephony/java", + "frameworks/native/libs/permission/aidl", + "packages/modules/Bluetooth/framework/aidl-export", + "packages/modules/Connectivity/framework/aidl-export", + "packages/modules/Media/apex/aidl/stable", + "hardware/interfaces/biometrics/common/aidl", + "hardware/interfaces/biometrics/fingerprint/aidl", + "hardware/interfaces/graphics/common/aidl", + "hardware/interfaces/keymaster/aidl", + "system/hardware/interfaces/media/aidl", + ], + }, + // These are libs from framework-internal-utils that are required (i.e. being referenced) + // from framework-non-updatable-sources. Add more here when there's a need. + // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular + // dependencies gets bigger. + libs: [ + "android.hardware.cas-V1.2-java", + "android.hardware.health-V1.0-java-constants", + "android.hardware.radio-V1.5-java", + "android.hardware.radio-V1.6-java", + "android.hardware.thermal-V1.0-java-constants", + "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.gadget-V1.0-java", + "android.hardware.vibrator-V1.3-java", + "framework-protos", + ], + flags: [ + "--error NoSettingsProvider", + "--error UnhiddenSystemApi", + "--error UnflaggedApi", + "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*", + "--hide BroadcastBehavior", + "--hide CallbackInterface", + "--hide DeprecationMismatch", + "--hide HiddenSuperclass", + "--hide MissingPermission", + "--hide RequiresPermission", + "--hide SdkConstant", + "--hide Todo", + "--hide-package android.audio.policy.configuration.V7_0", + "--hide-package com.android.server", + "--manifest $(location :frameworks-base-core-AndroidManifest.xml)", + ], + filter_packages: packages_to_document, + high_mem: true, // Lots of sources => high memory use, see b/170701554 + installable: false, + annotations_enabled: true, + previous_api: ":android.api.public.latest", + merge_annotations_dirs: ["metalava-manual"], + defaults_visibility: ["//frameworks/base/api"], + visibility: ["//frameworks/base/api"], +} + +// We resolve dependencies on APIs in modules by depending on a prebuilt of the whole +// platform (sdk_system_current_android). That prebuilt does not include module-lib APIs, +// so use the prebuilt module-lib stubs for modules that export module-lib stubs that the +// non-updatable part depends on. +non_updatable_api_deps_on_modules = [ + "sdk_module-lib_current_framework-tethering", + "sdk_module-lib_current_framework-connectivity-t", + "sdk_system_current_android", +] + +// Defaults with module APIs in the classpath (mostly from prebuilts). +// Suitable for compiling android-non-updatable. +stubs_defaults { + name: "module-classpath-stubs-defaults", + aidl: { + include_dirs: [ + "packages/modules/Bluetooth/framework/aidl-export", + "packages/modules/Connectivity/framework/aidl-export", + "packages/modules/Media/apex/aidl/stable", + ], + }, + libs: non_updatable_api_deps_on_modules, +} + +// Defaults for the java_sdk_libraries of unbundled jars from framework. +// java_sdk_libraries using these defaults should also add themselves to the +// non_updatable_modules list in frameworks/base/api/api.go +java_defaults { + name: "framework-non-updatable-unbundled-defaults", + defaults: [ + "framework-non-updatable-lint-defaults", + "non-updatable-framework-module-defaults", + ], + public: { + libs: ["android_module_lib_stubs_current"], + }, + system: { + libs: ["android_module_lib_stubs_current"], + }, + module_lib: { + libs: ["android_module_lib_stubs_current"], + }, + test: { + libs: ["android_test_frameworks_core_stubs_current"], + }, + sdk_version: "core_platform", + stub_only_libs: ["framework-protos"], + impl_only_libs: ["framework-minus-apex-headers"], // the framework, including hidden API + impl_library_visibility: ["//frameworks/base"], + defaults_visibility: [ + "//frameworks/base/location", + "//frameworks/base/nfc", + ], + plugins: ["error_prone_android_framework"], + errorprone: { + javacflags: [ + "-Xep:AndroidFrameworkCompatChange:ERROR", + "-Xep:AndroidFrameworkUid:ERROR", + ], + }, + // Include manual annotations in API txt files + merge_annotations_dirs: ["metalava-manual"], +} + build = [ "ApiDocs.bp", "StubLibraries.bp", ] + +genrule_defaults { + name: "flag-api-mapping-generation-defaults", + cmd: "$(location extract-flagged-apis) $(in) $(out)", + tools: ["extract-flagged-apis"], +} + +genrule { + name: "flag-api-mapping-PublicApi", + defaults: ["flag-api-mapping-generation-defaults"], + srcs: [":frameworks-base-api-current.txt"], + out: ["flag_api_map.textproto"], + dist: { + targets: ["droid"], + }, +} + +genrule { + name: "flag-api-mapping-SystemApi", + defaults: ["flag-api-mapping-generation-defaults"], + srcs: [":frameworks-base-api-system-current.txt"], + out: ["system_flag_api_map.textproto"], + dist: { + targets: ["droid"], + }, +} + +genrule { + name: "flag-api-mapping-ModuleLibApi", + defaults: ["flag-api-mapping-generation-defaults"], + srcs: [":frameworks-base-api-module-lib-current.txt"], + out: ["module_lib_flag_api_map.textproto"], + dist: { + targets: ["droid"], + }, +} + +genrule { + name: "flag-api-mapping-SystemServerApi", + defaults: ["flag-api-mapping-generation-defaults"], + srcs: [":frameworks-base-api-system-server-current.txt"], + out: ["system_server_flag_api_map.textproto"], + dist: { + targets: ["droid"], + }, +} diff --git a/api/ApiDocs.bp b/api/ApiDocs.bp index fbcaa52f9bb4..5744bdfd4b28 100644 --- a/api/ApiDocs.bp +++ b/api/ApiDocs.bp @@ -20,41 +20,6 @@ // The API doc generation is done by the various droiddoc modules each of which // is for different format. -///////////////////////////////////////////////////////////////////// -// stub source files are generated using metalava -///////////////////////////////////////////////////////////////////// - -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-design", - "android-support-dynamic-animation", - "android-support-exifinterface", - "android-support-fragment", - "android-support-media-compat", - "android-support-percent", - "android-support-transition", - "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-vectordrawable", - "android-support-animatedvectordrawable", - "android-support-v7-appcompat", - "android-support-v7-recyclerview", - "android-support-v8-renderscript", - "android-support-multidex", - "android-support-multidex-instrumentation", -] - // These defaults enable doc-stub generation, api lint database generation and sdk value generation. stubs_defaults { name: "android-non-updatable-doc-stubs-defaults", @@ -65,7 +30,6 @@ stubs_defaults { ":android-test-mock-sources", ":android-test-runner-sources", ], - libs: framework_docs_only_libs, create_doc_stubs: true, write_sdk_values: true, } @@ -108,7 +72,6 @@ droidstubs { "android-non-updatable-doc-stubs-defaults", "module-classpath-stubs-defaults", ], - args: metalava_framework_docs_args, } droidstubs { @@ -117,8 +80,7 @@ droidstubs { "android-non-updatable-doc-stubs-defaults", "module-classpath-stubs-defaults", ], - args: metalava_framework_docs_args + - " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ", + flags: ["--show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\)"], } droidstubs { @@ -127,9 +89,10 @@ droidstubs { "android-non-updatable-doc-stubs-defaults", "module-classpath-stubs-defaults", ], - args: metalava_framework_docs_args + - " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) " + - " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.MODULE_LIBRARIES\\) ", + flags: [ + "--show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\)", + "--show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.MODULE_LIBRARIES\\)", + ], generate_stubs: false, // We're only using this module for the annotations.zip output, disable doc-stubs. write_sdk_values: false, } @@ -140,10 +103,11 @@ droidstubs { "android-non-updatable-doc-stubs-defaults", "module-classpath-stubs-defaults", ], - args: metalava_framework_docs_args + - " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) " + - " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.MODULE_LIBRARIES\\) " + - " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\) ", + flags: [ + "--show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\)", + "--show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.MODULE_LIBRARIES\\)", + "--show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)", + ], generate_stubs: false, // We're only using this module for the annotations.zip output, disable doc-stubs. write_sdk_values: false, } @@ -152,7 +116,6 @@ droidstubs { name: "framework-doc-stubs", defaults: ["android-non-updatable-doc-stubs-defaults"], srcs: [":all-modules-public-stubs-source"], - args: metalava_framework_docs_args, api_levels_module: "api_versions_public", aidl: { include_dirs: [ @@ -160,21 +123,13 @@ droidstubs { "packages/modules/Media/apex/aidl/stable", ], }, - extensions_info_file: ":sdk-extensions-info", } droidstubs { name: "framework-doc-system-stubs", defaults: ["framework-doc-stubs-sources-default"], - args: metalava_framework_docs_args + - " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ", - api_levels_annotations_enabled: true, - api_levels_annotations_dirs: [ - "sdk-dir", - "api-versions-jars-dir", - ], - api_levels_sdk_type: "system", - extensions_info_file: ":sdk-extensions-info", + flags: ["--show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\)"], + api_levels_module: "api_versions_system", } ///////////////////////////////////////////////////////////////////// @@ -182,20 +137,11 @@ droidstubs { // using droiddoc ///////////////////////////////////////////////////////////////////// -framework_docs_only_args = " -android -manifest $(location :frameworks-base-core-AndroidManifest.xml) " + - "-metalavaApiSince " + - "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " + - "-overview $(location :frameworks-base-java-overview) " + - // Federate Support Library references against local API file. - "-federate SupportLib https://developer.android.com " + - "-federationapi SupportLib $(location :current-support-api) " + - // Federate Support Library references against local API file. - "-federate AndroidX https://developer.android.com " + - "-federationapi AndroidX $(location :current-androidx-api) " - doc_defaults { name: "framework-docs-default", - libs: framework_docs_only_libs + [ + sdk_version: "none", + system_modules: "none", + libs: [ "stub-annotations", "unsupportedappusage", ], @@ -209,6 +155,29 @@ doc_defaults { custom_template: "droiddoc-templates-sdk", resourcesdir: "docs/html/reference/images/", resourcesoutdir: "reference/android/images/", + lint_baseline: "javadoc-lint-baseline", + flags: [ + "-android", + "-manifest $(location :frameworks-base-core-AndroidManifest.xml)", + "-metalavaApiSince", + "-werror", + "-lerror", + "-overview $(location :frameworks-base-java-overview)", + // Federate Support Library references against local API file. + "-federate SupportLib https://developer.android.com", + "-federationapi SupportLib $(location :current-support-api)", + // Federate Support Library references against local API file. + "-federate AndroidX https://developer.android.com", + "-federationapi AndroidX $(location :current-androidx-api)", + // doclava contains checks for a few issues that are have been migrated to metalava. + // disable them in doclava, to avoid mistriggering or double triggering. + "-hide 111", // HIDDEN_SUPERCLASS + "-hide 113", // DEPRECATION_MISMATCH + "-hide 125", // REQUIRES_PERMISSION + "-hide 126", // BROADCAST_BEHAVIOR + "-hide 127", // SDK_CONSTANT + "-hide 128", // TODO + ], hdf: [ "dac true", "sdk.codename O", @@ -233,20 +202,6 @@ doc_defaults { }, } -doc_defaults { - name: "framework-dokka-docs-default", -} - -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"], @@ -258,7 +213,10 @@ droiddoc { ], compat_config: ":global-compat-config", proofread_file: "offline-sdk-docs-proofread.txt", - args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"", + flags: [ + "-offlinemode", + "-title \"Android SDK\"", + ], static_doc_index_redirect: "docs/docs-preview-index.html", } @@ -275,7 +233,11 @@ droiddoc { "android.whichdoc offline", ], proofread_file: "offline-sdk-referenceonly-docs-proofread.txt", - args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly", + flags: [ + "-offlinemode", + "-title \"Android SDK\"", + "-referenceonly", + ], static_doc_index_redirect: "docs/docs-documentation-redirect.html", static_doc_properties: "docs/source.properties", } @@ -293,77 +255,19 @@ droiddoc { "android.whichdoc offline", ], proofread_file: "offline-system-sdk-referenceonly-docs-proofread.txt", - args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" + - " -offlinemode -title \"Android System SDK\" -referenceonly", + flags: [ + "-hide 101", + "-hide 104", + "-hide 108", + "-offlinemode", + "-title \"Android System SDK\"", + "-referenceonly", + ], 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-proofread.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-proofread.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: [ @@ -374,32 +278,40 @@ droiddoc { "android.hasSamples true", ], proofread_file: "ds-docs-proofread.txt", - args: framework_docs_only_args + - " -toroot / -yamlV2 -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 ", + flags: [ + " -toroot /", + "-yamlV2", + "-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 " + + flags: [ + "-noJdkLink", + "-links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list", "-noStdlibLink", + ], proofread_file: "ds-dokka-proofread.txt", dokka_enabled: true, } @@ -452,65 +364,26 @@ droiddoc { hdf: [ "android.whichdoc online", ], - args: framework_docs_only_args + - " -staticonly " + - " -toroot / " + - " -devsite " + - " -ignoreJdLinks ", -} - -droiddoc { - name: "ds-ref-navtree-docs", - defaults: ["framework-docs-default"], - srcs: [ - ":framework-doc-stubs", + flags: [ + "-staticonly", + "-toroot /", + "-devsite", + "-ignoreJdLinks", ], - hdf: [ - "android.whichdoc online", - ], - args: framework_docs_only_args + - " -toroot / " + - " -atLinksNavtree " + - " -navtreeonly ", } droiddoc { - name: "online-sdk-dev-docs", + name: "ds-ref-navtree-docs", defaults: ["framework-docs-default"], srcs: [ ":framework-doc-stubs", ], hdf: [ "android.whichdoc online", - "android.hasSamples true", ], - proofread_file: "online-sdk-dev-docs-proofread.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", + flags: [ + "-toroot /", + "-atLinksNavtree", + "-navtreeonly", ], - proofread_file: "hidden-docs-proofread.txt", - args: framework_docs_only_args + - " -referenceonly " + - " -title \"Android SDK - Including hidden APIs.\"", } diff --git a/api/OWNERS b/api/OWNERS index bf6216c168e8..965093c9ab38 100644 --- a/api/OWNERS +++ b/api/OWNERS @@ -3,7 +3,10 @@ hansson@google.com # Modularization team file:platform/packages/modules/common:/OWNERS +# Soong plugin owned by Soong team. +per-file *.go,go.mod,go.work,go.work.sum = file:platform/build/soong:/OWNERS + per-file Android.bp = file:platform/build/soong:/OWNERS #{LAST_RESORT_SUGGESTION} # For metalava team to disable lint checks in platform -per-file Android.bp = aurimas@google.com,emberrose@google.com,sjgilbert@google.com +per-file Android.bp = aurimas@google.com,emberrose@google.com diff --git a/api/StubLibraries.bp b/api/StubLibraries.bp index f08745b5cd2c..50c9fd3ec499 100644 --- a/api/StubLibraries.bp +++ b/api/StubLibraries.bp @@ -33,7 +33,6 @@ droidstubs { "android-non-updatable-stubs-defaults", "module-classpath-stubs-defaults", ], - args: metalava_framework_docs_args, check_api: { current: { api_file: ":non-updatable-current.txt", @@ -47,6 +46,7 @@ droidstubs { api_lint: { enabled: true, new_since: ":android.api.public.latest", + baseline_file: ":non-updatable-lint-baseline.txt", }, }, dists: [ @@ -63,21 +63,28 @@ droidstubs { tag: ".removed-api.txt", }, ], + api_surface: "public", } -priv_apps = " --show-annotation android.annotation.SystemApi\\(" + - "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + - "\\)" +priv_apps = [ + "--show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + + "\\)", +] -priv_apps_in_stubs = " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + - "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + - "\\)" +priv_apps_in_stubs = [ + "--show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + + "\\)", +] -test = " --show-annotation android.annotation.TestApi" +test = ["--show-annotation android.annotation.TestApi"] -module_libs = " --show-annotation android.annotation.SystemApi\\(" + - "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + - "\\)" +module_libs = [ + "--show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + + "\\)", +] droidstubs { name: "system-api-stubs-docs-non-updatable", @@ -85,7 +92,7 @@ droidstubs { "android-non-updatable-stubs-defaults", "module-classpath-stubs-defaults", ], - args: metalava_framework_docs_args + priv_apps, + flags: priv_apps, check_api: { current: { api_file: ":non-updatable-system-current.txt", @@ -116,6 +123,7 @@ droidstubs { tag: ".removed-api.txt", }, ], + api_surface: "system", } droidstubs { @@ -124,7 +132,7 @@ droidstubs { "android-non-updatable-stubs-defaults", "module-classpath-stubs-defaults", ], - args: metalava_framework_docs_args + test + priv_apps_in_stubs, + flags: test + priv_apps_in_stubs, check_api: { current: { api_file: ":non-updatable-test-current.txt", @@ -132,6 +140,7 @@ droidstubs { }, api_lint: { enabled: true, + new_since: ":android.api.test.latest", baseline_file: ":non-updatable-test-lint-baseline.txt", }, }, @@ -161,6 +170,7 @@ droidstubs { tag: ".removed-api.txt", }, ], + api_surface: "test", } droidstubs { @@ -169,7 +179,7 @@ droidstubs { "android-non-updatable-stubs-defaults", "module-classpath-stubs-defaults", ], - args: metalava_framework_docs_args + priv_apps_in_stubs + module_libs, + flags: priv_apps_in_stubs + module_libs, check_api: { current: { api_file: ":non-updatable-module-lib-current.txt", @@ -200,6 +210,7 @@ droidstubs { tag: ".removed-api.txt", }, ], + api_surface: "module-lib", } ///////////////////////////////////////////////////////////////////// @@ -213,30 +224,106 @@ java_defaults { system_modules: "none", java_version: "1.8", compile_dex: true, - defaults_visibility: ["//visibility:private"], visibility: ["//visibility:public"], } java_defaults { - name: "android-non-updatable_defaults_stubs_current", - libs: ["stub-annotations"], - static_libs: ["framework-res-package-jar"], // Export package of framework-res + name: "android-non-updatable_defaults", sdk_version: "none", system_modules: "none", java_version: "1.8", compile_dex: true, +} + +java_defaults { + name: "android-non-updatable_from_source_defaults", + libs: ["stub-annotations"], + static_libs: ["framework-res-package-jar"], // Export package of framework-res dist: { targets: ["sdk"], tag: ".jar", dest: "android-non-updatable.jar", }, - defaults_visibility: ["//visibility:private"], - visibility: ["//visibility:private"], } java_library { name: "android-non-updatable.stubs", - defaults: ["android-non-updatable_defaults_stubs_current"], + defaults: ["android-non-updatable_defaults"], + static_libs: [ + "android-non-updatable.stubs.from-source", + ], + product_variables: { + build_from_text_stub: { + static_libs: [ + "android-non-updatable.stubs.from-text", + ], + exclude_static_libs: [ + "android-non-updatable.stubs.from-source", + ], + }, + }, +} + +java_library { + name: "android-non-updatable.stubs.system", + defaults: ["android-non-updatable_defaults"], + static_libs: [ + "android-non-updatable.stubs.system.from-source", + ], + product_variables: { + build_from_text_stub: { + static_libs: [ + "android-non-updatable.stubs.system.from-text", + ], + exclude_static_libs: [ + "android-non-updatable.stubs.system.from-source", + ], + }, + }, +} + +java_library { + name: "android-non-updatable.stubs.module_lib", + defaults: ["android-non-updatable_defaults"], + static_libs: [ + "android-non-updatable.stubs.module_lib.from-source", + ], + product_variables: { + build_from_text_stub: { + static_libs: [ + "android-non-updatable.stubs.module_lib.from-text", + ], + exclude_static_libs: [ + "android-non-updatable.stubs.module_lib.from-source", + ], + }, + }, +} + +java_library { + name: "android-non-updatable.stubs.test", + defaults: ["android-non-updatable_defaults"], + static_libs: [ + "android-non-updatable.stubs.test.from-source", + ], + product_variables: { + build_from_text_stub: { + static_libs: [ + "android-non-updatable.stubs.test.from-text", + ], + exclude_static_libs: [ + "android-non-updatable.stubs.test.from-source", + ], + }, + }, +} + +java_library { + name: "android-non-updatable.stubs.from-source", + defaults: [ + "android-non-updatable_defaults", + "android-non-updatable_from_source_defaults", + ], srcs: [":api-stubs-docs-non-updatable"], libs: ["all-modules-public-stubs"], dist: { @@ -245,8 +332,11 @@ java_library { } java_library { - name: "android-non-updatable.stubs.system", - defaults: ["android-non-updatable_defaults_stubs_current"], + name: "android-non-updatable.stubs.system.from-source", + defaults: [ + "android-non-updatable_defaults", + "android-non-updatable_from_source_defaults", + ], srcs: [":system-api-stubs-docs-non-updatable"], libs: ["all-modules-system-stubs"], dist: { @@ -255,26 +345,24 @@ java_library { } java_library { - name: "android-non-updatable.stubs.module_lib", - defaults: ["android-non-updatable_defaults_stubs_current"], - srcs: [":module-lib-api-stubs-docs-non-updatable"], - libs: [ - "sdk_module-lib_current_framework-tethering", - "sdk_module-lib_current_framework-connectivity-t", - "sdk_public_current_framework-bluetooth", - // NOTE: The below can be removed once the prebuilt stub contains bluetooth. - "sdk_system_current_android", - // NOTE: The below can be removed once the prebuilt stub contains IKE. - "sdk_system_current_android.net.ipsec.ike", + name: "android-non-updatable.stubs.module_lib.from-source", + defaults: [ + "android-non-updatable_defaults", + "android-non-updatable_from_source_defaults", ], + srcs: [":module-lib-api-stubs-docs-non-updatable"], + libs: non_updatable_api_deps_on_modules, dist: { dir: "apistubs/android/module-lib", }, } java_library { - name: "android-non-updatable.stubs.test", - defaults: ["android-non-updatable_defaults_stubs_current"], + name: "android-non-updatable.stubs.test.from-source", + defaults: [ + "android-non-updatable_defaults", + "android-non-updatable_from_source_defaults", + ], srcs: [":test-api-stubs-docs-non-updatable"], libs: ["all-modules-system-stubs"], dist: { @@ -283,6 +371,77 @@ java_library { } java_defaults { + name: "android-non-updatable_from_text_defaults", + static_libs: ["framework-res-package-jar"], + libs: ["stub-annotations"], +} + +java_api_library { + name: "android-non-updatable.stubs.from-text", + api_surface: "public", + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + ], + defaults: ["android-non-updatable_from_text_defaults"], + full_api_surface_stub: "android_stubs_current.from-text", +} + +java_api_library { + name: "android-non-updatable.stubs.system.from-text", + api_surface: "system", + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + "system-api-stubs-docs-non-updatable.api.contribution", + ], + defaults: ["android-non-updatable_from_text_defaults"], + full_api_surface_stub: "android_system_stubs_current.from-text", +} + +java_api_library { + name: "android-non-updatable.stubs.test.from-text", + api_surface: "test", + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + "system-api-stubs-docs-non-updatable.api.contribution", + "test-api-stubs-docs-non-updatable.api.contribution", + ], + defaults: ["android-non-updatable_from_text_defaults"], + full_api_surface_stub: "android_test_stubs_current.from-text", +} + +java_api_library { + name: "android-non-updatable.stubs.module_lib.from-text", + api_surface: "module_lib", + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + "system-api-stubs-docs-non-updatable.api.contribution", + "module-lib-api-stubs-docs-non-updatable.api.contribution", + ], + defaults: ["android-non-updatable_from_text_defaults"], + full_api_surface_stub: "android_module_lib_stubs_current_full.from-text", +} + +// This module generates a stub jar that is a union of the test and module lib +// non-updatable api contributions. Modules should not depend on the stub jar +// generated from this module, as this module is strictly used for hiddenapi only. +java_api_library { + name: "android-non-updatable.stubs.test_module_lib", + api_surface: "module_lib", + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + "system-api-stubs-docs-non-updatable.api.contribution", + "test-api-stubs-docs-non-updatable.api.contribution", + "module-lib-api-stubs-docs-non-updatable.api.contribution", + ], + defaults: ["android-non-updatable_from_text_defaults"], + full_api_surface_stub: "android_test_module_lib_stubs_current.from-text", + + // This module is only used for hiddenapi, and other modules should not + // depend on this module. + visibility: ["//visibility:private"], +} + +java_defaults { name: "android_stubs_dists_default", dist: { targets: ["sdk"], @@ -293,7 +452,7 @@ java_defaults { } java_library { - name: "android_stubs_current", + name: "android_stubs_current.from-source", static_libs: [ "all-modules-public-stubs", "android-non-updatable.stubs", @@ -303,7 +462,7 @@ java_library { } java_library { - name: "android_system_stubs_current", + name: "android_system_stubs_current.from-source", static_libs: [ "all-modules-system-stubs", "android-non-updatable.stubs.system", @@ -327,7 +486,7 @@ java_library { } java_library { - name: "android_test_stubs_current", + name: "android_test_stubs_current.from-source", static_libs: [ // Updatable modules do not have test APIs, but we want to include their SystemApis, like we // include the SystemApi of framework-non-updatable-sources. @@ -347,7 +506,22 @@ java_library { } java_library { - name: "android_module_lib_stubs_current", + name: "android_test_frameworks_core_stubs_current.from-source", + static_libs: [ + "all-updatable-modules-system-stubs", + "android-non-updatable.stubs.test", + ], + defaults: [ + "android.jar_defaults", + "android_stubs_dists_default", + ], + dist: { + dir: "apistubs/android/test-core", + }, +} + +java_library { + name: "android_module_lib_stubs_current.from-source", defaults: [ "android.jar_defaults", "android_stubs_dists_default", @@ -363,7 +537,7 @@ java_library { } java_library { - name: "android_system_server_stubs_current", + name: "android_system_server_stubs_current.from-source", defaults: [ "android.jar_defaults", "android_stubs_dists_default", @@ -371,7 +545,7 @@ java_library { srcs: [":services-non-updatable-stubs"], installable: false, static_libs: [ - "android_module_lib_stubs_current", + "android_module_lib_stubs_current.from-source", ], dist: { dir: "apistubs/android/system-server", @@ -402,7 +576,6 @@ java_library { java_genrule { name: "android_stubs_private_hjar", - visibility: ["//visibility:private"], srcs: [":android_stubs_private_jar{.hjar}"], out: ["android_stubs_private.jar"], cmd: "cp $(in) $(out)", @@ -411,7 +584,6 @@ java_genrule { java_library { name: "android_stubs_private", defaults: ["android_stubs_dists_default"], - visibility: ["//visibility:private"], sdk_version: "none", system_modules: "none", static_libs: ["android_stubs_private_hjar"], @@ -422,7 +594,6 @@ java_library { java_genrule { name: "android_stubs_private_framework_aidl", - visibility: ["//visibility:private"], tools: ["sdkparcelables"], srcs: [":android_stubs_private"], out: ["framework.aidl"], @@ -439,6 +610,206 @@ java_genrule { }, } +// +// Java API defaults and libraries for single tree build +// + +java_defaults { + name: "stub-annotation-defaults", + libs: [ + "stub-annotations", + ], + static_libs: [ + // stub annotations do not contribute to the API surfaces but are statically + // linked in the stubs for API surfaces (see frameworks/base/StubLibraries.bp). + // This is because annotation processors insist on loading the classes for any + // annotations found, thus should exist inside android.jar. + "private-stub-annotations-jar", + ], +} + +// Listing of API domains contribution and dependencies per API surfaces +java_defaults { + name: "android_test_stubs_current_contributions", + api_surface: "test", + api_contributions: [ + "framework-virtualization.stubs.source.test.api.contribution", + "framework-location.stubs.source.test.api.contribution", + "framework-nfc.stubs.source.test.api.contribution", + ], +} + +java_defaults { + name: "android_test_frameworks_core_stubs_current_contributions", + api_surface: "test", + api_contributions: [ + "test-api-stubs-docs-non-updatable.api.contribution", + ], +} + +java_defaults { + name: "android_module_lib_stubs_current_contributions", + api_surface: "module-lib", + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + "system-api-stubs-docs-non-updatable.api.contribution", + "module-lib-api-stubs-docs-non-updatable.api.contribution", + "art.module.public.api.stubs.source.api.contribution", + "art.module.public.api.stubs.source.system.api.contribution", + "art.module.public.api.stubs.source.module_lib.api.contribution", + "i18n.module.public.api.stubs.source.api.contribution", + "i18n.module.public.api.stubs.source.system.api.contribution", + "i18n.module.public.api.stubs.source.module_lib.api.contribution", + ], +} + +// Java API library definitions per API surface +java_api_library { + name: "android_stubs_current.from-text", + api_surface: "public", + defaults: [ + // This module is dynamically created at frameworks/base/api/api.go + // instead of being written out, in order to minimize edits in the codebase + // when there is a change in the list of modules. + // that contributes to an api surface. + "android_stubs_current_contributions", + "stub-annotation-defaults", + ], + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + ], + visibility: ["//visibility:public"], + enable_validation: false, +} + +java_api_library { + name: "android_system_stubs_current.from-text", + api_surface: "system", + defaults: [ + "android_stubs_current_contributions", + "android_system_stubs_current_contributions", + "stub-annotation-defaults", + ], + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + "system-api-stubs-docs-non-updatable.api.contribution", + ], + visibility: ["//visibility:public"], + enable_validation: false, +} + +java_api_library { + name: "android_test_stubs_current.from-text", + api_surface: "test", + defaults: [ + "android_stubs_current_contributions", + "android_system_stubs_current_contributions", + "android_test_stubs_current_contributions", + "stub-annotation-defaults", + ], + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + "system-api-stubs-docs-non-updatable.api.contribution", + "test-api-stubs-docs-non-updatable.api.contribution", + ], + visibility: ["//visibility:public"], + enable_validation: false, +} + +java_api_library { + name: "android_test_frameworks_core_stubs_current.from-text", + api_surface: "test", + defaults: [ + "android_stubs_current_contributions", + "android_system_stubs_current_contributions", + "android_test_frameworks_core_stubs_current_contributions", + ], + libs: [ + "stub-annotations", + ], + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + "system-api-stubs-docs-non-updatable.api.contribution", + ], + enable_validation: false, +} + +java_api_library { + name: "android_module_lib_stubs_current_full.from-text", + api_surface: "module-lib", + defaults: [ + "android_stubs_current_contributions", + "android_system_stubs_current_contributions", + "android_module_lib_stubs_current_contributions_full", + ], + libs: [ + "stub-annotations", + ], + api_contributions: [ + "api-stubs-docs-non-updatable.api.contribution", + "system-api-stubs-docs-non-updatable.api.contribution", + "module-lib-api-stubs-docs-non-updatable.api.contribution", + ], + visibility: ["//visibility:public"], + enable_validation: false, +} + +java_api_library { + name: "android_module_lib_stubs_current.from-text", + api_surface: "module-lib", + defaults: [ + "android_module_lib_stubs_current_contributions", + ], + libs: [ + "android_module_lib_stubs_current_full.from-text", + "stub-annotations", + ], + visibility: ["//visibility:public"], + enable_validation: false, +} + +java_api_library { + name: "android_test_module_lib_stubs_current.from-text", + api_surface: "module-lib", + defaults: [ + "android_stubs_current_contributions", + "android_system_stubs_current_contributions", + "android_test_stubs_current_contributions", + "android_module_lib_stubs_current_contributions", + ], + libs: [ + "android_module_lib_stubs_current_full.from-text", + "stub-annotations", + ], + api_contributions: [ + "test-api-stubs-docs-non-updatable.api.contribution", + ], + + // This module is only used to build android-non-updatable.stubs.test_module_lib + // and other modules should not depend on this module. + visibility: [ + "//visibility:private", + ], + enable_validation: false, +} + +java_api_library { + name: "android_system_server_stubs_current.from-text", + api_surface: "system-server", + api_contributions: [ + "services-non-updatable-stubs.api.contribution", + ], + libs: [ + "android_module_lib_stubs_current.from-text", + "stub-annotations", + ], + static_libs: [ + "android_module_lib_stubs_current.from-text", + ], + visibility: ["//visibility:public"], + enable_validation: false, +} + //////////////////////////////////////////////////////////////////////// // api-versions.xml generation, for public and system. This API database // also contains the android.test.* APIs. @@ -529,6 +900,15 @@ droidstubs { ], api_levels_sdk_type: "system", extensions_info_file: ":sdk-extensions-info", + dists: [ + // Make the api-versions.xml file for the system API available in the + // sdk build target. + { + targets: ["sdk"], + dest: "api-versions_system.xml", + tag: ".api_versions.xml", + }, + ], } // This module can be built with: @@ -585,8 +965,7 @@ droidstubs { merge_annotations_dirs: [ "metalava-manual", ], - args: priv_apps, - visibility: ["//visibility:private"], + flags: priv_apps, } java_library { diff --git a/api/api.go b/api/api.go index 09c238336a39..2668999c572e 100644 --- a/api/api.go +++ b/api/api.go @@ -15,12 +15,13 @@ package api import ( + "fmt" "sort" + "strings" "github.com/google/blueprint/proptools" "android/soong/android" - "android/soong/bazel" "android/soong/genrule" "android/soong/java" ) @@ -29,6 +30,8 @@ const art = "art.module.public.api" const conscrypt = "conscrypt.module.public.api" const i18n = "i18n.module.public.api" const virtualization = "framework-virtualization" +const location = "framework-location" +const nfc = "framework-nfc" var core_libraries_modules = []string{art, conscrypt, i18n} @@ -40,7 +43,7 @@ var core_libraries_modules = []string{art, conscrypt, i18n} // APIs. // In addition, the modules in this list are allowed to contribute to test APIs // stubs. -var non_updatable_modules = []string{virtualization} +var non_updatable_modules = []string{virtualization, location, nfc} // The intention behind this soong plugin is to generate a number of "merged" // API-related modules that would otherwise require a large amount of very @@ -61,7 +64,6 @@ type CombinedApisProperties struct { type CombinedApis struct { android.ModuleBase - android.BazelModuleBase properties CombinedApisProperties } @@ -94,6 +96,7 @@ type libraryProps struct { Sdk_version *string Static_libs []string Visibility []string + Defaults []string } type fgProps struct { @@ -102,17 +105,12 @@ type fgProps struct { Visibility []string } -type Bazel_module struct { - Bp2build_available *bool -} -type bazelProperties struct { - *Bazel_module -} - -var bp2buildNotAvailable = bazelProperties{ - &Bazel_module{ - Bp2build_available: proptools.BoolPtr(false), - }, +type defaultsProps struct { + Name *string + Api_surface *string + Api_contributions []string + Defaults_visibility []string + Previous_api *string } // Struct to pass parameters for the various merged [current|removed].txt file modules we create. @@ -135,17 +133,19 @@ func createMergedTxt(ctx android.LoadHookContext, txt MergedTxtDefinition) { metalavaCmd := "$(location metalava)" // Silence reflection warnings. See b/168689341 metalavaCmd += " -J--add-opens=java.base/java.util=ALL-UNNAMED " - metalavaCmd += " --quiet --no-banner --format=v2 " + metalavaCmd += " --quiet merge-signatures --format=v2 " filename := txt.TxtFilename if txt.Scope != "public" { filename = txt.Scope + "-" + filename } + moduleName := ctx.ModuleName() + "-" + filename + props := genruleProps{} - props.Name = proptools.StringPtr(ctx.ModuleName() + "-" + filename) + props.Name = proptools.StringPtr(moduleName) props.Tools = []string{"metalava"} props.Out = []string{filename} - props.Cmd = proptools.StringPtr(metalavaCmd + "$(in) --api $(out)") + props.Cmd = proptools.StringPtr(metalavaCmd + "$(in) --out $(out)") props.Srcs = append([]string{txt.BaseTxt}, createSrcs(txt.Modules, txt.ModuleTag)...) props.Dists = []android.Dist{ { @@ -160,37 +160,37 @@ func createMergedTxt(ctx android.LoadHookContext, txt MergedTxtDefinition) { }, } props.Visibility = []string{"//visibility:public"} - ctx.CreateModule(genrule.GenRuleFactory, &props, &bp2buildNotAvailable) + ctx.CreateModule(genrule.GenRuleFactory, &props) } func createMergedAnnotationsFilegroups(ctx android.LoadHookContext, modules, system_server_modules []string) { - for _, i := range []struct{ + for _, i := range []struct { name string tag string modules []string }{ { - name: "all-modules-public-annotations", - tag: "{.public.annotations.zip}", + name: "all-modules-public-annotations", + tag: "{.public.annotations.zip}", modules: modules, }, { - name: "all-modules-system-annotations", - tag: "{.system.annotations.zip}", + name: "all-modules-system-annotations", + tag: "{.system.annotations.zip}", modules: modules, }, { - name: "all-modules-module-lib-annotations", - tag: "{.module-lib.annotations.zip}", + name: "all-modules-module-lib-annotations", + tag: "{.module-lib.annotations.zip}", modules: modules, }, { - name: "all-modules-system-server-annotations", - tag: "{.system-server.annotations.zip}", + name: "all-modules-system-server-annotations", + tag: "{.system-server.annotations.zip}", modules: system_server_modules, }, } { props := fgProps{} props.Name = proptools.StringPtr(i.name) props.Srcs = createSrcs(i.modules, i.tag) - ctx.CreateModule(android.FileGroupFactory, &props, &bp2buildNotAvailable) + ctx.CreateModule(android.FileGroupFactory, &props) } } @@ -267,8 +267,10 @@ func createMergedFrameworkImpl(ctx android.LoadHookContext, modules []string) { } func createMergedFrameworkModuleLibStubs(ctx android.LoadHookContext, modules []string) { - // The user of this module compiles against the "core" SDK, so remove core libraries to avoid dupes. + // The user of this module compiles against the "core" SDK and against non-updatable modules, + // so remove to avoid dupes. modules = removeAll(modules, core_libraries_modules) + modules = removeAll(modules, non_updatable_modules) props := libraryProps{} props.Name = proptools.StringPtr("framework-updatable-stubs-module_libs_api") props.Static_libs = transformArray(modules, "", ".stubs.module_lib") @@ -282,7 +284,7 @@ func createPublicStubsSourceFilegroup(ctx android.LoadHookContext, modules []str props.Name = proptools.StringPtr("all-modules-public-stubs-source") props.Srcs = createSrcs(modules, "{.public.stubs.source}") props.Visibility = []string{"//frameworks/base"} - ctx.CreateModule(android.FileGroupFactory, &props, &bp2buildNotAvailable) + ctx.CreateModule(android.FileGroupFactory, &props) } func createMergedTxts(ctx android.LoadHookContext, bootclasspath, system_server_classpath []string) { @@ -329,6 +331,56 @@ func createMergedTxts(ctx android.LoadHookContext, bootclasspath, system_server_ } } +func createApiContributionDefaults(ctx android.LoadHookContext, modules []string) { + defaultsSdkKinds := []android.SdkKind{ + android.SdkPublic, android.SdkSystem, android.SdkModule, + } + for _, sdkKind := range defaultsSdkKinds { + props := defaultsProps{} + props.Name = proptools.StringPtr( + sdkKind.DefaultJavaLibraryName() + "_contributions") + if sdkKind == android.SdkModule { + props.Name = proptools.StringPtr( + sdkKind.DefaultJavaLibraryName() + "_contributions_full") + } + props.Api_surface = proptools.StringPtr(sdkKind.String()) + apiSuffix := "" + if sdkKind != android.SdkPublic { + apiSuffix = "." + strings.ReplaceAll(sdkKind.String(), "-", "_") + } + props.Api_contributions = transformArray( + modules, "", fmt.Sprintf(".stubs.source%s.api.contribution", apiSuffix)) + props.Defaults_visibility = []string{"//visibility:public"} + props.Previous_api = proptools.StringPtr(":android.api.public.latest") + ctx.CreateModule(java.DefaultsFactory, &props) + } +} + +func createFullApiLibraries(ctx android.LoadHookContext) { + javaLibraryNames := []string{ + "android_stubs_current", + "android_system_stubs_current", + "android_test_stubs_current", + "android_test_frameworks_core_stubs_current", + "android_module_lib_stubs_current", + "android_system_server_stubs_current", + } + + for _, libraryName := range javaLibraryNames { + props := libraryProps{} + props.Name = proptools.StringPtr(libraryName) + staticLib := libraryName + ".from-source" + if ctx.Config().BuildFromTextStub() { + staticLib = libraryName + ".from-text" + } + props.Static_libs = []string{staticLib} + props.Defaults = []string{"android.jar_defaults"} + props.Visibility = []string{"//visibility:public"} + + ctx.CreateModule(java.LibraryFactory, &props) + } +} + func (a *CombinedApis) createInternalModules(ctx android.LoadHookContext) { bootclasspath := a.properties.Bootclasspath system_server_classpath := a.properties.System_server_classpath @@ -347,6 +399,10 @@ func (a *CombinedApis) createInternalModules(ctx android.LoadHookContext) { createMergedAnnotationsFilegroups(ctx, bootclasspath, system_server_classpath) createPublicStubsSourceFilegroup(ctx, bootclasspath) + + createApiContributionDefaults(ctx, bootclasspath) + + createFullApiLibraries(ctx) } func combinedApisModuleFactory() android.Module { @@ -354,55 +410,9 @@ func combinedApisModuleFactory() android.Module { module.AddProperties(&module.properties) android.InitAndroidModule(module) android.AddLoadHook(module, func(ctx android.LoadHookContext) { module.createInternalModules(ctx) }) - android.InitBazelModule(module) return module } -type bazelCombinedApisAttributes struct { - Scope bazel.StringAttribute - Base bazel.LabelAttribute - Deps bazel.LabelListAttribute -} - -// combined_apis bp2build converter -func (a *CombinedApis) ConvertWithBp2build(ctx android.TopDownMutatorContext) { - basePrefix := "non-updatable" - scopeToSuffix := map[string]string{ - "public": "-current.txt", - "system": "-system-current.txt", - "module-lib": "-module-lib-current.txt", - "system-server": "-system-server-current.txt", - } - - for scopeName, suffix := range scopeToSuffix{ - name := a.Name() + suffix - - var scope bazel.StringAttribute - scope.SetValue(scopeName) - - var base bazel.LabelAttribute - base.SetValue(android.BazelLabelForModuleDepSingle(ctx, basePrefix+suffix)) - - var deps bazel.LabelListAttribute - classpath := a.properties.Bootclasspath - if scopeName == "system-server" { - classpath = a.properties.System_server_classpath - } - deps = bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, classpath)) - - attrs := bazelCombinedApisAttributes{ - Scope: scope, - Base: base, - Deps: deps, - } - props := bazel.BazelTargetModuleProperties{ - Rule_class: "merged_txts", - Bzl_load_location: "//build/bazel/rules/java:merged_txts.bzl", - } - ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: name}, &attrs) - } -} - // Various utility methods below. // Creates an array of ":<m><tag>" for each m in <modules>. diff --git a/api/api_test.go b/api/api_test.go deleted file mode 100644 index 15b695ca0d36..000000000000 --- a/api/api_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (C) 2023 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. - -package api - -import ( - "testing" - - "android/soong/android" - "android/soong/bp2build" -) - -func runCombinedApisTestCaseWithRegistrationCtxFunc(t *testing.T, tc bp2build.Bp2buildTestCase, registrationCtxFunc func(ctx android.RegistrationContext)) { - t.Helper() - (&tc).ModuleTypeUnderTest = "combined_apis" - (&tc).ModuleTypeUnderTestFactory = combinedApisModuleFactory - bp2build.RunBp2BuildTestCase(t, registrationCtxFunc, tc) -} - -func runCombinedApisTestCase(t *testing.T, tc bp2build.Bp2buildTestCase) { - t.Helper() - runCombinedApisTestCaseWithRegistrationCtxFunc(t, tc, func(ctx android.RegistrationContext) {}) -} - -func TestCombinedApisGeneral(t *testing.T) { - runCombinedApisTestCase(t, bp2build.Bp2buildTestCase{ - Description: "combined_apis, general case", - Blueprint: `combined_apis { - name: "foo", - bootclasspath: ["bcp"], - system_server_classpath: ["ssc"], -} -`, - ExpectedBazelTargets: []string{ - bp2build.MakeBazelTargetNoRestrictions("merged_txts", "foo-current.txt", bp2build.AttrNameToString{ - "scope": `"public"`, - "base": `":non-updatable-current.txt__BP2BUILD__MISSING__DEP"`, - "deps": `[":bcp__BP2BUILD__MISSING__DEP"]`, - }), - bp2build.MakeBazelTargetNoRestrictions("merged_txts", "foo-system-current.txt", bp2build.AttrNameToString{ - "scope": `"system"`, - "base": `":non-updatable-system-current.txt__BP2BUILD__MISSING__DEP"`, - "deps": `[":bcp__BP2BUILD__MISSING__DEP"]`, - }), - bp2build.MakeBazelTargetNoRestrictions("merged_txts", "foo-module-lib-current.txt", bp2build.AttrNameToString{ - "scope": `"module-lib"`, - "base": `":non-updatable-module-lib-current.txt__BP2BUILD__MISSING__DEP"`, - "deps": `[":bcp__BP2BUILD__MISSING__DEP"]`, - }), - bp2build.MakeBazelTargetNoRestrictions("merged_txts", "foo-system-server-current.txt", bp2build.AttrNameToString{ - "scope": `"system-server"`, - "base": `":non-updatable-system-server-current.txt__BP2BUILD__MISSING__DEP"`, - "deps": `[":ssc__BP2BUILD__MISSING__DEP"]`, - }), - }, - }) -} diff --git a/api/coverage/tools/Android.bp b/api/coverage/tools/Android.bp new file mode 100644 index 000000000000..3e169120dc48 --- /dev/null +++ b/api/coverage/tools/Android.bp @@ -0,0 +1,32 @@ +// Copyright (C) 2023 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. + +java_binary_host { + name: "extract-flagged-apis", + srcs: ["ExtractFlaggedApis.kt"], + main_class: "android.platform.coverage.ExtractFlaggedApisKt", + static_libs: [ + "metalava-signature-reader", + "extract_flagged_apis_proto", + ], +} + +java_library_host { + name: "extract_flagged_apis_proto", + srcs: ["extract_flagged_apis.proto"], + static_libs: ["libprotobuf-java-full"], + proto: { + type: "full", + }, +} diff --git a/api/coverage/tools/ExtractFlaggedApis.kt b/api/coverage/tools/ExtractFlaggedApis.kt new file mode 100644 index 000000000000..caa1929abd54 --- /dev/null +++ b/api/coverage/tools/ExtractFlaggedApis.kt @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2023 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. + */ + +package android.platform.coverage + +import com.android.tools.metalava.model.text.ApiFile +import java.io.File +import java.io.FileWriter + +/** Usage: extract-flagged-apis <api text file> <output .pb file> */ +fun main(args: Array<String>) { + var cb = ApiFile.parseApi(listOf(File(args[0]))) + var builder = FlagApiMap.newBuilder() + for (pkg in cb.getPackages().packages) { + var packageName = pkg.qualifiedName() + pkg.allClasses() + .filter { it.methods().size > 0 } + .forEach { + for (method in it.methods()) { + val flagValue = + method.modifiers + .findAnnotation("android.annotation.FlaggedApi") + ?.findAttribute("value") + ?.value + ?.value() + if (flagValue != null && flagValue is String) { + var api = + JavaMethod.newBuilder() + .setPackageName(packageName) + .setClassName(it.fullName()) + .setMethodName(method.name()) + for (param in method.parameters()) { + api.addParameters(param.type().toTypeString()) + } + if (builder.containsFlagToApi(flagValue)) { + var updatedApis = + builder + .getFlagToApiOrThrow(flagValue) + .toBuilder() + .addJavaMethods(api) + .build() + builder.putFlagToApi(flagValue, updatedApis) + } else { + var apis = FlaggedApis.newBuilder().addJavaMethods(api).build() + builder.putFlagToApi(flagValue, apis) + } + } + } + } + } + val flagApiMap = builder.build() + FileWriter(args[1]).use { it.write(flagApiMap.toString()) } +} diff --git a/api/coverage/tools/extract_flagged_apis.proto b/api/coverage/tools/extract_flagged_apis.proto new file mode 100644 index 000000000000..4db2a8b03de5 --- /dev/null +++ b/api/coverage/tools/extract_flagged_apis.proto @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2023 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. + */ + +syntax = "proto3"; + +package android.platform.coverage; + +option java_multiple_files = true; + +message FlagApiMap { + map<string, FlaggedApis> flag_to_api = 1; +} + +message FlaggedApis { + repeated JavaMethod java_methods = 1; +} + +message JavaMethod { + string package_name = 1; + string class_name = 2; + string method_name = 3; + repeated string parameters = 4; +} + diff --git a/api/gen_combined_removed_dex.sh b/api/gen_combined_removed_dex.sh index 9225fe8dfe85..e0153f7c1091 100755 --- a/api/gen_combined_removed_dex.sh +++ b/api/gen_combined_removed_dex.sh @@ -6,6 +6,6 @@ shift 2 # Convert each removed.txt to the "dex format" equivalent, and print all output. for f in "$@"; do - "$metalava_path" --no-banner "$f" --dex-api "${tmp_dir}/tmp" + "$metalava_path" signature-to-dex "$f" "${tmp_dir}/tmp" cat "${tmp_dir}/tmp" done diff --git a/api/go.mod b/api/go.mod new file mode 100644 index 000000000000..445a6f4a5ec6 --- /dev/null +++ b/api/go.mod @@ -0,0 +1,10 @@ +module android/soong/aidl + +go 1.18 + +require ( + android/soong v0.0.0 + github.com/google/blueprint v0.0.0 + google.golang.org/protobuf v0.0.0 + go.starlark.net v0.0.0 +) diff --git a/api/go.work b/api/go.work new file mode 100644 index 000000000000..edd002e7efba --- /dev/null +++ b/api/go.work @@ -0,0 +1,17 @@ +go 1.18 + +use ( + . + ../../../build/soong + ../../../build/blueprint + ../../../external/go-cmp + ../../../external/golang-protobuf +) + +replace ( + android/soong v0.0.0 => ../../../build/soong + google.golang.org/protobuf v0.0.0 => ../../../external/golang-protobuf + github.com/google/blueprint v0.0.0 => ../../../build/blueprint + github.com/google/go-cmp v0.0.0 => ../../../external/go-cmp + go.starlark.net v0.0.0 => ../../../external/starlark-go +) diff --git a/api/go.work.sum b/api/go.work.sum new file mode 100644 index 000000000000..d00184fa2aa5 --- /dev/null +++ b/api/go.work.sum @@ -0,0 +1,66 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/api/javadoc-lint-baseline b/api/javadoc-lint-baseline new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/api/javadoc-lint-baseline |