xref: /aosp_15_r20/build/blueprint/Android.bp (revision 1fa6dee971e1612fa5cc0aa5ca2d35a22e2c34a3)
1package {
2    default_applicable_licenses: ["build_blueprint_license"],
3    default_visibility: [
4        "//build/blueprint:__subpackages__",
5        "//build/soong:__subpackages__",
6    ],
7}
8
9// Added automatically by a large-scale-change that took the approach of
10// 'apply every license found to every target'. While this makes sure we respect
11// every license restriction, it may not be entirely correct.
12//
13// e.g. GPL in an MIT project might only apply to the contrib/ directory.
14//
15// Please consider splitting the single license below into multiple licenses,
16// taking care not to lose any license_kind information, and overriding the
17// default license using the 'licenses: [...]' property on targets as needed.
18//
19// For unused files, consider creating a 'fileGroup' with "//visibility:private"
20// to attach the license to, and including a comment whether the files may be
21// used in the current project.
22// See: http://go/android-license-faq
23license {
24    name: "build_blueprint_license",
25    visibility: [":__subpackages__"],
26    license_kinds: [
27        "SPDX-license-identifier-Apache-2.0",
28        "SPDX-license-identifier-BSD",
29    ],
30    license_text: [
31        "LICENSE",
32    ],
33}
34
35bootstrap_go_package {
36    name: "blueprint",
37    deps: [
38        "blueprint-gobtools",
39        "blueprint-metrics",
40        "blueprint-parser",
41        "blueprint-pathtools",
42        "blueprint-proptools",
43    ],
44    pkgPath: "github.com/google/blueprint",
45    srcs: [
46        "context.go",
47        "incremental.go",
48        "levenshtein.go",
49        "glob.go",
50        "live_tracker.go",
51        "mangle.go",
52        "module_ctx.go",
53        "name_interface.go",
54        "ninja_defs.go",
55        "ninja_strings.go",
56        "ninja_writer.go",
57        "package_ctx.go",
58        "provider.go",
59        "scope.go",
60        "singleton_ctx.go",
61        "source_file_provider.go",
62        "transition.go",
63    ],
64    testSrcs: [
65        "context_test.go",
66        "levenshtein_test.go",
67        "glob_test.go",
68        "module_ctx_test.go",
69        "ninja_strings_test.go",
70        "ninja_writer_test.go",
71        "provider_test.go",
72        "splice_modules_test.go",
73        "transition_test.go",
74        "visit_test.go",
75    ],
76    visibility: [
77        // used by plugins
78        "//visibility:public",
79    ],
80}
81
82bootstrap_go_package {
83    name: "blueprint-parser",
84    pkgPath: "github.com/google/blueprint/parser",
85    srcs: [
86        "parser/ast.go",
87        "parser/modify.go",
88        "parser/parser.go",
89        "parser/printer.go",
90        "parser/sort.go",
91    ],
92    testSrcs: [
93        "parser/modify_test.go",
94        "parser/parser_test.go",
95        "parser/printer_test.go",
96        "parser/sort_test.go",
97    ],
98    visibility: [
99        "//build/blueprint:__subpackages__",
100        "//build/soong:__subpackages__",
101        "//development/vndk/tools/elfcheck",
102        "//tools/security/fuzzing/fuzzer_parser",
103        "//vendor:__subpackages__",
104    ],
105}
106
107bootstrap_go_package {
108    name: "blueprint-deptools",
109    pkgPath: "github.com/google/blueprint/deptools",
110    srcs: ["deptools/depfile.go"],
111    visibility: [
112        "//build/blueprint:__subpackages__",
113        "//build/make/tools/compliance",
114        "//build/soong:__subpackages__",
115    ],
116}
117
118bootstrap_go_package {
119    name: "blueprint-pathtools",
120    pkgPath: "github.com/google/blueprint/pathtools",
121    deps: [
122        "blueprint-deptools",
123    ],
124    srcs: [
125        "pathtools/lists.go",
126        "pathtools/fs.go",
127        "pathtools/glob.go",
128    ],
129    testSrcs: [
130        "pathtools/fs_test.go",
131        "pathtools/glob_test.go",
132        "pathtools/lists_test.go",
133    ],
134    visibility: [
135        // used by plugins
136        "//visibility:public",
137    ],
138}
139
140bootstrap_go_package {
141    name: "blueprint-proptools",
142    pkgPath: "github.com/google/blueprint/proptools",
143    deps: [
144        "blueprint-parser",
145        "blueprint-optional",
146    ],
147    srcs: [
148        "proptools/clone.go",
149        "proptools/configurable.go",
150        "proptools/escape.go",
151        "proptools/extend.go",
152        "proptools/filter.go",
153        "proptools/hash_provider.go",
154        "proptools/proptools.go",
155        "proptools/repack.go",
156        "proptools/tag.go",
157        "proptools/typeequal.go",
158        "proptools/unpack.go",
159        "proptools/utils.go",
160    ],
161    testSrcs: [
162        "proptools/clone_test.go",
163        "proptools/configurable_test.go",
164        "proptools/escape_test.go",
165        "proptools/extend_test.go",
166        "proptools/filter_test.go",
167        "proptools/hash_provider_test.go",
168        "proptools/repack_test.go",
169        "proptools/tag_test.go",
170        "proptools/typeequal_test.go",
171        "proptools/unpack_test.go",
172    ],
173    visibility: [
174        // used by plugins
175        "//visibility:public",
176    ],
177}
178
179bootstrap_go_package {
180    name: "blueprint-optional",
181    pkgPath: "github.com/google/blueprint/optional",
182    srcs: [
183        "optional/optional.go",
184    ],
185}
186
187bootstrap_go_package {
188    name: "blueprint-bootstrap",
189    deps: [
190        "blueprint",
191        "blueprint-deptools",
192        "blueprint-pathtools",
193        "blueprint-bootstrap-bpdoc",
194    ],
195    pkgPath: "github.com/google/blueprint/bootstrap",
196    srcs: [
197        "bootstrap/bootstrap.go",
198        "bootstrap/command.go",
199        "bootstrap/config.go",
200        "bootstrap/writedocs.go",
201    ],
202}
203
204bootstrap_go_package {
205    name: "blueprint-bootstrap-bpdoc",
206    deps: [
207        "blueprint",
208        "blueprint-proptools",
209    ],
210    pkgPath: "github.com/google/blueprint/bootstrap/bpdoc",
211    srcs: [
212        "bootstrap/bpdoc/bpdoc.go",
213        "bootstrap/bpdoc/properties.go",
214        "bootstrap/bpdoc/reader.go",
215    ],
216    testSrcs: [
217        "bootstrap/bpdoc/bpdoc_test.go",
218        "bootstrap/bpdoc/properties_test.go",
219        "bootstrap/bpdoc/reader_test.go",
220    ],
221}
222
223blueprint_go_binary {
224    name: "bpfmt",
225    deps: ["blueprint-parser"],
226    srcs: ["bpfmt/bpfmt.go"],
227    visibility: [
228        "//development/tools/cargo_embargo",
229        "//tools/external_updater",
230    ],
231}
232
233blueprint_go_binary {
234    name: "gotestmain",
235    srcs: ["gotestmain/gotestmain.go"],
236}
237
238// gotestmain tests can't be on the gotestmain module because it is an implicit dependency of tests.
239// Put the tests in their own package and make it a dependency of minibp to make sure they run.
240bootstrap_go_package {
241    name: "gotestmain-tests",
242    pkgPath: "github.com/google/blueprint/gotestmain",
243    srcs: [
244        "gotestmain/dummy.go",
245    ],
246    testSrcs: [
247        "gotestmain/testmain_test.go",
248    ],
249}
250
251blueprint_go_binary {
252    name: "gotestrunner",
253    srcs: ["gotestrunner/gotestrunner.go"],
254}
255
256blueprint_go_binary {
257    name: "loadplugins",
258    srcs: ["loadplugins/loadplugins.go"],
259}
260
261blueprint_go_binary {
262    name: "microfactory",
263    deps: ["blueprint-microfactory"],
264    srcs: ["microfactory/main/main.go"],
265}
266
267bootstrap_go_package {
268    name: "blueprint-microfactory",
269    pkgPath: "github.com/google/blueprint/microfactory",
270    srcs: ["microfactory/microfactory.go"],
271    testSrcs: ["microfactory/microfactory_test.go"],
272}
273