Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 1 | # Copyright (C) 2015 The Android Open Source Project |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 17 | # build caliper host jar |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 18 | # ============================================================ |
| 19 | |
| 20 | include $(CLEAR_VARS) |
| 21 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 22 | LOCAL_MODULE := caliper-host |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 23 | LOCAL_MODULE_TAGS := optional |
| 24 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 25 | LOCAL_SRC_FILES := $(call all-java-files-under, caliper/src/main/java/) |
| 26 | LOCAL_JAVA_RESOURCE_DIRS := caliper/src/main/resources |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 27 | LOCAL_IS_HOST_MODULE := true |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 28 | |
| 29 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 30 | apache-commons-math-host \ |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 31 | caliper-gson-host \ |
| 32 | caliper-java-allocation-instrumenter-host \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 33 | caliper-jersey-client-host \ |
| 34 | caliper-jersey-core-host \ |
| 35 | caliper-joda-time-host \ |
| 36 | caliper-jsr311-api-host \ |
| 37 | dagger2-host \ |
| 38 | dagger2-inject-host \ |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 39 | guavalib |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 40 | |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 41 | # Use Dagger2 annotation processor |
Colin Cross | 8e31c10 | 2017-04-07 16:31:28 -0700 | [diff] [blame^] | 42 | LOCAL_ANNOTATION_PROCESSORS := dagger2-compiler-host |
| 43 | LOCAL_ANNOTATION_PROCESSOR_CLASSES := dagger.internal.codegen.ComponentProcessor |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 44 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 45 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 46 | include $(BUILD_HOST_JAVA_LIBRARY) |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 47 | |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 48 | # build caliper target api jar |
| 49 | # ============================================================ |
| 50 | # This contains just those classes needed for benchmarks to compile. |
| 51 | |
| 52 | include $(CLEAR_VARS) |
| 53 | |
| 54 | LOCAL_MODULE := caliper-api-target |
| 55 | LOCAL_MODULE_TAGS := optional |
| 56 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 57 | LOCAL_SRC_FILES := \ |
| 58 | caliper/src/main/java/com/google/caliper/AfterExperiment.java \ |
| 59 | caliper/src/main/java/com/google/caliper/BeforeExperiment.java \ |
| 60 | caliper/src/main/java/com/google/caliper/Param.java \ |
| 61 | caliper/src/main/java/com/google/caliper/All.java \ |
| 62 | caliper/src/main/java/com/google/caliper/Benchmark.java |
| 63 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 64 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 65 | include $(BUILD_JAVA_LIBRARY) |
| 66 | |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 67 | # build caliper tests |
| 68 | # ============================================================ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 69 | # vogar --expectations $ANDROID_BUILD_TOP/external/caliper/expectations/knownfailures.txt \ |
| 70 | --test-only \ |
| 71 | --classpath $ANDROID_BUILD_TOP/out/host/common/obj/JAVA_LIBRARIES/caliper-tests_intermediates/javalib.jar \ |
| 72 | com.google.caliper |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 73 | |
| 74 | include $(CLEAR_VARS) |
| 75 | |
| 76 | LOCAL_MODULE := caliper-tests |
| 77 | LOCAL_MODULE_TAGS := optional |
| 78 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 79 | LOCAL_SRC_FILES := $(call all-java-files-under, caliper/src/test/java/) |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 80 | LOCAL_JAVA_RESOURCE_DIRS := caliper/src/test/resources |
| 81 | LOCAL_IS_HOST_MODULE := true |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 82 | |
| 83 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 84 | caliper-host \ |
Paul Duffin | 361540c | 2016-11-29 12:39:42 +0000 | [diff] [blame] | 85 | junit-host \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 86 | mockito-host |
| 87 | |
| 88 | # Use Dagger2 annotation processor |
Colin Cross | 8e31c10 | 2017-04-07 16:31:28 -0700 | [diff] [blame^] | 89 | LOCAL_ANNOTATION_PROCESSORS := dagger2-compiler-host |
| 90 | LOCAL_ANNOTATION_PROCESSOR_CLASSES := dagger.internal.codegen.ComponentProcessor |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 91 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 92 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 93 | include $(BUILD_HOST_JAVA_LIBRARY) |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 94 | |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 95 | # build caliper examples |
| 96 | # ============================================================ |
| 97 | |
| 98 | include $(CLEAR_VARS) |
| 99 | |
| 100 | LOCAL_MODULE := caliper-examples |
| 101 | LOCAL_MODULE_TAGS := optional |
| 102 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 103 | LOCAL_SRC_FILES := $(call all-java-files-under, examples/src/main/java/) |
| 104 | LOCAL_IS_HOST_MODULE := true |
| 105 | |
| 106 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
| 107 | caliper-host \ |
Paul Duffin | 361540c | 2016-11-29 12:39:42 +0000 | [diff] [blame] | 108 | junit-host \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 109 | mockito-host |
| 110 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 111 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 112 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 113 | |
| 114 | # Build host dependencies. |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 115 | # ============================================================ |
| 116 | include $(CLEAR_VARS) |
| 117 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 118 | LOCAL_PREBUILT_JAVA_LIBRARIES := \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 119 | caliper-gson-host:lib/gson-2.2.2$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 120 | caliper-java-allocation-instrumenter-host:lib/java-allocation-instrumenter-2.0$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 121 | caliper-jersey-client-host:lib/jersey-client-1.11$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 122 | caliper-jersey-core-host:lib/jersey-core-1.11$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 123 | caliper-joda-time-host:lib/joda-time-2.1$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 124 | caliper-jsr311-api-host:lib/jsr311-api-1.1.1$(COMMON_JAVA_PACKAGE_SUFFIX) |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 125 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 126 | include $(BUILD_HOST_PREBUILT) |