From 0d7e86d03c8443cee90096ff0447fd50541d77c3 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Fri, 20 Dec 2019 14:35:43 +0900 Subject: Separate modules for API docs and API stubs frameworks/base/Android.bp became too big. Modularize it into multiple files for better readability and extensibility. droidstubs and java_library modules for API stub libraries are moved to StubLibraries.bp. droidstubs and droiddoc modules for API documents are moved to ApiDocs.bp Also, added some documentation to explain the roles of the many modules and how they are related with each other. Bug: N/A Test: m Change-Id: I285e8c82078d5bd3ed85b0343db2f6375ce7ffb7 --- StubLibraries.bp | 340 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 340 insertions(+) create mode 100644 StubLibraries.bp (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp new file mode 100644 index 000000000000..78f1b9ca26e5 --- /dev/null +++ b/StubLibraries.bp @@ -0,0 +1,340 @@ +// Copyright (C) 2019 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. + +// How stubs are generated: +// +// raw source files --(metalava)--> stub source files --(javac)--> stub jar files +// +// The metalava conversion is done by droidstub modules *-api-stubs-docs. +// The javac compilation is done by java_library modules android_*_stubs_current. +// The metalava conversion is also responsible for creating API signature files +// and comparing them against the last API signature in api/*-current.txt files +// and also against the latest frozen API signature in prebuilts/sdk/*/*/api/android.txt +// files. + +///////////////////////////////////////////////////////////////////// +// Common metalava configs +///////////////////////////////////////////////////////////////////// + +packages_to_document = [ + "android", + "dalvik", + "java", + "javax", + "junit", + "org.apache.http", + "org.json", + "org.w3c.dom", + "org.xml.sax", + "org.xmlpull", +] + +stubs_defaults { + name: "metalava-api-stubs-default", + srcs: [ + ":framework-non-updatable-sources", + ":framework-updatable-sources", + "core/java/**/*.logtags", + ":opt-telephony-srcs", + ":opt-net-voip-srcs", + ":core-current-stubs-source", + ":core_public_api_files", + ":ike-api-srcs", + ], + libs: ["framework-internal-utils"], + installable: false, + annotations_enabled: true, + previous_api: ":last-released-public-api", + merge_annotations_dirs: [ + "metalava-manual", + ], + api_levels_annotations_enabled: true, + api_levels_annotations_dirs: [ + "sdk-dir", + "api-versions-jars-dir", + ], + sdk_version: "core_platform", + filter_packages: packages_to_document, +} + +///////////////////////////////////////////////////////////////////// +// *-api-stubs-docs modules providing source files for the stub libraries +///////////////////////////////////////////////////////////////////// + +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", + }, + api_lint: { + enabled: true, + new_since: ":last-released-public-api", + baseline_file: "api/lint-baseline.txt", + }, + }, + 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\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)", + 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" + }, + api_lint: { + enabled: true, + new_since: ":last-released-system-api", + baseline_file: "api/system-lint-baseline.txt", + }, + }, + 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", + }, + api_lint: { + enabled: true, + baseline_file: "api/test-lint-baseline.txt", + }, + }, +} + +///////////////////////////////////////////////////////////////////// +// android_*_stubs_current modules are the stubs libraries compiled +// from *-api-stubs-docs +///////////////////////////////////////////////////////////////////// + +java_defaults { + name: "framework-stubs-default", + errorprone: { + javacflags: [ + "-XepDisableAllChecks", + ], + }, + java_resources: [ + ":notices-for-framework-stubs", + ], + sdk_version: "core_current", + system_modules: "none", + java_version: "1.8", + compile_dex: true, +} + +java_library_static { + name: "android_stubs_current", + srcs: [ + ":api-stubs-docs", + ], + libs: [ + "stub-annotations", + ], + static_libs: [ + "private-stub-annotations-jar", + ], + defaults: ["framework-stubs-default"], +} + +java_library_static { + name: "android_system_stubs_current", + srcs: [ + ":system-api-stubs-docs", + ], + libs: [ + "stub-annotations", + ], + static_libs: [ + "private-stub-annotations-jar", + ], + defaults: ["framework-stubs-default"], +} + +java_library_static { + name: "android_test_stubs_current", + srcs: [ + ":test-api-stubs-docs", + ], + libs: [ + "stub-annotations", + ], + static_libs: [ + "private-stub-annotations-jar", + ], + defaults: ["framework-stubs-default"], +} + +java_system_modules { + name: "android_stubs_current_system_modules", + libs: ["android_stubs_current"], +} + +java_system_modules { + name: "android_system_stubs_current_system_modules", + libs: ["android_system_stubs_current"], +} + +java_system_modules { + name: "android_test_stubs_current_system_modules", + libs: ["android_test_stubs_current"], +} + +///////////////////////////////////////////////////////////////////// +// hwbinder.stubs provides APIs required for building HIDL Java +// libraries. +///////////////////////////////////////////////////////////////////// + +droidstubs { + name: "hwbinder-stubs-docs", + srcs: [ + "core/java/android/os/HidlSupport.java", + "core/java/android/annotation/IntDef.java", + "core/java/android/annotation/IntRange.java", + "core/java/android/annotation/NonNull.java", + "core/java/android/annotation/SystemApi.java", + "core/java/android/os/HidlMemory.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", + ], + args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)", +} + +java_library_static { + name: "hwbinder.stubs", + sdk_version: "core_current", + srcs: [ + ":hwbinder-stubs-docs", + ], +} + +///////////////////////////////////////////////////////////////////// +// Stubs for hiddenapi processing. +///////////////////////////////////////////////////////////////////// + +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\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " + + " --show-annotation android.annotation.TestApi ", +} + +droidstubs { + name: "hiddenapi-mappings", + defaults: ["metalava-api-stubs-default"], + srcs: [ + ":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\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " + + " --show-annotation android.annotation.TestApi ", +} + +///////////////////////////////////////////////////////////////////// +// api/*-current.txt files for use by modules in other directories +// like the CTS test +///////////////////////////////////////////////////////////////////// + +filegroup { + name: "frameworks-base-api-current.txt", + srcs: [ + "api/current.txt", + ], +} + +filegroup { + name: "frameworks-base-api-system-current.txt", + srcs: [ + "api/system-current.txt", + ], +} + +filegroup { + name: "frameworks-base-api-system-removed.txt", + srcs: [ + "api/system-removed.txt", + ], +} -- cgit v1.2.3 From e309516406a1ec2ce095713cc3adfacdedbcbefe Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Fri, 20 Dec 2019 15:30:28 +0900 Subject: Add API stubs for module APIs The following two stub libraries are added: - android_module_app_stubs_current: @SystemApis that are available for modules implemented as apps. @SystemApis with client=PRIVILEGED_APPS and client=MODULE_APPS are included here. - android_module_lib_stubs_current: @SystemApis that are available for modules implemented as bootclasspath jars. @SystemApis with client=PRIVILEGED_APPS, MODULE_APPS, and MODULE_LIBRARIES are all included here. For now, the compatibility check against the last release API is not done, but this is not a problem because this is the first time these APIs are released. Bug: 139391334 Bug: 140202860 Bug: 146727827 Test: m Change-Id: I0254a5f7751c58029fa7a8d5c342b731a7deb69a --- StubLibraries.bp | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 153 insertions(+), 5 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index d1950474da5a..baa3c615039d 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -41,10 +41,9 @@ packages_to_document = [ ] stubs_defaults { - name: "metalava-api-stubs-default", + name: "metalava-non-updatable-api-stubs-default", srcs: [ ":framework-non-updatable-sources", - ":framework-updatable-sources", "core/java/**/*.logtags", ":opt-telephony-srcs", ":opt-net-voip-srcs", @@ -64,14 +63,23 @@ stubs_defaults { "sdk-dir", "api-versions-jars-dir", ], - sdk_version: "core_platform", filter_packages: packages_to_document, } +stubs_defaults { + name: "metalava-api-stubs-default", + defaults: ["metalava-non-updatable-api-stubs-default"], + srcs: [":framework-updatable-sources"], + sdk_version: "core_platform", +} + ///////////////////////////////////////////////////////////////////// // *-api-stubs-docs modules providing source files for the stub libraries ///////////////////////////////////////////////////////////////////// +// api-stubs-docs, system-api-stubs-docs, and test-api-stubs-docs have APIs +// from the non-updatable part of the platform as well as from the updatable +// modules droidstubs { name: "api-stubs-docs", defaults: ["metalava-api-stubs-default"], @@ -112,7 +120,10 @@ droidstubs { arg_files: [ "core/res/AndroidManifest.xml", ], - args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)", + args: metalava_framework_docs_args + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\)", check_api: { current: { api_file: "api/system-current.txt", @@ -154,6 +165,111 @@ droidstubs { }, } +///////////////////////////////////////////////////////////////////// +// Following droidstubs modules are for extra APIs for modules. +// The framework currently have two more API surfaces for modules: +// @SystemApi(client=MODULE_APPS) and @SystemApi(client=MODULE_LIBRARIES) +///////////////////////////////////////////////////////////////////// + +// TODO(b/146727827) remove the *-api modules when we can teach metalava +// about the relationship among the API surfaces. Currently, these modules are only to generate +// the API signature files and ensure that the APIs evolve in a backwards compatible manner. +// They however are NOT used for building the API stub. +droidstubs { + name: "module-app-api", + defaults: ["metalava-non-updatable-api-stubs-default"], + libs: ["framework-all"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.MODULE_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\)", + check_api: { + current: { + api_file: "api/module-app-current.txt", + removed_api_file: "api/module-app-removed.txt", + }, + // TODO(b/147559833) enable the compatibility check against the last release API + // and the API lint + //last_released: { + // api_file: ":last-released-module-app-api", + // removed_api_file: "api/module-app-removed.txt", + // baseline_file: ":module-app-api-incompatibilities-with-last-released" + //}, + //api_lint: { + // enabled: true, + // new_since: ":last-released-module-app-api", + // baseline_file: "api/module-app-lint-baseline.txt", + //}, + }, + //jdiff_enabled: true, +} + +droidstubs { + name: "module-lib-api", + defaults: ["metalava-non-updatable-api-stubs-default"], + libs: ["framework-all"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES," + + "process=android.annotation.SystemApi.Process.ALL\\)", + check_api: { + current: { + api_file: "api/module-lib-current.txt", + removed_api_file: "api/module-lib-removed.txt", + }, + // TODO(b/147559833) enable the compatibility check against the last release API + // and the API lint + //last_released: { + // api_file: ":last-released-module-lib-api", + // removed_api_file: "api/module-lib-removed.txt", + // baseline_file: ":module-lib-api-incompatibilities-with-last-released" + //}, + //api_lint: { + // enabled: true, + // new_since: ":last-released-module-lib-api", + // baseline_file: "api/module-lib-lint-baseline.txt", + //}, + }, + //jdiff_enabled: true, +} + +// The following two droidstubs modules generate source files for the API stub libraries for +// modules. Note that they not only include their own APIs but also other APIs that have +// narrower scope. For example, module-lib-api-stubs-docs includes all @SystemApis not just +// the ones with 'client=MODULE_LIBRARIES'. +droidstubs { + name: "module-app-api-stubs-docs", + defaults: ["metalava-non-updatable-api-stubs-default"], + libs: ["framework-all"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\)" + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.MODULE_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\)", +} + +droidstubs { + name: "module-lib-api-stubs-docs", + defaults: ["metalava-non-updatable-api-stubs-default"], + libs: ["framework-all"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\)" + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.MODULE_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\)" + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES," + + "process=android.annotation.SystemApi.Process.ALL\\)", +} + ///////////////////////////////////////////////////////////////////// // android_*_stubs_current modules are the stubs libraries compiled // from *-api-stubs-docs @@ -169,7 +285,6 @@ java_defaults { java_resources: [ ":notices-for-framework-stubs", ], - sdk_version: "core_current", system_modules: "none", java_version: "1.8", compile_dex: true, @@ -187,6 +302,7 @@ java_library_static { "private-stub-annotations-jar", ], defaults: ["framework-stubs-default"], + sdk_version: "core_current", } java_library_static { @@ -201,6 +317,7 @@ java_library_static { "private-stub-annotations-jar", ], defaults: ["framework-stubs-default"], + sdk_version: "core_current", } java_library_static { @@ -215,6 +332,37 @@ java_library_static { "private-stub-annotations-jar", ], defaults: ["framework-stubs-default"], + sdk_version: "core_current", +} + +java_library_static { + name: "framework_module_app_stubs_current", + srcs: [ + ":module-app-api-stubs-docs", + ], + libs: [ + "stub-annotations", + "framework-all", + ], + static_libs: [ + "private-stub-annotations-jar", + ], + defaults: ["framework-stubs-default"], +} + +java_library_static { + name: "framework_module_lib_stubs_current", + srcs: [ + ":module-lib-api-stubs-docs", + ], + libs: [ + "stub-annotations", + "framework-all", + ], + static_libs: [ + "private-stub-annotations-jar", + ], + defaults: ["framework-stubs-default"], } ///////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 546ce5e45eadc6053d41545315f1ea6ca9a00ad4 Mon Sep 17 00:00:00 2001 From: Chen Xu Date: Fri, 10 Jan 2020 08:38:31 -0800 Subject: modularize telephony-framework from framework.jar Bug: 140908357 Test: Build & Manaul Change-Id: Idd4cbdb84247b98072b6ebc00a37168fde6fbbaa --- StubLibraries.bp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index baa3c615039d..cdc0d322eedb 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -51,6 +51,10 @@ stubs_defaults { ":core_public_api_files", ":ike-api-srcs", ], + // TODO(b/147699819): remove below aidl includes. + aidl: { + local_include_dirs: ["telephony/java"], + }, libs: ["framework-internal-utils"], installable: false, annotations_enabled: true, -- cgit v1.2.3 From 970c053315752471bee37a2d3a2c3c6b5a8e0b0b Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Fri, 17 Jan 2020 13:42:43 +0000 Subject: Add module-defined APIs to module-(app|lib) These APIs should really leave in individual .txt files, but had them here for the moment to make sure there is *some* tracking of the surface. Bug: 147768409 Test: m module-app-api-check-current-api Test: m module-lib-api-check-current-api Test: patch I97ef83f7f9b4c1376f373713036f5256318f1050 && the above `m` Change-Id: Ia0a48b9f6e45fccbe67b369b61660d88b5000a44 --- StubLibraries.bp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index cdc0d322eedb..6927f4449054 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -181,7 +181,7 @@ droidstubs { // They however are NOT used for building the API stub. droidstubs { name: "module-app-api", - defaults: ["metalava-non-updatable-api-stubs-default"], + defaults: ["metalava-api-stubs-default"], libs: ["framework-all"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + @@ -211,7 +211,7 @@ droidstubs { droidstubs { name: "module-lib-api", - defaults: ["metalava-non-updatable-api-stubs-default"], + defaults: ["metalava-api-stubs-default"], libs: ["framework-all"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + @@ -245,7 +245,7 @@ droidstubs { // the ones with 'client=MODULE_LIBRARIES'. droidstubs { name: "module-app-api-stubs-docs", - defaults: ["metalava-non-updatable-api-stubs-default"], + defaults: ["metalava-api-stubs-default"], libs: ["framework-all"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + @@ -259,7 +259,7 @@ droidstubs { droidstubs { name: "module-lib-api-stubs-docs", - defaults: ["metalava-non-updatable-api-stubs-default"], + defaults: ["metalava-api-stubs-default"], libs: ["framework-all"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + -- cgit v1.2.3 From 1b9cf09e36b0801400837cb09851d317450cf0c5 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 30 Jan 2020 12:09:02 +0000 Subject: Rename module lib stubs to 'android' android.jar is the historical name of the framework stubs, so stick with that. Exempt-From-Owner-Approval: comment-only changes irrelvant to statsd team Test: m Change-Id: I1ef40b0e426c51d697f1efdabdc87096555e26e8 --- StubLibraries.bp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 6927f4449054..0f805655b33d 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -340,7 +340,7 @@ java_library_static { } java_library_static { - name: "framework_module_app_stubs_current", + name: "android_module_app_stubs_current", srcs: [ ":module-app-api-stubs-docs", ], @@ -355,7 +355,7 @@ java_library_static { } java_library_static { - name: "framework_module_lib_stubs_current", + name: "android_module_lib_stubs_current", srcs: [ ":module-lib-api-stubs-docs", ], -- cgit v1.2.3 From 2e2008b7a1b9c81f78f0ab732f62211801ddbcaa Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Sat, 8 Feb 2020 20:39:59 +0000 Subject: Tweak module_libs stub build rules - Don't depend on framework-all (we depend on srcs) - Set sdk_version to core_current Bug: 146757305 Test: m Change-Id: I9f14d35ba657045e99190b7a651781a5b87d490d --- StubLibraries.bp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index d4db7373504b..9b9311f6c3c2 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -190,7 +190,6 @@ droidstubs { droidstubs { name: "module-lib-api", defaults: ["metalava-api-stubs-default"], - libs: ["framework-all"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + module_libs, check_api: { @@ -222,7 +221,6 @@ droidstubs { droidstubs { name: "module-lib-api-stubs-docs", defaults: ["metalava-api-stubs-default"], - libs: ["framework-all"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + priv_apps + module_libs, } @@ -299,12 +297,12 @@ java_library_static { ], libs: [ "stub-annotations", - "framework-all", ], static_libs: [ "private-stub-annotations-jar", ], defaults: ["framework-stubs-default"], + sdk_version: "core_current", } ///////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 08b48bb91f7268ee9f0cdb3bdfdaa277bfddc23d Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Sat, 8 Feb 2020 20:43:19 +0000 Subject: Dedup stub jar build rules Move shared attrs into defaults. Bug: 146757305 Test: m Change-Id: I90292cafaac1dcc64d642db072ce4880fcdb87cb --- StubLibraries.bp | 47 +++++++---------------------------------------- 1 file changed, 7 insertions(+), 40 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 9b9311f6c3c2..50d23ad2d657 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -232,6 +232,9 @@ droidstubs { java_defaults { name: "framework-stubs-default", + libs: [ "stub-annotations" ], + static_libs: [ "private-stub-annotations-jar" ], + sdk_version: "core_current", errorprone: { javacflags: [ "-XepDisableAllChecks", @@ -247,62 +250,26 @@ java_defaults { java_library_static { name: "android_stubs_current", - srcs: [ - ":api-stubs-docs", - ], - libs: [ - "stub-annotations", - ], - static_libs: [ - "private-stub-annotations-jar", - ], + srcs: [ ":api-stubs-docs" ], defaults: ["framework-stubs-default"], - sdk_version: "core_current", } java_library_static { name: "android_system_stubs_current", - srcs: [ - ":system-api-stubs-docs", - ], - libs: [ - "stub-annotations", - ], - static_libs: [ - "private-stub-annotations-jar", - ], + srcs: [ ":system-api-stubs-docs" ], defaults: ["framework-stubs-default"], - sdk_version: "core_current", } java_library_static { name: "android_test_stubs_current", - srcs: [ - ":test-api-stubs-docs", - ], - libs: [ - "stub-annotations", - ], - static_libs: [ - "private-stub-annotations-jar", - ], + srcs: [ ":test-api-stubs-docs" ], defaults: ["framework-stubs-default"], - sdk_version: "core_current", } java_library_static { name: "android_module_lib_stubs_current", - srcs: [ - ":module-lib-api-stubs-docs", - ], - libs: [ - "stub-annotations", - ], - static_libs: [ - "private-stub-annotations-jar", - ], + srcs: [ ":module-lib-api-stubs-docs" ], defaults: ["framework-stubs-default"], - sdk_version: "core_current", } ///////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 79e35c3bebb348be9ccb95bfd7d1862365303fcb Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Tue, 11 Feb 2020 14:36:40 +0000 Subject: Enable compat checking & lint for module_lib api These were previously turned off as there were no previous releases to compare it to. Check in empty files as comparison. The new tethering APIs fail lint -- I have filed a release blocking bug to get these cleaned up. Bug: 149430003 Bug: 147559833 Test: m module-lib-api-api-lint Test: m module-lib-api-check-last-released-api (with+without incompatibilities) Change-Id: I2b171dc836ca121502fb345d8dd512a05c566a49 --- StubLibraries.bp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 50d23ad2d657..4616ced1226c 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -197,20 +197,17 @@ droidstubs { api_file: "api/module-lib-current.txt", removed_api_file: "api/module-lib-removed.txt", }, - // TODO(b/147559833) enable the compatibility check against the last release API - // and the API lint - //last_released: { - // api_file: ":last-released-module-lib-api", - // removed_api_file: "api/module-lib-removed.txt", - // baseline_file: ":module-lib-api-incompatibilities-with-last-released" - //}, - //api_lint: { - // enabled: true, - // new_since: ":last-released-module-lib-api", - // baseline_file: "api/module-lib-lint-baseline.txt", - //}, + last_released: { + api_file: ":last-released-module-lib-api", + removed_api_file: "api/module-lib-removed.txt", + baseline_file: ":module-lib-api-incompatibilities-with-last-released" + }, + api_lint: { + enabled: true, + new_since: ":last-released-module-lib-api", + baseline_file: "api/module-lib-lint-baseline.txt", + }, }, - //jdiff_enabled: true, } -- cgit v1.2.3 From daeb328e327a85c64bb5945d7ab2d5a137972116 Mon Sep 17 00:00:00 2001 From: evitayan Date: Thu, 2 Jan 2020 15:47:13 -0800 Subject: Do not expose module IPsec(IKE) API from frameworks Module IPsec(IKE) will not be in bootclasspath or expose API from frameworks/base anymore. Instead it will be built as a java_sdk_library and expose APIs under its own directory. This commit: - Removes API from frameworks/base - Adds ike to FrameworksNetTests manifest so that VpnTest is able to load it. Bug: 145995723 Test: build, flash, boot Test: atest FramewokrsIkeTests (passed) Test: m mts && mts-tradefed run mts-ipsec (passed) Test: manually tested that FrameworksNetTests can use ike.jar Change-Id: I37ba02eb3003ea28e66f50ca0b612597ef48f6d5 --- StubLibraries.bp | 1 - 1 file changed, 1 deletion(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 4616ced1226c..7f23df74d2da 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -49,7 +49,6 @@ stubs_defaults { ":opt-net-voip-srcs", ":core-current-stubs-source", ":core_public_api_files", - ":ike-api-srcs", ], // TODO(b/147699819): remove below aidl includes. aidl: { -- cgit v1.2.3 From 822cdb3031af78ada24bc18b758ccac157570b1f Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Fri, 6 Mar 2020 17:16:06 +0000 Subject: Take module APIs out of the module_current stubs This allows modules components to depend on internals of other module components, by specifying the non-stub version of that library. Bug: 151092414 Test: m Change-Id: Ia39b2686de7619ccb1ec154588c11a8b1b322647 --- StubLibraries.bp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 7f23df74d2da..da9f1654d60f 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -41,7 +41,7 @@ packages_to_document = [ ] stubs_defaults { - name: "metalava-non-updatable-api-stubs-default", + name: "metalava-base-api-stubs-default", srcs: [ ":framework-non-updatable-sources", "core/java/**/*.logtags", @@ -70,12 +70,18 @@ stubs_defaults { } stubs_defaults { - name: "metalava-api-stubs-default", - defaults: ["metalava-non-updatable-api-stubs-default"], + name: "metalava-full-api-stubs-default", + defaults: ["metalava-base-api-stubs-default"], srcs: [":framework-updatable-sources"], sdk_version: "core_platform", } +stubs_defaults { + name: "metalava-non-updatable-api-stubs-default", + defaults: ["metalava-base-api-stubs-default"], + sdk_version: "system_current", +} + ///////////////////////////////////////////////////////////////////// // *-api-stubs-docs modules providing source files for the stub libraries ///////////////////////////////////////////////////////////////////// @@ -85,7 +91,7 @@ stubs_defaults { // modules droidstubs { name: "api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], api_filename: "public_api.txt", private_api_filename: "private.txt", removed_api_filename: "removed.txt", @@ -124,7 +130,7 @@ module_libs = " " + droidstubs { name: "system-api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], api_tag_name: "SYSTEM", api_filename: "system-api.txt", private_api_filename: "system-private.txt", @@ -155,7 +161,7 @@ droidstubs { droidstubs { name: "test-api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], api_tag_name: "TEST", api_filename: "test-api.txt", removed_api_filename: "test-removed.txt", @@ -188,7 +194,7 @@ droidstubs { droidstubs { name: "module-lib-api", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + module_libs, check_api: { @@ -216,7 +222,7 @@ droidstubs { droidstubs { name: "module-lib-api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-non-updatable-api-stubs-default"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + priv_apps + module_libs, } @@ -266,6 +272,7 @@ java_library_static { name: "android_module_lib_stubs_current", srcs: [ ":module-lib-api-stubs-docs" ], defaults: ["framework-stubs-default"], + libs: ["android_system_stubs_current"], } ///////////////////////////////////////////////////////////////////// @@ -317,7 +324,7 @@ java_library_static { droidstubs { name: "hiddenapi-lists-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ], @@ -332,7 +339,7 @@ droidstubs { droidstubs { name: "hiddenapi-mappings", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], srcs: [ ":opt-telephony-common-srcs", ], -- cgit v1.2.3 From 7b0414beb77aaf67124c3ef7f2a55a898772bd1d Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 19 Mar 2020 15:09:44 +0000 Subject: Add module_lib and system-server artifacts to sdk dist Makes these artifacts available for the update_prebuilts script. Bug: 149293194 Test: m win_sdk dist && find out/dist -type f Change-Id: Ia1064e50e987433e5e308527c6770ba2d3e8bde3 --- StubLibraries.bp | 1 + 1 file changed, 1 insertion(+) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index da9f1654d60f..809b809f5c96 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -195,6 +195,7 @@ droidstubs { droidstubs { name: "module-lib-api", defaults: ["metalava-full-api-stubs-default"], + api_tag_name: "MODULE_LIB", arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + module_libs, check_api: { -- cgit v1.2.3 From 92d79fddd49b1b502f0b47c574fb1aec7ca85b15 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Fri, 20 Mar 2020 09:12:52 +0000 Subject: Remove SDK dep from module_lib_api This had the consequence of making two large metalava invocations run in sequence rather than parallell. For now, add back the dependency on framework-all instead. Building framework-all should be a lot faster than the sdk stubs. Also move the module stubs dep from framework_defaults to framework-minus-apex. framework-all does not need this dep. Bug: 151092414 Test: m Test: NINJA_ARGS="-t path out/soong/.intermediates/frameworks/base/module-lib-api-stubs-docs/android_common/module-lib-api-stubs-docs-stubs.srcjar \ out/soong/.intermediates/frameworks/base/system-api-stubs-docs/android_common/system-api-stubs-docs-stubs.srcjar" m Change-Id: Ifdf8823d374254e594330b43ae3a39a76c7b90c5 --- StubLibraries.bp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index da9f1654d60f..68e1b1b2872f 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -79,7 +79,11 @@ stubs_defaults { stubs_defaults { name: "metalava-non-updatable-api-stubs-default", defaults: ["metalava-base-api-stubs-default"], - sdk_version: "system_current", + sdk_version: "core_platform", + libs: ["framework-all"], + aidl: { + local_include_dirs: ["apex/media/framework/java"], + }, } ///////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From d9a3fee23d3fe0055efc3174bd573e197535e53b Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 23 Mar 2020 18:08:55 +0000 Subject: Convert disting of api txt from mk to bp droidstubs dist now dists the api file, so convert these manual mk rules into bp dist instead. Bug: 149293194 Test: m dist sdk && find out/dist/apistubs -name /android\.txt Change-Id: I96052b427dc01a6d24b040ad0006129d4d1e48fb --- StubLibraries.bp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 01f27d22ea3d..fd0fe9c7f5ae 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -119,6 +119,11 @@ droidstubs { baseline_file: "api/lint-baseline.txt", }, }, + dist: { + targets: ["sdk", "win_sdk"], + dir: "apistubs/android/public/api", + dest: "android.txt", + }, jdiff_enabled: true, } @@ -160,6 +165,11 @@ droidstubs { baseline_file: "api/system-lint-baseline.txt", }, }, + dist: { + targets: ["sdk", "win_sdk"], + dir: "apistubs/android/system/api", + dest: "android.txt", + }, jdiff_enabled: true, } @@ -183,6 +193,11 @@ droidstubs { baseline_file: "api/test-lint-baseline.txt", }, }, + dist: { + targets: ["sdk", "win_sdk"], + dir: "apistubs/android/test/api", + dest: "android.txt", + }, } ///////////////////////////////////////////////////////////////////// @@ -218,6 +233,11 @@ droidstubs { baseline_file: "api/module-lib-lint-baseline.txt", }, }, + dist: { + targets: ["sdk", "win_sdk"], + dir: "apistubs/android/module-lib/api", + dest: "android.txt", + }, } -- cgit v1.2.3 From 6bb95ad75142109bdfe96115236bc6c0bbff0eac Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas Date: Thu, 12 Mar 2020 17:06:12 -0700 Subject: Reconfigure stub libraries to do less work. - Stop generating api version XML file - Stop reading api version XML file Testing with: touch frameworks/base/core/java/android/view/View.java && time make -j framework Before patch: Run #1: 118.7 seconds Run #2: 118.8 seconds Run #3: 117.7 seconds Average: 118.4 seconds After patch: Run #1: 107.8 seconds Run #2: 106.5 seconds Run #3: 108.3 seconds Average: 107.5 seconds Savings of 10.7 seconds (~9.2%) Test: make framework Bug: 151160048 Change-Id: Ie3a7e078844d1d1cac7976142e2069704d4c1545 Merged-in: Ie3a7e078844d1d1cac7976142e2069704d4c1545 --- StubLibraries.bp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 01f27d22ea3d..12f211df4549 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -61,11 +61,7 @@ stubs_defaults { merge_annotations_dirs: [ "metalava-manual", ], - api_levels_annotations_enabled: true, - api_levels_annotations_dirs: [ - "sdk-dir", - "api-versions-jars-dir", - ], + api_levels_annotations_enabled: false, filter_packages: packages_to_document, } -- cgit v1.2.3 From 7e7fdde3a52c50aeaa118b7421039639424c55a2 Mon Sep 17 00:00:00 2001 From: Artur Satayev Date: Wed, 25 Mar 2020 16:45:56 +0000 Subject: Remove hiddenapi-mappings and hiddenapi-list-docs. We still need to keep access to removed APIs to keep them on greylist. Instead of having a separate run to generate those, we would instead depend on the actual droidstubs. Kudos to Makoto for producing build traces: "m droid" Before: https://screenshot.googleplex.com/oEcd4x76YAz After: https://screenshot.googleplex.com/CxZCNJMDyK5 "m sync" Before: https://screenshot.googleplex.com/7cjE96qcNAL After: https://screenshot.googleplex.com/po6BhCoP9L3 Bug: 143864733 Test: diff out/soong/hiddenapi/hiddenapi-flags.csv Exempt-From-Owner-Approval: clean cherry-pick (cherry picked from commit 0a97d5eaf2f57ed9d93c8360a8a83e98440a4ec7) Change-Id: If9dcac94eb077c6265c5acf5b3ce6d262db64f90 Merged-In: If9dcac94eb077c6265c5acf5b3ce6d262db64f90 --- StubLibraries.bp | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index ccd873352a33..60f6174740df 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -95,6 +95,7 @@ droidstubs { api_filename: "public_api.txt", private_api_filename: "private.txt", removed_api_filename: "removed.txt", + removed_dex_api_filename: "removed-dex.txt", arg_files: [ "core/res/AndroidManifest.xml", ], @@ -141,6 +142,7 @@ droidstubs { private_api_filename: "system-private.txt", private_dex_api_filename: "system-private-dex.txt", removed_api_filename: "system-removed.txt", + removed_dex_api_filename: "system-removed-dex.txt", arg_files: [ "core/res/AndroidManifest.xml", ], @@ -339,44 +341,6 @@ java_library_static { ], } -///////////////////////////////////////////////////////////////////// -// Stubs for hiddenapi processing. -///////////////////////////////////////////////////////////////////// - -droidstubs { - name: "hiddenapi-lists-docs", - defaults: ["metalava-full-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 " + - priv_apps + - " --show-annotation android.annotation.TestApi ", -} - -droidstubs { - name: "hiddenapi-mappings", - defaults: ["metalava-full-api-stubs-default"], - srcs: [ - ":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 " + - priv_apps + - " --show-annotation android.annotation.TestApi ", -} - ///////////////////////////////////////////////////////////////////// // api/*-current.txt files for use by modules in other directories // like the CTS test -- cgit v1.2.3 From 87c7d28881c8bb8578905bce139ae16f6acc59e9 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 9 Apr 2020 14:16:37 +0100 Subject: Use sdk_version: none for platform stubs These stubs contain the libcore sources inside them, so need not compile against core_current. Also rename the defaults rule to be in line with the new neverallow. Bug: 144149403 Test: m Change-Id: I5f1b01875b0073f942c692882db157a8c5788ce0 Merged-In: I5f1b01875b0073f942c692882db157a8c5788ce0 --- StubLibraries.bp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 60f6174740df..f06f2792e0d7 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -256,18 +256,16 @@ droidstubs { ///////////////////////////////////////////////////////////////////// java_defaults { - name: "framework-stubs-default", + name: "android_defaults_stubs_current", libs: [ "stub-annotations" ], static_libs: [ "private-stub-annotations-jar" ], - sdk_version: "core_current", errorprone: { javacflags: [ "-XepDisableAllChecks", ], }, - java_resources: [ - ":notices-for-framework-stubs", - ], + java_resources: [":notices-for-framework-stubs"], + sdk_version: "none", system_modules: "none", java_version: "1.8", compile_dex: true, @@ -276,25 +274,25 @@ java_defaults { java_library_static { name: "android_stubs_current", srcs: [ ":api-stubs-docs" ], - defaults: ["framework-stubs-default"], + defaults: ["android_defaults_stubs_current"], } java_library_static { name: "android_system_stubs_current", srcs: [ ":system-api-stubs-docs" ], - defaults: ["framework-stubs-default"], + defaults: ["android_defaults_stubs_current"], } java_library_static { name: "android_test_stubs_current", srcs: [ ":test-api-stubs-docs" ], - defaults: ["framework-stubs-default"], + defaults: ["android_defaults_stubs_current"], } java_library_static { name: "android_module_lib_stubs_current", srcs: [ ":module-lib-api-stubs-docs" ], - defaults: ["framework-stubs-default"], + defaults: ["android_defaults_stubs_current"], libs: ["android_system_stubs_current"], } -- cgit v1.2.3 From 394febc71bb37a6df748421d38e55dd28e1c2667 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Tue, 14 Apr 2020 16:35:36 +0100 Subject: Make non-updatable stubs depend on sdk 29 There are a few classes from modules referenced as type arguments in the non-updatable part of the API, which need to be resolved. The current dependencies that satisfy those references create dependency cycles when we change the big stubs to be assembled from other stubs. I considered two options for breaking that cycle: 1) depending on a previous SDK 2) add empty classes in a simple manual stub lib This CL does #1. #2 is more work, but may be required when/if we want to reference a newly-added API in the same release. Bug: 144149403 Bug: 149906971 Test: m Change-Id: I3c5e611ca45536bdd931291e663a21757e35992f --- StubLibraries.bp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index f06f2792e0d7..270c160dc5e9 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -76,9 +76,14 @@ stubs_defaults { name: "metalava-non-updatable-api-stubs-default", defaults: ["metalava-base-api-stubs-default"], sdk_version: "core_platform", - libs: ["framework-all"], + // There are a few classes from modules used as type arguments that + // need to be resolved by metalava. For now, we can use a previously + // finalized stub library to resolve them. If a new class gets added, + // this may be need to be revisited to use a manually maintained stub + // library with empty classes in order to resolve those references. + libs: ["sdk_system_29_android"], aidl: { - local_include_dirs: ["apex/media/framework/java"], + local_include_dirs: ["apex/media/aidl/stable"], }, } @@ -293,7 +298,7 @@ java_library_static { name: "android_module_lib_stubs_current", srcs: [ ":module-lib-api-stubs-docs" ], defaults: ["android_defaults_stubs_current"], - libs: ["android_system_stubs_current"], + libs: ["sdk_system_29_android"], } ///////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 9b7b73d91b0d32e583c97c746e9baa9d4673cd05 Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas Date: Sat, 14 Mar 2020 00:20:29 +0000 Subject: Stop building unused dex.txt files Testing with: touch frameworks/base/core/java/android/view/View.java && time make -j framework Before patch: Run #1: 107.8 seconds Run #2: 106.5 seconds Run #3: 108.3 seconds Average: 107.5 seconds After patch: Run #1: 105.5 seconds Run #2: 105.6 seconds Run #3: 105.0 seconds Average: 105.4 seconds Savings of 2.2 seconds (~2%) Test: make framework Bug: 151160048 Change-Id: Ic58875a315c9d1dc09b029d3de405a5f5648c46e Merged-In: Ic58875a315c9d1dc09b029d3de405a5f5648c46e --- StubLibraries.bp | 1 - 1 file changed, 1 deletion(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 270c160dc5e9..8ab95242d8a2 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -145,7 +145,6 @@ droidstubs { 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", removed_dex_api_filename: "system-removed-dex.txt", arg_files: [ -- cgit v1.2.3 From 960c16cd389fd56542fd3dcc8935406e022cb1be Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Wed, 22 Apr 2020 14:21:54 +0100 Subject: Remove obsolete droidstub args - I see no usages of private_api_filename / private.txt / private_dex_api_filename - tags are no longer used as of Iff355041d88eb59ac47dd19a03e993cf1ce3927e - api_filename/removed_api_filename does nothing if check_api is specified. test-api does not need a removed.txt Bug: 152479829 Bug: 144149403 Test: m Change-Id: Ic1e859dc6aa91f8d7b4f285b63d3faafb27edc9b --- StubLibraries.bp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 8ab95242d8a2..bfc1367cceb9 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -97,9 +97,6 @@ stubs_defaults { droidstubs { name: "api-stubs-docs", defaults: ["metalava-full-api-stubs-default"], - api_filename: "public_api.txt", - private_api_filename: "private.txt", - removed_api_filename: "removed.txt", removed_dex_api_filename: "removed-dex.txt", arg_files: [ "core/res/AndroidManifest.xml", @@ -142,10 +139,6 @@ module_libs = " " + droidstubs { name: "system-api-stubs-docs", defaults: ["metalava-full-api-stubs-default"], - api_tag_name: "SYSTEM", - api_filename: "system-api.txt", - private_api_filename: "system-private.txt", - removed_api_filename: "system-removed.txt", removed_dex_api_filename: "system-removed-dex.txt", arg_files: [ "core/res/AndroidManifest.xml", @@ -178,9 +171,6 @@ droidstubs { droidstubs { name: "test-api-stubs-docs", defaults: ["metalava-full-api-stubs-default"], - api_tag_name: "TEST", - api_filename: "test-api.txt", - removed_api_filename: "test-removed.txt", arg_files: [ "core/res/AndroidManifest.xml", ], @@ -216,7 +206,6 @@ droidstubs { droidstubs { name: "module-lib-api", defaults: ["metalava-full-api-stubs-default"], - api_tag_name: "MODULE_LIB", arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + module_libs, check_api: { -- cgit v1.2.3 From 37c10f05d868ea8f9d678790a5caa0c23f105ec9 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 26 Mar 2020 15:33:48 +0000 Subject: Reference libcore, conscrypt and icu sources directly Avoids an extra aggregation step in the creation of the API sources. Bug: 153306490 Test: m nothing Bug: 142935992 Merged-In: Ia15c3ceb9fc59e7945687536c60ce265ec95781e Change-Id: Ia15c3ceb9fc59e7945687536c60ce265ec95781e (cherry picked from commit 5c89e70a1fbbc9f9251342358835c8a139eb2285) --- StubLibraries.bp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index bfc1367cceb9..2fe5c96a36da 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -47,8 +47,9 @@ stubs_defaults { "core/java/**/*.logtags", ":opt-telephony-srcs", ":opt-net-voip-srcs", - ":core-current-stubs-source", - ":core_public_api_files", + ":art-module-public-api-stubs-source", + ":conscrypt-module-public-api-stubs-source", + ":android_icu4j_public_api_files", ], // TODO(b/147699819): remove below aidl includes. aidl: { -- cgit v1.2.3 From f025501e3f073d6919b8aa1e098e79c5a90ad0e0 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 9 Apr 2020 10:04:14 +0100 Subject: Rename conscrypt-module-public-api-stubs-source Renamed conscrypt-module-public-api-stubs-source to conscrypt.module.public.api.stubs.source to match the format of the name created by java_sdk_library. This is in preparation for switching to use java_sdk_library to generate conscrypt's public API. Bug: 153443117 Bug: 153306490 Test: m nothing Merged-In: I26ad21cf74ad3600de250df8e84deec65b91b3f9 Change-Id: I26ad21cf74ad3600de250df8e84deec65b91b3f9 (cherry picked from commit 29adf462b6346644678809a792c803b8841dc956) --- StubLibraries.bp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 2fe5c96a36da..8fd8c907202c 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -48,7 +48,7 @@ stubs_defaults { ":opt-telephony-srcs", ":opt-net-voip-srcs", ":art-module-public-api-stubs-source", - ":conscrypt-module-public-api-stubs-source", + ":conscrypt.module.public.api.stubs.source", ":android_icu4j_public_api_files", ], // TODO(b/147699819): remove below aidl includes. -- cgit v1.2.3 From 48ee95e9b1d8c31a83065038f406ff9f2dc052e1 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Sat, 2 May 2020 17:49:26 +0100 Subject: Change last-released filegroup There were two different filegroups referencing the same last released APIs. Delete the manually defined one and switch references over to use the one defined by prebuilt_apis. Bug: 155197156 Test: m Change-Id: Ib15d2c08e6400546ca03de6bfd4e5cbcc938c992 --- StubLibraries.bp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 8fd8c907202c..170cac43764a 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -58,7 +58,7 @@ stubs_defaults { libs: ["framework-internal-utils"], installable: false, annotations_enabled: true, - previous_api: ":last-released-public-api", + previous_api: ":android.api.public.latest", merge_annotations_dirs: [ "metalava-manual", ], @@ -109,13 +109,13 @@ droidstubs { removed_api_file: "api/removed.txt", }, last_released: { - api_file: ":last-released-public-api", + api_file: ":android.api.public.latest", removed_api_file: "api/removed.txt", baseline_file: ":public-api-incompatibilities-with-last-released", }, api_lint: { enabled: true, - new_since: ":last-released-public-api", + new_since: ":android.api.public.latest", baseline_file: "api/lint-baseline.txt", }, }, @@ -151,13 +151,13 @@ droidstubs { removed_api_file: "api/system-removed.txt", }, last_released: { - api_file: ":last-released-system-api", + api_file: ":android.api.system.latest", removed_api_file: "api/system-removed.txt", baseline_file: ":system-api-incompatibilities-with-last-released" }, api_lint: { enabled: true, - new_since: ":last-released-system-api", + new_since: ":android.api.system.latest", baseline_file: "api/system-lint-baseline.txt", }, }, @@ -215,13 +215,13 @@ droidstubs { removed_api_file: "api/module-lib-removed.txt", }, last_released: { - api_file: ":last-released-module-lib-api", + api_file: ":android.api.module-lib.latest", removed_api_file: "api/module-lib-removed.txt", baseline_file: ":module-lib-api-incompatibilities-with-last-released" }, api_lint: { enabled: true, - new_since: ":last-released-module-lib-api", + new_since: ":android.api.module-lib.latest", baseline_file: "api/module-lib-lint-baseline.txt", }, }, @@ -318,7 +318,7 @@ droidstubs { installable: false, sdk_version: "core_platform", annotations_enabled: true, - previous_api: ":last-released-public-api", + previous_api: ":android.api.public.latest", merge_annotations_dirs: [ "metalava-manual", ], -- cgit v1.2.3 From 960c675a831092d221fdcb07c15cb2bfa3a0eeef Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Sat, 2 May 2020 18:00:30 +0100 Subject: Fix last-released check of removed.txt The last-released checks should check compatibility of the removed.txt file generated from src with the checked in last-released removed.txt. It was previously checking compatibility with the checked in removed.txt at HEAD, which is what check_api is for. Bug: 155197156 Test: m checkapi Change-Id: I0f4eca5a30ee13e2c098ccf50e1b992adf4e22cb --- StubLibraries.bp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 170cac43764a..91efb05b50f4 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -110,7 +110,7 @@ droidstubs { }, last_released: { api_file: ":android.api.public.latest", - removed_api_file: "api/removed.txt", + removed_api_file: ":removed.api.public.latest", baseline_file: ":public-api-incompatibilities-with-last-released", }, api_lint: { @@ -152,7 +152,7 @@ droidstubs { }, last_released: { api_file: ":android.api.system.latest", - removed_api_file: "api/system-removed.txt", + removed_api_file: ":removed.api.system.latest", baseline_file: ":system-api-incompatibilities-with-last-released" }, api_lint: { @@ -216,7 +216,7 @@ droidstubs { }, last_released: { api_file: ":android.api.module-lib.latest", - removed_api_file: "api/module-lib-removed.txt", + removed_api_file: ":removed.api.module-lib.latest", baseline_file: ":module-lib-api-incompatibilities-with-last-released" }, api_lint: { -- cgit v1.2.3 From e89d37d6d88de0cd3ca2fdbcd5648bb0f4c7310f Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 7 May 2020 12:06:00 +0100 Subject: Move conscrypt from the set of non-updatable APIs This has no practical effect in this CL, but in a future CL we are changing the stub jars to be assembled by merging other jar files, at which point we want to conscrypt to not be in the non-updatable jar. Bug: 144149403 Test: m Change-Id: Iacfcc3a789cb42a73cc4b4c89a215db0ea09800f --- StubLibraries.bp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 91efb05b50f4..50524998d416 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -48,7 +48,6 @@ stubs_defaults { ":opt-telephony-srcs", ":opt-net-voip-srcs", ":art-module-public-api-stubs-source", - ":conscrypt.module.public.api.stubs.source", ":android_icu4j_public_api_files", ], // TODO(b/147699819): remove below aidl includes. @@ -69,7 +68,10 @@ stubs_defaults { stubs_defaults { name: "metalava-full-api-stubs-default", defaults: ["metalava-base-api-stubs-default"], - srcs: [":framework-updatable-sources"], + srcs: [ + ":conscrypt.module.public.api.stubs.source", + ":framework-updatable-sources", + ], sdk_version: "core_platform", } -- cgit v1.2.3 From 206be52a78bc96714c1e70484937ed0cd3131b94 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Wed, 20 May 2020 12:06:23 +0100 Subject: Remove nullablility annotations from module-lib They were added to workaround the problem of package-private versions being added to the stubs, which prevented use of the annotations from mainline modules. Having them in the API leads to a different problem -- this version of the nullability annotations have SOURCE retention. However in the stubs build we want to have CLASS retention, so that kotlin can make use of their presence. This is arguably a much cleaner fix, since having a source-retention annotation doesn't really make much sense. Bug: 157010342 Test: m Change-Id: Id78f00da5b6af2930224a82faa24cb8235362521 Merged-In: Id78f00da5b6af2930224a82faa24cb8235362521 --- StubLibraries.bp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 50524998d416..83b0eb2b5972 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -254,7 +254,6 @@ droidstubs { java_defaults { name: "android_defaults_stubs_current", libs: [ "stub-annotations" ], - static_libs: [ "private-stub-annotations-jar" ], errorprone: { javacflags: [ "-XepDisableAllChecks", @@ -270,18 +269,21 @@ java_defaults { java_library_static { name: "android_stubs_current", srcs: [ ":api-stubs-docs" ], + static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } java_library_static { name: "android_system_stubs_current", srcs: [ ":system-api-stubs-docs" ], + static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } java_library_static { name: "android_test_stubs_current", srcs: [ ":test-api-stubs-docs" ], + static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } -- cgit v1.2.3 From f330f3ab74ab8d89afd4e67df58656185f35f19c Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Wed, 20 May 2020 12:06:23 +0100 Subject: Remove nullablility annotations from module-lib They were added to workaround the problem of package-private versions being added to the stubs, which prevented use of the annotations from mainline modules. Having them in the API leads to a different problem -- this version of the nullability annotations have SOURCE retention. However in the stubs build we want to have CLASS retention, so that kotlin can make use of their presence. This is arguably a much cleaner fix, since having a source-retention annotation doesn't really make much sense. Bug: 157010342 Test: m Change-Id: Id78f00da5b6af2930224a82faa24cb8235362521 Merged-In: Id78f00da5b6af2930224a82faa24cb8235362521 --- StubLibraries.bp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 63478aba2fbd..2aa8f43a76ea 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -259,8 +259,6 @@ java_defaults { name: "android_defaults_stubs_current", libs: [ "stub-annotations" ], static_libs: [ - "private-stub-annotations-jar", - // License notices from art module "art-notices-for-framework-stubs-jar", ], @@ -278,18 +276,21 @@ java_defaults { java_library_static { name: "android_stubs_current", srcs: [ ":api-stubs-docs" ], + static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } java_library_static { name: "android_system_stubs_current", srcs: [ ":system-api-stubs-docs" ], + static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } java_library_static { name: "android_test_stubs_current", srcs: [ ":test-api-stubs-docs" ], + static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } -- cgit v1.2.3 From 4f8e74977512a4b220c1016962e4e381040cf5f5 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 9 Apr 2020 14:16:37 +0100 Subject: Compose the main stubs jars from module stubs This adds stub generation for the non-updatable part of the platform, and changes the full stub jars to be a combination of multiple jars: the stubs of the updatable modules and the stubs of the remaining part of the platform. Composing the stub jars like this allows overriding the individual parts with prebuilts rather than building everything from source. This makes the build safer, as we can make sure that the stub of the apex that is used is also what is used to build the rest of the platform against. The monolithic droidstubs rules remain for now, as it has other functions than generating stub sources (api lint, current.txt, checklast). It remains a goal to get rid of this, but by submitting this CL first it can be done in steps. Bug: 144149403 Test: m android{,_system}_{monolith,merged}_stubs_current Test: m Change-Id: I255486112c03f237aa342cfb93f3b473a2f50470 Merged-In: I255486112c03f237aa342cfb93f3b473a2f50470 --- StubLibraries.bp | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 114 insertions(+), 3 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 83b0eb2b5972..6e6efe50309a 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -84,7 +84,7 @@ stubs_defaults { // finalized stub library to resolve them. If a new class gets added, // this may be need to be revisited to use a manually maintained stub // library with empty classes in order to resolve those references. - libs: ["sdk_system_29_android"], + libs: ["sdk_system_30_android"], aidl: { local_include_dirs: ["apex/media/aidl/stable"], }, @@ -129,6 +129,23 @@ droidstubs { jdiff_enabled: true, } +droidstubs { + name: "api-stubs-docs-non-updatable", + defaults: ["metalava-non-updatable-api-stubs-default"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args, + check_api: { + current: { + api_file: "non-updatable-api/current.txt", + removed_api_file: "non-updatable-api/removed.txt", + }, + api_lint: { + enabled: true, + new_since: ":android-non-updatable.api.public.latest", + }, + }, +} + priv_apps = " " + "--show-annotation android.annotation.SystemApi\\(" + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + @@ -171,6 +188,24 @@ droidstubs { jdiff_enabled: true, } +droidstubs { + name: "system-api-stubs-docs-non-updatable", + defaults: ["metalava-non-updatable-api-stubs-default"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args + priv_apps, + check_api: { + current: { + api_file: "non-updatable-api/system-current.txt", + removed_api_file: "non-updatable-api/system-removed.txt", + }, + api_lint: { + enabled: true, + new_since: ":android-non-updatable.api.system.latest", + baseline_file: "non-updatable-api/system-lint-baseline.txt", + }, + }, +} + droidstubs { name: "test-api-stubs-docs", defaults: ["metalava-full-api-stubs-default"], @@ -234,6 +269,22 @@ droidstubs { }, } +droidstubs { + name: "module-lib-api-stubs-docs-non-updatable", + defaults: ["metalava-non-updatable-api-stubs-default"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args + module_libs, + check_api: { + current: { + api_file: "non-updatable-api/module-lib-current.txt", + removed_api_file: "non-updatable-api/module-lib-removed.txt", + }, + api_lint: { + enabled: true, + new_since: ":android-non-updatable.api.module-lib.latest", + }, + }, +} // The following droidstub module generates source files for the API stub library for // modules. Note that it not only includes its own APIs but also other APIs that have @@ -267,19 +318,65 @@ java_defaults { } java_library_static { - name: "android_stubs_current", + name: "android_monolith_stubs_current", srcs: [ ":api-stubs-docs" ], static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } java_library_static { - name: "android_system_stubs_current", + name: "android_merged_stubs_current", + srcs: [ ":api-stubs-docs-non-updatable" ], + static_libs: [ + "conscrypt.module.public.api.stubs", + "framework-media-stubs-publicapi", + "framework-mediaprovider-stubs-publicapi", + "framework-permission-stubs-publicapi", + "framework-sdkextensions-stubs-publicapi", + "framework-statsd-stubs-publicapi", + "framework-tethering-stubs-publicapi", + "framework-wifi-stubs-publicapi", + "private-stub-annotations-jar", + ], + defaults: ["android_defaults_stubs_current"], +} + +java_library_static { + name: "android_stubs_current", + static_libs: ["android_merged_stubs_current"], + defaults: ["android_defaults_stubs_current"], +} + +java_library_static { + name: "android_system_monolith_stubs_current", srcs: [ ":system-api-stubs-docs" ], static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } +java_library_static { + name: "android_system_merged_stubs_current", + srcs: [ ":system-api-stubs-docs-non-updatable" ], + static_libs: [ + "conscrypt.module.public.api.stubs", + "framework-media-stubs-systemapi", + "framework-mediaprovider-stubs-systemapi", + "framework-permission-stubs-systemapi", + "framework-sdkextensions-stubs-systemapi", + "framework-statsd-stubs-systemapi", + "framework-tethering-stubs-systemapi", + "framework-wifi-stubs-systemapi", + "private-stub-annotations-jar", + ], + defaults: ["android_defaults_stubs_current"], +} + +java_library_static { + name: "android_system_stubs_current", + static_libs: ["android_system_merged_stubs_current"], + defaults: ["android_defaults_stubs_current"], +} + java_library_static { name: "android_test_stubs_current", srcs: [ ":test-api-stubs-docs" ], @@ -294,6 +391,20 @@ java_library_static { libs: ["sdk_system_29_android"], } +java_library_static { + name: "android_non_updatable_stubs_current", + srcs: [":api-stubs-docs-non-updatable"], + defaults: ["android_defaults_stubs_current"], + libs: ["sdk_system_29_android"], +} + +java_library_static { + name: "android_system_non_updatable_stubs_current", + srcs: [":system-api-stubs-docs-non-updatable"], + defaults: ["android_defaults_stubs_current"], + libs: ["sdk_system_29_android"], +} + ///////////////////////////////////////////////////////////////////// // hwbinder.stubs provides APIs required for building HIDL Java // libraries. -- cgit v1.2.3 From 33ea9997205a90fd0116c283e52a50a2134f947f Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 9 Apr 2020 14:16:37 +0100 Subject: Compose the main stubs jars from module stubs This adds stub generation for the non-updatable part of the platform, and changes the full stub jars to be a combination of multiple jars: the stubs of the updatable modules and the stubs of the remaining part of the platform. Composing the stub jars like this allows overriding the individual parts with prebuilts rather than building everything from source. This makes the build safer, as we can make sure that the stub of the apex that is used is also what is used to build the rest of the platform against. The monolithic droidstubs rules remain for now, as it has other functions than generating stub sources (api lint, current.txt, checklast). It remains a goal to get rid of this, but by submitting this CL first it can be done in steps. Bug: 144149403 Test: m android{,_system}_{monolith,merged}_stubs_current Test: m Change-Id: I255486112c03f237aa342cfb93f3b473a2f50470 Merged-In: I255486112c03f237aa342cfb93f3b473a2f50470 --- StubLibraries.bp | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 114 insertions(+), 3 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 2aa8f43a76ea..7fb0bc54993f 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -84,7 +84,7 @@ stubs_defaults { // finalized stub library to resolve them. If a new class gets added, // this may be need to be revisited to use a manually maintained stub // library with empty classes in order to resolve those references. - libs: ["sdk_system_29_android"], + libs: ["sdk_system_30_android"], aidl: { local_include_dirs: ["apex/media/aidl/stable"], }, @@ -129,6 +129,23 @@ droidstubs { jdiff_enabled: true, } +droidstubs { + name: "api-stubs-docs-non-updatable", + defaults: ["metalava-non-updatable-api-stubs-default"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args, + check_api: { + current: { + api_file: "non-updatable-api/current.txt", + removed_api_file: "non-updatable-api/removed.txt", + }, + api_lint: { + enabled: true, + new_since: ":android-non-updatable.api.public.latest", + }, + }, +} + priv_apps = " " + "--show-annotation android.annotation.SystemApi\\(" + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + @@ -171,6 +188,24 @@ droidstubs { jdiff_enabled: true, } +droidstubs { + name: "system-api-stubs-docs-non-updatable", + defaults: ["metalava-non-updatable-api-stubs-default"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args + priv_apps, + check_api: { + current: { + api_file: "non-updatable-api/system-current.txt", + removed_api_file: "non-updatable-api/system-removed.txt", + }, + api_lint: { + enabled: true, + new_since: ":android-non-updatable.api.system.latest", + baseline_file: "non-updatable-api/system-lint-baseline.txt", + }, + }, +} + droidstubs { name: "test-api-stubs-docs", defaults: ["metalava-full-api-stubs-default"], @@ -238,6 +273,22 @@ droidstubs { }, } +droidstubs { + name: "module-lib-api-stubs-docs-non-updatable", + defaults: ["metalava-non-updatable-api-stubs-default"], + arg_files: ["core/res/AndroidManifest.xml"], + args: metalava_framework_docs_args + module_libs, + check_api: { + current: { + api_file: "non-updatable-api/module-lib-current.txt", + removed_api_file: "non-updatable-api/module-lib-removed.txt", + }, + api_lint: { + enabled: true, + new_since: ":android-non-updatable.api.module-lib.latest", + }, + }, +} // The following droidstub module generates source files for the API stub library for // modules. Note that it not only includes its own APIs but also other APIs that have @@ -274,19 +325,65 @@ java_defaults { } java_library_static { - name: "android_stubs_current", + name: "android_monolith_stubs_current", srcs: [ ":api-stubs-docs" ], static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } java_library_static { - name: "android_system_stubs_current", + name: "android_merged_stubs_current", + srcs: [ ":api-stubs-docs-non-updatable" ], + static_libs: [ + "conscrypt.module.public.api.stubs", + "framework-media-stubs-publicapi", + "framework-mediaprovider-stubs-publicapi", + "framework-permission-stubs-publicapi", + "framework-sdkextensions-stubs-publicapi", + "framework-statsd-stubs-publicapi", + "framework-tethering-stubs-publicapi", + "framework-wifi-stubs-publicapi", + "private-stub-annotations-jar", + ], + defaults: ["android_defaults_stubs_current"], +} + +java_library_static { + name: "android_stubs_current", + static_libs: ["android_merged_stubs_current"], + defaults: ["android_defaults_stubs_current"], +} + +java_library_static { + name: "android_system_monolith_stubs_current", srcs: [ ":system-api-stubs-docs" ], static_libs: [ "private-stub-annotations-jar" ], defaults: ["android_defaults_stubs_current"], } +java_library_static { + name: "android_system_merged_stubs_current", + srcs: [ ":system-api-stubs-docs-non-updatable" ], + static_libs: [ + "conscrypt.module.public.api.stubs", + "framework-media-stubs-systemapi", + "framework-mediaprovider-stubs-systemapi", + "framework-permission-stubs-systemapi", + "framework-sdkextensions-stubs-systemapi", + "framework-statsd-stubs-systemapi", + "framework-tethering-stubs-systemapi", + "framework-wifi-stubs-systemapi", + "private-stub-annotations-jar", + ], + defaults: ["android_defaults_stubs_current"], +} + +java_library_static { + name: "android_system_stubs_current", + static_libs: ["android_system_merged_stubs_current"], + defaults: ["android_defaults_stubs_current"], +} + java_library_static { name: "android_test_stubs_current", srcs: [ ":test-api-stubs-docs" ], @@ -301,6 +398,20 @@ java_library_static { libs: ["sdk_system_29_android"], } +java_library_static { + name: "android_non_updatable_stubs_current", + srcs: [":api-stubs-docs-non-updatable"], + defaults: ["android_defaults_stubs_current"], + libs: ["sdk_system_29_android"], +} + +java_library_static { + name: "android_system_non_updatable_stubs_current", + srcs: [":system-api-stubs-docs-non-updatable"], + defaults: ["android_defaults_stubs_current"], + libs: ["sdk_system_29_android"], +} + ///////////////////////////////////////////////////////////////////// // hwbinder.stubs provides APIs required for building HIDL Java // libraries. -- cgit v1.2.3 From bf48c955ab22cee2a682934f97bdbbd82186cecc Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 14 May 2020 17:55:46 +0100 Subject: Use tags to access conscrypt sources Avoids direct access to the stub sources and instead access them via tags passed to the java_sdk_library. Bug: 155164730 Test: m checkapi Merged-In: I93dfb8bfac60bd7ab628292667c8d7a9d5e8eb82 Change-Id: I93dfb8bfac60bd7ab628292667c8d7a9d5e8eb82 (cherry picked from commit e55d4e3b6231d41c165ec0dd52fa6ca2e3913799) --- StubLibraries.bp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index 6e6efe50309a..c0197c4b2acf 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -69,7 +69,7 @@ stubs_defaults { name: "metalava-full-api-stubs-default", defaults: ["metalava-base-api-stubs-default"], srcs: [ - ":conscrypt.module.public.api.stubs.source", + ":conscrypt.module.public.api{.public.stubs.source}", ":framework-updatable-sources", ], sdk_version: "core_platform", -- cgit v1.2.3 From abebc6a89729b79b0d3af45f27f27208df4d2c0f Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Sun, 31 May 2020 11:35:50 +0100 Subject: Switch to standard naming scheme Removes use of the special framework-modules naming scheme. Bug: 155164730 Test: m java Exempt-From-Owner-Approval: Build cleanup. Change-Id: I3b78fcbcacc3df787e171d6eedeef1e51b087615 Merged-In: I0c31e2183353dfb5bd49f04f3455cb7b10be6866 (cherry picked from 8b864fb45ce79051437f13c2a19510718ea3b7aa) --- StubLibraries.bp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index c0197c4b2acf..ef4e202fdfe2 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -329,13 +329,13 @@ java_library_static { srcs: [ ":api-stubs-docs-non-updatable" ], static_libs: [ "conscrypt.module.public.api.stubs", - "framework-media-stubs-publicapi", - "framework-mediaprovider-stubs-publicapi", - "framework-permission-stubs-publicapi", - "framework-sdkextensions-stubs-publicapi", - "framework-statsd-stubs-publicapi", - "framework-tethering-stubs-publicapi", - "framework-wifi-stubs-publicapi", + "framework-media.stubs", + "framework-mediaprovider.stubs", + "framework-permission.stubs", + "framework-sdkextensions.stubs", + "framework-statsd.stubs", + "framework-tethering.stubs", + "framework-wifi.stubs", "private-stub-annotations-jar", ], defaults: ["android_defaults_stubs_current"], @@ -359,13 +359,13 @@ java_library_static { srcs: [ ":system-api-stubs-docs-non-updatable" ], static_libs: [ "conscrypt.module.public.api.stubs", - "framework-media-stubs-systemapi", - "framework-mediaprovider-stubs-systemapi", - "framework-permission-stubs-systemapi", - "framework-sdkextensions-stubs-systemapi", - "framework-statsd-stubs-systemapi", - "framework-tethering-stubs-systemapi", - "framework-wifi-stubs-systemapi", + "framework-media.stubs.system", + "framework-mediaprovider.stubs.system", + "framework-permission.stubs.system", + "framework-sdkextensions.stubs.system", + "framework-statsd.stubs.system", + "framework-tethering.stubs.system", + "framework-wifi.stubs.system", "private-stub-annotations-jar", ], defaults: ["android_defaults_stubs_current"], -- cgit v1.2.3