This removes the i18n source from the non-updatable stubs which removes
them from the frameworks/base/core/api files too. The API is still
protected by both the build and Gerrit review as the API is specified
in the external/icu/android_icu4j/api/public/ directory.
The i18n stubs source is used instead of the implementation source for
generating the JavaDoc. That revealed a minor issue with metalava which
is fixed in this topic.
The i18n stubs library was statically included alongside the conscrypt
stubs library so it will still appear in the monolothic android.jar.
Bug: 174344410
Test: m offline-sdk-docs
- check that i18n classes are present
m android_stubs_current android_system_stubs_current android_test_stubs_current
- check that i18n classes are present in each jar
m droid
Change-Id: I744c8bac54a8a5518ca0eca2a7700abbfa0997f4
236 lines
7.6 KiB
Plaintext
236 lines
7.6 KiB
Plaintext
// Copyright (C) 2020 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 {
|
|
default_visibility: ["//visibility:private"],
|
|
}
|
|
|
|
genrule {
|
|
name: "current-api-xml",
|
|
tools: ["metalava"],
|
|
srcs: [":frameworks-base-api-current.txt"],
|
|
out: ["current.api"],
|
|
cmd: "$(location metalava) --no-banner -convert2xmlnostrip $(in) $(out)",
|
|
visibility: ["//visibility:public"],
|
|
}
|
|
|
|
genrule {
|
|
name: "frameworks-base-api-current.txt",
|
|
srcs: [
|
|
":conscrypt.module.public.api{.public.api.txt}",
|
|
":framework-media{.public.api.txt}",
|
|
":framework-mediaprovider{.public.api.txt}",
|
|
":framework-permission{.public.api.txt}",
|
|
":framework-sdkextensions{.public.api.txt}",
|
|
":framework-statsd{.public.api.txt}",
|
|
":framework-tethering{.public.api.txt}",
|
|
":framework-wifi{.public.api.txt}",
|
|
":i18n.module.public.api{.public.api.txt}",
|
|
":non-updatable-current.txt",
|
|
],
|
|
out: ["current.txt"],
|
|
tools: ["metalava"],
|
|
cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
|
|
dists: [
|
|
{
|
|
targets: ["droidcore"],
|
|
dir: "api",
|
|
dest: "current.txt",
|
|
},
|
|
{
|
|
targets: [
|
|
"sdk",
|
|
"win_sdk",
|
|
],
|
|
dir: "apistubs/android/public/api",
|
|
dest: "android.txt",
|
|
},
|
|
],
|
|
visibility: ["//visibility:public"],
|
|
}
|
|
|
|
genrule {
|
|
name: "frameworks-base-api-current.srcjar",
|
|
srcs: [
|
|
":api-stubs-docs-non-updatable",
|
|
":conscrypt.module.public.api{.public.stubs.source}",
|
|
":framework-media{.public.stubs.source}",
|
|
":framework-mediaprovider{.public.stubs.source}",
|
|
":framework-permission{.public.stubs.source}",
|
|
":framework-sdkextensions{.public.stubs.source}",
|
|
":framework-statsd{.public.stubs.source}",
|
|
":framework-tethering{.public.stubs.source}",
|
|
":framework-wifi{.public.stubs.source}",
|
|
":i18n.module.public.api{.public.stubs.source}",
|
|
],
|
|
out: ["current.srcjar"],
|
|
tools: ["merge_zips"],
|
|
cmd: "$(location merge_zips) $(out) $(in)",
|
|
visibility: ["//visibility:private"], // Used by make module in //development, mind.
|
|
}
|
|
|
|
genrule {
|
|
name: "frameworks-base-api-removed.txt",
|
|
srcs: [
|
|
":conscrypt.module.public.api{.public.removed-api.txt}",
|
|
":framework-media{.public.removed-api.txt}",
|
|
":framework-mediaprovider{.public.removed-api.txt}",
|
|
":framework-permission{.public.removed-api.txt}",
|
|
":framework-sdkextensions{.public.removed-api.txt}",
|
|
":framework-statsd{.public.removed-api.txt}",
|
|
":framework-tethering{.public.removed-api.txt}",
|
|
":framework-wifi{.public.removed-api.txt}",
|
|
":i18n.module.public.api{.public.removed-api.txt}",
|
|
":non-updatable-removed.txt",
|
|
],
|
|
out: ["removed.txt"],
|
|
tools: ["metalava"],
|
|
cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
|
|
dists: [
|
|
{
|
|
targets: ["droidcore"],
|
|
dir: "api",
|
|
dest: "removed.txt",
|
|
},
|
|
],
|
|
}
|
|
|
|
genrule {
|
|
name: "frameworks-base-api-system-current.txt",
|
|
srcs: [
|
|
":framework-media{.system.api.txt}",
|
|
":framework-mediaprovider{.system.api.txt}",
|
|
":framework-permission{.system.api.txt}",
|
|
":framework-sdkextensions{.system.api.txt}",
|
|
":framework-statsd{.system.api.txt}",
|
|
":framework-tethering{.system.api.txt}",
|
|
":framework-wifi{.system.api.txt}",
|
|
":non-updatable-system-current.txt",
|
|
],
|
|
out: ["system-current.txt"],
|
|
tools: ["metalava"],
|
|
cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
|
|
dists: [
|
|
{
|
|
targets: ["droidcore"],
|
|
dir: "api",
|
|
dest: "system-current.txt",
|
|
},
|
|
{
|
|
targets: [
|
|
"sdk",
|
|
"win_sdk",
|
|
],
|
|
dir: "apistubs/android/system/api",
|
|
dest: "android.txt",
|
|
},
|
|
],
|
|
visibility: ["//visibility:public"],
|
|
}
|
|
|
|
genrule {
|
|
name: "frameworks-base-api-system-removed.txt",
|
|
srcs: [
|
|
":framework-media{.system.removed-api.txt}",
|
|
":framework-mediaprovider{.system.removed-api.txt}",
|
|
":framework-permission{.system.removed-api.txt}",
|
|
":framework-sdkextensions{.system.removed-api.txt}",
|
|
":framework-statsd{.system.removed-api.txt}",
|
|
":framework-tethering{.system.removed-api.txt}",
|
|
":framework-wifi{.system.removed-api.txt}",
|
|
":non-updatable-system-removed.txt",
|
|
],
|
|
out: ["system-removed.txt"],
|
|
tools: ["metalava"],
|
|
cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
|
|
dists: [
|
|
{
|
|
targets: ["droidcore"],
|
|
dir: "api",
|
|
dest: "system-removed.txt",
|
|
},
|
|
],
|
|
visibility: ["//visibility:public"],
|
|
}
|
|
|
|
genrule {
|
|
name: "frameworks-base-api-module-lib-current.txt",
|
|
srcs: [
|
|
":framework-media{.module-lib.api.txt}",
|
|
":framework-mediaprovider{.module-lib.api.txt}",
|
|
":framework-permission{.module-lib.api.txt}",
|
|
":framework-sdkextensions{.module-lib.api.txt}",
|
|
":framework-statsd{.module-lib.api.txt}",
|
|
":framework-tethering{.module-lib.api.txt}",
|
|
":framework-wifi{.module-lib.api.txt}",
|
|
":non-updatable-module-lib-current.txt",
|
|
],
|
|
out: ["module-lib-current.txt"],
|
|
tools: ["metalava"],
|
|
cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
|
|
dists: [
|
|
{
|
|
targets: ["droidcore"],
|
|
dir: "api",
|
|
dest: "module-lib-current.txt",
|
|
},
|
|
{
|
|
targets: [
|
|
"sdk",
|
|
"win_sdk",
|
|
],
|
|
dir: "apistubs/android/module-lib/api",
|
|
dest: "android.txt",
|
|
},
|
|
],
|
|
}
|
|
|
|
genrule {
|
|
name: "frameworks-base-api-module-lib-removed.txt",
|
|
srcs: [
|
|
":framework-media{.module-lib.removed-api.txt}",
|
|
":framework-mediaprovider{.module-lib.removed-api.txt}",
|
|
":framework-permission{.module-lib.removed-api.txt}",
|
|
":framework-sdkextensions{.module-lib.removed-api.txt}",
|
|
":framework-statsd{.module-lib.removed-api.txt}",
|
|
":framework-tethering{.module-lib.removed-api.txt}",
|
|
":framework-wifi{.module-lib.removed-api.txt}",
|
|
":non-updatable-module-lib-removed.txt",
|
|
],
|
|
out: ["module-lib-removed.txt"],
|
|
tools: ["metalava"],
|
|
cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
|
|
dists: [
|
|
{
|
|
targets: ["droidcore"],
|
|
dir: "api",
|
|
dest: "module-lib-removed.txt",
|
|
},
|
|
],
|
|
}
|
|
|
|
genrule {
|
|
name: "combined-removed-dex",
|
|
srcs: [
|
|
":frameworks-base-api-removed.txt",
|
|
":frameworks-base-api-system-removed.txt",
|
|
":android.car-stubs-docs{.removed-api.txt}",
|
|
":android.car-system-stubs-docs{.removed-api.txt}",
|
|
],
|
|
tool_files: ["gen_combined_removed_dex.sh"],
|
|
tools: ["metalava"],
|
|
out: ["combined-removed-dex.txt"],
|
|
cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
|
|
}
|