Narayan Kamath | 153d095 | 2012-08-09 13:14:26 +0100 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2012 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | LOCAL_PATH := $(call my-dir) |
| 17 | |
Narayan Kamath | 166772b | 2013-11-04 16:04:55 +0000 | [diff] [blame] | 18 | okhttp_common_src_files := $(call all-java-files-under,okhttp/src/main/java) |
Neil Fuller | 3c938a3 | 2014-02-19 09:40:26 +0000 | [diff] [blame] | 19 | okhttp_common_src_files += $(call all-java-files-under,okio/src/main/java) |
Allan Wojciechowski | e7f0391 | 2013-05-28 18:16:54 +0100 | [diff] [blame] | 20 | okhttp_system_src_files := $(filter-out %/Platform.java, $(okhttp_common_src_files)) |
| 21 | okhttp_system_src_files += $(call all-java-files-under, android/main/java) |
jwilson | 2231db3 | 2012-12-26 11:37:43 -0700 | [diff] [blame] | 22 | |
Neil Fuller | 3c938a3 | 2014-02-19 09:40:26 +0000 | [diff] [blame] | 23 | okhttp_test_src_files := $(call all-java-files-under,okhttp-tests/src/test/java) |
Narayan Kamath | 166772b | 2013-11-04 16:04:55 +0000 | [diff] [blame] | 24 | okhttp_test_src_files += $(call all-java-files-under,mockwebserver/src/main/java) |
| 25 | okhttp_test_src_files := $(filter-out mockwebserver/src/main/java/com/squareup/okhttp/internal/spdy/SpdyServer.java, $(okhttp_test_src_files)) |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 26 | |
Narayan Kamath | 153d095 | 2012-08-09 13:14:26 +0100 | [diff] [blame] | 27 | include $(CLEAR_VARS) |
| 28 | LOCAL_MODULE := okhttp |
| 29 | LOCAL_MODULE_TAGS := optional |
Allan Wojciechowski | e7f0391 | 2013-05-28 18:16:54 +0100 | [diff] [blame] | 30 | LOCAL_SRC_FILES := $(okhttp_system_src_files) |
jwilson | 2231db3 | 2012-12-26 11:37:43 -0700 | [diff] [blame] | 31 | LOCAL_JAVACFLAGS := -encoding UTF-8 |
| 32 | LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |
Kenny Root | ee421d1 | 2013-04-23 22:39:04 -0700 | [diff] [blame] | 33 | LOCAL_JAVA_LIBRARIES := conscrypt core |
Brian Carlstrom | cd5fb67 | 2013-04-02 13:21:23 -0700 | [diff] [blame] | 34 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 35 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Narayan Kamath | 153d095 | 2012-08-09 13:14:26 +0100 | [diff] [blame] | 36 | include $(BUILD_JAVA_LIBRARY) |
jwilson | 2231db3 | 2012-12-26 11:37:43 -0700 | [diff] [blame] | 37 | |
Allan Wojciechowski | e7f0391 | 2013-05-28 18:16:54 +0100 | [diff] [blame] | 38 | # static version of okhttp for inclusion in apps targeting older releases |
| 39 | include $(CLEAR_VARS) |
| 40 | LOCAL_MODULE := okhttp-static |
| 41 | LOCAL_MODULE_TAGS := optional |
| 42 | LOCAL_SRC_FILES := $(okhttp_common_src_files) |
| 43 | LOCAL_JAVACFLAGS := -encoding UTF-8 |
Costin Manolache | 3aed1bf | 2013-09-17 17:07:03 -0700 | [diff] [blame] | 44 | # This is set when building apps - exclude platform targets. |
| 45 | ifneq ($(TARGET_BUILD_APPS),) |
| 46 | LOCAL_SDK_VERSION := 11 |
| 47 | else |
| 48 | LOCAL_JAVA_LIBRARIES := core |
| 49 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 50 | endif |
Allan Wojciechowski | e7f0391 | 2013-05-28 18:16:54 +0100 | [diff] [blame] | 51 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 52 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 53 | |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 54 | # non-jarjar'd version of okhttp to compile the tests against |
| 55 | include $(CLEAR_VARS) |
| 56 | LOCAL_MODULE := okhttp-nojarjar |
| 57 | LOCAL_MODULE_TAGS := optional |
Allan Wojciechowski | e7f0391 | 2013-05-28 18:16:54 +0100 | [diff] [blame] | 58 | LOCAL_SRC_FILES := $(okhttp_system_src_files) |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 59 | LOCAL_JAVACFLAGS := -encoding UTF-8 |
Kenny Root | ee421d1 | 2013-04-23 22:39:04 -0700 | [diff] [blame] | 60 | LOCAL_JAVA_LIBRARIES := conscrypt core |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 61 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 62 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Brian Carlstrom | 38381e4 | 2013-04-03 18:01:19 -0700 | [diff] [blame] | 63 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 64 | |
| 65 | include $(CLEAR_VARS) |
Neil Fuller | 98d2d60 | 2014-05-29 11:58:32 +0100 | [diff] [blame] | 66 | LOCAL_MODULE := okhttp-tests-nojarjar |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 67 | LOCAL_MODULE_TAGS := optional |
| 68 | LOCAL_SRC_FILES := $(okhttp_test_src_files) |
| 69 | LOCAL_JAVACFLAGS := -encoding UTF-8 |
Neil Fuller | 98d2d60 | 2014-05-29 11:58:32 +0100 | [diff] [blame] | 70 | LOCAL_JAVA_LIBRARIES := okhttp-nojarjar junit4-target bouncycastle-nojarjar |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 71 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 72 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 73 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 74 | |
Ian Rogers | 112fb08 | 2014-05-23 12:09:52 -0700 | [diff] [blame^] | 75 | include $(CLEAR_VARS) |
| 76 | LOCAL_MODULE := okhttp-hostdex |
| 77 | LOCAL_MODULE_TAGS := optional |
| 78 | LOCAL_SRC_FILES := $(okhttp_system_src_files) |
| 79 | LOCAL_JAVACFLAGS := -encoding UTF-8 |
| 80 | LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |
| 81 | LOCAL_JAVA_LIBRARIES := conscrypt-hostdex |
| 82 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 83 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |