Use lint database from api_version_public
These two databases are (nearly) identical but the latter is generated
in a much more efficient way.
The diffs are very minor and it's not clear to me which versions is more
correct than the other, though I'm fairly confident they don't matter.
https://paste.googleplex.com/5567994005553152
Droidstubs now support using the api-versions.xml from another
droidstubs module, so reuse the one from api_versions_public
in framework-doc-stubs.
Bug: 187398174
Test: diff api-versions.xml
Test: diff stubs of framework-doc-stubs
Change-Id: I774be9097e97d6b180fe54d799c94515780be6ec
diff --git a/ApiDocs.bp b/ApiDocs.bp
index 39f055b..a542c5c 100644
--- a/ApiDocs.bp
+++ b/ApiDocs.bp
@@ -134,11 +134,7 @@
defaults: ["android-non-updatable-doc-stubs-defaults"],
srcs: [":all-modules-public-stubs-source"],
args: metalava_framework_docs_args,
- api_levels_annotations_enabled: true,
- api_levels_annotations_dirs: [
- "sdk-dir",
- "api-versions-jars-dir",
- ],
+ api_levels_module: "api_versions_public",
aidl: {
include_dirs: [
"packages/modules/Connectivity/framework/aidl-export",
diff --git a/api/api.go b/api/api.go
index 9cd0132..93f1354 100644
--- a/api/api.go
+++ b/api/api.go
@@ -179,7 +179,7 @@
// Note: order matters: first parameter is the full api-versions.xml
// after that the stubs files in any order
// stubs files are all modules that export API surfaces EXCEPT ART
- props.Srcs = append([]string{":framework-doc-stubs{.api_versions.xml}"}, createSrcs(modules, ".stubs{.jar}")...)
+ props.Srcs = append([]string{":api_versions_public{.api_versions.xml}"}, createSrcs(modules, ".stubs{.jar}")...)
props.Dists = []android.Dist{{Targets: []string{"sdk"}}}
ctx.CreateModule(genrule.GenRuleFactory, &props)
}