diff options
author | Jihoon Kang <jihoonkang@google.com> | 2024-04-10 18:55:36 +0000 |
---|---|---|
committer | Jihoon Kang <jihoonkang@google.com> | 2024-04-10 19:02:31 +0000 |
commit | 00f480e0b83381a088e9ccc9e9cd85d9d47f618a (patch) | |
tree | 901195e4716cd806fcef45335c29cee9354d35a1 /api | |
parent | 22be9ae76937aef3723d6d3bff0f29ab2866ec47 (diff) | |
download | base-00f480e0b83381a088e9ccc9e9cd85d9d47f618a.tar.gz |
Do not split struct properties based on soong_config_variables
https://r.android.com/3009280 has introduced the mechanism to modify the
tag of the dist artifacts based on the soong_config_variable (i.e. based
on the value of the build flag "RELEASE_HIDDEN_API_EXPORTABLE_STUBS" or
the product variable "PRODUCT_HIDDEN_API_EXPORTABLE_STUBS"). In order to
minimize duplication, the change has kept the common properties within
the struct outside of the "soong_config_variables" block and only
specified the affected (list of) struct properties (tag) in the
"soong_config_variables" block.
However, this is an unsupported feature in Soong and led to the default
OutputFile (i.e. the output file when no tag is specified). In order to
fix this, this change specifies all properties of the struct in the
"soong_config_variables" block, with the cost of some duplication.
Test: ABTD
Bug: 333653043
Change-Id: If91099b3499894d5b1c284ace0e1f23c80b84051
Diffstat (limited to 'api')
-rw-r--r-- | api/StubLibraries.bp | 118 |
1 files changed, 60 insertions, 58 deletions
diff --git a/api/StubLibraries.bp b/api/StubLibraries.bp index 65ec4d46a27c..3e277e8a0cab 100644 --- a/api/StubLibraries.bp +++ b/api/StubLibraries.bp @@ -54,34 +54,34 @@ non_updatable_exportable_droidstubs { baseline_file: ":non-updatable-lint-baseline.txt", }, }, - dists: [ - { - targets: ["sdk"], - dir: "apistubs/android/public/api", - dest: "android-non-updatable.txt", - }, - { - targets: ["sdk"], - dir: "apistubs/android/public/api", - dest: "android-non-updatable-removed.txt", - }, - ], soong_config_variables: { release_hidden_api_exportable_stubs: { dists: [ { + targets: ["sdk"], + dir: "apistubs/android/public/api", + dest: "android-non-updatable.txt", tag: ".exportable.api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/public/api", + dest: "android-non-updatable-removed.txt", tag: ".exportable.removed-api.txt", }, ], conditions_default: { dists: [ { + targets: ["sdk"], + dir: "apistubs/android/public/api", + dest: "android-non-updatable.txt", tag: ".api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/public/api", + dest: "android-non-updatable-removed.txt", tag: ".removed-api.txt", }, ], @@ -134,34 +134,34 @@ non_updatable_exportable_droidstubs { baseline_file: ":non-updatable-system-lint-baseline.txt", }, }, - dists: [ - { - targets: ["sdk"], - dir: "apistubs/android/system/api", - dest: "android-non-updatable.txt", - }, - { - targets: ["sdk"], - dir: "apistubs/android/system/api", - dest: "android-non-updatable-removed.txt", - }, - ], soong_config_variables: { release_hidden_api_exportable_stubs: { dists: [ { + targets: ["sdk"], + dir: "apistubs/android/system/api", + dest: "android-non-updatable.txt", tag: ".exportable.api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/system/api", + dest: "android-non-updatable-removed.txt", tag: ".exportable.removed-api.txt", }, ], conditions_default: { dists: [ { + targets: ["sdk"], + dir: "apistubs/android/system/api", + dest: "android-non-updatable.txt", tag: ".api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/system/api", + dest: "android-non-updatable-removed.txt", tag: ".removed-api.txt", }, ], @@ -189,56 +189,58 @@ non_updatable_exportable_droidstubs { baseline_file: ":non-updatable-test-lint-baseline.txt", }, }, - dists: [ - { - targets: ["sdk"], - dir: "apistubs/android/test/api", - dest: "android.txt", - }, - { - targets: ["sdk"], - dir: "apistubs/android/test/api", - dest: "removed.txt", - }, - { - targets: ["sdk"], - dir: "apistubs/android/test/api", - dest: "android-non-updatable.txt", - }, - { - targets: ["sdk"], - dir: "apistubs/android/test/api", - dest: "android-non-updatable-removed.txt", - }, - ], soong_config_variables: { release_hidden_api_exportable_stubs: { dists: [ { + targets: ["sdk"], + dir: "apistubs/android/test/api", + dest: "android.txt", tag: ".exportable.api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/test/api", + dest: "removed.txt", tag: ".exportable.removed-api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/test/api", + dest: "android-non-updatable.txt", tag: ".exportable.api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/test/api", + dest: "android-non-updatable-removed.txt", tag: ".exportable.removed-api.txt", }, ], conditions_default: { dists: [ { + targets: ["sdk"], + dir: "apistubs/android/test/api", + dest: "android.txt", tag: ".api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/test/api", + dest: "removed.txt", tag: ".removed-api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/test/api", + dest: "android-non-updatable.txt", tag: ".api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/test/api", + dest: "android-non-updatable-removed.txt", tag: ".removed-api.txt", }, ], @@ -271,34 +273,34 @@ non_updatable_exportable_droidstubs { baseline_file: ":non-updatable-module-lib-lint-baseline.txt", }, }, - dists: [ - { - targets: ["sdk"], - dir: "apistubs/android/module-lib/api", - dest: "android-non-updatable.txt", - }, - { - targets: ["sdk"], - dir: "apistubs/android/module-lib/api", - dest: "android-non-updatable-removed.txt", - }, - ], soong_config_variables: { release_hidden_api_exportable_stubs: { dists: [ { + targets: ["sdk"], + dir: "apistubs/android/module-lib/api", + dest: "android-non-updatable.txt", tag: ".exportable.api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/module-lib/api", + dest: "android-non-updatable-removed.txt", tag: ".exportable.removed-api.txt", }, ], conditions_default: { dists: [ { + targets: ["sdk"], + dir: "apistubs/android/module-lib/api", + dest: "android-non-updatable.txt", tag: ".api.txt", }, { + targets: ["sdk"], + dir: "apistubs/android/module-lib/api", + dest: "android-non-updatable-removed.txt", tag: ".removed-api.txt", }, ], |