1package { 2 default_applicable_licenses: ["Android-Apache-2.0"], 3} 4 5genrule { 6 name: "statslog-telecom-java-gen", 7 tools: ["stats-log-api-gen"], 8 cmd: "$(location stats-log-api-gen) --java $(out) --module telecom" 9 + " --javaPackage com.android.server.telecom --javaClass TelecomStatsLog", 10 out: ["com/android/server/telecom/TelecomStatsLog.java"], 11} 12 13filegroup { 14 name: "Telecom-srcs", 15 srcs: [ 16 "src/**/*.java", 17 ":statslog-telecom-java-gen", 18 ], 19} 20 21// Build the Telecom service. 22android_app { 23 name: "Telecom", 24 srcs: [ 25 ":Telecom-srcs", 26 "proto/**/*.proto", 27 ], 28 resource_dirs: ["res"], 29 proto: { 30 type: "nano", 31 local_include_dirs: ["proto/"], 32 output_params: ["optional_field_style=accessors"], 33 }, 34 platform_apis: true, 35 certificate: "platform", 36 privileged: true, 37 optimize: { 38 proguard_flags_files: ["proguard.flags"], 39 }, 40 defaults: ["SettingsLibDefaults"], 41} 42 43android_test { 44 name: "TelecomUnitTests", 45 static_libs: [ 46 "android-ex-camera2", 47 "guava", 48 "mockito-target-extended", 49 "androidx.test.rules", 50 "platform-test-annotations", 51 "androidx.legacy_legacy-support-core-ui", 52 "androidx.legacy_legacy-support-core-utils", 53 "androidx.core_core", 54 "androidx.fragment_fragment", 55 "androidx.test.ext.junit" 56 ], 57 srcs: [ 58 "tests/src/**/*.java", 59 ":Telecom-srcs", 60 "proto/**/*.proto", 61 ], 62 proto: { 63 type: "nano", 64 local_include_dirs: ["proto/"], 65 output_params: ["optional_field_style=accessors"], 66 }, 67 resource_dirs: [ 68 "tests/res", 69 "res", 70 ], 71 libs: [ 72 "android.test.mock", 73 "android.test.base", 74 "android.test.runner", 75 ], 76 77 jni_libs: [ 78 "libdexmakerjvmtiagent", 79 "libstaticjvmtiagent", 80 ], 81 82 aaptflags: [ 83 "--auto-add-overlay", 84 "--extra-packages", 85 "com.android.server.telecom", 86 ], 87 manifest: "tests/AndroidManifest.xml", 88 optimize: { 89 enabled: false, 90 }, 91 platform_apis: true, 92 certificate: "platform", 93 jacoco: { 94 include_filter: ["com.android.server.telecom.*"], 95 exclude_filter: ["com.android.server.telecom.tests.*"], 96 }, 97 test_suites: ["device-tests"], 98 defaults: ["SettingsLibDefaults"], 99} 100