xref: /aosp_15_r20/prebuilts/tools/common/m2/Android.bp (revision 6774467a9462441f7cd7fbc651979727f762377a)
1// Copyright (C) 2010 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
15package {
16    default_applicable_licenses: ["prebuilts_tools_common_m2_license"],
17}
18
19// Added automatically by a large-scale-change that took the approach of
20// 'apply every license found to every target'. While this makes sure we respect
21// every license restriction, it may not be entirely correct.
22//
23// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24//
25// Please consider splitting the single license below into multiple licenses,
26// taking care not to lose any license_kind information, and overriding the
27// default license using the 'licenses: [...]' property on targets as needed.
28//
29// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30// to attach the license to, and including a comment whether the files may be
31// used in the current project.
32// See: http://go/android-license-faq
33license {
34    name: "prebuilts_tools_common_m2_license",
35    visibility: [":__subpackages__"],
36    license_kinds: [
37        "legacy_notice",
38        "SPDX-license-identifier-Apache-2.0",
39        "SPDX-license-identifier-BSD",
40        "SPDX-license-identifier-CC0-1.0",
41        "SPDX-license-identifier-CC-BY",
42        "SPDX-license-identifier-CDDL",
43        "SPDX-license-identifier-CDDL-1.0",
44        "SPDX-license-identifier-CPL-1.0",
45        "SPDX-license-identifier-EPL",
46        "SPDX-license-identifier-GPL",
47        "SPDX-license-identifier-GPL-2.0",
48        "SPDX-license-identifier-ISC",
49        "SPDX-license-identifier-LGPL",
50        "SPDX-license-identifier-LGPL-2.1",
51        "SPDX-license-identifier-LGPL-3.0",
52        "SPDX-license-identifier-MIT",
53        "SPDX-license-identifier-MPL",
54        "SPDX-license-identifier-MPL-1.0",
55        "SPDX-license-identifier-MPL-1.1",
56        "SPDX-license-identifier-MPL-2.0",
57    ],
58    license_text: [
59        "LICENSE",
60    ],
61}
62
63license {
64    name: "m2_guava_license",
65    visibility: [":__subpackages__"],
66    license_kinds: [
67        "SPDX-license-identifier-Apache-2.0",
68    ],
69    license_text: [
70        "repository/com/google/guava/LICENSE.txt",
71    ],
72}
73
74license {
75    name: "m2_java_diff_license",
76    visibility: [":__subpackages__"],
77    license_kinds: [
78        "SPDX-license-identifier-Apache-2.0",
79    ],
80    license_text: [
81        "repository/com/googlecode/java-diff-utils/diffutils/LICENSE.txt",
82    ],
83}
84
85license {
86    name: "m2_javax_annotation_license",
87    visibility: [":__subpackages__"],
88    license_kinds: [
89        "SPDX-license-identifier-CDDL",
90        "SPDX-license-identifier-CDDL-1.0",
91        "SPDX-license-identifier-GPL-2.0-with-classpath-exception",
92    ],
93    license_text: [
94        "repository/javax/annotation/javax.annotation-api/NOTICE",
95    ],
96}
97
98license {
99    name: "m2_api_grpc_license",
100    visibility: [":__subpackages__"],
101    license_kinds: [
102        "SPDX-license-identifier-Apache-2.0",
103    ],
104    license_text: [
105        "repository/com/google/api/grpc/LICENSE",
106    ],
107}
108
109license {
110    name: "m2_joda_time_2.9.1_license",
111    visibility: [":__subpackages__"],
112    license_kinds: [
113        "SPDX-license-identifier-Apache-2.0",
114    ],
115    license_text: [
116        "repository/joda-time/joda-time/2.9.1/LICENSE",
117    ],
118}
119
120license {
121    name: "m2_google_auth_0.13.0_license",
122    visibility: [":__subpackages__"],
123    license_kinds: [
124        "SPDX-license-identifier-BSD-3-Clause",
125    ],
126    license_text: [
127        "repository/com/google/auth/google-auth-library-credentials/0.13.0/LICENSE",
128        "repository/com/google/auth/google-auth-library-oauth2-http/0.13.0/LICENSE",
129    ],
130}
131
132license {
133    name: "m2_google_auth_1.23.0_license",
134    visibility: [":__subpackages__"],
135    license_kinds: [
136        "SPDX-license-identifier-BSD-3-Clause",
137    ],
138    license_text: [
139        "repository/com/google/auth/google-auth-library-oauth2-http/1.23.0/LICENSE",
140    ],
141}
142
143license {
144    name: "m2_grpc_netty_shaded_1.16.1_license",
145    visibility: [":__subpackages__"],
146    license_kinds: [
147        "SPDX-license-identifier-Apache-2.0",
148    ],
149    license_text: [
150        "repository/io/grpc/grpc-netty-shaded/1.16.1/LICENSE",
151    ],
152}
153
154license {
155    name: "m2_grpc_netty_shaded_1.56.0_license",
156    visibility: [":__subpackages__"],
157    license_kinds: [
158        "SPDX-license-identifier-Apache-2.0",
159    ],
160    license_text: [
161        "repository/io/grpc/grpc-netty-shaded/1.56.0/LICENSE",
162    ],
163}
164
165license {
166    name: "m2_checker_qual_jar_license",
167    visibility: [":__subpackages__"],
168    license_kinds: [
169        "SPDX-license-identifier-MIT",
170    ],
171    license_text: [
172        "repository/org/checkerframework/LICENSE",
173    ],
174}
175
176license {
177    name: "m2_jna_3.4.0_license",
178    visibility: [":__subpackages__"],
179    license_kinds: [
180        "SPDX-license-identifier-LGPL-2.1",
181    ],
182    license_text: [
183        "repository/net/java/dev/jna/jna/3.4.0/LICENSE",
184    ],
185}
186
187license {
188    name: "m2_turbine_license",
189    visibility: [":__subpackages__"],
190    license_kinds: [
191        "SPDX-license-identifier-Apache-2.0",
192    ],
193    license_text: [
194        "repository/com/google/turbine/LICENSE",
195    ],
196}
197
198java_import {
199    name: "apache-commons-lang3",
200    jars: ["repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar"],
201}
202
203java_import {
204    name: "byte-buddy-prebuilt-jar",
205    jars: [
206        "repository/net/bytebuddy/byte-buddy/1.14.18/byte-buddy-1.14.18.jar",
207        "repository/net/bytebuddy/byte-buddy-agent/1.14.18/byte-buddy-agent-1.14.18.jar",
208    ],
209    sdk_version: "current",
210    host_supported: true,
211}
212
213java_import {
214    name: "diffutils-prebuilt-jar",
215    jars: ["repository/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar"],
216    sdk_version: "current",
217    host_supported: true,
218    licenses: ["m2_java_diff_license"],
219}
220
221java_import_host {
222    name: "google-auth-library-credentials-0.13.0",
223    jars: ["repository/com/google/auth/google-auth-library-credentials/0.13.0/google-auth-library-credentials-0.13.0.jar"],
224    licenses: ["m2_google_auth_0.13.0_license"],
225    target: {
226        windows: {
227            enabled: true,
228        },
229    },
230}
231
232java_import_host {
233    name: "google-auth-library-credentials-1.23.0",
234    jars: ["repository/com/google/auth/google-auth-library-credentials/1.23.0/google-auth-library-credentials-1.23.0.jar"],
235    licenses: ["m2_google_auth_1.23.0_license"],
236    target: {
237        windows: {
238            enabled: true,
239        },
240    },
241}
242
243java_import_host {
244    name: "google-auth-library-oauth2-http-0.13.0",
245    jars: ["repository/com/google/auth/google-auth-library-oauth2-http/0.13.0/google-auth-library-oauth2-http-0.13.0.jar"],
246    licenses: ["m2_google_auth_0.13.0_license"],
247}
248
249java_import_host {
250    name: "google-auth-library-oauth2-http-1.23.0",
251    jars: ["repository/com/google/auth/google-auth-library-oauth2-http/1.23.0/google-auth-library-oauth2-http-1.23.0.jar"],
252    licenses: ["m2_google_auth_1.23.0_license"],
253}
254
255java_import_host {
256    name: "google-http-client-jackson2-1.28.0",
257    jars: ["repository/com/google/http-client/google-http-client-jackson2/1.28.0/google-http-client-jackson2-1.28.0.jar"],
258}
259
260java_import {
261    name: "guava-listenablefuture-prebuilt-jar",
262    jars: ["repository/com/google/guava/guava/listenablefuture/1.0/listenablefuture-1.0.jar"],
263    sdk_version: "current",
264    min_sdk_version: "29",
265    apex_available: [
266        "//apex_available:platform",
267        "//apex_available:anyapex",
268    ],
269    licenses: ["m2_guava_license"],
270}
271
272java_import {
273    name: "mockito4-prebuilt-jar",
274    jars: ["repository/org/mockito/mockito-core/4.8.1/mockito-core-4.8.1.jar"],
275    sdk_version: "current",
276}
277
278java_import {
279    name: "inline-mockito4-prebuilt-jar",
280    jars: ["repository/org/mockito/mockito-inline/4.8.1/mockito-inline-4.8.1.jar"],
281    sdk_version: "current",
282}
283
284java_import_host {
285    name: "truth-1.4.0-prebuilt",
286    jars: ["repository/com/google/truth/truth/1.4.0/truth-1.4.0.jar"],
287    sdk_version: "current",
288}
289
290java_import {
291    name: "rxjava",
292    jars: [
293        "repository/io/reactivex/rxjava2/rxjava/2.2.9/rxjava-2.2.9.jar",
294        "repository/org/reactivestreams/reactive-streams/1.0.2/reactive-streams-1.0.2.jar",
295    ],
296    sdk_version: "current",
297    host_supported: true,
298}
299
300java_import_host {
301    name: "kotlinpoet",
302    jars: ["repository/com/squareup/kotlinpoet/1.8.0/kotlinpoet-1.8.0.jar"],
303}
304
305java_import {
306    name: "grpc-netty-shaded-1.16.1-jar",
307    host_supported: true,
308    jars: ["repository/io/grpc/grpc-netty-shaded/1.16.1/grpc-netty-shaded-1.16.1.jar"],
309    visibility: ["//external/grpc-grpc-java/netty/shaded"],
310    licenses: ["m2_grpc_netty_shaded_1.16.1_license"],
311}
312
313java_import {
314    name: "grpc-netty-shaded-1.56.0-jar",
315    host_supported: true,
316    jars: ["repository/io/grpc/grpc-netty-shaded/1.56.0/grpc-netty-shaded-1.56.0.jar"],
317    visibility: ["//external/grpc-grpc-java/netty:__subpackages__"],
318    licenses: ["m2_grpc_netty_shaded_1.56.0_license"],
319    target: {
320        windows: {
321            enabled: true,
322        },
323    },
324}
325
326java_import_host {
327    name: "trove-prebuilt",
328    jars: ["repository/net/sf/trove4j/trove4j/1.1/trove4j-1.1.jar"],
329}
330
331java_import_host {
332    name: "jna-prebuilt",
333    jars: ["repository/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar"],
334    licenses: ["m2_jna_3.4.0_license"],
335}
336
337java_import_host {
338    name: "compile-testing-prebuilt",
339    jars: ["repository/com/google/testing/compile/compile-testing/0.19/compile-testing-0.19.jar"],
340}
341
342// Combined libraries.
343
344java_library_static {
345    name: "mockito-robolectric-prebuilt",
346    static_libs: [
347        "byte-buddy-prebuilt-jar",
348        "mockito4-prebuilt-jar",
349        "objenesis",
350    ],
351    sdk_version: "current",
352}
353
354java_library_static {
355    name: "inline-mockito-robolectric-prebuilt",
356    static_libs: [
357        "byte-buddy-prebuilt-jar",
358        "inline-mockito4-prebuilt-jar",
359        "objenesis",
360    ],
361    sdk_version: "current",
362}
363
364license {
365    name: "m2_clikt_license",
366    visibility: [":__subpackages__"],
367    license_kinds: [
368        "SPDX-license-identifier-Apache-2.0",
369    ],
370    license_text: [
371        "repository/com/github/ajalt/clikt/LICENSE.txt",
372    ],
373}
374
375java_import {
376    name: "metalava-tools-common-m2-deps",
377    host_supported: true,
378    jars: [
379        "repository/com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.jar",
380        "repository/com/google/guava/guava/32.1.1-jre/guava-32.1.1-jre.jar",
381        "repository/com/google/turbine/0.2.1/turbine-0.2.1.jar",
382        "repository/javax/xml/bind/jaxb-api/2.2.12-b140109.1041/jaxb-api-2.2.12-b140109.1041.jar",
383        "repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar",
384        "repository/org/ow2/asm/asm/6.1.1/asm-6.1.1.jar",
385        "repository/org/ow2/asm/asm-tree/6.1.1/asm-tree-6.1.1.jar",
386    ],
387    licenses: [
388        "m2_clikt_license",
389        "m2_guava_license",
390        "m2_turbine_license",
391    ],
392}
393
394java_import {
395    name: "dokka-tools-common-m2-deps",
396    host_supported: true,
397    jars: [
398        "repository/com/intellij/core-analysis/intellij-core-analysis.jar",
399        "repository/org/jetbrains/kotlin/kotlin-compiler/1.3.61-release-180/kotlin-compiler-1.3.61-release-180.jar",
400        "repository/com/squareup/okhttp4/okhttp/4.0.0/okhttp-4.0.0-RC1.jar",
401        "repository/com/sampullara/cli/1.1.2/cli-parser-1.1.2.jar",
402        "repository/ru/yole/jkid/jkid-8fc7f12e1a.jar",
403        "repository/com/google/inject/guice/3.0/guice-3.0.jar",
404        "repository/org/jetbrains/markdown/0.1.41/markdown-0.1.41.jar",
405        "repository/org/jsoup/jsoup/1.8.3/jsoup-1.8.3.jar",
406        "repository/kotlinx/html/jvm/0.6.8/kotlinx-html-jvm-0.6.8-google.jar",
407        "repository/org/jetbrains/intellij/deps/trove4j/1.0.20181211/trove4j-1.0.20181211.jar",
408        "repository/org/jetbrains/kotlin/kotlin-script-runtime/1.3.61-release-180/kotlin-script-runtime-1.3.61-release-180-sources.jar",
409        "repository/org/jetbrains/kotlin/kotlin-reflect/1.3.61-release-180/kotlin-reflect-1.3.61-release-180.jar",
410        "repository/org/jetbrains/kotlin/kotlin-plugin-ij193/1.3.61-release-180/kotlin-plugin-ij193-1.3.61-release-180.jar",
411    ],
412}
413
414java_import {
415    name: "wire-runtime-prebuilt-jar",
416    jars: [
417        "repository/com/squareup/wire/wire-runtime-jvm/4.7.0/wire-runtime-jvm-4.7.0.jar",
418    ],
419}
420
421java_library_static {
422    name: "wire-runtime",
423    static_libs: [
424        "wire-runtime-prebuilt-jar",
425        "okio-lib",
426    ],
427    sdk_version: "current",
428}
429
430java_import {
431    name: "accessibility-test-framework",
432    jars: [
433        "repository/com/google/android/apps/common/testing/accessibility/framework/accessibility-test-framework/2.0/accessibility-test-framework-2.0.jar",
434    ],
435}
436
437java_import {
438    name: "javawriter",
439    jars: [
440        "repository/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar",
441    ],
442}
443
444java_import_host {
445    name: "com.google.api.grpc_proto-google-common-protos-prebuilt-jar",
446    jars: ["repository/com/google/api/grpc/proto-google-common-protos/1.14.0/proto-google-common-protos-1.14.0.jar"],
447    licenses: ["m2_api_grpc_license"],
448    target: {
449        windows: {
450            enabled: true,
451        },
452    },
453}
454
455java_import {
456    name: "auto-common-1.1.2",
457    jars: ["repository/com/google/auto/auto-common/1.1.2/auto-common-1.1.2.jar"],
458    host_supported: true,
459}
460
461java_import {
462    name: "auto-value-1.9",
463    jars: ["repository/com/google/auto/value/auto-value/1.9/auto-value-1.9.jar"],
464    host_supported: true,
465}
466
467java_plugin {
468    name: "auto_value_plugin_1.9",
469    static_libs: [
470        "auto-value-1.9",
471        "auto-common-1.1.2",
472        "escapevelocity",
473        "guava",
474        "javapoet",
475    ],
476    processor_class: "com.google.auto.value.processor.AutoValueProcessor",
477    visibility: ["//visibility:public"],
478}
479
480java_plugin {
481    name: "auto_value_builder_plugin_1.9",
482    static_libs: [
483        "auto-value-1.9",
484        "auto-common-1.1.2",
485        "escapevelocity",
486        "guava",
487        "javapoet",
488    ],
489    processor_class: "com.google.auto.value.processor.AutoBuilderProcessor",
490    visibility: ["//visibility:public"],
491}
492
493java_import {
494    name: "gson-prebuilt-jar-2.9.1",
495    jars: ["repository/com/google/code/gson/gson/2.9.1/gson-2.9.1.jar"],
496    sdk_version: "current",
497    host_supported: true,
498}
499
500java_import {
501    name: "commons-codec",
502    jars: ["repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar"],
503    host_supported: true,
504}
505
506java_import {
507    name: "xerial-sqlite-jdbc",
508    jars: ["repository/org/xerial/sqlite-jdbc/3.28.0/sqlite-jdbc-3.28.0.jar"],
509    host_supported: true,
510}
511
512java_import {
513    name: "jetbrains-annotations",
514    jars: ["repository/org/jetbrains/annotations/13.0/annotations-13.0.jar"],
515    host_supported: true,
516}
517
518java_import {
519    name: "checker-qual",
520    jars: ["repository/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar"],
521    host_supported: true,
522    licenses: ["m2_checker_qual_jar_license"],
523}
524
525java_import_host {
526    name: "javax-annotation-api-prebuilt-host-jar",
527    jars: ["repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar"],
528    licenses: ["m2_javax_annotation_license"],
529}
530
531build = ["robolectric.bp"]
532
533java_import_host {
534    name: "jsoup-1.6.3",
535    jars: ["repository/org/jsoup/jsoup/1.6.3/jsoup-1.6.3.jar"],
536}
537
538java_import {
539    name: "symbol-processing-api",
540    jars: ["repository/com/google/devtools/ksp/symbol-processing-api/1.4.10-dev-experimental-20201110/symbol-processing-api-1.4.10-dev-experimental-20201110.jar"],
541    host_supported: true,
542}
543
544java_import {
545    name: "kotlin-compiler-embeddable",
546    jars: ["repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.9.23/kotlin-compiler-embeddable-1.9.23.jar"],
547    sdk_version: "current",
548    host_supported: true,
549}
550
551java_import {
552    name: "location-gnss-joda-time",
553    jars: ["repository/joda-time/joda-time/2.9.1/joda-time-2.9.1.jar"],
554    sdk_version: "core_current",
555    licenses: ["m2_joda_time_2.9.1_license"],
556}
557
558java_import {
559    name: "dialer-common-m2-target-deps",
560    visibility: ["//packages/apps/Dialer"],
561    jars: [
562        "repository/com/google/dagger/dagger/2.7/dagger-2.7.jar",
563        "repository/com/google/guava/guava/23.0/guava-23.0.jar",
564        "repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar",
565        "repository/commons-io/commons-io/2.4/commons-io-2.4.jar",
566        "repository/com/squareup/okhttp/okhttp/2.7.4/okhttp-2.7.4.jar",
567        "repository/com/squareup/okio/okio/1.9.0/okio-1.9.0.jar",
568        "repository/io/grpc/grpc-all/1.0.3/grpc-all-1.0.3.jar",
569        "repository/io/grpc/grpc-context/1.0.3/grpc-context-1.0.3.jar",
570        "repository/io/grpc/grpc-core/1.0.3/grpc-core-1.0.3.jar",
571        "repository/io/grpc/grpc-okhttp/1.0.3/grpc-okhttp-1.0.3.jar",
572        "repository/io/grpc/grpc-protobuf-lite/1.0.3/grpc-protobuf-lite-1.0.3.jar",
573        "repository/io/grpc/grpc-stub/1.0.3/grpc-stub-1.0.3.jar",
574        "repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar",
575        "repository/javax/inject/javax.inject/1/javax.inject-1.jar",
576        "repository/me/leolin/ShortcutBadger/1.1.13/ShortcutBadger-1.1.13.jar",
577        "repository/org/apache/james/apache-mime4j-core/0.7.2/apache-mime4j-core-0.7.2.jar",
578        "repository/org/apache/james/apache-mime4j-dom/0.7.2/apache-mime4j-dom-0.7.2.jar",
579        "repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar",
580    ],
581    sdk_version: "current",
582}
583
584java_import_host {
585    name: "dialer-common-m2-host-deps",
586    visibility: ["//packages/apps/Dialer"],
587    jars: [
588        "repository/com/google/dagger/dagger/2.7/dagger-2.7.jar",
589        "repository/com/google/guava/guava/23.0/guava-23.0.jar",
590        "repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar",
591        "repository/javax/inject/javax.inject/1/javax.inject-1.jar",
592    ],
593}
594
595java_import_host {
596    name: "dialer-dagger2-compiler-deps",
597    visibility: ["//packages/apps/Dialer"],
598    jars: [
599        "repository/com/google/dagger/dagger-compiler/2.7/dagger-compiler-2.7.jar",
600        "repository/com/google/dagger/dagger-producers/2.7/dagger-producers-2.7.jar",
601    ],
602}
603
604java_plugin {
605    name: "dialer-dagger2-compiler",
606    visibility: ["//packages/apps/Dialer"],
607    static_libs: ["dialer-dagger2-compiler-deps"],
608    processor_class: "dagger.internal.codegen.ComponentProcessor",
609}
610
611java_import_host {
612    name: "jopt-simple-4.9",
613    jars: ["repository/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar"],
614}
615
616java_import {
617    name: "javax_annotation-api_1.3.2",
618    host_supported: true,
619    jars: ["repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar"],
620    sdk_version: "current",
621    target: {
622        windows: {
623            enabled: true,
624        },
625    },
626    licenses: ["m2_javax_annotation_license"],
627}
628