blob: 1ec83a360048b02e1f0a841a0769ad1bd8a8f4ff [file] [log] [blame]
Dan Willemsend3eac262017-09-08 22:47:47 -07001//
2// Copyright (C) 2015 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17// ==========================================================
18// Build the host executable: protoc-gen-javastream
19// ==========================================================
Bob Badour8a6a2bc2021-02-12 17:07:05 -080020package {
21 // See: http://go/android-license-faq
22 // A large-scale-change added 'default_applicable_licenses' to import
23 // all of the 'license_kinds' from "frameworks_base_license"
24 // to get the below license kinds:
25 // SPDX-license-identifier-Apache-2.0
26 default_applicable_licenses: ["frameworks_base_license"],
27}
28
Yi Jin0473f88b2017-10-09 11:21:40 -070029cc_defaults {
30 name: "protoc-gen-stream-defaults",
Dan Willemsend3eac262017-09-08 22:47:47 -070031 srcs: [
32 "Errors.cpp",
Yi Jinf9ed04b2017-10-20 16:17:58 -070033 "stream_proto_utils.cpp",
Dan Willemsend3eac262017-09-08 22:47:47 -070034 "string_utils.cpp",
Yi Jin0473f88b2017-10-09 11:21:40 -070035 ],
Chih-Hung Hsieh548fdbd2017-12-05 10:11:02 -080036 cflags: [
37 "-Wall",
38 "-Werror",
39 ],
Yi Jinf9ed04b2017-10-20 16:17:58 -070040
Ryan Mitchell055e6182019-10-14 09:25:39 -070041 static_libs: ["libprotoc"],
Yi Jin0473f88b2017-10-09 11:21:40 -070042}
43
Yi Jin0473f88b2017-10-09 11:21:40 -070044cc_binary_host {
45 name: "protoc-gen-javastream",
46 srcs: [
47 "java/main.cpp",
Dan Willemsend3eac262017-09-08 22:47:47 -070048 ],
49
Yi Jin0473f88b2017-10-09 11:21:40 -070050 defaults: ["protoc-gen-stream-defaults"],
Yi Jin0473f88b2017-10-09 11:21:40 -070051}
52
53cc_binary_host {
54 name: "protoc-gen-cppstream",
55 srcs: [
56 "cpp/main.cpp",
57 ],
58
59 defaults: ["protoc-gen-stream-defaults"],
Dan Willemsend3eac262017-09-08 22:47:47 -070060}
Colin Cross45c0d712019-03-28 22:31:35 -070061
62// ==========================================================
63// Build the java test
64// ==========================================================
65java_library {
66 name: "StreamingProtoTest",
67 srcs: [
68 "test/**/*.java",
69 "test/**/*.proto",
70 ],
71 proto: {
72 plugin: "javastream",
73 },
74 static_libs: ["libprotobuf-java-lite"],
75}