1// Copyright (C) 2023 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licensNew.javaues/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// This is manually maintained and automatically included into the Android.bp by the gn2bp script. 16 17license { 18 name: "external_cronet_license", 19 license_kinds: [ 20 "SPDX-license-identifier-Apache-2.0", 21 "SPDX-license-identifier-BSD", 22 "SPDX-license-identifier-BSD-3-Clause", 23 "SPDX-license-identifier-BSD-Source-Code", 24 "SPDX-license-identifier-BSD-2-Clause", 25 "SPDX-license-identifier-BSD-4-Clause", 26 "SPDX-license-identifier-BSL-1.0", 27 "SPDX-license-identifier-ICU", 28 "SPDX-license-identifier-ISC", 29 "SPDX-license-identifier-MIT", 30 "SPDX-license-identifier-MPL", 31 "SPDX-license-identifier-MPL-1.1", 32 "SPDX-license-identifier-MPL-2.0", 33 "SPDX-license-identifier-NCSA", 34 "SPDX-license-identifier-Zlib", 35 // "SPDX-license-identifier-GPL-2.0-with-autoconf-exception", // ICU TODO(aymanm): Reapply those once aosp/2470343 is merged 36 // "SPDX-license-identifier-GPL-3.0-with-autoconf-exception", // ICU TODO(aymanm): Reapply those once aosp/2470343 is merged 37 "SPDX-license-identifier-OpenSSL", 38 "SPDX-license-identifier-Unicode-DFS-2016", 39 "legacy_unencumbered", 40 ], 41 license_text: [ 42 "LICENSE", 43 ], 44} 45 46java_library { 47 // Don't change the name of the module. 48 name: "cronet_aml_api_java", 49 static_libs: [ 50 "cronet_aml_components_cronet_android_cronet_api_java", 51 ], 52 sdk_version: "module_current", 53 min_sdk_version: "30", 54 visibility: [ 55 "//packages/modules/Connectivity:__subpackages__", 56 "//external/cronet/android:__subpackages__", 57 ], 58 apex_available: [ 59 "com.android.tethering", 60 ], 61} 62 63java_library { 64 // Don't change the name of the module. 65 name: "cronet_aml_java", 66 static_libs: [ 67 "cronet_aml_components_cronet_android_cronet_impl_native_java", 68 "cronet_aml_components_cronet_android_cronet_jni_registration_java" 69 ], 70 sdk_version: "module_current", 71 min_sdk_version: "30", 72 visibility: [ 73 "//packages/modules/Connectivity:__subpackages__", 74 "//external/cronet/android:__subpackages__", 75 ], 76 apex_available: [ 77 "com.android.tethering", 78 ], 79} 80 81java_library { 82 // Don't change the name of the module. 83 name: "cronet_aml_java__testing", 84 static_libs: [ 85 "cronet_aml_components_cronet_android_cronet_impl_native_java__testing", 86 "cronet_aml_components_cronet_android_cronet_jni_registration_java__testing", 87 "cronet_aml_components_cronet_android_cronet_tests_jni_registration_java__testing" 88 ], 89 sdk_version: "module_current", 90 min_sdk_version: "30", 91 visibility: [ 92 "//external/cronet/android:__subpackages__", 93 ], 94 apex_available: [ 95 "com.android.tethering", 96 ], 97} 98 99// ------------------------------ NATIVE TEST TARGETS -------------------------------------------- 100 101java_defaults { 102 name: "cronet_native_unittests_defaults", 103 defaults: [ 104 "mts-target-sdk-version-current", 105 ], 106 asset_dirs: [ 107 "third_party/icu/android", 108 ], 109 aaptflags: ["-0 .dat"], 110 compile_multilib: "both", 111 min_sdk_version: "31", // b/270049141 112 static_libs: [ 113 "cronet_aml_testing_android_native_test_native_test_java__testing", 114 "cronet_aml_java__testing", 115 "androidx.annotation_annotation", 116 "junit", 117 ], 118} 119 120java_library { 121 name: "cronet_for_testing_net_java", 122 static_libs: [ 123 "cronet_aml_net_android_net_test_support_provider_java__testing", 124 "cronet_aml_net_android_net_java_test_support__testing", 125 "cronet_aml_net_android_net_tests_java__testing" 126 ], 127} 128 129filegroup { 130 name: "net_unittests_data", 131 srcs: [ 132 "net/data/**/*", 133 "net/third_party/quiche/src/quiche/common/platform/api/testdir/**/*", 134 "third_party/anonymous_tokens/src/anonymous_tokens/testdata/**/*", 135 ], 136} 137 138android_test_helper_app { 139 name: "cronet_tester_app", 140 defaults: [ 141 "cronet_native_unittests_defaults", 142 ], 143 manifest: "test_runner/AndroidManifest.xml", 144 jni_libs: [ 145 "cronet_aml_components_cronet_android_cronet_unittests_android__library__testing", 146 ], 147 static_libs: ["cronet_aml_java__testing"], 148} 149 150android_test_helper_app { 151 name: "cronet_net_tester_app", 152 defaults: [ 153 "cronet_native_unittests_defaults", 154 ], 155 manifest: "test_runner/AndroidNetManifest.xml", 156 jni_libs: [ 157 "cronet_aml_net_net_unittests__library__testing", 158 ], 159 static_libs: ["cronet_for_testing_net_java"], 160 resource_dirs : [ 161 "net/android/unittest_support/res", 162 ], 163} 164 165filegroup { 166 name: "cronet_javatests_resources", 167 srcs: [ 168 "net/data/ssl/certificates/**/*", 169 "components/cronet/testing/test_server/data/**/*", 170 ], 171 visibility: [ 172 "//external/cronet/android/tests:__subpackages__", 173 ], 174} 175 176android_library { 177 name: "cronet_java_tests", 178 manifest: "components/cronet/android/test/src/org/chromium/net/AndroidManifest.xml", 179 sdk_version: "module_current", 180 min_sdk_version: "30", 181 static_libs: [ 182 "cronet_aml_components_cronet_android_cronet_javatests__testing", 183 "androidx.test.ext.junit", 184 "androidx.test.rules", 185 "cronet_aml_java__testing", 186 "guava", 187 "hamcrest-library", 188 "junit", 189 "net-tests-utils", 190 "truth", 191 ], 192 libs: [ 193 "android.test.base.stubs.system", 194 "cronet_aml_api_java", 195 "framework-connectivity.stubs.module_lib", 196 "framework-connectivity-pre-jarjar", 197 // android.net.TrafficStats apis 198 "framework-connectivity-t.stubs.module_lib", 199 "guava", 200 ], 201 lint: { test: true }, 202 visibility: [ 203 "//external/cronet/android/tests:__subpackages__", 204 ], 205} 206 207java_defaults { 208 name: "cronet_aml_java_framework_defaults", 209 libs: [ 210 "framework-connectivity-pre-jarjar-without-cronet", 211 "framework-connectivity-t.stubs.module_lib", 212 "framework-location.stubs.module_lib", 213 "framework-mediaprovider.stubs.module_lib", 214 "framework-statsd.stubs.module_lib", 215 "framework-wifi.stubs.module_lib", 216 ], 217 sdk_version: "module_current", 218 visibility: [ 219 "//external/cronet:__subpackages__", 220 ], 221} 222 223filegroup { 224 name: "license_data", 225 srcs: ["**/README.chromium", "**/MODULE_LICENSE_*", "**/LICENSE", "**/METADATA"] 226} 227