• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: "stable_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: "stable_cronet_api_java",
49    static_libs: [
50        "stable_cronet_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: "stable_cronet_java",
66    static_libs: [
67        "stable_cronet_components_cronet_android_cronet_impl_native_java",
68        "stable_cronet_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: "stable_cronet_java__testing",
84    static_libs: [
85        "stable_cronet_components_cronet_android_cronet_impl_native_java__testing",
86        "stable_cronet_components_cronet_android_cronet_jni_registration_java__testing",
87        "stable_cronet_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_library {
102    name: "stable_cronet_for_testing_net_java",
103    static_libs: [
104        "stable_cronet_net_android_net_test_support_provider_java__testing",
105        "stable_cronet_net_android_net_java_test_support__testing",
106        "stable_cronet_net_android_net_tests_java__testing",
107        "stable_cronet_net_android_dummy_spnego_authenticator_java__testing",
108    ],
109}
110
111filegroup {
112    name: "stable_cronet_net_unittests_data",
113    srcs: [
114        "net/data/**/*",
115        "net/third_party/quiche/src/quiche/common/platform/api/testdir/**/*",
116        "third_party/anonymous_tokens/src/anonymous_tokens/testdata/**/*",
117    ],
118}
119
120filegroup {
121    name: "stable_cronet_javatests_resources",
122    srcs: [
123        "net/data/ssl/certificates/**/*",
124        "components/cronet/testing/test_server/data/**/*",
125    ],
126    visibility: [
127        "//external/cronet/android/tests:__subpackages__",
128    ],
129}
130
131android_library {
132    name: "stable_cronet_java_tests",
133    manifest: "components/cronet/android/test/src/org/chromium/net/AndroidManifest.xml",
134    sdk_version: "module_current",
135    min_sdk_version: "30",
136    static_libs: [
137        "stable_cronet_components_cronet_android_cronet_javatests__testing",
138        "androidx.test.ext.junit",
139        "androidx.test.rules",
140        "stable_cronet_java__testing",
141        "guava",
142        "hamcrest-library",
143        "junit",
144        "net-tests-utils",
145        "truth",
146    ],
147    libs: [
148        "android.test.base.stubs.system",
149        "stable_cronet_api_java",
150        "framework-connectivity.stubs.module_lib",
151        "framework-connectivity-pre-jarjar",
152        // android.net.TrafficStats apis
153        "framework-connectivity-t.stubs.module_lib",
154        "guava",
155    ],
156    lint: {
157        test: true,
158    },
159    visibility: [
160        "//external/cronet/android/tests:__subpackages__",
161    ],
162}
163
164java_defaults {
165    name: "stable_cronet_java_framework_defaults",
166    sdk_version: "system_current",
167    visibility: [
168        "//external/cronet:__subpackages__",
169    ],
170}
171
172// the current rust_bindgen modules does not have a `include_dirs` attribute which means
173// that the CC header generated from the rust_bindgen will not be allowed to reference
174// other headers through relative path from repository root like how Chromium does, so
175// in order to circumvent this issue, this module exists in order to allow
176// rust_bindgen module access to include header files  using the relative path
177// from the repository root.
178cc_library_headers {
179    name: "stable_cronet_repository_root_include_dirs_anchor",
180    host_supported: true,
181    apex_available: [
182        "com.android.tethering",
183    ],
184    min_sdk_version: "30",
185    export_include_dirs: ["."],
186    visibility: [
187        "//external/cronet:__subpackages__",
188    ],
189}
190
191filegroup {
192    name: "stable_cronet_license_data",
193    srcs: [
194        "**/README.chromium",
195        "**/MODULE_LICENSE_*",
196        "**/LICENSE",
197        "**/METADATA",
198    ],
199}
200