From 94c9945a7971f047b798e82d83460fb3f416b7af Mon Sep 17 00:00:00 2001
From: Anton Hansson <hansson@google.com>
Date: Tue, 2 May 2023 08:57:12 +0000
Subject: [PATCH] Move ApiDocs.bp and StubLibraries.bp to api dir

Make a symlink from api/docs -> docs, since many places are
hardcoding the path fw/base/docs.

Bug: 271563074
Test: presubmit
(cherry picked from https://android-review.googlesource.com/q/commit:19fcec6c634c28c1a842d7164d94a46b3ef59942)
Merged-In: I354f3cb62535f34d8819d158e53aa46ff26dc18a
Change-Id: I354f3cb62535f34d8819d158e53aa46ff26dc18a
---
 Android.bp                               | 2 --
 api/Android.bp                           | 5 +++++
 ApiDocs.bp => api/ApiDocs.bp             | 0
 StubLibraries.bp => api/StubLibraries.bp | 0
 api/docs                                 | 1 +
 5 files changed, 6 insertions(+), 2 deletions(-)
 rename ApiDocs.bp => api/ApiDocs.bp (100%)
 rename StubLibraries.bp => api/StubLibraries.bp (100%)
 create mode 120000 api/docs

diff --git a/Android.bp b/Android.bp
index 54d9255b8a034..4473d9458d259 100644
--- a/Android.bp
+++ b/Android.bp
@@ -690,8 +690,6 @@ stubs_defaults {
 }
 
 build = [
-    "StubLibraries.bp",
-    "ApiDocs.bp",
     "ProtoLibraries.bp",
     "TestProtoLibraries.bp",
 ]
diff --git a/api/Android.bp b/api/Android.bp
index 24b30048fab79..f5bafe8bf8dae 100644
--- a/api/Android.bp
+++ b/api/Android.bp
@@ -258,3 +258,8 @@ java_genrule {
     out: ["api_fingerprint.txt"],
     cmd: "cat $(in) | md5sum | cut -d' ' -f1 > $(out)",
 }
+
+build = [
+    "ApiDocs.bp",
+    "StubLibraries.bp",
+]
diff --git a/ApiDocs.bp b/api/ApiDocs.bp
similarity index 100%
rename from ApiDocs.bp
rename to api/ApiDocs.bp
diff --git a/StubLibraries.bp b/api/StubLibraries.bp
similarity index 100%
rename from StubLibraries.bp
rename to api/StubLibraries.bp
diff --git a/api/docs b/api/docs
new file mode 120000
index 0000000000000..a9594bfe4ab69
--- /dev/null
+++ b/api/docs
@@ -0,0 +1 @@
+../docs
\ No newline at end of file
-- 
GitLab