blob: 725e2179fd0e2eb29a2163e2b67b343e651dd094 [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 ],
51 static_libs: [
52 "kotlinx_atomicfu",
53 ],
54 kotlincflags: [
55 "-Xmulti-platform",
56 "-Xuse-experimental=kotlin.ExperimentalMultiplatform",
57 "-Xuse-experimental=kotlin.Experimental",
58 "-Xuse-experimental=kotlin.experimental.ExperimentalTypeInference",
59 "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
60 "-Xuse-experimental=kotlinx.coroutines.FlowPreview",
61 "-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi",
62 "-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi",
63 ],
Colin Crossc21c4302021-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",
72 sdk_version: "28",
73 srcs: ["ui/kotlinx-coroutines-android/src/**/*.kt"],
74 kotlincflags: [
75 "-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi",
76 "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
77 ],
78 libs: [
79 "kotlinx_coroutines",
80 "androidx.annotation_annotation",
81 ],
Colin Crossc21c4302021-07-30 16:43:21 -070082 apex_available: [
83 "//apex_available:platform",
84 "//apex_available:anyapex"
85 ],
Colin Cross9b946d02020-07-17 15:12:08 -070086}
Colin Cross39c97452021-07-30 12:16:41 -070087
88java_library {
89 name: "kotlinx_coroutines_test",
90 host_supported: true,
91 srcs: ["kotlinx-coroutines-test/src/**/*.kt"],
92 kotlincflags: [
93 "-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi",
94 "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
95 ],
96 libs: [
97 "kotlinx_coroutines",
98 ],
Colin Crossc21c4302021-07-30 16:43:21 -070099 apex_available: [
100 "//apex_available:platform",
101 "//apex_available:anyapex"
102 ],
103}
104
105// Temporary aliases for kotlinx-coroutines-core, kotlinx-coroutines-core-jvm and kotlinx-coroutines-android
106
107java_library {
108 name: "kotlinx-coroutines-core",
109 host_supported: true,
110 sdk_version: "28",
111 static_libs: ["kotlinx_coroutines"],
112 apex_available: [
113 "//apex_available:platform",
114 "//apex_available:anyapex"
115 ],
116}
117
118java_library {
119 name: "kotlinx-coroutines-core-jvm",
120 host_supported: true,
121 sdk_version: "28",
122 static_libs: ["kotlinx_coroutines"],
123 apex_available: [
124 "//apex_available:platform",
125 "//apex_available:anyapex"
126 ],
127}
128
129java_library {
130 name: "kotlinx-coroutines-android",
131 sdk_version: "28",
132 static_libs: [
133 "kotlinx_coroutines_android",
134 "kotlinx_coroutines",
135 ],
136 apex_available: [
137 "//apex_available:platform",
138 "//apex_available:anyapex"
139 ],
Colin Cross39c97452021-07-30 12:16:41 -0700140}