xref: /aosp_15_r20/external/apache-http/Android.bp (revision eb3a33c0c9109b0079c79e90b6c32db7576f04ad)
1// Copyright (C) 2014 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: ["external_apache-http_license"],
17}
18
19// Added automatically by a large-scale-change
20// See: http://go/android-license-faq
21license {
22    name: "external_apache-http_license",
23    visibility: [":__subpackages__"],
24    license_kinds: [
25        "SPDX-license-identifier-Apache-2.0",
26    ],
27    license_text: [
28        "NOTICE",
29    ],
30}
31
32filegroup {
33    name: "org.apache.http.legacy.sources",
34    srcs: ["src/**/*.java"],
35    path: "src",
36    visibility: ["//visibility:private"],
37}
38
39filegroup {
40    name: "org.apache.http.legacy.android.sources",
41    srcs: ["android/src/**/*.java"],
42    path: "android/src",
43    visibility: ["//visibility:private"],
44}
45
46java_sdk_library {
47    name: "org.apache.http.legacy",
48    srcs: [
49        ":org.apache.http.legacy.sources",
50        ":org.apache.http.legacy.android.sources",
51    ],
52    api_packages: [
53        "android.net.compatibility",
54        "android.net.http",
55        "com.android.internal.http.multipart",
56        "org.apache.commons.codec",
57        "org.apache.commons.codec.binary",
58        "org.apache.commons.codec.language",
59        "org.apache.commons.codec.net",
60        "org.apache.commons.logging",
61        "org.apache.commons.logging.impl",
62        "org.apache.http",
63        "org.apache.http.auth",
64        "org.apache.http.auth.params",
65        "org.apache.http.client",
66        "org.apache.http.client.entity",
67        "org.apache.http.client.methods",
68        "org.apache.http.client.params",
69        "org.apache.http.client.protocol",
70        "org.apache.http.client.utils",
71        "org.apache.http.conn",
72        "org.apache.http.conn.params",
73        "org.apache.http.conn.routing",
74        "org.apache.http.conn.scheme",
75        "org.apache.http.conn.util",
76        "org.apache.http.cookie",
77        "org.apache.http.cookie.params",
78        "org.apache.http.entity",
79        "org.apache.http.impl",
80        "org.apache.http.impl.auth",
81        "org.apache.http.impl.client",
82        "org.apache.http.impl.conn",
83        "org.apache.http.impl.conn.tsccm",
84        "org.apache.http.impl.cookie",
85        "org.apache.http.impl.entity",
86        "org.apache.http.impl.io",
87        "org.apache.http.io",
88        "org.apache.http.message",
89        "org.apache.http.params",
90        "org.apache.http.protocol",
91        "org.apache.http.util",
92    ],
93    dex_preopt: {
94        profile: "art-profile",
95        app_image: false,
96    },
97    errorprone: {
98        javacflags: ["-Xep:MissingOverride:OFF"], // b/73499927
99    },
100    // Add dependencies on files used by droiddoc_options.
101    droiddoc_option_files: [":frameworks-base-api-current.txt"],
102    droiddoc_options: [
103        // Subtract classes from the API .txt / stubs that are in the public SDK API. Without this
104        // the org.apache.http.legacy.jar would contain duplicates of classes in android.jar.
105        // See http://b/119021844 for more details.
106        "--subtract-api $(location :frameworks-base-api-current.txt)",
107    ],
108    dist_group: "android",
109    default_to_stubs: true,
110}
111
112// Make the current.txt available for use by the cts/tests/signature and /vendor tests.
113// ========================================================================
114filegroup {
115    name: "apache-http-legacy-current.txt",
116    srcs: [
117        "api/current.txt",
118    ],
119}
120
121// Make the system-current.txt available for use by the /vendor tests.
122filegroup {
123    name: "apache-http-legacy-system-current.txt",
124    srcs: [
125        "api/system-current.txt",
126    ],
127}
128