blob: 209632b87b4d894974a372640aa43ba660391879 [file] [log] [blame]
Narayan Kamath153d0952012-08-09 13:14:26 +01001#
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#
16LOCAL_PATH := $(call my-dir)
17
jwilson2231db32012-12-26 11:37:43 -070018okhttp_src_files := $(call all-java-files-under,src/main/java)
19okhttp_src_files := $(filter-out %/Platform.java, $(okhttp_src_files))
20okhttp_src_files += $(call all-java-files-under, android/main/java)
21
Brian Carlstromd935f312013-04-03 10:06:56 -070022okhttp_test_src_files := $(call all-java-files-under,src/test/java)
23okhttp_test_src_files := $(filter-out src/test/java/com/squareup/okhttp/internal/spdy/SpdyServer.java, $(okhttp_test_src_files))
24
Narayan Kamath153d0952012-08-09 13:14:26 +010025include $(CLEAR_VARS)
26LOCAL_MODULE := okhttp
27LOCAL_MODULE_TAGS := optional
jwilson2231db32012-12-26 11:37:43 -070028LOCAL_SRC_FILES := $(okhttp_src_files)
29LOCAL_JAVACFLAGS := -encoding UTF-8
30LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
Kenny Rootee421d12013-04-23 22:39:04 -070031LOCAL_JAVA_LIBRARIES := conscrypt core
Brian Carlstromcd5fb672013-04-02 13:21:23 -070032LOCAL_NO_STANDARD_LIBRARIES := true
33LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Narayan Kamath153d0952012-08-09 13:14:26 +010034include $(BUILD_JAVA_LIBRARY)
jwilson2231db32012-12-26 11:37:43 -070035
Brian Carlstromd935f312013-04-03 10:06:56 -070036# non-jarjar'd version of okhttp to compile the tests against
37include $(CLEAR_VARS)
38LOCAL_MODULE := okhttp-nojarjar
39LOCAL_MODULE_TAGS := optional
40LOCAL_SRC_FILES := $(okhttp_src_files)
41LOCAL_JAVACFLAGS := -encoding UTF-8
Kenny Rootee421d12013-04-23 22:39:04 -070042LOCAL_JAVA_LIBRARIES := conscrypt core
Brian Carlstromd935f312013-04-03 10:06:56 -070043LOCAL_NO_STANDARD_LIBRARIES := true
44LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Brian Carlstrom38381e42013-04-03 18:01:19 -070045include $(BUILD_STATIC_JAVA_LIBRARY)
Brian Carlstromd935f312013-04-03 10:06:56 -070046
47include $(CLEAR_VARS)
48LOCAL_MODULE := okhttp-tests
49LOCAL_MODULE_TAGS := optional
50LOCAL_SRC_FILES := $(okhttp_test_src_files)
51LOCAL_JAVACFLAGS := -encoding UTF-8
52LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
53LOCAL_JAVA_LIBRARIES := okhttp-nojarjar junit4-target mockwebserver bouncycastle-nojarjar
54LOCAL_NO_STANDARD_LIBRARIES := true
55LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
56include $(BUILD_STATIC_JAVA_LIBRARY)
57
jwilson2231db32012-12-26 11:37:43 -070058ifeq ($(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 Rootee421d12013-04-23 22:39:04 -070066 LOCAL_JAVA_LIBRARIES := conscrypt-hostdex core-hostdex
Brian Carlstromcd5fb672013-04-02 13:21:23 -070067 LOCAL_NO_STANDARD_LIBRARIES := true
68 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
jwilson2231db32012-12-26 11:37:43 -070069 include $(BUILD_HOST_JAVA_LIBRARY)
70endif