aboutsummaryrefslogtreecommitdiff
path: root/Android.mk
blob: f31845d1e95e1ce5a6b48053052ba0290f67d731 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)

# build dagger2 host jar
# ============================================================

include $(CLEAR_VARS)

LOCAL_MODULE := dagger2-host
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_SRC_FILES := $(call all-java-files-under, core/src/main/java/)

LOCAL_JAVA_LIBRARIES := \
  dagger2-inject-host \
  guavalib

LOCAL_JAVA_LANGUAGE_VERSION := 1.7
include $(BUILD_HOST_JAVA_LIBRARY)

# build dagger2 producers host jar
# ============================================================

include $(CLEAR_VARS)

LOCAL_MODULE := dagger2-producers-host
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_SRC_FILES := $(call all-java-files-under, producers/src/main/java/)

LOCAL_JAVA_LIBRARIES := \
  dagger2-host \
  dagger2-inject-host \
  guavalib

LOCAL_JAVA_LANGUAGE_VERSION := 1.7
include $(BUILD_HOST_JAVA_LIBRARY)

# build dagger2 compiler host jar
# ============================================================

include $(CLEAR_VARS)

LOCAL_MODULE := dagger2-compiler-host
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
# Required for use of javax.annotation.Generated per http://b/62050818
LOCAL_JAVACFLAGS := $(if $(EXPERIMENTAL_USE_OPENJDK9),-J--add-modules=java.xml.ws.annotation,)
LOCAL_SRC_FILES := $(call all-java-files-under, compiler/src/main/java/)

# Manually include META-INF/services/javax.annotation.processing.Processor
# as the AutoService processor doesn't work properly.
LOCAL_JAVA_RESOURCE_DIRS := resources

LOCAL_STATIC_JAVA_LIBRARIES := \
  dagger2-host \
  dagger2-auto-common-host \
  dagger2-auto-factory-host \
  dagger2-auto-service-host \
  dagger2-auto-value-host \
  dagger2-google-java-format \
  dagger2-inject-host \
  dagger2-producers-host \
  guavalib

LOCAL_ANNOTATION_PROCESSORS := \
  dagger2-auto-common-host \
  dagger2-auto-factory-host \
  dagger2-auto-service-host \
  dagger2-auto-value-host \
  guavalib

LOCAL_ANNOTATION_PROCESSOR_CLASSES := \
  com.google.auto.factory.processor.AutoFactoryProcessor \
  com.google.auto.service.processor.AutoServiceProcessor \
  com.google.auto.value.processor.AutoAnnotationProcessor \
  com.google.auto.value.processor.AutoValueProcessor

LOCAL_JAVA_LANGUAGE_VERSION := 1.7
include $(BUILD_HOST_JAVA_LIBRARY)

# Build host dependencies.
# ============================================================
include $(CLEAR_VARS)

LOCAL_PREBUILT_JAVA_LIBRARIES := \
    dagger2-auto-common-host:lib/auto-common-1.0-20151022.071545-39$(COMMON_JAVA_PACKAGE_SUFFIX) \
    dagger2-auto-factory-host:lib/auto-factory-1.0-20150915.183854-35$(COMMON_JAVA_PACKAGE_SUFFIX) \
    dagger2-auto-service-host:lib/auto-service-1.0-rc2$(COMMON_JAVA_PACKAGE_SUFFIX) \
    dagger2-auto-value-host:lib/auto-value-1.0$(COMMON_JAVA_PACKAGE_SUFFIX) \
    dagger2-google-java-format:lib/google-java-format-0.1-20151017.042846-2$(COMMON_JAVA_PACKAGE_SUFFIX) \
    dagger2-inject-host:lib/javax-inject$(COMMON_JAVA_PACKAGE_SUFFIX)

include $(BUILD_HOST_PREBUILT)