Home | History | Annotate | Download | only in dagger2
      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 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 # build dagger2 host jar
     18 # ============================================================
     19 
     20 include $(CLEAR_VARS)
     21 
     22 LOCAL_MODULE := dagger2-host
     23 LOCAL_MODULE_TAGS := optional
     24 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
     25 LOCAL_SRC_FILES := $(call all-java-files-under, core/src/main/java/)
     26 
     27 LOCAL_JAVA_LIBRARIES := \
     28   dagger2-inject-host \
     29   guavalib
     30 
     31 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
     32 include $(BUILD_HOST_JAVA_LIBRARY)
     33 
     34 # build dagger2 producers host jar
     35 # ============================================================
     36 
     37 include $(CLEAR_VARS)
     38 
     39 LOCAL_MODULE := dagger2-producers-host
     40 LOCAL_MODULE_TAGS := optional
     41 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
     42 LOCAL_SRC_FILES := $(call all-java-files-under, producers/src/main/java/)
     43 
     44 LOCAL_JAVA_LIBRARIES := \
     45   dagger2-host \
     46   dagger2-inject-host \
     47   guavalib
     48 
     49 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
     50 include $(BUILD_HOST_JAVA_LIBRARY)
     51 
     52 # build dagger2 compiler host jar
     53 # ============================================================
     54 
     55 include $(CLEAR_VARS)
     56 
     57 LOCAL_MODULE := dagger2-compiler-host
     58 LOCAL_MODULE_TAGS := optional
     59 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
     60 LOCAL_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.
     64 LOCAL_JAVA_RESOURCE_DIRS := resources
     65 
     66 LOCAL_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.
     80 PROCESSOR_LIBRARIES := \
     81   dagger2-auto-common-host \
     82   dagger2-auto-factory-host \
     83   dagger2-auto-service-host \
     84   dagger2-auto-value-host \
     85   guavalib
     86 
     87 PROCESSOR_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 
     93 include $(LOCAL_PATH)/java_annotation_processors.mk
     94 
     95 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
     96 include $(BUILD_HOST_JAVA_LIBRARY)
     97 
     98 # Build host dependencies.
     99 # ============================================================
    100 include $(CLEAR_VARS)
    101 
    102 LOCAL_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 
    110 include $(BUILD_HOST_PREBUILT)
    111