xref: /aosp_15_r20/external/kotlinc/Android.bp (revision db694bcbe6ddf7a54139cd11aad3e01286b7b463)
1package {
2    default_applicable_licenses: [
3        "external_kotlinc_license",
4        "external_kotlinc_asm_license",
5        "external_kotlinc_dart_license",
6        "external_kotlinc_rhino_license",
7        "external_kotlinc_qunit_license",
8        "external_kotlinc_gwt_license",
9        "external_kotlinc_guava_license",
10        "external_kotlinc_boost_license",
11        "external_kotlinc_closure_compiler_license",
12        "external_kotlinc_assemblyscript_license",
13        "external_kotlinc_aosp_license",
14        "external_kotlinc_asmble_license",
15        "external_kotlinc_sun_license",
16    ],
17}
18
19java_defaults {
20    name: "kotlin_stdlib_defaults",
21    host_supported: true,
22    sdk_version: "core_current",
23    apex_available: [
24        "//apex_available:anyapex",
25        "//apex_available:platform",
26    ],
27}
28
29java_import {
30    name: "kotlin-annotations",
31    defaults: ["kotlin_stdlib_defaults"],
32    jars: ["lib/annotations-13.0.jar"],
33}
34
35// exclude_dirs is used to remove META-INF resources for java multi-release
36// jar support that soong does not support. https://openjdk.java.net/jeps/238
37
38java_import {
39    name: "kotlin-reflect",
40    defaults: ["kotlin_stdlib_defaults"],
41    jars: ["lib/kotlin-reflect.jar"],
42    exclude_dirs: ["META-INF/versions"],
43}
44
45java_import {
46    name: "kotlin-stdlib",
47    defaults: ["kotlin_stdlib_defaults"],
48    jars: ["lib/kotlin-stdlib.jar"],
49    exclude_dirs: ["META-INF/versions"],
50}
51
52java_import {
53    name: "kotlin-stdlib-jdk7",
54    defaults: ["kotlin_stdlib_defaults"],
55    jars: ["lib/kotlin-stdlib-jdk7.jar"],
56    exclude_dirs: ["META-INF/versions"],
57}
58
59java_import {
60    name: "kotlin-stdlib-jdk8",
61    defaults: ["kotlin_stdlib_defaults"],
62    jars: [
63        "lib/kotlin-stdlib-jdk8.jar",
64        "lib/kotlin-stdlib-jdk7.jar",
65    ],
66    exclude_dirs: ["META-INF/versions"],
67}
68
69java_import {
70    name: "kotlin-test",
71    defaults: ["kotlin_stdlib_defaults"],
72    jars: [
73        "lib/kotlin-test.jar",
74        "lib/kotlin-test-junit.jar",
75    ],
76    exclude_dirs: ["META-INF/versions"],
77}
78
79java_import {
80    name: "kotlin-parcelize-runtime",
81    host_supported: true,
82    jars: ["lib/parcelize-runtime.jar"],
83    sdk_version: "core_current",
84    exclude_dirs: ["META-INF/versions"],
85    apex_available: [
86        "//apex_available:platform",
87        // AdServices is using androidx.datastore_datastore-core which requires the dependency
88        "com.android.adservices",
89        "com.android.extservices",
90        "com.android.ondevicepersonalization",
91    ],
92}
93
94java_import_host {
95    name: "kotlin-serialize-compiler-plugin-lib",
96    jars: ["lib/kotlin-serialization-compiler-plugin.jar"],
97    sdk_version: "core_current",
98    exclude_dirs: ["META-INF/versions"],
99}
100
101kotlin_plugin {
102    name: "kotlin-serialize-compiler-plugin",
103    static_libs: ["kotlin-serialize-compiler-plugin-lib"],
104}
105
106// See: http://go/android-license-faq
107license {
108    name: "external_kotlinc_license",
109    visibility: [":__subpackages__"],
110    license_kinds: [
111        "SPDX-license-identifier-Apache-2.0",
112    ],
113    license_text: [
114        "license/LICENSE.txt",
115        "license/NOTICE.txt",
116    ],
117}
118
119license {
120    name: "external_kotlinc_aether_license",
121    visibility: [":__subpackages__"],
122    license_kinds: [
123        "SPDX-license-identifier-EPL",
124    ],
125    license_text: [
126        "license/third_party/aether_license.txt",
127    ],
128}
129
130license {
131    name: "external_kotlinc_aosp_license",
132    visibility: [":__subpackages__"],
133    license_kinds: [
134        "SPDX-license-identifier-Apache-2.0",
135    ],
136    copyright_notice: "Copyright (C) 2011-15 The Android Open Source Project",
137    license_text: [
138        "license/third_party/aosp_license.txt",
139    ],
140}
141
142license {
143    name: "external_kotlinc_args4j_license",
144    visibility: [":__subpackages__"],
145    license_kinds: [
146        "SPDX-license-identifier-MIT",
147    ],
148    license_text: [
149        "license/third_party/args4j_LICENSE.txt",
150    ],
151}
152
153license {
154    name: "external_kotlinc_asm_license",
155    package_name: "ASM",
156    visibility: [":__subpackages__"],
157    license_kinds: [
158        "SPDX-license-identifier-BSD",
159    ],
160    copyright_notice: "Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom",
161    license_text: [
162        "license/third_party/asm_license.txt",
163    ],
164}
165
166license {
167    name: "external_kotlinc_asmble_license",
168    visibility: [":__subpackages__"],
169    license_kinds: [
170        "SPDX-license-identifier-MIT",
171    ],
172    copyright_notice: "Copyright (C) 2018 Chad Retz",
173    license_text: [
174        "license/third_party/asmble_license.txt",
175    ],
176}
177
178license {
179    name: "external_kotlinc_assemblyscript_license",
180    package_name: "assemblyscript standard library",
181    visibility: [":__subpackages__"],
182    license_kinds: [
183        "SPDX-license-identifier-Apache-2.0",
184    ],
185    copyright_notice: "Derived from assemblyscript standard library",
186    license_text: [
187        "license/third_party/assemblyscript_license.txt",
188    ],
189}
190
191license {
192    name: "external_kotlinc_boost_license",
193    package_name: "boost special math functions",
194    visibility: [":__subpackages__"],
195    license_kinds: [
196        "SPDX-license-identifier-BSL-1.0",
197    ],
198    copyright_notice: "Derived from boost special math functions, Copyright Eric Ford & Hubert Holin 2001.",
199    license_text: [
200        "license/third_party/boost_LICENSE.txt",
201    ],
202}
203
204license {
205    name: "external_kotlinc_closure_compiler_license",
206    package_name: "Google Closure Library",
207    visibility: [":__subpackages__"],
208    license_kinds: [
209        "SPDX-license-identifier-Apache-2.0",
210    ],
211    copyright_notice: "Google Closure Library, Copyright 2009 The Closure Library Authors",
212    license_text: [
213        "license/third_party/closure-compiler_LICENSE.txt",
214    ],
215}
216
217license {
218    name: "external_kotlinc_dart_license",
219    package_name: "Dart compiler",
220    visibility: [":__subpackages__"],
221    license_kinds: [
222        "SPDX-license-identifier-BSD",
223    ],
224    copyright_notice: "Originally part of the Dart compiler, (c) 2011 the Dart Project Authors,",
225    license_text: [
226        "license/third_party/dart_LICENSE.txt",
227    ],
228}
229
230license {
231    name: "external_kotlinc_fastutil_license",
232    visibility: [":__subpackages__"],
233    license_kinds: [
234        "SPDX-license-identifier-Apache-2.0",
235    ],
236    license_text: [
237        "license/third_party/fastutil_licence",
238    ],
239}
240
241license {
242    name: "external_kotlinc_gradle_license",
243    package_name: "Gradle",
244    visibility: [":__subpackages__"],
245    license_kinds: [
246        "SPDX-license-identifier-Apache-2.0",
247        "SPDX-license-identifier-BSD-3-Clause",
248        "SPDX-license-identifier-BSD",
249        "SPDX-license-identifier-CDDL-1.0",
250        "SPDX-license-identifier-EPL",
251        "SPDX-license-identifier-MIT",
252        "SPDX-license-identifier-LGPL-2.1",
253        "SPDX-license-identifier-MPL-2.0",
254    ],
255    copyright_notice: "Gradle, Copyright 2002-2017 Gradle, Inc.",
256    license_text: [
257        "license/third_party/gradle_license.txt",
258    ],
259}
260
261license {
262    name: "external_kotlinc_guava_license",
263    package_name: "Guava",
264    visibility: [":__subpackages__"],
265    license_kinds: [
266        "SPDX-license-identifier-Apache-2.0",
267    ],
268    copyright_notice: "Derived from Guava's UnsignedLongs, (C) 2011 The Guava Authors",
269    license_text: [
270        "license/third_party/guava_license.txt",
271    ],
272}
273
274license {
275    name: "external_kotlinc_gwt_license",
276    package_name: "GWT",
277    visibility: [":__subpackages__"],
278    license_kinds: [
279        "SPDX-license-identifier-Apache-2.0",
280    ],
281    copyright_notice: "Derived from GWT, (C) 2007-08 Google Inc.",
282    license_text: [
283        "license/third_party/gwt_license.txt",
284    ],
285}
286
287license {
288    name: "external_kotlinc_jquery_license",
289    package_name: "jQuery JavaScript Library v1.6.2",
290    visibility: [":__subpackages__"],
291    license_kinds: [
292        "SPDX-license-identifier-MIT",
293    ],
294    copyright_notice: "jQuery JavaScript Library v1.6.2, Copyright 2011, John Resig",
295    license_text: [
296        "license/third_party/jquery_license.txt",
297    ],
298}
299
300license {
301    name: "external_kotlinc_jshashtable_license",
302    visibility: [":__subpackages__"],
303    license_kinds: [
304        "SPDX-license-identifier-Apache-2.0",
305    ],
306    license_text: [
307        "license/third_party/jshashtable_license.txt",
308    ],
309}
310
311license {
312    name: "external_kotlinc_karma_teamcity_reporter_license",
313    visibility: [":__subpackages__"],
314    license_kinds: [
315        "SPDX-license-identifier-MIT",
316    ],
317    copyright_notice: "Copyright (C) 2011-2013 Vojta Jína and contributors.",
318    license_text: [
319        "license/third_party/karma-teamcity-reporter_LICENSE.txt",
320    ],
321}
322
323license {
324    name: "external_kotlinc_karma_license",
325    visibility: [":__subpackages__"],
326    license_kinds: [
327        "SPDX-license-identifier-MIT",
328    ],
329    copyright_notice: "Copyright (C) 2011-2019 Google, Inc.",
330    license_text: [
331        "license/third_party/karma_LICENSE.txt",
332    ],
333}
334
335license {
336    name: "external_kotlinc_lodash_license",
337    visibility: [":__subpackages__"],
338    license_kinds: [
339        "SPDX-license-identifier-MIT",
340        "SPDX-license-identifier-CC0-1.0",
341    ],
342    copyright_notice: "Copyright JS Foundation and other contributors <https://js.foundation/>",
343    license_text: [
344        "license/third_party/lodash_LICENSE.txt",
345    ],
346}
347
348license {
349    name: "external_kotlinc_lombok_license",
350    package_name: "Project Lombok",
351    visibility: [":__subpackages__"],
352    license_kinds: [
353        "SPDX-license-identifier-MIT",
354    ],
355    copyright_notice: "Project Lombok, Copyright (C) 2009-2013 The Project Lombok Authors",
356    license_text: [
357        "license/third_party/lombok_LICENSE.txt",
358    ],
359}
360
361license {
362    name: "external_kotlinc_maven_license",
363    visibility: [":__subpackages__"],
364    license_kinds: [
365        "SPDX-license-identifier-Apache-2.0",
366    ],
367    license_text: [
368        "license/third_party/maven_LICENSE.txt",
369    ],
370}
371
372license {
373    name: "external_kotlinc_mocha_teamcity_reporter_license",
374    visibility: [":__subpackages__"],
375    license_kinds: [
376        "SPDX-license-identifier-MIT",
377    ],
378    copyright_notice: "Copyright (c) 2016 Jamie Sherriff",
379    license_text: [
380        "license/third_party/mocha-teamcity-reporter_LICENSE.txt",
381    ],
382}
383
384license {
385    name: "external_kotlinc_prototype_license",
386    visibility: [":__subpackages__"],
387    license_kinds: [
388        "SPDX-license-identifier-MIT",
389    ],
390    license_text: [
391        "license/third_party/prototype_license.txt",
392    ],
393}
394
395license {
396    name: "external_kotlinc_qunit_license",
397    package_name: "QUnit",
398    visibility: [":__subpackages__"],
399    license_kinds: [
400        "SPDX-license-identifier-MIT",
401    ],
402    copyright_notice: "QUnit, Copyright (c) 2012 John Resig, Jörn Zaefferer,",
403    license_text: [
404        "license/third_party/qunit_license.txt",
405    ],
406}
407
408license {
409    name: "external_kotlinc_rhino_license",
410    package_name: "Rhino",
411    visibility: [":__subpackages__"],
412    license_kinds: [
413        "SPDX-license-identifier-MPL-1.1",
414    ],
415    copyright_notice: "Originally part of GWT, (C) 2007-08 Google Inc., distributed under the Apache 2 license. The code is derived from Rhino, (C) 1997-1999 Netscape Communications Corporation, distributed under the Netscape Public License.",
416    license_text: [
417        "license/third_party/rhino_LICENSE.txt",
418    ],
419}
420
421license {
422    name: "external_kotlinc_scala_license",
423    visibility: [":__subpackages__"],
424    license_kinds: [
425        "SPDX-license-identifier-BSD",
426    ],
427    license_text: [
428        "license/third_party/scala_license.txt",
429    ],
430}
431
432license {
433    name: "external_kotlinc_sun_license",
434    visibility: [":__subpackages__"],
435    copyright_notice: "Copyright (C) 1993 by Sun Microsystems, Inc.",
436    license_kinds: [
437        "legacy_notice",
438    ],
439    license_text: [
440        "license/third_party/sun_license.txt",
441    ],
442}
443
444license {
445    name: "external_kotlinc_teamcity_service_messages_license",
446    visibility: [":__subpackages__"],
447    license_kinds: [
448        "SPDX-license-identifier-MIT",
449    ],
450    copyright_notice: "Copyright (c) 2013 Aaron Forsander",
451    license_text: [
452        "license/third_party/teamcity-service-messages_LICENSE.txt",
453    ],
454}
455
456license {
457    name: "external_kotlinc_trove_license",
458    visibility: [":__subpackages__"],
459    license_kinds: [
460        "SPDX-license-identifier-LGPL-2.1",
461    ],
462    license_text: [
463        "license/third_party/trove_license.txt",
464    ],
465}
466
467license {
468    name: "external_kotlinc_trove_readme_license",
469    visibility: [":__subpackages__"],
470    license_kinds: [
471        "SPDX-license-identifier-ISC",
472    ],
473    license_text: [
474        "license/third_party/trove_readme_license.txt",
475    ],
476}
477
478license {
479    name: "external_kotlinc_testdata_dagger_license",
480    package_name: "Dagger",
481    visibility: [":__subpackages__"],
482    license_kinds: [
483        "SPDX-license-identifier-Apache-2.0",
484    ],
485    copyright_notice: "Dagger, Copyright (C) 2013 Square, Inc.",
486    license_text: [
487        "license/third_party/testdata/dagger_license.txt",
488    ],
489}
490
491license {
492    name: "external_kotlinc_testdata_eclipse_distribution_license",
493    package_name: "javax.persistence",
494    visibility: [":__subpackages__"],
495    license_kinds: [
496        "SPDX-license-identifier-BSD",
497    ],
498    copyright_notice: "javax.persistence, Copyright (c) 2008, 2017 Sun Microsystems, Oracle Corporation.",
499    license_text: [
500        "license/third_party/testdata/eclipse_distribution_license.txt",
501    ],
502}
503
504license {
505    name: "external_kotlinc_testdata_eclipse_license",
506    package_name: "javax.persistence",
507    visibility: [":__subpackages__"],
508    license_kinds: [
509        "SPDX-license-identifier-EPL-1.0",
510    ],
511    copyright_notice: "javax.persistence, Copyright (c) 2008, 2017 Sun Microsystems, Oracle Corporation.",
512    license_text: [
513        "license/third_party/testdata/eclipse_license.txt",
514    ],
515}
516
517license {
518    name: "external_kotlinc_testdata_findbugs_license",
519    package_name: "Bytecode Analysis Framework",
520    visibility: [":__subpackages__"],
521    license_kinds: [
522        "SPDX-license-identifier-LGPL-2.1",
523    ],
524    copyright_notice: "Bytecode Analysis Framework, Copyright (C) 2005 University of Maryland",
525    license_text: [
526        "license/third_party/testdata/findbugs_license.txt",
527    ],
528}
529
530license {
531    name: "external_kotlinc_testdata_jspecify_license",
532    package_name: "JSpecify",
533    visibility: [":__subpackages__"],
534    license_kinds: [
535        "SPDX-license-identifier-Apache-2.0",
536    ],
537    copyright_notice: "JSpecify, Copyright (C) 2020 The JSpecify Authors",
538    license_text: [
539        "license/third_party/testdata/jspecify_license.txt",
540    ],
541}
542
543license {
544    name: "external_kotlinc_testdata_lombok_license",
545    package_name: "Project Lombok",
546    visibility: [":__subpackages__"],
547    license_kinds: [
548        "SPDX-license-identifier-MIT",
549    ],
550    copyright_notice: "Project Lombok, Copyright (C) 2009-2013 The Project Lombok Authors",
551    license_text: [
552        "license/third_party/testdata/lombok_license.txt",
553    ],
554}
555
556license {
557    name: "external_kotlinc_testdata_rxjava_license",
558    package_name: "RxJava",
559    visibility: [":__subpackages__"],
560    license_kinds: [
561        "SPDX-license-identifier-Apache-2.0",
562    ],
563    copyright_notice: "RxJava, Copyright (c) 2016-present, RxJava Contributors",
564    license_text: [
565        "license/third_party/testdata/rxjava_license.txt",
566    ],
567}
568
569license {
570    name: "external_kotlinc_testdata_spring_license",
571    package_name: "Spring Framework",
572    visibility: [":__subpackages__"],
573    license_kinds: [
574        "SPDX-license-identifier-Apache-2.0",
575    ],
576    copyright_notice: "Spring Framework, Copyright 2002-2007 the original author or authors.",
577    license_text: [
578        "license/third_party/testdata/spring_license.txt",
579    ],
580}
581