diff options
| author | 2024-10-01 09:46:19 +0000 | |
|---|---|---|
| committer | 2024-10-01 09:46:19 +0000 | |
| commit | 6caaf2f3e464807940ede306033f0bb4055e9268 (patch) | |
| tree | 450b382c618408524c743c68e95d491dda6af794 /api | |
| parent | 1a072d3539d986288bccddf66cd1696462bf6c86 (diff) | |
| parent | 319ffa7b44c2a68769fc6086afe20bf920a6932d (diff) | |
Merge "Use select syntax on from-text vs from-source static lib selection" into main
Diffstat (limited to 'api')
| -rw-r--r-- | api/StubLibraries.bp | 105 |
1 files changed, 40 insertions, 65 deletions
diff --git a/api/StubLibraries.bp b/api/StubLibraries.bp index d1aa23c8ea5f..a949ff5a331b 100644 --- a/api/StubLibraries.bp +++ b/api/StubLibraries.bp @@ -364,19 +364,14 @@ java_defaults { java_library { name: "android-non-updatable.stubs", defaults: ["android-non-updatable_defaults"], - static_libs: [ - "android-non-updatable.stubs.from-source", - ], - product_variables: { - build_from_text_stub: { - static_libs: [ - "android-non-updatable.stubs.from-text", - ], - exclude_static_libs: [ - "android-non-updatable.stubs.from-source", - ], - }, - }, + static_libs: select(product_variable("build_from_text_stub"), { + true: [ + "android-non-updatable.stubs.from-text", + ], + default: [ + "android-non-updatable.stubs.from-source", + ], + }), } java_library { @@ -390,19 +385,14 @@ java_library { java_library { name: "android-non-updatable.stubs.system", defaults: ["android-non-updatable_defaults"], - static_libs: [ - "android-non-updatable.stubs.system.from-source", - ], - product_variables: { - build_from_text_stub: { - static_libs: [ - "android-non-updatable.stubs.system.from-text", - ], - exclude_static_libs: [ - "android-non-updatable.stubs.system.from-source", - ], - }, - }, + static_libs: select(product_variable("build_from_text_stub"), { + true: [ + "android-non-updatable.stubs.system.from-text", + ], + default: [ + "android-non-updatable.stubs.system.from-source", + ], + }), } java_library { @@ -416,19 +406,14 @@ java_library { java_library { name: "android-non-updatable.stubs.module_lib", defaults: ["android-non-updatable_defaults"], - static_libs: [ - "android-non-updatable.stubs.module_lib.from-source", - ], - product_variables: { - build_from_text_stub: { - static_libs: [ - "android-non-updatable.stubs.module_lib.from-text", - ], - exclude_static_libs: [ - "android-non-updatable.stubs.module_lib.from-source", - ], - }, - }, + static_libs: select(product_variable("build_from_text_stub"), { + true: [ + "android-non-updatable.stubs.module_lib.from-text", + ], + default: [ + "android-non-updatable.stubs.module_lib.from-source", + ], + }), } java_library { @@ -442,19 +427,14 @@ java_library { java_library { name: "android-non-updatable.stubs.test", defaults: ["android-non-updatable_defaults"], - static_libs: [ - "android-non-updatable.stubs.test.from-source", - ], - product_variables: { - build_from_text_stub: { - static_libs: [ - "android-non-updatable.stubs.test.from-text", - ], - exclude_static_libs: [ - "android-non-updatable.stubs.test.from-source", - ], - }, - }, + static_libs: select(product_variable("build_from_text_stub"), { + true: [ + "android-non-updatable.stubs.test.from-text", + ], + default: [ + "android-non-updatable.stubs.test.from-source", + ], + }), } java_library { @@ -468,19 +448,14 @@ java_library { java_library { name: "android-non-updatable.stubs.system_server", defaults: ["android-non-updatable_defaults"], - static_libs: [ - "android-non-updatable.stubs.system_server.from-source", - ], - product_variables: { - build_from_text_stub: { - static_libs: [ - "android-non-updatable.stubs.system_server.from-text", - ], - exclude_static_libs: [ - "android-non-updatable.stubs.system_server.from-source", - ], - }, - }, + static_libs: select(product_variable("build_from_text_stub"), { + true: [ + "android-non-updatable.stubs.system_server.from-text", + ], + default: [ + "android-non-updatable.stubs.system_server.from-source", + ], + }), } java_library { |