1# Copyright (C) 2015 The Android Open Source Project 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 15LOCAL_PATH := $(call my-dir) 16 17# build dagger2 host jar 18# ============================================================ 19 20include $(CLEAR_VARS) 21 22LOCAL_MODULE := dagger2-host 23LOCAL_MODULE_TAGS := optional 24LOCAL_MODULE_CLASS := JAVA_LIBRARIES 25LOCAL_SRC_FILES := $(call all-java-files-under, core/src/main/java/) 26 27LOCAL_JAVA_LIBRARIES := \ 28 dagger2-inject-host \ 29 guavalib 30 31LOCAL_JAVA_LANGUAGE_VERSION := 1.7 32include $(BUILD_HOST_JAVA_LIBRARY) 33 34# build dagger2 producers host jar 35# ============================================================ 36 37include $(CLEAR_VARS) 38 39LOCAL_MODULE := dagger2-producers-host 40LOCAL_MODULE_TAGS := optional 41LOCAL_MODULE_CLASS := JAVA_LIBRARIES 42LOCAL_SRC_FILES := $(call all-java-files-under, producers/src/main/java/) 43 44LOCAL_JAVA_LIBRARIES := \ 45 dagger2-host \ 46 dagger2-inject-host \ 47 guavalib 48 49LOCAL_JAVA_LANGUAGE_VERSION := 1.7 50include $(BUILD_HOST_JAVA_LIBRARY) 51 52# build dagger2 compiler host jar 53# ============================================================ 54 55include $(CLEAR_VARS) 56 57LOCAL_MODULE := dagger2-compiler-host 58LOCAL_MODULE_TAGS := optional 59LOCAL_MODULE_CLASS := JAVA_LIBRARIES 60LOCAL_SRC_FILES := $(call all-java-files-under, compiler/src/main/java/) 61 62# Manually include META-INF/services/javax.annotation.processing.Processor 63# as the AutoService processor doesn't work properly. 64LOCAL_JAVA_RESOURCE_DIRS := resources 65 66LOCAL_STATIC_JAVA_LIBRARIES := \ 67 dagger2-host \ 68 dagger2-auto-common-host \ 69 dagger2-auto-factory-host \ 70 dagger2-auto-service-host \ 71 dagger2-auto-value-host \ 72 dagger2-google-java-format \ 73 dagger2-inject-host \ 74 dagger2-producers-host \ 75 guavalib 76 77# Disable the default discovery for annotation processors and explicitly specify 78# the path and classes needed. This is needed because otherwise it breaks a code 79# indexing tool that doesn't, as yet do automatic discovery. 80PROCESSOR_LIBRARIES := \ 81 dagger2-auto-common-host \ 82 dagger2-auto-factory-host \ 83 dagger2-auto-service-host \ 84 dagger2-auto-value-host \ 85 guavalib 86 87PROCESSOR_CLASSES := \ 88 com.google.auto.factory.processor.AutoFactoryProcessor \ 89 com.google.auto.service.processor.AutoServiceProcessor \ 90 com.google.auto.value.processor.AutoAnnotationProcessor \ 91 com.google.auto.value.processor.AutoValueProcessor 92 93include $(LOCAL_PATH)/java_annotation_processors.mk 94 95LOCAL_JAVA_LANGUAGE_VERSION := 1.7 96include $(BUILD_HOST_JAVA_LIBRARY) 97 98# Build host dependencies. 99# ============================================================ 100include $(CLEAR_VARS) 101 102LOCAL_PREBUILT_JAVA_LIBRARIES := \ 103 dagger2-auto-common-host:lib/auto-common-1.0-20151022.071545-39$(COMMON_JAVA_PACKAGE_SUFFIX) \ 104 dagger2-auto-factory-host:lib/auto-factory-1.0-20150915.183854-35$(COMMON_JAVA_PACKAGE_SUFFIX) \ 105 dagger2-auto-service-host:lib/auto-service-1.0-rc2$(COMMON_JAVA_PACKAGE_SUFFIX) \ 106 dagger2-auto-value-host:lib/auto-value-1.0$(COMMON_JAVA_PACKAGE_SUFFIX) \ 107 dagger2-google-java-format:lib/google-java-format-0.1-20151017.042846-2$(COMMON_JAVA_PACKAGE_SUFFIX) \ 108 dagger2-inject-host:lib/javax-inject$(COMMON_JAVA_PACKAGE_SUFFIX) 109 110include $(BUILD_HOST_PREBUILT) 111