1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5java_defaults {
6    name: "BluetoothInstrumentationTestsDefaults",
7    defaults: ["framework-bluetooth-tests-defaults"],
8
9    min_sdk_version: "Tiramisu",
10    target_sdk_version: "current",
11    libs: [
12        "android.test.base",
13        "android.test.mock",
14        "android.test.runner",
15        "javax.obex",
16        "libprotobuf-java-micro",
17        "telephony-common",
18    ],
19
20    static_libs: [
21        "PlatformProperties",
22        "androidx.media_media",
23        "androidx.room_room-migration",
24        "androidx.room_room-runtime",
25        "androidx.room_room-testing",
26        "androidx.test.espresso.intents",
27        "androidx.test.ext.truth",
28        "androidx.test.rules",
29        "androidx.test.uiautomator_uiautomator",
30        "com.android.sysprop.bluetooth",
31        "flag-junit",
32        "framework-bluetooth-pre-jarjar",
33        "frameworks-base-testutils",
34        "gson",
35        "mockito-target",
36        "platform-parametric-runner-lib",
37        "platform-test-annotations",
38        "truth",
39    ],
40
41    asset_dirs: ["src/com/android/bluetooth/btservice/storage/schemas"],
42
43    // Include all test java files.
44    srcs: ["src/**/*.java"],
45    jacoco: {
46        include_filter: ["android.bluetooth.*"],
47        exclude_filter: [],
48    },
49    platform_apis: true,
50
51    test_suites: [
52        "automotive-tests",
53        "general-tests",
54        "mts-bluetooth",
55    ],
56
57    errorprone: {
58        enabled: true,
59        javacflags: [
60            "-Xep:AlmostJavadoc:ERROR",
61            "-Xep:BadImport:ERROR",
62            "-Xep:CatchFail:ERROR",
63            "-Xep:ClassCanBeStatic:ERROR",
64            "-Xep:EmptyBlockTag:ERROR",
65            "-Xep:EmptyCatch:ERROR",
66            "-Xep:FutureReturnValueIgnored:ERROR",
67            "-Xep:InlineMeInliner:ERROR",
68            "-Xep:InvalidBlockTag:ERROR",
69            "-Xep:InvalidInlineTag:ERROR",
70            "-Xep:InvalidParam:ERROR",
71            "-Xep:MockNotUsedInProduction:ERROR",
72            "-Xep:NonApiType:ERROR",
73            "-Xep:NonCanonicalType:ERROR",
74            "-Xep:ReturnAtTheEndOfVoidFunction:ERROR",
75            "-Xep:StringCharset:ERROR",
76            "-Xep:UnnecessaryAssignment:ERROR",
77            "-Xep:UnnecessaryAsync:ERROR",
78            "-Xep:UnusedMethod:ERROR",
79            "-Xep:UnusedVariable:ERROR",
80        ],
81    },
82
83    instrumentation_for: "Bluetooth",
84}
85
86android_test {
87    name: "BluetoothInstrumentationTests",
88    defaults: ["BluetoothInstrumentationTestsDefaults"],
89}
90
91android_test {
92    name: "GoogleBluetoothInstrumentationTests",
93    defaults: ["BluetoothInstrumentationTestsDefaults"],
94    test_config: "GoogleAndroidTest.xml",
95    instrumentation_target_package: "com.google.android.bluetooth",
96}
97