record-finalized-flags: introduce new tool
Add a new tool, record-finalized-flags. The tool will be used to create
a list of all @FlaggedApi flags that participate in the next API
finalization so we can add tooling to prevent reusing "spent" flags in
future @FlaggedApi annotations.
This CL only adds the new soong module to allow soong to call the new
tool: the actual implementation will land in future CLs.
Bug: 377676163
Test: m all_aconfig_declarations
Change-Id: I81b3dd0158764c9936fba63a29acdbe80d1d44b0
diff --git a/tools/record-finalized-flags/Android.bp b/tools/record-finalized-flags/Android.bp
new file mode 100644
index 0000000..63bcc2d
--- /dev/null
+++ b/tools/record-finalized-flags/Android.bp
@@ -0,0 +1,4 @@
+sh_binary_host {
+ name: "record-finalized-flags",
+ src: "record-finalized-flags.sh",
+}
diff --git a/tools/record-finalized-flags/OWNERS b/tools/record-finalized-flags/OWNERS
new file mode 100644
index 0000000..2864a2c
--- /dev/null
+++ b/tools/record-finalized-flags/OWNERS
@@ -0,0 +1 @@
+include platform/frameworks/base:/SDK_OWNERS
diff --git a/tools/record-finalized-flags/record-finalized-flags.sh b/tools/record-finalized-flags/record-finalized-flags.sh
new file mode 100644
index 0000000..1d85ae9
--- /dev/null
+++ b/tools/record-finalized-flags/record-finalized-flags.sh
@@ -0,0 +1,18 @@
+#!/bin/bash -e
+#
+# Copyright 2024 Google Inc. All rights reserved.
+#
+# 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.
+
+# TODO: implement this tool
+echo "record-finalized-flags.sh $*"