xref: /aosp_15_r20/build/make/tools/compliance/Android.bp (revision 9e94795a3d4ef5c1d47486f9a02bb378756cea8a)
1//
2// Copyright (C) 2021 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
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20blueprint_go_binary {
21    name: "compliance_checkmetadata",
22    srcs: ["cmd/checkmetadata/checkmetadata.go"],
23    deps: [
24        "compliance-module",
25        "projectmetadata-module",
26        "soong-response",
27    ],
28    testSrcs: ["cmd/checkmetadata/checkmetadata_test.go"],
29}
30
31blueprint_go_binary {
32    name: "compliance_checkshare",
33    srcs: ["cmd/checkshare/checkshare.go"],
34    deps: [
35        "compliance-module",
36        "soong-response",
37    ],
38    testSrcs: ["cmd/checkshare/checkshare_test.go"],
39}
40
41blueprint_go_binary {
42    name: "compliancenotice_bom",
43    srcs: ["cmd/bom/bom.go"],
44    deps: [
45        "compliance-module",
46        "soong-response",
47    ],
48    testSrcs: ["cmd/bom/bom_test.go"],
49}
50
51blueprint_go_binary {
52    name: "compliancenotice_shippedlibs",
53    srcs: ["cmd/shippedlibs/shippedlibs.go"],
54    deps: [
55        "compliance-module",
56        "soong-response",
57    ],
58    testSrcs: ["cmd/shippedlibs/shippedlibs_test.go"],
59}
60
61blueprint_go_binary {
62    name: "compliance_listshare",
63    srcs: ["cmd/listshare/listshare.go"],
64    deps: [
65        "compliance-module",
66        "soong-response",
67    ],
68    testSrcs: ["cmd/listshare/listshare_test.go"],
69}
70
71blueprint_go_binary {
72    name: "compliance_dumpgraph",
73    srcs: ["cmd/dumpgraph/dumpgraph.go"],
74    deps: [
75        "compliance-module",
76        "soong-response",
77    ],
78    testSrcs: ["cmd/dumpgraph/dumpgraph_test.go"],
79}
80
81blueprint_go_binary {
82    name: "compliance_dumpresolutions",
83    srcs: ["cmd/dumpresolutions/dumpresolutions.go"],
84    deps: [
85        "compliance-module",
86        "soong-response",
87    ],
88    testSrcs: ["cmd/dumpresolutions/dumpresolutions_test.go"],
89}
90
91blueprint_go_binary {
92    name: "htmlnotice",
93    srcs: ["cmd/htmlnotice/htmlnotice.go"],
94    deps: [
95        "compliance-module",
96        "blueprint-deptools",
97        "soong-response",
98    ],
99    testSrcs: ["cmd/htmlnotice/htmlnotice_test.go"],
100}
101
102blueprint_go_binary {
103    name: "compliance_rtrace",
104    srcs: ["cmd/rtrace/rtrace.go"],
105    deps: [
106        "compliance-module",
107        "soong-response",
108    ],
109    testSrcs: ["cmd/rtrace/rtrace_test.go"],
110}
111
112blueprint_go_binary {
113    name: "textnotice",
114    srcs: ["cmd/textnotice/textnotice.go"],
115    deps: [
116        "compliance-module",
117        "blueprint-deptools",
118        "soong-response",
119    ],
120    testSrcs: ["cmd/textnotice/textnotice_test.go"],
121}
122
123blueprint_go_binary {
124    name: "xmlnotice",
125    srcs: ["cmd/xmlnotice/xmlnotice.go"],
126    deps: [
127        "compliance-module",
128        "blueprint-deptools",
129        "soong-response",
130    ],
131    testSrcs: ["cmd/xmlnotice/xmlnotice_test.go"],
132}
133
134blueprint_go_binary {
135    name: "compliance_sbom",
136    srcs: ["cmd/sbom/sbom.go"],
137    deps: [
138        "compliance-module",
139        "blueprint-deptools",
140        "soong-response",
141        "spdx-tools-spdxv2_2",
142        "spdx-tools-builder2v2",
143        "spdx-tools-spdxcommon",
144        "spdx-tools-spdx-json",
145        "spdx-tools-spdxlib",
146    ],
147    testSrcs: ["cmd/sbom/sbom_test.go"],
148}
149
150bootstrap_go_package {
151    name: "compliance-module",
152    srcs: [
153        "condition.go",
154        "conditionset.go",
155        "doc.go",
156        "graph.go",
157        "noticeindex.go",
158        "policy_policy.go",
159        "policy_resolve.go",
160        "policy_resolvenotices.go",
161        "policy_resolveshare.go",
162        "policy_resolveprivacy.go",
163        "policy_shareprivacyconflicts.go",
164        "policy_shipped.go",
165        "policy_walk.go",
166        "readgraph.go",
167        "resolution.go",
168        "resolutionset.go",
169    ],
170    testSrcs: [
171        "condition_test.go",
172        "conditionset_test.go",
173        "readgraph_test.go",
174        "policy_policy_test.go",
175        "policy_resolve_test.go",
176        "policy_resolvenotices_test.go",
177        "policy_resolveshare_test.go",
178        "policy_resolveprivacy_test.go",
179        "policy_shareprivacyconflicts_test.go",
180        "policy_shipped_test.go",
181        "policy_walk_test.go",
182        "resolutionset_test.go",
183        "test_util.go",
184    ],
185    deps: [
186        "compliance-test-fs-module",
187        "projectmetadata-module",
188        "golang-protobuf-proto",
189        "golang-protobuf-encoding-prototext",
190        "license_metadata_proto",
191    ],
192    pkgPath: "android/soong/tools/compliance",
193}
194