| rust_binary { |
| name: "aconfigd-system", |
| defaults: ["aconfigd_system.defaults"], |
| srcs: ["src/main.rs"], |
| rustlibs: [ |
| "libaconfig_new_storage_flags_rust", |
| "libaconfigd_system", |
| "libaconfigd_rust", |
| "libandroid_logger", |
| "librustutils", |
| "liblibc", |
| ], |
| cfgs: select(release_flag("RELEASE_DISABLE_SYSTEM_ACONFIGD_SOCKET"), { |
| true: ["disable_system_aconfigd_socket"], |
| default: [], |
| }), |
| native_coverage: false, |
| init_rc: ["aconfigd.rc"], |
| } |
| |
| rust_library { |
| name: "libaconfigd_system", |
| crate_name: "aconfigd_system", |
| defaults: ["aconfigd_system.defaults"], |
| srcs: ["lib.rs"], |
| rustlibs: [ |
| "libcxx", |
| "libbase", |
| "libaconfigd_protos_rust", |
| ], |
| static_libs: [ |
| "libcxx_aconfigd", |
| "libaconfigd_protos_cc", |
| "libaconfig_storage_file_cc", |
| "libaconfig_new_storage_flags", |
| "libaconfig_storage_read_api_cc", |
| "libaconfig_storage_write_api_cc", |
| ], |
| shared_libs: [ |
| "libbase", |
| "libaconfigd", |
| "libprotobuf-cpp-lite", |
| ], |
| } |
| |
| cc_library_static { |
| name: "libcxx_aconfigd", |
| srcs: ["libcxx_aconfigd.cpp"], |
| generated_headers: [ |
| "cxx-bridge-header", |
| "libcxx_aconfigd_bridge_header", |
| ], |
| static_libs: [ |
| "libaconfigd_protos_cc", |
| "libaconfig_storage_file_cc", |
| "libaconfig_new_storage_flags", |
| "libaconfig_storage_read_api_cc", |
| "libaconfig_storage_write_api_cc", |
| ], |
| shared_libs: [ |
| "libaconfigd", |
| "libbase", |
| "libprotobuf-cpp-lite", |
| ], |
| generated_sources: ["libcxx_aconfigd_bridge_code"], |
| } |
| |
| genrule { |
| name: "libcxx_aconfigd_bridge_code", |
| tools: ["cxxbridge"], |
| cmd: "$(location cxxbridge) $(in) > $(out)", |
| srcs: ["lib.rs"], |
| out: ["libcxx_aconfigd_cxx_generated.cc"], |
| } |
| |
| genrule { |
| name: "libcxx_aconfigd_bridge_header", |
| tools: ["cxxbridge"], |
| cmd: "$(location cxxbridge) $(in) --header > $(out)", |
| srcs: ["lib.rs"], |
| out: ["lib.rs.h"], |
| } |
| |
| cc_library { |
| name: "libaconfigd", |
| srcs: [ |
| "aconfigd.cpp", |
| "aconfigd_util.cpp", |
| "storage_files.cpp", |
| "storage_files_manager.cpp", |
| ], |
| static_libs: [ |
| "libaconfig_flags_cc", |
| "libaconfigd_protos_cc", |
| "libaconfig_storage_file_cc", |
| "libaconfig_new_storage_flags", |
| "libaconfig_storage_read_api_cc", |
| "libaconfig_storage_write_api_cc", |
| // TODO(370864013): Remove this once the CTS annotation issue is fixed. |
| "cts_flags_tests_cc", |
| ], |
| shared_libs: [ |
| "libcutils", |
| "libprotobuf-cpp-lite", |
| "libbase", |
| "liblog", |
| "libcrypto", |
| "server_configurable_flags", |
| ], |
| export_include_dirs: ["include"], |
| } |
| |
| aconfig_declarations { |
| name: "aconfig_new_storage_flags", |
| package: "com.android.aconfig_new_storage", |
| container: "system", |
| srcs: ["new_aconfig_storage.aconfig"], |
| } |
| |
| cc_aconfig_library { |
| name: "libaconfig_new_storage_flags", |
| aconfig_declarations: "aconfig_new_storage_flags", |
| } |
| |
| rust_aconfig_library { |
| name: "libaconfig_new_storage_flags_rust", |
| crate_name: "aconfig_new_storage_flags", |
| aconfig_declarations: "aconfig_new_storage_flags", |
| apex_available: [ |
| "//apex_available:anyapex", |
| "//apex_available:platform", |
| ], |
| min_sdk_version: "34", |
| } |
| |
| java_aconfig_library { |
| name: "aconfig_new_storage_flags_lib", |
| aconfig_declarations: "aconfig_new_storage_flags", |
| } |
| |
| cc_test { |
| name: "aconfigd_test", |
| defaults: [ |
| "aconfig_lib_cc_shared_link.defaults", |
| ], |
| team: "trendy_team_android_core_experiments", |
| srcs: [ |
| "aconfigd_test.cpp", |
| "aconfigd_util.cpp", |
| ], |
| static_libs: [ |
| "libflagtest", |
| "libgmock", |
| "libaconfigd_protos_cc", |
| "libaconfig_storage_file_cc", |
| "libaconfig_new_storage_flags", |
| "libaconfig_storage_read_api_cc", |
| "libaconfig_storage_write_api_cc", |
| "libaconfig_flags_cc", |
| "libaconfigd", |
| ], |
| shared_libs: [ |
| "libbase", |
| "liblog", |
| "libcrypto", |
| "libprotobuf-cpp-lite", |
| "server_configurable_flags", |
| ], |
| data: [ |
| "tests/data/v1/package.map", |
| "tests/data/v1/flag.map", |
| "tests/data/v1/flag.val", |
| "tests/data/v1/flag.info", |
| "tests/data/v2/package.map", |
| "tests/data/v2/flag.map", |
| "tests/data/v2/flag.val", |
| "tests/data/v2/flag.info", |
| ], |
| test_suites: [ |
| "device-tests", |
| "general-tests", |
| ], |
| } |
| |
| cc_test { |
| name: "aconfigd_proton_collider_test", |
| defaults: [ |
| "aconfig_lib_cc_shared_link.defaults", |
| ], |
| team: "trendy_team_android_core_experiments", |
| srcs: [ |
| "aconfigd_proton_collider_test.cpp", |
| ], |
| static_libs: [ |
| "libflagtest", |
| "libgmock", |
| "libaconfigd_protos_cc", |
| "libaconfig_storage_file_cc", |
| "libaconfig_new_storage_flags", |
| "libaconfig_storage_read_api_cc", |
| "libaconfig_storage_write_api_cc", |
| "libaconfigd", |
| ], |
| shared_libs: [ |
| "libprotobuf-cpp-lite", |
| "libbase", |
| "liblog", |
| "libcrypto", |
| "server_configurable_flags", |
| ], |
| test_suites: [ |
| "device-tests", |
| "general-tests", |
| ], |
| } |
| |
| cc_test { |
| name: "aconfigd_socket_test", |
| team: "trendy_team_android_core_experiments", |
| srcs: [ |
| "aconfigd_socket_test.cpp", |
| ], |
| static_libs: [ |
| "libgmock", |
| "libaconfigd_protos_cc", |
| "libaconfig_new_storage_flags", |
| ], |
| shared_libs: [ |
| "libcutils", |
| "libprotobuf-cpp-lite", |
| "libbase", |
| "liblog", |
| ], |
| data: [ |
| "tests/data/v1/package.map", |
| "tests/data/v1/flag.map", |
| "tests/data/v1/flag.val", |
| ], |
| test_suites: [ |
| "device-tests", |
| "general-tests", |
| ], |
| } |
| |
| java_library { |
| name: "aconfigd_java_utils", |
| srcs: [ |
| "srcs/**/*.java", |
| ], |
| static_libs: [ |
| "aconfigd_java_proto_lib", |
| ], |
| min_sdk_version: "UpsideDownCake", |
| apex_available: [ |
| "//apex_available:anyapex", |
| "//apex_available:platform", |
| ], |
| } |
| |
| rust_defaults { |
| name: "aconfigd_system.defaults", |
| edition: "2021", |
| lints: "none", |
| rustlibs: [ |
| "libaconfig_storage_file", |
| "libaconfig_storage_read_api", |
| "libaconfig_storage_write_api", |
| "libaconfigd_protos_rust", |
| "libanyhow", |
| "libclap", |
| "libmemmap2", |
| "liblog_rust", |
| "libprotobuf", |
| "libthiserror", |
| ], |
| } |