Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 1 | // 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 | |
| 15 | package { |
| 16 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 17 | } |
| 18 | |
| 19 | java_import { |
| 20 | name: "cronet_impl_native_java", |
| 21 | jars: ["prebuilt/cronet_impl_native_java.jar"], |
| 22 | visibility: ["//visibility:private"], |
Motomu Utsumi | 402b18d | 2022-10-11 17:21:41 +0900 | [diff] [blame] | 23 | apex_available: ["com.android.tethering"], |
| 24 | min_sdk_version: "29", |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | java_import { |
| 28 | name: "cronet_impl_common_java", |
| 29 | jars: ["prebuilt/cronet_impl_common_java.jar"], |
| 30 | visibility: ["//visibility:private"], |
Motomu Utsumi | 402b18d | 2022-10-11 17:21:41 +0900 | [diff] [blame] | 31 | apex_available: ["com.android.tethering"], |
| 32 | min_sdk_version: "29", |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | java_import { |
| 36 | name: "cronet_impl_platform_java", |
| 37 | jars: ["prebuilt/cronet_impl_platform_java.jar"], |
| 38 | visibility: ["//visibility:private"], |
Motomu Utsumi | 402b18d | 2022-10-11 17:21:41 +0900 | [diff] [blame] | 39 | apex_available: ["com.android.tethering"], |
| 40 | min_sdk_version: "29", |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | cc_prebuilt_library_shared { |
Patrick Rohr | 0f2ef7c | 2022-09-29 00:11:55 -0700 | [diff] [blame] | 44 | name: "libcronet.107.0.5284.2", |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 45 | shared_libs: [ |
| 46 | "libandroid", |
| 47 | "libc", |
| 48 | "libdl", |
| 49 | "liblog", |
| 50 | "libm", |
| 51 | ], |
| 52 | stl: "libc++_static", |
| 53 | target: { |
| 54 | android_arm64: { |
Patrick Rohr | 0f2ef7c | 2022-09-29 00:11:55 -0700 | [diff] [blame] | 55 | srcs: ["prebuilt/libs/arm64-v8a/libcronet.107.0.5284.2.so"], |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 56 | }, |
| 57 | android_arm: { |
Patrick Rohr | 0f2ef7c | 2022-09-29 00:11:55 -0700 | [diff] [blame] | 58 | srcs: ["prebuilt/libs/armeabi-v7a/libcronet.107.0.5284.2.so"], |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 59 | }, |
| 60 | android_x86_64: { |
Patrick Rohr | 0f2ef7c | 2022-09-29 00:11:55 -0700 | [diff] [blame] | 61 | srcs: ["prebuilt/libs/x86_64/libcronet.107.0.5284.2.so"], |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 62 | }, |
| 63 | android_x86: { |
Patrick Rohr | 0f2ef7c | 2022-09-29 00:11:55 -0700 | [diff] [blame] | 64 | srcs: ["prebuilt/libs/x86/libcronet.107.0.5284.2.so"], |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 65 | }, |
| 66 | }, |
| 67 | // These are already stripped, and restripping them just issues diagnostics. |
| 68 | strip: { |
| 69 | none: true, |
| 70 | }, |
Motomu Utsumi | 402b18d | 2022-10-11 17:21:41 +0900 | [diff] [blame] | 71 | apex_available: ["com.android.tethering"], |
| 72 | min_sdk_version: "29", |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | genrule { |
| 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 | |
| 84 | java_sdk_library { |
Motomu Utsumi | 6dca85d | 2022-10-11 18:32:15 +0900 | [diff] [blame] | 85 | name: "framework-cronet", |
Motomu Utsumi | 402b18d | 2022-10-11 17:21:41 +0900 | [diff] [blame] | 86 | defaults: ["framework-module-defaults"], |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 87 | srcs: [ |
| 88 | ":cronet_api-src", |
| 89 | ], |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 90 | libs: [ |
| 91 | "androidx.annotation_annotation", |
| 92 | ], |
| 93 | static_libs: [ |
Patrick Rohr | 0f2ef7c | 2022-09-29 00:11:55 -0700 | [diff] [blame] | 94 | "androidx.core_core-nodeps", |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 95 | "cronet_impl_common_java", |
| 96 | "cronet_impl_native_java", |
| 97 | "cronet_impl_platform_java", |
| 98 | ], |
Motomu Utsumi | 402b18d | 2022-10-11 17:21:41 +0900 | [diff] [blame] | 99 | apex_available: ["com.android.tethering"], |
Patrick Rohr | ad66683 | 2022-09-29 00:45:30 -0700 | [diff] [blame] | 100 | jarjar_rules: "jarjar-rules.txt", |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 101 | unsafe_ignore_missing_latest_api: true, |
| 102 | dist_group: "android", |
Motomu Utsumi | 402b18d | 2022-10-11 17:21:41 +0900 | [diff] [blame] | 103 | // cronet is used as a shared library. |
| 104 | shared_library: true, |
Patrick Rohr | 0f2ef7c | 2022-09-29 00:11:55 -0700 | [diff] [blame] | 105 | exclude_kotlinc_generated_files: true, |
Motomu Utsumi | ceb2a75 | 2022-10-04 18:38:04 +0900 | [diff] [blame] | 106 | } |