Narayan Kamath | df5e4d4 | 2015-01-20 12:55:52 +0000 | [diff] [blame] | 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 | # |
| 15 | LOCAL_PATH:= $(call my-dir) |
| 16 | |
Narayan Kamath | abddcd8 | 2015-04-08 18:27:53 +0100 | [diff] [blame^] | 17 | apache_http_src_files := \ |
Narayan Kamath | a8b46a3 | 2014-11-27 18:15:37 +0000 | [diff] [blame] | 18 | $(call all-java-files-under,src) \ |
| 19 | $(call all-java-files-under,android) |
Narayan Kamath | df5e4d4 | 2015-01-20 12:55:52 +0000 | [diff] [blame] | 20 | |
Narayan Kamath | abddcd8 | 2015-04-08 18:27:53 +0100 | [diff] [blame^] | 21 | apache_http_java_libs := conscrypt |
Narayan Kamath | 3e38746 | 2015-01-23 15:31:00 +0000 | [diff] [blame] | 22 | |
Narayan Kamath | abddcd8 | 2015-04-08 18:27:53 +0100 | [diff] [blame^] | 23 | apache_http_packages := $(strip \ |
| 24 | com.android.internal.http.multipart \ |
| 25 | org.apache.commons.logging \ |
| 26 | org.apache.commons.logging.impl \ |
| 27 | org.apache.commons.codec \ |
| 28 | org.apache.commons.codec.net \ |
| 29 | org.apache.commons.codec.language \ |
| 30 | org.apache.commons.codec.binary \ |
| 31 | org.apache.http.params \ |
| 32 | org.apache.http \ |
| 33 | org.apache.http.client.params \ |
| 34 | org.apache.http.client \ |
| 35 | org.apache.http.client.utils \ |
| 36 | org.apache.http.client.protocol \ |
| 37 | org.apache.http.client.methods \ |
| 38 | org.apache.http.client.entity \ |
| 39 | org.apache.http.protocol \ |
| 40 | org.apache.http.impl \ |
| 41 | org.apache.http.impl.client \ |
| 42 | org.apache.http.impl.auth \ |
| 43 | org.apache.http.impl.cookie \ |
| 44 | org.apache.http.impl.entity \ |
| 45 | org.apache.http.impl.io \ |
| 46 | org.apache.http.impl.conn \ |
| 47 | org.apache.http.impl.conn.tsccm \ |
| 48 | org.apache.http.message \ |
| 49 | org.apache.http.auth.params \ |
| 50 | org.apache.http.auth \ |
| 51 | org.apache.http.cookie.params \ |
| 52 | org.apache.http.cookie \ |
| 53 | org.apache.http.util \ |
| 54 | org.apache.http.entity \ |
| 55 | org.apache.http.io \ |
| 56 | org.apache.http.conn.params \ |
| 57 | org.apache.http.conn \ |
| 58 | org.apache.http.conn.routing \ |
| 59 | org.apache.http.conn.scheme \ |
| 60 | org.apache.http.conn.util \ |
| 61 | android.net.compatibility \ |
| 62 | android.net.http \ |
| 63 | ) |
| 64 | |
| 65 | include $(CLEAR_VARS) |
| 66 | LOCAL_MODULE := org.apache.http.legacy |
| 67 | LOCAL_MODULE_TAGS := optional |
| 68 | LOCAL_JAVA_LIBRARIES := $(apache_http_java_libs) |
| 69 | LOCAL_SRC_FILES := $(apache_http_src_files) |
| 70 | LOCAL_SDK_VERSION := 21 |
Narayan Kamath | df5e4d4 | 2015-01-20 12:55:52 +0000 | [diff] [blame] | 71 | LOCAL_MODULE_TAGS := optional |
| 72 | include $(BUILD_JAVA_LIBRARY) |
Ying Wang | 30a19d9 | 2015-02-25 12:22:35 -0800 | [diff] [blame] | 73 | |
Narayan Kamath | abddcd8 | 2015-04-08 18:27:53 +0100 | [diff] [blame^] | 74 | ############################################## |
| 75 | # Generate the stub source files |
| 76 | include $(CLEAR_VARS) |
| 77 | LOCAL_SRC_FILES := $(apache_http_src_files) |
| 78 | LOCAL_JAVA_LIBRARIES := $(apache_http_java_libs) |
| 79 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 80 | LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src \ |
| 81 | $(LOCAL_PATH)/android |
| 82 | |
| 83 | LOCAL_DROIDDOC_OPTIONS:= \ |
| 84 | -stubpackages $(subst $(space),:,$(apache_http_packages)) \ |
| 85 | -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/apache-http-stubs_intermediates/src \ |
| 86 | -nodocs |
| 87 | |
| 88 | LOCAL_SDK_VERSION := 21 |
| 89 | LOCAL_UNINSTALLABLE_MODULE := true |
| 90 | LOCAL_MODULE := apache-http-stubs-gen |
| 91 | |
| 92 | include $(BUILD_DROIDDOC) |
| 93 | apache_http_stubs_gen_stamp := $(full_target) |
| 94 | |
| 95 | ############################################### |
| 96 | # Build the stub source files into a jar. |
| 97 | include $(CLEAR_VARS) |
| 98 | LOCAL_MODULE := apache-http-stubs |
| 99 | LOCAL_JAVA_LIBRARIES := $(apache_http_java_libs) |
| 100 | LOCAL_SOURCE_FILES_ALL_GENERATED := true |
| 101 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 102 | # Make sure to run droiddoc first to generate the stub source files. |
| 103 | $(full_classes_compiled_jar) : $(apache_http_stubs_gen_stamp) |
| 104 | $(full_classes_jack) : $(apache_http_stubs_gen_stamp) |
| 105 | |
Ying Wang | 30a19d9 | 2015-02-25 12:22:35 -0800 | [diff] [blame] | 106 | # Archive a copy of the classes.jar in SDK build. |
| 107 | $(call dist-for-goals,sdk win_sdk,$(full_classes_jar):org.apache.http.legacy.jar) |
Narayan Kamath | abddcd8 | 2015-04-08 18:27:53 +0100 | [diff] [blame^] | 108 | |
| 109 | apache_http_src_files := |
| 110 | apache_http_java_libs := |
| 111 | apache_http_packages := |
| 112 | apache_http_stubs_gen_stamp := |