blob: cc55c17690e05868b000fddf0c8abe0b1f4e4f6a [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,
41 // This should be "core_current", but that causes nullability issues
42 // for returned platform types that are explicitly marked @Nullable in
43 // SDK 29 and current.
44 sdk_version: "28",
45 srcs: ["kotlinx-coroutines-core/jvm/src/**/*.kt"],
46 common_srcs: ["kotlinx-coroutines-core/common/src/**/*.kt"],
47 exclude_srcs: [
48 "kotlinx-coroutines-core/jvm/src/debug/**/*.kt",
49 "kotlinx-coroutines-core/jvm/src/test_/TestCoroutineContext.kt",
50 ],
Colin Cross361f4f62021-08-03 13:36:05 -070051 java_resource_dirs: ["kotlinx-coroutines-core/jvm/resources"],
Colin Cross905a53f2020-06-25 19:12:23 -070052 static_libs: [
53 "kotlinx_atomicfu",
54 ],
55 kotlincflags: [
56 "-Xmulti-platform",
Colin Cross53eee302022-06-23 15:36:42 -070057 "-opt-in=kotlin.RequiresOptIn",
58 "-opt-in=kotlin.experimental.ExperimentalTypeInference",
59 "-opt-in=kotlin.ExperimentalMultiplatform",
60 "-opt-in=kotlinx.coroutines.DelicateCoroutinesApi",
61 "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
62 "-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi",
63 "-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
64 "-opt-in=kotlinx.coroutines.FlowPreview",
Colin Cross905a53f2020-06-25 19:12:23 -070065 ],
Colin Crossb5da2582021-07-30 16:43:21 -070066 apex_available: [
67 "//apex_available:platform",
68 "//apex_available:anyapex"
69 ],
Colin Cross905a53f2020-06-25 19:12:23 -070070}
Colin Cross9b946d02020-07-17 15:12:08 -070071
72java_library {
73 name: "kotlinx_coroutines_android",
74 sdk_version: "28",
75 srcs: ["ui/kotlinx-coroutines-android/src/**/*.kt"],
Colin Cross361f4f62021-08-03 13:36:05 -070076 java_resource_dirs: ["ui/kotlinx-coroutines-android/resources"],
Colin Cross9b946d02020-07-17 15:12:08 -070077 kotlincflags: [
Colin Cross53eee302022-06-23 15:36:42 -070078 "-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
79 "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
Colin Cross9b946d02020-07-17 15:12:08 -070080 ],
81 libs: [
82 "kotlinx_coroutines",
83 "androidx.annotation_annotation",
84 ],
Colin Crossb5da2582021-07-30 16:43:21 -070085 apex_available: [
86 "//apex_available:platform",
87 "//apex_available:anyapex"
88 ],
Colin Cross9b946d02020-07-17 15:12:08 -070089}
Colin Cross39c97452021-07-30 12:16:41 -070090
91java_library {
92 name: "kotlinx_coroutines_test",
93 host_supported: true,
94 srcs: ["kotlinx-coroutines-test/src/**/*.kt"],
Colin Cross361f4f62021-08-03 13:36:05 -070095 java_resource_dirs: ["kotlinx-coroutines-test/resources"],
Colin Cross39c97452021-07-30 12:16:41 -070096 kotlincflags: [
Colin Cross53eee302022-06-23 15:36:42 -070097 "-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
98 "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
Colin Cross39c97452021-07-30 12:16:41 -070099 ],
100 libs: [
101 "kotlinx_coroutines",
102 ],
Colin Crossb5da2582021-07-30 16:43:21 -0700103 apex_available: [
104 "//apex_available:platform",
105 "//apex_available:anyapex"
106 ],
107}
108
109// Temporary aliases for kotlinx-coroutines-core, kotlinx-coroutines-core-jvm and kotlinx-coroutines-android
110
111java_library {
112 name: "kotlinx-coroutines-core",
113 host_supported: true,
114 sdk_version: "28",
115 static_libs: ["kotlinx_coroutines"],
116 apex_available: [
117 "//apex_available:platform",
118 "//apex_available:anyapex"
119 ],
120}
121
122java_library {
123 name: "kotlinx-coroutines-core-jvm",
124 host_supported: true,
125 sdk_version: "28",
126 static_libs: ["kotlinx_coroutines"],
127 apex_available: [
128 "//apex_available:platform",
129 "//apex_available:anyapex"
130 ],
131}
132
133java_library {
134 name: "kotlinx-coroutines-android",
135 sdk_version: "28",
136 static_libs: [
137 "kotlinx_coroutines_android",
138 "kotlinx_coroutines",
139 ],
140 apex_available: [
141 "//apex_available:platform",
142 "//apex_available:anyapex"
143 ],
Colin Cross39c97452021-07-30 12:16:41 -0700144}
Anubha Kushwaha76874392022-04-13 21:56:03 +0000145
146filegroup {
147 name: "kotlinx-coroutines-play-services",
148 srcs: ["integration/kotlinx-coroutines-play-services/src/**/*.kt"],
149}