Bob Badour | a060d41 | 2021-02-12 14:45:18 -0800 | [diff] [blame] | 1 | package { |
| 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 |
| 24 | license { |
| 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 Cross | 905a53f | 2020-06-25 19:12:23 -0700 | [diff] [blame] | 38 | java_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 Cross | 361f4f6 | 2021-08-03 13:36:05 -0700 | [diff] [blame] | 51 | java_resource_dirs: ["kotlinx-coroutines-core/jvm/resources"], |
Colin Cross | 905a53f | 2020-06-25 19:12:23 -0700 | [diff] [blame] | 52 | static_libs: [ |
| 53 | "kotlinx_atomicfu", |
| 54 | ], |
| 55 | kotlincflags: [ |
| 56 | "-Xmulti-platform", |
| 57 | "-Xuse-experimental=kotlin.ExperimentalMultiplatform", |
| 58 | "-Xuse-experimental=kotlin.Experimental", |
| 59 | "-Xuse-experimental=kotlin.experimental.ExperimentalTypeInference", |
| 60 | "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi", |
| 61 | "-Xuse-experimental=kotlinx.coroutines.FlowPreview", |
| 62 | "-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi", |
| 63 | "-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi", |
| 64 | ], |
Colin Cross | b5da258 | 2021-07-30 16:43:21 -0700 | [diff] [blame] | 65 | apex_available: [ |
| 66 | "//apex_available:platform", |
| 67 | "//apex_available:anyapex" |
| 68 | ], |
Colin Cross | 905a53f | 2020-06-25 19:12:23 -0700 | [diff] [blame] | 69 | } |
Colin Cross | 9b946d0 | 2020-07-17 15:12:08 -0700 | [diff] [blame] | 70 | |
| 71 | java_library { |
| 72 | name: "kotlinx_coroutines_android", |
| 73 | sdk_version: "28", |
| 74 | srcs: ["ui/kotlinx-coroutines-android/src/**/*.kt"], |
Colin Cross | 361f4f6 | 2021-08-03 13:36:05 -0700 | [diff] [blame] | 75 | java_resource_dirs: ["ui/kotlinx-coroutines-android/resources"], |
Colin Cross | 9b946d0 | 2020-07-17 15:12:08 -0700 | [diff] [blame] | 76 | kotlincflags: [ |
| 77 | "-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi", |
| 78 | "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi", |
| 79 | ], |
| 80 | libs: [ |
| 81 | "kotlinx_coroutines", |
| 82 | "androidx.annotation_annotation", |
| 83 | ], |
Colin Cross | b5da258 | 2021-07-30 16:43:21 -0700 | [diff] [blame] | 84 | apex_available: [ |
| 85 | "//apex_available:platform", |
| 86 | "//apex_available:anyapex" |
| 87 | ], |
Colin Cross | 9b946d0 | 2020-07-17 15:12:08 -0700 | [diff] [blame] | 88 | } |
Colin Cross | 39c9745 | 2021-07-30 12:16:41 -0700 | [diff] [blame] | 89 | |
| 90 | java_library { |
| 91 | name: "kotlinx_coroutines_test", |
| 92 | host_supported: true, |
| 93 | srcs: ["kotlinx-coroutines-test/src/**/*.kt"], |
Colin Cross | 361f4f6 | 2021-08-03 13:36:05 -0700 | [diff] [blame] | 94 | java_resource_dirs: ["kotlinx-coroutines-test/resources"], |
Colin Cross | 39c9745 | 2021-07-30 12:16:41 -0700 | [diff] [blame] | 95 | kotlincflags: [ |
| 96 | "-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi", |
| 97 | "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi", |
| 98 | ], |
| 99 | libs: [ |
| 100 | "kotlinx_coroutines", |
| 101 | ], |
Colin Cross | b5da258 | 2021-07-30 16:43:21 -0700 | [diff] [blame] | 102 | apex_available: [ |
| 103 | "//apex_available:platform", |
| 104 | "//apex_available:anyapex" |
| 105 | ], |
| 106 | } |
| 107 | |
| 108 | // Temporary aliases for kotlinx-coroutines-core, kotlinx-coroutines-core-jvm and kotlinx-coroutines-android |
| 109 | |
| 110 | java_library { |
| 111 | name: "kotlinx-coroutines-core", |
| 112 | host_supported: true, |
| 113 | sdk_version: "28", |
| 114 | static_libs: ["kotlinx_coroutines"], |
| 115 | apex_available: [ |
| 116 | "//apex_available:platform", |
| 117 | "//apex_available:anyapex" |
| 118 | ], |
| 119 | } |
| 120 | |
| 121 | java_library { |
| 122 | name: "kotlinx-coroutines-core-jvm", |
| 123 | host_supported: true, |
| 124 | sdk_version: "28", |
| 125 | static_libs: ["kotlinx_coroutines"], |
| 126 | apex_available: [ |
| 127 | "//apex_available:platform", |
| 128 | "//apex_available:anyapex" |
| 129 | ], |
| 130 | } |
| 131 | |
| 132 | java_library { |
| 133 | name: "kotlinx-coroutines-android", |
| 134 | sdk_version: "28", |
| 135 | static_libs: [ |
| 136 | "kotlinx_coroutines_android", |
| 137 | "kotlinx_coroutines", |
| 138 | ], |
| 139 | apex_available: [ |
| 140 | "//apex_available:platform", |
| 141 | "//apex_available:anyapex" |
| 142 | ], |
Colin Cross | 39c9745 | 2021-07-30 12:16:41 -0700 | [diff] [blame] | 143 | } |
Anubha Kushwaha | 7687439 | 2022-04-13 21:56:03 +0000 | [diff] [blame] | 144 | |
| 145 | filegroup { |
| 146 | name: "kotlinx-coroutines-play-services", |
| 147 | srcs: ["integration/kotlinx-coroutines-play-services/src/**/*.kt"], |
| 148 | } |