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 | |
| 15 | java_binary { |
| 16 | name: "incident-helper-cmd", |
| 17 | wrapper: "incident_helper_cmd", |
| 18 | srcs: [ |
| 19 | "java/**/*.java", |
| 20 | ], |
| 21 | proto: { |
| 22 | plugin: "javastream", |
| 23 | }, |
| 24 | } |
| 25 | |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 26 | cc_defaults { |
| 27 | name: "incident_helper_defaults", |
| 28 | |
| 29 | cflags: [ |
| 30 | "-Wall", |
| 31 | "-Werror", |
| 32 | "-g", |
| 33 | "-O0" |
| 34 | ], |
| 35 | |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 36 | local_include_dirs: [ |
| 37 | "src/", |
| 38 | "src/parsers/", |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 39 | ], |
| 40 | |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 41 | srcs: [ |
| 42 | "src/parsers/*.cpp", |
| 43 | "src/TextParserBase.cpp", |
| 44 | "src/ih_util.cpp", |
| 45 | ], |
| 46 | |
Mike Ma | a47ad72 | 2020-01-28 22:04:20 -0800 | [diff] [blame] | 47 | generated_headers: ["framework-cppstream-protos"], |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 48 | |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 49 | shared_libs: [ |
| 50 | "libbase", |
| 51 | "liblog", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 52 | "libprotoutil", |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 53 | "libutils", |
| 54 | ], |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | cc_binary { |
| 58 | name: "incident_helper", |
| 59 | defaults: ["incident_helper_defaults"], |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 60 | srcs: ["src/main.cpp"], |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | |
| 64 | cc_test { |
| 65 | name: "incident_helper_test", |
Yi Jin | 5e4ce2c | 2017-11-13 21:06:26 -0800 | [diff] [blame] | 66 | test_suites: ["device-tests"], |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 67 | defaults: ["incident_helper_defaults"], |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 68 | local_include_dirs: ["src/"], |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 69 | |
| 70 | srcs: [ |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 71 | "tests/*.cpp", |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 72 | ], |
| 73 | |
| 74 | data: [ |
| 75 | "testdata/*", |
| 76 | ], |
| 77 | |
| 78 | static_libs: [ |
| 79 | "libgmock", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 80 | "libplatformprotos" |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 81 | ], |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 82 | |
| 83 | shared_libs: [ |
| 84 | "libprotobuf-cpp-full" |
| 85 | ], |
| 86 | proto: { |
| 87 | type: "full", |
| 88 | }, |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 89 | } |