diff options
author | Allan Wojciechowski <allanwoj@google.com> | 2013-05-28 18:16:54 +0100 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2013-05-31 10:41:11 -0700 |
commit | e7f03919322be5e2fecea46fc149a214ee171839 (patch) | |
tree | 76327d38f249d9f9fd0fe48685241086880274ed | |
parent | c3e24933514279a86d901ed4d4b6169aa0fdc9c3 (diff) | |
download | okhttp-e7f03919322be5e2fecea46fc149a214ee171839.tar.gz |
Add a new static library version of okhttp for inclusion in apps
$ make okhttp-static
Change-Id: I9f9c82c5fd4a1607ec2765d0488241397b72b7fa
-rw-r--r-- | Android.mk | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -15,9 +15,9 @@ # LOCAL_PATH := $(call my-dir) -okhttp_src_files := $(call all-java-files-under,src/main/java) -okhttp_src_files := $(filter-out %/Platform.java, $(okhttp_src_files)) -okhttp_src_files += $(call all-java-files-under, android/main/java) +okhttp_common_src_files := $(call all-java-files-under,src/main/java) +okhttp_system_src_files := $(filter-out %/Platform.java, $(okhttp_common_src_files)) +okhttp_system_src_files += $(call all-java-files-under, android/main/java) okhttp_test_src_files := $(call all-java-files-under,src/test/java) okhttp_test_src_files := $(filter-out src/test/java/com/squareup/okhttp/internal/spdy/SpdyServer.java, $(okhttp_test_src_files)) @@ -25,7 +25,7 @@ okhttp_test_src_files := $(filter-out src/test/java/com/squareup/okhttp/internal include $(CLEAR_VARS) LOCAL_MODULE := okhttp LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := $(okhttp_src_files) +LOCAL_SRC_FILES := $(okhttp_system_src_files) LOCAL_JAVACFLAGS := -encoding UTF-8 LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt LOCAL_JAVA_LIBRARIES := conscrypt core @@ -33,11 +33,22 @@ LOCAL_NO_STANDARD_LIBRARIES := true LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk include $(BUILD_JAVA_LIBRARY) +# static version of okhttp for inclusion in apps targeting older releases +include $(CLEAR_VARS) +LOCAL_MODULE := okhttp-static +LOCAL_MODULE_TAGS := optional +LOCAL_SRC_FILES := $(okhttp_common_src_files) +LOCAL_JAVACFLAGS := -encoding UTF-8 +LOCAL_JAVA_LIBRARIES := core +LOCAL_NO_STANDARD_LIBRARIES := true +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +include $(BUILD_STATIC_JAVA_LIBRARY) + # non-jarjar'd version of okhttp to compile the tests against include $(CLEAR_VARS) LOCAL_MODULE := okhttp-nojarjar LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := $(okhttp_src_files) +LOCAL_SRC_FILES := $(okhttp_system_src_files) LOCAL_JAVACFLAGS := -encoding UTF-8 LOCAL_JAVA_LIBRARIES := conscrypt core LOCAL_NO_STANDARD_LIBRARIES := true @@ -59,7 +70,7 @@ ifeq ($(WITH_HOST_DALVIK),true) include $(CLEAR_VARS) LOCAL_MODULE := okhttp-hostdex LOCAL_MODULE_TAGS := optional - LOCAL_SRC_FILES := $(okhttp_src_files) + LOCAL_SRC_FILES := $(okhttp_system_src_files) LOCAL_JAVACFLAGS := -encoding UTF-8 LOCAL_BUILD_HOST_DEX := true LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |