Dan Albert | 2a8d9c2 | 2016-09-23 15:55:49 -0700 | [diff] [blame] | 1 | // Copyright (C) 2016 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 | |
Colin Cross | d8e0225 | 2017-10-02 17:14:22 -0700 | [diff] [blame] | 15 | // Build ext.jar |
| 16 | // ============================================================ |
| 17 | java_library { |
| 18 | name: "ext", |
| 19 | no_framework_libs: true, |
| 20 | static_libs: [ |
| 21 | "libphonenumber-platform", |
| 22 | "nist-sip", |
| 23 | "tagsoup", |
| 24 | ], |
| 25 | dxflags: ["--core-library"], |
| 26 | } |
| 27 | |
Colin Cross | aa0d435 | 2017-05-02 14:14:56 -0700 | [diff] [blame] | 28 | // ==== c++ proto device library ============================== |
| 29 | cc_library { |
| 30 | name: "libplatformprotos", |
| 31 | host_supported: true, |
Colin Cross | aa0d435 | 2017-05-02 14:14:56 -0700 | [diff] [blame] | 32 | proto: { |
| 33 | export_proto_headers: true, |
| 34 | include_dirs: ["external/protobuf/src"], |
| 35 | }, |
| 36 | |
Chih-Hung Hsieh | c7edf07 | 2017-10-03 09:57:55 -0700 | [diff] [blame] | 37 | cflags: [ |
| 38 | "-Wall", |
| 39 | "-Werror", |
| 40 | "-Wno-unused-parameter", |
| 41 | ], |
Colin Cross | aa0d435 | 2017-05-02 14:14:56 -0700 | [diff] [blame] | 42 | target: { |
| 43 | host: { |
| 44 | proto: { |
| 45 | type: "full", |
| 46 | }, |
John Reck | 915883b | 2017-05-03 10:27:20 -0700 | [diff] [blame] | 47 | srcs: [ |
| 48 | "core/proto/**/*.proto", |
| 49 | "libs/incident/**/*.proto", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 50 | "tools/streaming_proto/stream.proto", |
John Reck | 915883b | 2017-05-03 10:27:20 -0700 | [diff] [blame] | 51 | ], |
Colin Cross | aa0d435 | 2017-05-02 14:14:56 -0700 | [diff] [blame] | 52 | }, |
| 53 | android: { |
| 54 | proto: { |
| 55 | type: "lite", |
| 56 | }, |
John Reck | 915883b | 2017-05-03 10:27:20 -0700 | [diff] [blame] | 57 | // We only build the protos that are optimized for the lite |
| 58 | // runtime, as well as the only protos that are actually |
| 59 | // needed by the device. |
| 60 | srcs: [ |
Yi Jin | 0eb2234 | 2017-11-06 17:17:27 -0800 | [diff] [blame] | 61 | "core/proto/android/os/cpufreq.proto", |
Yi Jin | e2f7f79 | 2017-11-01 17:08:27 -0700 | [diff] [blame] | 62 | "core/proto/android/os/cpuinfo.proto", |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 63 | "core/proto/android/os/kernelwake.proto", |
Yi Jin | 810b14f | 2017-09-11 19:01:08 -0700 | [diff] [blame] | 64 | "core/proto/android/os/pagetypeinfo.proto", |
Yi Jin | b44f7d4 | 2017-07-21 12:12:59 -0700 | [diff] [blame] | 65 | "core/proto/android/os/procrank.proto", |
Yi Jin | 0dfa752 | 2017-11-06 17:43:47 -0800 | [diff] [blame] | 66 | "core/proto/android/os/system_properties.proto", |
John Reck | 915883b | 2017-05-03 10:27:20 -0700 | [diff] [blame] | 67 | "core/proto/android/service/graphicsstats.proto", |
Yi Jin | bdf5894 | 2017-11-14 17:58:19 -0800 | [diff] [blame^] | 68 | "libs/incident/proto/android/privacy.proto", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 69 | "tools/streaming_proto/stream.proto", |
John Reck | 915883b | 2017-05-03 10:27:20 -0700 | [diff] [blame] | 70 | ], |
Colin Cross | aa0d435 | 2017-05-02 14:14:56 -0700 | [diff] [blame] | 71 | shared: { |
Colin Cross | aa0d435 | 2017-05-02 14:14:56 -0700 | [diff] [blame] | 72 | enabled: false, |
| 73 | }, |
| 74 | }, |
| 75 | }, |
Colin Cross | aa0d435 | 2017-05-02 14:14:56 -0700 | [diff] [blame] | 76 | } |
| 77 | |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 78 | gensrcs { |
| 79 | name: "gen-platform-proto-constants", |
| 80 | depfile: true, |
| 81 | |
| 82 | tools: [ |
| 83 | "aprotoc", |
| 84 | "protoc-gen-cppstream", |
| 85 | ], |
| 86 | |
| 87 | srcs: [ |
Yi Jin | 0eb2234 | 2017-11-06 17:17:27 -0800 | [diff] [blame] | 88 | "core/proto/android/os/cpufreq.proto", |
Yi Jin | e2f7f79 | 2017-11-01 17:08:27 -0700 | [diff] [blame] | 89 | "core/proto/android/os/cpuinfo.proto", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 90 | "core/proto/android/os/kernelwake.proto", |
| 91 | "core/proto/android/os/pagetypeinfo.proto", |
| 92 | "core/proto/android/os/procrank.proto", |
Yi Jin | 0dfa752 | 2017-11-06 17:43:47 -0800 | [diff] [blame] | 93 | "core/proto/android/os/system_properties.proto", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 94 | ], |
| 95 | |
| 96 | // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool |
| 97 | cmd: "PATH=$$PATH:$$(dirname $(location protoc-gen-cppstream)) $(location aprotoc) --plugin=protoc-gen-cpp-stream=$(location protoc-gen-cppstream) --dependency_out=$(depfile) --cppstream_out=$(genDir)/ -Iexternal/protobuf/src -I . $(in)", |
| 98 | |
| 99 | output_extension = "proto.h", |
| 100 | } |
| 101 | |
Dan Albert | 2a8d9c2 | 2016-09-23 15:55:49 -0700 | [diff] [blame] | 102 | subdirs = [ |
Yi Jin | 0a3406f | 2017-06-22 19:23:11 -0700 | [diff] [blame] | 103 | "cmds/*", |
Jeff Sharkey | 0c686e7 | 2017-10-23 16:04:31 -0600 | [diff] [blame] | 104 | "core/*", |
Colin Cross | 4f8d9e6 | 2016-12-01 15:55:00 -0800 | [diff] [blame] | 105 | "libs/*", |
Colin Cross | 76de4f6 | 2017-05-15 18:10:40 -0700 | [diff] [blame] | 106 | "media/*", |
Colin Cross | 747e7c1 | 2017-10-24 16:21:22 -0700 | [diff] [blame] | 107 | "proto", |
Fabien Sanglard | 1916020 | 2017-01-12 14:24:31 -0500 | [diff] [blame] | 108 | "tools/*", |
Dan Albert | 2a8d9c2 | 2016-09-23 15:55:49 -0700 | [diff] [blame] | 109 | "native/android", |
Dan Albert | 7ce8df3 | 2016-09-23 16:43:49 -0700 | [diff] [blame] | 110 | "native/graphics/jni", |
Dan Albert | 2a8d9c2 | 2016-09-23 15:55:49 -0700 | [diff] [blame] | 111 | ] |
Svetoslav Ganov | 74c9983 | 2016-12-05 20:07:20 -0800 | [diff] [blame] | 112 | |
| 113 | optional_subdirs = [ |
| 114 | "core/tests/utiltests/jni", |
| 115 | ] |
Steven Moreland | eddafe9 | 2017-10-02 16:58:41 -0700 | [diff] [blame] | 116 | |
| 117 | java_library { |
| 118 | name: "hwbinder", |
| 119 | no_framework_libs: true, |
| 120 | |
| 121 | srcs: [ |
| 122 | "core/java/android/os/HidlSupport.java", |
| 123 | "core/java/android/annotation/NonNull.java", |
| 124 | "core/java/android/os/HwBinder.java", |
| 125 | "core/java/android/os/HwBlob.java", |
| 126 | "core/java/android/os/HwParcel.java", |
| 127 | "core/java/android/os/IHwBinder.java", |
| 128 | "core/java/android/os/IHwInterface.java", |
| 129 | "core/java/android/os/DeadObjectException.java", |
| 130 | "core/java/android/os/DeadSystemException.java", |
| 131 | "core/java/android/os/RemoteException.java", |
| 132 | "core/java/android/util/AndroidException.java", |
| 133 | ], |
| 134 | |
| 135 | dxflags: ["--core-library"], |
| 136 | installable: false, |
| 137 | } |
Nan Zhang | 2db709d | 2017-11-08 20:48:46 -0800 | [diff] [blame] | 138 | |
| 139 | python_defaults { |
| 140 | name: "base_default", |
| 141 | version: { |
| 142 | py2: { |
| 143 | enabled: true, |
| 144 | embedded_launcher: true, |
| 145 | }, |
| 146 | py3: { |
| 147 | enabled: false, |
| 148 | embedded_launcher: false, |
| 149 | }, |
| 150 | }, |
| 151 | } |
| 152 | |
| 153 | python_binary_host { |
| 154 | name: "fontchain_linter", |
| 155 | defaults: ["base_default"], |
| 156 | main: "tools/fonts/fontchain_linter.py", |
| 157 | srcs: [ |
| 158 | "tools/fonts/fontchain_linter.py", |
| 159 | ], |
| 160 | libs: [ |
| 161 | "fontTools", |
| 162 | ], |
| 163 | } |