Add aconfig storage API deps to codegened lib
Change-Id: I4991c9fccb0a0bab15457883cf20aacb3142c4cf
diff --git a/aconfig/codegen/cc_aconfig_library.go b/aconfig/codegen/cc_aconfig_library.go
index 80e4926..2d3ee39 100644
--- a/aconfig/codegen/cc_aconfig_library.go
+++ b/aconfig/codegen/cc_aconfig_library.go
@@ -33,6 +33,11 @@
const baseLibDep = "server_configurable_flags"
+const libBaseDep = "libbase"
+const libLogDep = "liblog"
+const libAconfigStorageReadApiCcDep = "libaconfig_storage_read_api_cc"
+const libAconfigStorageProtosCcDep = "libaconfig_storage_protos_cc"
+
type CcAconfigLibraryProperties struct {
// name of the aconfig_declarations module to generate a library for
Aconfig_declarations string
@@ -82,6 +87,11 @@
// Add a dependency for the aconfig flags base library if it is not forced read only
if mode != "force-read-only" {
deps.SharedLibs = append(deps.SharedLibs, baseLibDep)
+
+ deps.SharedLibs = append(deps.SharedLibs, libBaseDep)
+ deps.SharedLibs = append(deps.SharedLibs, libLogDep)
+ deps.SharedLibs = append(deps.SharedLibs, libAconfigStorageReadApiCcDep)
+ deps.SharedLibs = append(deps.SharedLibs, libAconfigStorageProtosCcDep)
}
// TODO: It'd be really nice if we could reexport this library and not make everyone do it.
diff --git a/aconfig/codegen/cc_aconfig_library_test.go b/aconfig/codegen/cc_aconfig_library_test.go
index 05449bc..2e7fdc2 100644
--- a/aconfig/codegen/cc_aconfig_library_test.go
+++ b/aconfig/codegen/cc_aconfig_library_test.go
@@ -58,6 +58,26 @@
srcs: ["server_configurable_flags.cc"],
}
+ cc_library {
+ name: "libbase",
+ srcs: ["libbase.cc"],
+ }
+
+ cc_library {
+ name: "liblog",
+ srcs: ["liblog.cc"],
+ }
+
+ cc_library {
+ name: "libaconfig_storage_read_api_cc",
+ srcs: ["libaconfig_storage_read_api_cc.cc"],
+ }
+
+ cc_library {
+ name: "libaconfig_storage_protos_cc",
+ srcs: ["libaconfig_storage_protos_cc.cc"],
+ }
+
cc_aconfig_library {
name: "my_cc_aconfig_library",
aconfig_declarations: "my_aconfig_declarations",
@@ -100,6 +120,27 @@
srcs: ["server_configurable_flags.cc"],
}
+ cc_library {
+ name: "libbase",
+ srcs: ["libbase.cc"],
+ }
+
+ cc_library {
+ name: "liblog",
+ srcs: ["liblog.cc"],
+ }
+
+ cc_library {
+ name: "libaconfig_storage_read_api_cc",
+ srcs: ["libaconfig_storage_read_api_cc.cc"],
+ }
+
+ cc_library {
+ name: "libaconfig_storage_protos_cc",
+ srcs: ["libaconfig_storage_protos_cc.cc"],
+ }
+
+
cc_aconfig_library {
name: "my_cc_aconfig_library",
aconfig_declarations: "my_aconfig_declarations",
@@ -152,6 +193,30 @@
srcs: ["server_configurable_flags.cc"],
vendor_available: true,
}
+
+ cc_library {
+ name: "libbase",
+ srcs: ["libbase.cc"],
+ vendor_available: true,
+ }
+
+ cc_library {
+ name: "liblog",
+ srcs: ["liblog.cc"],
+ vendor_available: true,
+ }
+
+ cc_library {
+ name: "libaconfig_storage_read_api_cc",
+ srcs: ["libaconfig_storage_read_api_cc.cc"],
+ vendor_available: true,
+ }
+
+ cc_library {
+ name: "libaconfig_storage_protos_cc",
+ srcs: ["libaconfig_storage_protos_cc.cc"],
+ vendor_available: true,
+ }
`
result := android.GroupFixturePreparers(
PrepareForTestWithAconfigBuildComponents,