Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 1 | // Copyright (C) 2018 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 | bootstrap_go_package { |
| 16 | name: "aidl-soong-rules", |
| 17 | pkgPath: "android/soong/aidl", |
| 18 | deps: [ |
| 19 | "blueprint", |
| 20 | "soong", |
Jooyung Han | 1150b2a | 2020-08-18 15:43:56 +0900 | [diff] [blame] | 21 | "soong-apex", |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 22 | "soong-android", |
| 23 | "soong-cc", |
| 24 | "soong-genrule", |
| 25 | "soong-phony", |
| 26 | "soong-java", |
Andrei Homescu | b62afd9 | 2020-05-11 19:24:59 -0700 | [diff] [blame] | 27 | "soong-rust", |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 28 | ], |
| 29 | srcs: [ |
| 30 | "aidl_interface.go", |
| 31 | "properties.go", |
| 32 | ], |
Jooyung Han | 63a926a | 2019-12-09 11:07:20 +0900 | [diff] [blame] | 33 | testSrcs: [ |
| 34 | "aidl_test.go", |
| 35 | ], |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 36 | pluginFor: ["soong_build"], |
| 37 | } |
| 38 | |
Steven Moreland | 74d3f55 | 2020-02-04 15:57:50 -0800 | [diff] [blame] | 39 | aidl_interfaces_metadata { |
| 40 | name: "aidl_metadata_json", |
| 41 | visibility: ["//system/tools/aidl:__subpackages__"], |
| 42 | } |
| 43 | |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 44 | // These configurations are inherited by all aidl-gen modules |
| 45 | |
| 46 | cc_defaults { |
| 47 | name: "aidl-cpp-module-defaults", |
Steven Moreland | dca9d4b | 2019-09-20 18:42:24 +0000 | [diff] [blame] | 48 | // TODO(b/31559095): remove when host bionic is available |
| 49 | defaults: ["libbinder_ndk_host_user"], |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 50 | cflags: [ |
| 51 | "-Wall", |
| 52 | "-Werror", |
| 53 | "-Wextra-semi", |
| 54 | ], |
| 55 | } |
| 56 | |
| 57 | java_defaults { |
| 58 | name: "aidl-java-module-defaults", |
| 59 | } |
| 60 | |
Andrei Homescu | b62afd9 | 2020-05-11 19:24:59 -0700 | [diff] [blame] | 61 | rust_defaults { |
| 62 | name: "aidl-rust-module-defaults", |
| 63 | } |
| 64 | |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 65 | // Tests |
| 66 | |
Steven Moreland | f49719c | 2019-06-05 14:06:44 -0700 | [diff] [blame] | 67 | filegroup { |
| 68 | name: "aidl-test-filegroup", |
| 69 | srcs: [ |
| 70 | "tests_1/some_package/IFoo.aidl", |
| 71 | "tests_1/some_package/Thing.aidl", |
| 72 | "tests_1/some_package/sub_package/*.aidl", |
| 73 | ], |
| 74 | } |
| 75 | |
Steven Moreland | baab7f4 | 2019-02-11 12:38:56 -0800 | [diff] [blame] | 76 | // Copy of test-piece-1 as test only. Creating a separate library because 'vendor_available' is |
| 77 | // contagious. |
| 78 | aidl_interface { |
Steven Moreland | dca9d4b | 2019-09-20 18:42:24 +0000 | [diff] [blame] | 79 | name: "test-variants", |
Jiyong Park | a3617e6 | 2020-04-13 11:32:05 +0900 | [diff] [blame] | 80 | unstable: true, |
Steven Moreland | baab7f4 | 2019-02-11 12:38:56 -0800 | [diff] [blame] | 81 | local_include_dir: "tests_1", |
| 82 | vendor_available: true, |
Steven Moreland | dca9d4b | 2019-09-20 18:42:24 +0000 | [diff] [blame] | 83 | host_supported: true, |
Steven Moreland | baab7f4 | 2019-02-11 12:38:56 -0800 | [diff] [blame] | 84 | srcs: [ |
Steven Moreland | f49719c | 2019-06-05 14:06:44 -0700 | [diff] [blame] | 85 | ":aidl-test-filegroup", |
Steven Moreland | baab7f4 | 2019-02-11 12:38:56 -0800 | [diff] [blame] | 86 | ], |
| 87 | } |
| 88 | |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 89 | aidl_interface { |
| 90 | name: "test-piece-1", |
| 91 | local_include_dir: "tests_1", |
| 92 | srcs: [ |
| 93 | "tests_1/some_package/IFoo.aidl", |
| 94 | "tests_1/some_package/Thing.aidl", |
Steven Moreland | f49719c | 2019-06-05 14:06:44 -0700 | [diff] [blame] | 95 | "tests_1/some_package/sub_package/*.aidl", // testing glob w/o filegroup |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 96 | ], |
Jeongik Cha | 997281d | 2020-01-16 15:23:59 +0900 | [diff] [blame] | 97 | versions: [ |
| 98 | "1", |
| 99 | "2", |
| 100 | "3", |
| 101 | ], |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | aidl_interface { |
| 105 | name: "test-piece-2", |
| 106 | local_include_dir: "tests_1", |
| 107 | srcs: [ |
Steven Moreland | f3da089 | 2018-10-05 14:52:01 -0700 | [diff] [blame] | 108 | "tests_1/INoPackage.aidl", |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 109 | "tests_1/some_package/IBar.aidl", |
| 110 | ], |
| 111 | imports: [ |
| 112 | "test-piece-1", |
| 113 | ], |
Devin Moore | e2ccf8a | 2020-05-13 14:28:20 -0700 | [diff] [blame] | 114 | backend: { |
| 115 | java: { |
| 116 | platform_apis: true, |
| 117 | }, |
| 118 | }, |
Devin Moore | 7d5a454 | 2020-04-29 15:37:25 -0700 | [diff] [blame] | 119 | gen_trace: true, |
Jiyong Park | fce159b | 2018-09-20 15:24:52 +0900 | [diff] [blame] | 120 | versions: ["1"], |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | aidl_interface { |
| 124 | name: "test-piece-3", |
| 125 | local_include_dir: "tests_1", |
| 126 | srcs: [ |
| 127 | "tests_1/other_package/IBaz.aidl", |
| 128 | ], |
| 129 | imports: [ |
| 130 | "test-piece-2", |
| 131 | ], |
Devin Moore | e2ccf8a | 2020-05-13 14:28:20 -0700 | [diff] [blame] | 132 | backend: { |
| 133 | java: { |
| 134 | platform_apis: true, |
| 135 | }, |
| 136 | }, |
Devin Moore | 7d5a454 | 2020-04-29 15:37:25 -0700 | [diff] [blame] | 137 | gen_trace: true, |
Jiyong Park | fce159b | 2018-09-20 15:24:52 +0900 | [diff] [blame] | 138 | versions: ["1"], |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | aidl_interface { |
| 142 | name: "test-piece-4", |
| 143 | local_include_dir: "tests_2", |
| 144 | srcs: [ |
| 145 | "tests_2/another_package/IFaz.aidl", |
| 146 | ], |
| 147 | imports: [ |
| 148 | "test-piece-1", |
| 149 | ], |
Devin Moore | e2ccf8a | 2020-05-13 14:28:20 -0700 | [diff] [blame] | 150 | backend: { |
| 151 | java: { |
| 152 | platform_apis: true, |
| 153 | }, |
| 154 | }, |
Devin Moore | 7d5a454 | 2020-04-29 15:37:25 -0700 | [diff] [blame] | 155 | gen_trace: true, |
Jiyong Park | fce159b | 2018-09-20 15:24:52 +0900 | [diff] [blame] | 156 | versions: ["1"], |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 157 | } |
| 158 | |
| 159 | aidl_interface { |
| 160 | name: "test-root-package", |
| 161 | srcs: [ |
| 162 | "test_package/IBaz.aidl", |
| 163 | ], |
| 164 | imports: [ |
| 165 | "test-piece-2", |
| 166 | ], |
Devin Moore | e2ccf8a | 2020-05-13 14:28:20 -0700 | [diff] [blame] | 167 | backend: { |
| 168 | java: { |
| 169 | platform_apis: true, |
| 170 | }, |
| 171 | }, |
Devin Moore | 7d5a454 | 2020-04-29 15:37:25 -0700 | [diff] [blame] | 172 | gen_trace: true, |
Jeongik Cha | 997281d | 2020-01-16 15:23:59 +0900 | [diff] [blame] | 173 | versions: [ |
| 174 | "1", |
| 175 | "2", |
| 176 | ], |
Steven Moreland | 81079f9 | 2018-07-06 16:15:53 -0700 | [diff] [blame] | 177 | } |
Jeongik Cha | 969f11a | 2020-08-19 13:08:06 +0900 | [diff] [blame] | 178 | |
| 179 | aidl_interface { |
| 180 | name: "test-piece-5", |
| 181 | unstable: true, |
| 182 | local_include_dir: "tests_3", |
| 183 | srcs: [ |
| 184 | "tests_3/EmptyParcelable.aidl", |
| 185 | "tests_3/EmptyInterface.aidl", |
| 186 | ], |
| 187 | } |