blob: bd278db54ba2e5327a4b55b42f3655baca59f8ff [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 {
44 name: "libcronet.80.0.3986.0",
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: {
55 srcs: ["prebuilt/libs/arm64-v8a/libcronet.80.0.3986.0.so"],
56 },
57 android_arm: {
58 srcs: ["prebuilt/libs/armeabi-v7a/libcronet.80.0.3986.0.so"],
59 },
60 android_x86_64: {
61 srcs: ["prebuilt/libs/x86_64/libcronet.80.0.3986.0.so"],
62 },
63 android_x86: {
64 srcs: ["prebuilt/libs/x86/libcronet.80.0.3986.0.so"],
65 },
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 {
85 name: "org.chromium.net.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: [
94 "cronet_impl_common_java",
95 "cronet_impl_native_java",
96 "cronet_impl_platform_java",
97 ],
Motomu Utsumi402b18d2022-10-11 17:21:41 +090098 apex_available: ["com.android.tethering"],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090099 unsafe_ignore_missing_latest_api: true,
100 dist_group: "android",
Motomu Utsumi402b18d2022-10-11 17:21:41 +0900101 // cronet is used as a shared library.
102 shared_library: true,
Motomu Utsumiceb2a752022-10-04 18:38:04 +0900103}