blob: 3ce88ef108edb531fed145e4c6c2a0449e2cbf3f [file] [log] [blame]
Motomu Utsumiceb2a752022-10-04 18:38:04 +09001// Copyright (C) 2019 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/licenses/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
15package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19java_import {
20 name: "cronet_impl_native_java",
21 jars: ["prebuilt/cronet_impl_native_java.jar"],
22 visibility: ["//visibility:private"],
Motomu Utsumi402b18d2022-10-11 17:21:41 +090023 apex_available: ["com.android.tethering"],
24 min_sdk_version: "29",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090025}
26
27java_import {
28 name: "cronet_impl_common_java",
29 jars: ["prebuilt/cronet_impl_common_java.jar"],
30 visibility: ["//visibility:private"],
Motomu Utsumi402b18d2022-10-11 17:21:41 +090031 apex_available: ["com.android.tethering"],
32 min_sdk_version: "29",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090033}
34
35java_import {
36 name: "cronet_impl_platform_java",
37 jars: ["prebuilt/cronet_impl_platform_java.jar"],
38 visibility: ["//visibility:private"],
Motomu Utsumi402b18d2022-10-11 17:21:41 +090039 apex_available: ["com.android.tethering"],
40 min_sdk_version: "29",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090041}
42
43cc_prebuilt_library_shared {
Patrick Rohr0f2ef7c2022-09-29 00:11:55 -070044 name: "libcronet.107.0.5284.2",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090045 shared_libs: [
46 "libandroid",
47 "libc",
48 "libdl",
49 "liblog",
50 "libm",
51 ],
52 stl: "libc++_static",
53 target: {
54 android_arm64: {
Patrick Rohr0f2ef7c2022-09-29 00:11:55 -070055 srcs: ["prebuilt/libs/arm64-v8a/libcronet.107.0.5284.2.so"],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090056 },
57 android_arm: {
Patrick Rohr0f2ef7c2022-09-29 00:11:55 -070058 srcs: ["prebuilt/libs/armeabi-v7a/libcronet.107.0.5284.2.so"],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090059 },
60 android_x86_64: {
Patrick Rohr0f2ef7c2022-09-29 00:11:55 -070061 srcs: ["prebuilt/libs/x86_64/libcronet.107.0.5284.2.so"],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090062 },
63 android_x86: {
Patrick Rohr0f2ef7c2022-09-29 00:11:55 -070064 srcs: ["prebuilt/libs/x86/libcronet.107.0.5284.2.so"],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090065 },
66 },
67 // These are already stripped, and restripping them just issues diagnostics.
68 strip: {
69 none: true,
70 },
Motomu Utsumi402b18d2022-10-11 17:21:41 +090071 apex_available: ["com.android.tethering"],
72 min_sdk_version: "29",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090073}
74
75genrule {
76 name: "cronet_api-src",
77 srcs: ["prebuilt/cronet_api-src.jar"],
78 cmd: "cp $(in) $(out)",
79 out: [
80 "cronet_api-src.srcjar",
81 ],
82}
83
84java_sdk_library {
Motomu Utsumi6dca85d2022-10-11 18:32:15 +090085 name: "framework-cronet",
Motomu Utsumi402b18d2022-10-11 17:21:41 +090086 defaults: ["framework-module-defaults"],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090087 srcs: [
88 ":cronet_api-src",
89 ],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090090 libs: [
91 "androidx.annotation_annotation",
92 ],
93 static_libs: [
Patrick Rohr0f2ef7c2022-09-29 00:11:55 -070094 "androidx.core_core-nodeps",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090095 "cronet_impl_common_java",
96 "cronet_impl_native_java",
97 "cronet_impl_platform_java",
98 ],
Motomu Utsumi402b18d2022-10-11 17:21:41 +090099 apex_available: ["com.android.tethering"],
Patrick Rohrad666832022-09-29 00:45:30 -0700100 jarjar_rules: "jarjar-rules.txt",
Motomu Utsumiceb2a752022-10-04 18:38:04 +0900101 unsafe_ignore_missing_latest_api: true,
102 dist_group: "android",
Motomu Utsumi402b18d2022-10-11 17:21:41 +0900103 // cronet is used as a shared library.
104 shared_library: true,
Patrick Rohr0f2ef7c2022-09-29 00:11:55 -0700105 exclude_kotlinc_generated_files: true,
Motomu Utsumiceb2a752022-10-04 18:38:04 +0900106}