summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2015-04-14 18:42:03 -0700
committerYing Wang <wangying@google.com>2015-04-14 18:53:46 -0700
commit80540ef1af51ed239d0c50e077c17163261b70aa (patch)
tree120a6dc9a90928cccdf93c60a6e0e1e7224e1659
parent3049bb7f4224f055fc9f4d8a8667655ae8392cab (diff)
downloadandroid_external_apache-http-80540ef1af51ed239d0c50e077c17163261b70aa.tar.gz
android_external_apache-http-80540ef1af51ed239d0c50e077c17163261b70aa.tar.bz2
android_external_apache-http-80540ef1af51ed239d0c50e077c17163261b70aa.zip
Use prebuilt stub org.apache.http.legacy for unbundled build.
Even though the stub org.apache.http.legacy.jar itself can be built from source against the SDK, its dependency conscrypt must be built against libcore-art. (Actually we could remove the droiddoc module apache-http-stubs-gen's dependency on conscrypt. It would lead doclava to complain error of unresolved symbols of conscrypt. Such error isn't fatal because the stub java files don't reference any conscrypt symbols.) Also by using prebuilt org.apache.http.legacy, unbundled branches don't need to pull in external/doclava and its many dependency projects. Bug: 20221594 Change-Id: I6fb4377d35a70ad544cb8a91695e23625365df60
-rw-r--r--Android.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index d4c1410..9dffd55 100644
--- a/Android.mk
+++ b/Android.mk
@@ -92,12 +92,14 @@ LOCAL_MODULE := apache-http-stubs-gen
include $(BUILD_DROIDDOC)
apache_http_stubs_gen_stamp := $(full_target)
+# For unbundled build we'll use the prebuilt jar from prebuilts/sdk.
+ifeq (,$(TARGET_BUILD_APPS))
###############################################
# Build the stub source files into a jar.
include $(CLEAR_VARS)
LOCAL_MODULE := org.apache.http.legacy
-LOCAL_JAVA_LIBRARIES := $(apache_http_java_libs)
LOCAL_SOURCE_FILES_ALL_GENERATED := true
+LOCAL_SDK_VERSION := 21
include $(BUILD_STATIC_JAVA_LIBRARY)
# Make sure to run droiddoc first to generate the stub source files.
@@ -106,6 +108,7 @@ $(full_classes_jack) : $(apache_http_stubs_gen_stamp)
# Archive a copy of the classes.jar in SDK build.
$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):org.apache.http.legacy.jar)
+endif # not TARGET_BUILD_APPS
apache_http_src_files :=
apache_http_java_libs :=