• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// MAP API module
2
3java_library {
4    name: "bluetooth.mapsapi",
5
6    srcs: ["lib/mapapi/**/*.java"],
7}
8
9// Bluetooth JNI
10
11cc_library_shared {
12    name: "libbluetooth_jni",
13    srcs: ["jni/**/*.cpp"],
14    header_libs: ["libbluetooth_headers"],
15    include_dirs: [
16        "system/bt/types",
17    ],
18    shared_libs: [
19        "libbase",
20        "libchrome",
21        "liblog",
22    ],
23    static_libs: [
24        "libbluetooth-types",
25        // TODO(b/148645937) move this back to shared_libs
26        "libnativehelper",
27    ],
28    cflags: [
29        "-Wall",
30        "-Werror",
31        "-Wextra",
32        "-Wno-unused-parameter",
33    ],
34    sanitize: {
35        scs: true,
36    },
37}
38
39// Bluetooth APK
40
41android_app {
42    name: "Bluetooth",
43
44    srcs: [
45        "src/**/*.java",
46        ":statslog-bluetooth-java-gen",
47    ],
48    platform_apis: true,
49    certificate: "platform",
50
51    jni_libs: ["libbluetooth_jni"],
52    libs: [
53        "javax.obex",
54        "services.net",
55    ],
56    static_libs: [
57        "com.android.vcard",
58        "bluetooth.mapsapi",
59        "sap-api-java-static",
60        "services.net",
61        "libprotobuf-java-lite",
62        "bluetooth-protos-lite",
63        "androidx.core_core",
64        "androidx.legacy_legacy-support-v4",
65        "androidx.lifecycle_lifecycle-livedata",
66        "androidx.room_room-runtime",
67        "guava",
68    ],
69
70    plugins: [
71        "androidx.room_room-compiler-plugin",
72    ],
73
74    // Add in path to Bluetooth directory because local path does not exist
75    javacflags: ["-Aroom.schemaLocation=packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/storage/schemas"],
76
77    optimize: {
78        enabled: false,
79    },
80    required: ["libbluetooth"],
81    apex_available: [
82        "//apex_available:platform",
83        "com.android.bluetooth.updatable",
84    ],
85}
86
87genrule {
88    name: "statslog-bluetooth-java-gen",
89    tools: ["stats-log-api-gen"],
90    cmd: "$(location stats-log-api-gen) --java $(out) --module bluetooth"
91        + " --javaPackage com.android.bluetooth --javaClass BluetoothStatsLog --worksource",
92    out: ["com/android/bluetooth/BluetoothStatsLog.java"],
93}
94