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 | |
jwilson | 2231db3 | 2012-12-26 11:37:43 -0700 | [diff] [blame] | 18 | okhttp_src_files := $(call all-java-files-under,src/main/java) |
| 19 | okhttp_src_files := $(filter-out %/Platform.java, $(okhttp_src_files)) |
| 20 | okhttp_src_files += $(call all-java-files-under, android/main/java) |
| 21 | |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 22 | okhttp_test_src_files := $(call all-java-files-under,src/test/java) |
| 23 | okhttp_test_src_files := $(filter-out src/test/java/com/squareup/okhttp/internal/spdy/SpdyServer.java, $(okhttp_test_src_files)) |
| 24 | |
Narayan Kamath | 153d095 | 2012-08-09 13:14:26 +0100 | [diff] [blame] | 25 | include $(CLEAR_VARS) |
| 26 | LOCAL_MODULE := okhttp |
| 27 | LOCAL_MODULE_TAGS := optional |
jwilson | 2231db3 | 2012-12-26 11:37:43 -0700 | [diff] [blame] | 28 | LOCAL_SRC_FILES := $(okhttp_src_files) |
| 29 | LOCAL_JAVACFLAGS := -encoding UTF-8 |
| 30 | LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |
Kenny Root | ee421d1 | 2013-04-23 22:39:04 -0700 | [diff] [blame^] | 31 | LOCAL_JAVA_LIBRARIES := conscrypt core |
Brian Carlstrom | cd5fb67 | 2013-04-02 13:21:23 -0700 | [diff] [blame] | 32 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 33 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Narayan Kamath | 153d095 | 2012-08-09 13:14:26 +0100 | [diff] [blame] | 34 | include $(BUILD_JAVA_LIBRARY) |
jwilson | 2231db3 | 2012-12-26 11:37:43 -0700 | [diff] [blame] | 35 | |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 36 | # non-jarjar'd version of okhttp to compile the tests against |
| 37 | include $(CLEAR_VARS) |
| 38 | LOCAL_MODULE := okhttp-nojarjar |
| 39 | LOCAL_MODULE_TAGS := optional |
| 40 | LOCAL_SRC_FILES := $(okhttp_src_files) |
| 41 | LOCAL_JAVACFLAGS := -encoding UTF-8 |
Kenny Root | ee421d1 | 2013-04-23 22:39:04 -0700 | [diff] [blame^] | 42 | LOCAL_JAVA_LIBRARIES := conscrypt core |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 43 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 44 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Brian Carlstrom | 38381e4 | 2013-04-03 18:01:19 -0700 | [diff] [blame] | 45 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Brian Carlstrom | d935f31 | 2013-04-03 10:06:56 -0700 | [diff] [blame] | 46 | |
| 47 | include $(CLEAR_VARS) |
| 48 | LOCAL_MODULE := okhttp-tests |
| 49 | LOCAL_MODULE_TAGS := optional |
| 50 | LOCAL_SRC_FILES := $(okhttp_test_src_files) |
| 51 | LOCAL_JAVACFLAGS := -encoding UTF-8 |
| 52 | LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |
| 53 | LOCAL_JAVA_LIBRARIES := okhttp-nojarjar junit4-target mockwebserver bouncycastle-nojarjar |
| 54 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 55 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 56 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 57 | |
jwilson | 2231db3 | 2012-12-26 11:37:43 -0700 | [diff] [blame] | 58 | ifeq ($(WITH_HOST_DALVIK),true) |
| 59 | include $(CLEAR_VARS) |
| 60 | LOCAL_MODULE := okhttp-hostdex |
| 61 | LOCAL_MODULE_TAGS := optional |
| 62 | LOCAL_SRC_FILES := $(okhttp_src_files) |
| 63 | LOCAL_JAVACFLAGS := -encoding UTF-8 |
| 64 | LOCAL_BUILD_HOST_DEX := true |
| 65 | LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |
Kenny Root | ee421d1 | 2013-04-23 22:39:04 -0700 | [diff] [blame^] | 66 | LOCAL_JAVA_LIBRARIES := conscrypt-hostdex core-hostdex |
Brian Carlstrom | cd5fb67 | 2013-04-02 13:21:23 -0700 | [diff] [blame] | 67 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 68 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
jwilson | 2231db3 | 2012-12-26 11:37:43 -0700 | [diff] [blame] | 69 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 70 | endif |