Mike Ma | 22ff08b | 2020-01-09 11:25:47 -0800 | [diff] [blame] | 1 | // Copyright (C) 2017 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | e539dba | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "frameworks_base_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["frameworks_base_license"], |
| 22 | } |
| 23 | |
Mike Ma | 22ff08b | 2020-01-09 11:25:47 -0800 | [diff] [blame] | 24 | java_binary { |
| 25 | name: "incident-helper-cmd", |
| 26 | wrapper: "incident_helper_cmd", |
| 27 | srcs: [ |
| 28 | "java/**/*.java", |
| 29 | ], |
| 30 | proto: { |
| 31 | plugin: "javastream", |
| 32 | }, |
| 33 | } |
| 34 | |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 35 | cc_defaults { |
| 36 | name: "incident_helper_defaults", |
| 37 | |
| 38 | cflags: [ |
| 39 | "-Wall", |
| 40 | "-Werror", |
| 41 | "-g", |
| 42 | "-O0" |
| 43 | ], |
| 44 | |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 45 | local_include_dirs: [ |
| 46 | "src/", |
| 47 | "src/parsers/", |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 48 | ], |
| 49 | |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 50 | srcs: [ |
| 51 | "src/parsers/*.cpp", |
| 52 | "src/TextParserBase.cpp", |
| 53 | "src/ih_util.cpp", |
| 54 | ], |
| 55 | |
Mike Ma | a47ad72 | 2020-01-28 22:04:20 -0800 | [diff] [blame] | 56 | generated_headers: ["framework-cppstream-protos"], |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 57 | |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 58 | shared_libs: [ |
| 59 | "libbase", |
| 60 | "liblog", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 61 | "libprotoutil", |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 62 | "libutils", |
| 63 | ], |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | cc_binary { |
| 67 | name: "incident_helper", |
| 68 | defaults: ["incident_helper_defaults"], |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 69 | srcs: ["src/main.cpp"], |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | |
| 73 | cc_test { |
| 74 | name: "incident_helper_test", |
Yi Jin | 5e4ce2c | 2017-11-13 21:06:26 -0800 | [diff] [blame] | 75 | test_suites: ["device-tests"], |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 76 | defaults: ["incident_helper_defaults"], |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 77 | local_include_dirs: ["src/"], |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 78 | |
| 79 | srcs: [ |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 80 | "tests/*.cpp", |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 81 | ], |
| 82 | |
| 83 | data: [ |
| 84 | "testdata/*", |
| 85 | ], |
| 86 | |
| 87 | static_libs: [ |
| 88 | "libgmock", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 89 | "libplatformprotos" |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 90 | ], |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 91 | |
| 92 | shared_libs: [ |
| 93 | "libprotobuf-cpp-full" |
| 94 | ], |
| 95 | proto: { |
| 96 | type: "full", |
| 97 | }, |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 98 | } |