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 | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 17 | # Include definitions of DAGGER2_PROCESSOR_CLASSES/LIBRARIES |
| 18 | include external/dagger2/dagger2_annotation_processor.mk |
| 19 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 20 | # build caliper host jar |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 21 | # ============================================================ |
| 22 | |
| 23 | include $(CLEAR_VARS) |
| 24 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 25 | LOCAL_MODULE := caliper-host |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 26 | LOCAL_MODULE_TAGS := optional |
| 27 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 28 | LOCAL_SRC_FILES := $(call all-java-files-under, caliper/src/main/java/) |
| 29 | LOCAL_JAVA_RESOURCE_DIRS := caliper/src/main/resources |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 30 | LOCAL_IS_HOST_MODULE := true |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 31 | |
| 32 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 33 | apache-commons-math-host \ |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 34 | caliper-gson-host \ |
| 35 | caliper-java-allocation-instrumenter-host \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 36 | caliper-jersey-client-host \ |
| 37 | caliper-jersey-core-host \ |
| 38 | caliper-joda-time-host \ |
| 39 | caliper-jsr311-api-host \ |
| 40 | dagger2-host \ |
| 41 | dagger2-inject-host \ |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 42 | guavalib |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 43 | |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 44 | # Use Dagger2 annotation processor |
| 45 | PROCESSOR_LIBRARIES := $(DAGGER2_PROCESSOR_LIBRARIES) |
| 46 | PROCESSOR_CLASSES := $(DAGGER2_PROCESSOR_CLASSES) |
| 47 | include external/dagger2/java_annotation_processors.mk |
| 48 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 49 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 50 | include $(BUILD_HOST_JAVA_LIBRARY) |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 51 | |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 52 | # Remember the location of the generated files, this is needed for when |
| 53 | # building for target |
| 54 | caliper_host_generated_sources_dir := $(local-generated-sources-dir)/annotation_processor_output |
| 55 | |
| 56 | # build caliper target api jar |
| 57 | # ============================================================ |
| 58 | # This contains just those classes needed for benchmarks to compile. |
| 59 | |
| 60 | include $(CLEAR_VARS) |
| 61 | |
| 62 | LOCAL_MODULE := caliper-api-target |
| 63 | LOCAL_MODULE_TAGS := optional |
| 64 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 65 | LOCAL_SRC_FILES := \ |
| 66 | caliper/src/main/java/com/google/caliper/AfterExperiment.java \ |
| 67 | caliper/src/main/java/com/google/caliper/BeforeExperiment.java \ |
| 68 | caliper/src/main/java/com/google/caliper/Param.java \ |
| 69 | caliper/src/main/java/com/google/caliper/All.java \ |
| 70 | caliper/src/main/java/com/google/caliper/Benchmark.java |
| 71 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 72 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 73 | include $(BUILD_JAVA_LIBRARY) |
| 74 | |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 75 | # build caliper tests |
| 76 | # ============================================================ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 77 | # vogar --expectations $ANDROID_BUILD_TOP/external/caliper/expectations/knownfailures.txt \ |
| 78 | --test-only \ |
| 79 | --classpath $ANDROID_BUILD_TOP/out/host/common/obj/JAVA_LIBRARIES/caliper-tests_intermediates/javalib.jar \ |
| 80 | com.google.caliper |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 81 | |
| 82 | include $(CLEAR_VARS) |
| 83 | |
| 84 | LOCAL_MODULE := caliper-tests |
| 85 | LOCAL_MODULE_TAGS := optional |
| 86 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 87 | LOCAL_SRC_FILES := $(call all-java-files-under, caliper/src/test/java/) |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 88 | LOCAL_JAVA_RESOURCE_DIRS := caliper/src/test/resources |
| 89 | LOCAL_IS_HOST_MODULE := true |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 90 | |
| 91 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 92 | caliper-host \ |
Paul Duffin | 361540c | 2016-11-29 12:39:42 +0000 | [diff] [blame] | 93 | junit-host \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 94 | mockito-host |
| 95 | |
| 96 | # Use Dagger2 annotation processor |
| 97 | PROCESSOR_LIBRARIES := $(DAGGER2_PROCESSOR_LIBRARIES) |
| 98 | PROCESSOR_CLASSES := $(DAGGER2_PROCESSOR_CLASSES) |
| 99 | include external/dagger2/java_annotation_processors.mk |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 100 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 101 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 102 | include $(BUILD_HOST_JAVA_LIBRARY) |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 103 | |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 104 | # build caliper examples |
| 105 | # ============================================================ |
| 106 | |
| 107 | include $(CLEAR_VARS) |
| 108 | |
| 109 | LOCAL_MODULE := caliper-examples |
| 110 | LOCAL_MODULE_TAGS := optional |
| 111 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 112 | LOCAL_SRC_FILES := $(call all-java-files-under, examples/src/main/java/) |
| 113 | LOCAL_IS_HOST_MODULE := true |
| 114 | |
| 115 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
| 116 | caliper-host \ |
Paul Duffin | 361540c | 2016-11-29 12:39:42 +0000 | [diff] [blame] | 117 | junit-host \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 118 | mockito-host |
| 119 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 120 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 121 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 122 | |
| 123 | # Build host dependencies. |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 124 | # ============================================================ |
| 125 | include $(CLEAR_VARS) |
| 126 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 127 | LOCAL_PREBUILT_JAVA_LIBRARIES := \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 128 | caliper-gson-host:lib/gson-2.2.2$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 129 | caliper-java-allocation-instrumenter-host:lib/java-allocation-instrumenter-2.0$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 130 | caliper-jersey-client-host:lib/jersey-client-1.11$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 131 | caliper-jersey-core-host:lib/jersey-core-1.11$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 132 | caliper-joda-time-host:lib/joda-time-2.1$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 133 | 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] | 134 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 135 | include $(BUILD_HOST_PREBUILT) |