blob: eb9799a4a88c9909bec21a9fa8db6054b23c2323 [file] [log] [blame]
Bob Badoura060d412021-02-12 14:45:18 -08001package {
2 default_applicable_licenses: ["external_kotlinx.coroutines_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18//
19// large-scale-change included anything that looked like it might be a license
20// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
21//
22// Please consider removing redundant or irrelevant files from 'license_text:'.
23// See: http://go/android-license-faq
24license {
25 name: "external_kotlinx.coroutines_license",
26 visibility: [":__subpackages__"],
27 license_kinds: [
28 "SPDX-license-identifier-Apache-2.0",
29 "SPDX-license-identifier-MIT",
30 ],
31 license_text: [
32 "LICENSE",
33 "LICENSE.txt",
34 "license/**/*",
35 ],
36}
37
Colin Cross905a53f2020-06-25 19:12:23 -070038java_library {
39 name: "kotlinx_coroutines",
40 host_supported: true,
Cole Faust4963ba02022-06-28 15:59:28 -070041 sdk_version: "core_current",
42 min_sdk_version: "28",
Colin Cross905a53f2020-06-25 19:12:23 -070043 srcs: ["kotlinx-coroutines-core/jvm/src/**/*.kt"],
44 common_srcs: ["kotlinx-coroutines-core/common/src/**/*.kt"],
45 exclude_srcs: [
46 "kotlinx-coroutines-core/jvm/src/debug/**/*.kt",
47 "kotlinx-coroutines-core/jvm/src/test_/TestCoroutineContext.kt",
48 ],
Colin Cross361f4f62021-08-03 13:36:05 -070049 java_resource_dirs: ["kotlinx-coroutines-core/jvm/resources"],
Colin Cross905a53f2020-06-25 19:12:23 -070050 static_libs: [
51 "kotlinx_atomicfu",
52 ],
53 kotlincflags: [
54 "-Xmulti-platform",
Colin Cross53eee302022-06-23 15:36:42 -070055 "-opt-in=kotlin.RequiresOptIn",
56 "-opt-in=kotlin.experimental.ExperimentalTypeInference",
57 "-opt-in=kotlin.ExperimentalMultiplatform",
58 "-opt-in=kotlinx.coroutines.DelicateCoroutinesApi",
59 "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
60 "-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi",
61 "-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
62 "-opt-in=kotlinx.coroutines.FlowPreview",
Colin Cross905a53f2020-06-25 19:12:23 -070063 ],
Colin Crossb5da2582021-07-30 16:43:21 -070064 apex_available: [
65 "//apex_available:platform",
66 "//apex_available:anyapex"
67 ],
Colin Cross905a53f2020-06-25 19:12:23 -070068}
Colin Cross9b946d02020-07-17 15:12:08 -070069
70java_library {
71 name: "kotlinx_coroutines_android",
Cole Faust4963ba02022-06-28 15:59:28 -070072 sdk_version: "current",
73 min_sdk_version: "28",
Colin Cross9b946d02020-07-17 15:12:08 -070074 srcs: ["ui/kotlinx-coroutines-android/src/**/*.kt"],
Colin Cross361f4f62021-08-03 13:36:05 -070075 java_resource_dirs: ["ui/kotlinx-coroutines-android/resources"],
Colin Cross9b946d02020-07-17 15:12:08 -070076 kotlincflags: [
Colin Cross53eee302022-06-23 15:36:42 -070077 "-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
78 "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
Colin Cross9b946d02020-07-17 15:12:08 -070079 ],
Colin Cross70e65152022-09-22 16:51:25 -070080 static_libs: [
Colin Cross9b946d02020-07-17 15:12:08 -070081 "kotlinx_coroutines",
Colin Cross70e65152022-09-22 16:51:25 -070082 ],
83 libs: [
Colin Cross9b946d02020-07-17 15:12:08 -070084 "androidx.annotation_annotation",
85 ],
Colin Crossb5da2582021-07-30 16:43:21 -070086 apex_available: [
87 "//apex_available:platform",
88 "//apex_available:anyapex"
89 ],
Colin Cross9b946d02020-07-17 15:12:08 -070090}
Colin Cross39c97452021-07-30 12:16:41 -070091
92java_library {
93 name: "kotlinx_coroutines_test",
94 host_supported: true,
95 srcs: ["kotlinx-coroutines-test/src/**/*.kt"],
Colin Cross361f4f62021-08-03 13:36:05 -070096 java_resource_dirs: ["kotlinx-coroutines-test/resources"],
Colin Cross39c97452021-07-30 12:16:41 -070097 kotlincflags: [
Colin Cross53eee302022-06-23 15:36:42 -070098 "-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
99 "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
Colin Cross39c97452021-07-30 12:16:41 -0700100 ],
101 libs: [
102 "kotlinx_coroutines",
103 ],
Colin Crossb5da2582021-07-30 16:43:21 -0700104 apex_available: [
105 "//apex_available:platform",
106 "//apex_available:anyapex"
107 ],
108}
109
110// Temporary aliases for kotlinx-coroutines-core, kotlinx-coroutines-core-jvm and kotlinx-coroutines-android
111
112java_library {
113 name: "kotlinx-coroutines-core",
114 host_supported: true,
Cole Faust4963ba02022-06-28 15:59:28 -0700115 sdk_version: "core_current",
116 min_sdk_version: "28",
Colin Crossb5da2582021-07-30 16:43:21 -0700117 static_libs: ["kotlinx_coroutines"],
118 apex_available: [
119 "//apex_available:platform",
120 "//apex_available:anyapex"
121 ],
122}
123
124java_library {
125 name: "kotlinx-coroutines-core-jvm",
126 host_supported: true,
Cole Faust4963ba02022-06-28 15:59:28 -0700127 sdk_version: "core_current",
128 min_sdk_version: "28",
Colin Crossb5da2582021-07-30 16:43:21 -0700129 static_libs: ["kotlinx_coroutines"],
130 apex_available: [
131 "//apex_available:platform",
132 "//apex_available:anyapex"
133 ],
134}
135
136java_library {
137 name: "kotlinx-coroutines-android",
Cole Faust4963ba02022-06-28 15:59:28 -0700138 sdk_version: "current",
139 min_sdk_version: "28",
Colin Crossb5da2582021-07-30 16:43:21 -0700140 static_libs: [
141 "kotlinx_coroutines_android",
142 "kotlinx_coroutines",
143 ],
144 apex_available: [
145 "//apex_available:platform",
146 "//apex_available:anyapex"
147 ],
Colin Cross39c97452021-07-30 12:16:41 -0700148}
Anubha Kushwaha76874392022-04-13 21:56:03 +0000149
150filegroup {
151 name: "kotlinx-coroutines-play-services",
152 srcs: ["integration/kotlinx-coroutines-play-services/src/**/*.kt"],
153}