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 |
Tobias Thierer | 55f01c3 | 2017-05-17 16:54:43 +0100 | [diff] [blame] | 27 | # Required for use of javax.annotation.Generated per http://b/62050818 |
| 28 | LOCAL_JAVACFLAGS := $(if $(EXPERIMENTAL_USE_OPENJDK9),-J--add-modules=java.xml.ws.annotation) |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 29 | LOCAL_IS_HOST_MODULE := true |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 30 | |
| 31 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 32 | apache-commons-math-host \ |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 33 | caliper-gson-host \ |
| 34 | caliper-java-allocation-instrumenter-host \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 35 | caliper-jersey-client-host \ |
| 36 | caliper-jersey-core-host \ |
| 37 | caliper-joda-time-host \ |
| 38 | caliper-jsr311-api-host \ |
| 39 | dagger2-host \ |
| 40 | dagger2-inject-host \ |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 41 | guavalib |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 42 | |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 43 | # Use Dagger2 annotation processor |
Colin Cross | 8e31c10 | 2017-04-07 16:31:28 -0700 | [diff] [blame] | 44 | LOCAL_ANNOTATION_PROCESSORS := dagger2-compiler-host |
| 45 | LOCAL_ANNOTATION_PROCESSOR_CLASSES := dagger.internal.codegen.ComponentProcessor |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 46 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 47 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 48 | include $(BUILD_HOST_JAVA_LIBRARY) |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 49 | |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 50 | # build caliper target api jar |
| 51 | # ============================================================ |
| 52 | # This contains just those classes needed for benchmarks to compile. |
| 53 | |
| 54 | include $(CLEAR_VARS) |
| 55 | |
| 56 | LOCAL_MODULE := caliper-api-target |
| 57 | LOCAL_MODULE_TAGS := optional |
| 58 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 59 | LOCAL_SRC_FILES := \ |
| 60 | caliper/src/main/java/com/google/caliper/AfterExperiment.java \ |
| 61 | caliper/src/main/java/com/google/caliper/BeforeExperiment.java \ |
| 62 | caliper/src/main/java/com/google/caliper/Param.java \ |
| 63 | caliper/src/main/java/com/google/caliper/All.java \ |
| 64 | caliper/src/main/java/com/google/caliper/Benchmark.java |
| 65 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 66 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 67 | include $(BUILD_JAVA_LIBRARY) |
| 68 | |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 69 | # build caliper tests |
| 70 | # ============================================================ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 71 | # vogar --expectations $ANDROID_BUILD_TOP/external/caliper/expectations/knownfailures.txt \ |
| 72 | --test-only \ |
| 73 | --classpath $ANDROID_BUILD_TOP/out/host/common/obj/JAVA_LIBRARIES/caliper-tests_intermediates/javalib.jar \ |
| 74 | com.google.caliper |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 75 | |
| 76 | include $(CLEAR_VARS) |
| 77 | |
| 78 | LOCAL_MODULE := caliper-tests |
| 79 | LOCAL_MODULE_TAGS := optional |
| 80 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 81 | LOCAL_SRC_FILES := $(call all-java-files-under, caliper/src/test/java/) |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 82 | LOCAL_JAVA_RESOURCE_DIRS := caliper/src/test/resources |
Tobias Thierer | 55f01c3 | 2017-05-17 16:54:43 +0100 | [diff] [blame] | 83 | # Required for use of javax.annotation.Generated per http://b/62050818 |
| 84 | LOCAL_JAVACFLAGS := $(if $(EXPERIMENTAL_USE_OPENJDK9),-J--add-modules=java.xml.ws.annotation,) |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 85 | LOCAL_IS_HOST_MODULE := true |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 86 | |
| 87 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 88 | caliper-host \ |
Paul Duffin | 361540c | 2016-11-29 12:39:42 +0000 | [diff] [blame] | 89 | junit-host \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 90 | mockito-host |
| 91 | |
| 92 | # Use Dagger2 annotation processor |
Colin Cross | 8e31c10 | 2017-04-07 16:31:28 -0700 | [diff] [blame] | 93 | LOCAL_ANNOTATION_PROCESSORS := dagger2-compiler-host |
| 94 | LOCAL_ANNOTATION_PROCESSOR_CLASSES := dagger.internal.codegen.ComponentProcessor |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 95 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 96 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 97 | include $(BUILD_HOST_JAVA_LIBRARY) |
Paul Duffin | fb58c0d | 2015-11-11 14:37:37 +0000 | [diff] [blame] | 98 | |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 99 | # build caliper examples |
| 100 | # ============================================================ |
| 101 | |
| 102 | include $(CLEAR_VARS) |
| 103 | |
| 104 | LOCAL_MODULE := caliper-examples |
| 105 | LOCAL_MODULE_TAGS := optional |
| 106 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 107 | LOCAL_SRC_FILES := $(call all-java-files-under, examples/src/main/java/) |
| 108 | LOCAL_IS_HOST_MODULE := true |
| 109 | |
| 110 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
| 111 | caliper-host \ |
Paul Duffin | 361540c | 2016-11-29 12:39:42 +0000 | [diff] [blame] | 112 | junit-host \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 113 | mockito-host |
| 114 | |
Neil Fuller | 6a66412 | 2016-02-23 16:55:13 +0000 | [diff] [blame] | 115 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 116 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 117 | |
| 118 | # Build host dependencies. |
Paul Duffin | 7fc0b45 | 2015-11-10 17:45:15 +0000 | [diff] [blame] | 119 | # ============================================================ |
| 120 | include $(CLEAR_VARS) |
| 121 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 122 | LOCAL_PREBUILT_JAVA_LIBRARIES := \ |
Paul Duffin | e236301 | 2015-11-30 16:20:41 +0000 | [diff] [blame] | 123 | caliper-gson-host:lib/gson-2.2.2$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 124 | caliper-java-allocation-instrumenter-host:lib/java-allocation-instrumenter-2.0$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 125 | caliper-jersey-client-host:lib/jersey-client-1.11$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 126 | caliper-jersey-core-host:lib/jersey-core-1.11$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 127 | caliper-joda-time-host:lib/joda-time-2.1$(COMMON_JAVA_PACKAGE_SUFFIX) \ |
| 128 | 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] | 129 | |
Paul Duffin | 5b4f728 | 2015-11-20 11:11:31 +0000 | [diff] [blame] | 130 | include $(BUILD_HOST_PREBUILT) |