Convert build system to soong using Android.bp
* Convert top level Android.mk into build templates in build/Android.bp
and build/fluoride.go
* Initial conversion is done by "androidmk Android.mk > Android.bp"
* Android.bp does not allow source inclusion from external directories
and therefore they have to be made in to cc_library_static in their
respective sub-directories and linked using whole_static_libs in the
modules where they are used
* As Android.bp does not allow multiple modules of the same name,
same-name mudules for different target are merged into one definition
with target specific setup
* Generated proto header path has to be changed in osi/src/metrics.cc as
Android.bp only generate header path relative to the Android.bp file
instead of top-level directory such as system/bt
* Android.bp does not support resource copying yet and hence conf files
are left un-touched.
* Android.bp does support conditional module declaration and therefore
test-vendor libs are left untouched except for unit tests
* The goal of this CL is to direct (almost) translate Android.mk to
Android.bp first with Android.bp specific optimizations coming later
Bug: 32958753
Test: Code compilation, manual testing by test team
Change-Id: I5249e1f2135c4121205619b1d735ce448feb7499
diff --git a/device/Android.bp b/device/Android.bp
new file mode 100644
index 0000000..314dd50
--- /dev/null
+++ b/device/Android.bp
@@ -0,0 +1,45 @@
+// Bluetooth device static library for target
+// ========================================================
+cc_library_static {
+ name: "libbtdevice",
+ defaults: ["fluoride_defaults"],
+ local_include_dirs: [
+ "include",
+ ],
+ include_dirs: [
+ "system/bt",
+ "system/bt/btcore/include",
+ "system/bt/hci/include",
+ "system/bt/include",
+ "system/bt/stack/include",
+ ],
+ srcs: [
+ "src/controller.cc",
+ "src/interop.cc",
+ ],
+ shared_libs: [
+ "liblog",
+ ],
+}
+
+// Bluetooth device unit tests for target
+// ========================================================
+cc_test {
+ name: "net_test_device",
+ defaults: ["fluoride_defaults"],
+ include_dirs: ["system/bt"],
+ srcs: [
+ "test/interop_test.cc",
+ ],
+ shared_libs: [
+ "liblog",
+ "libdl",
+ ],
+ static_libs: [
+ "libbtdevice",
+ "libbtcore",
+ "libosi",
+ "libosi-AllocationTestHarness",
+ "libcutils",
+ ],
+}