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
15java_import_host {
16    name: "dagger2-auto-common",
17    jars: ["lib/auto-common-1.0-20151022.071545-39.jar"],
18}
19
20java_import_host {
21    name: "dagger2-auto-factory-jar",
22    jars: ["lib/auto-factory-1.0-20150915.183854-35.jar"],
23}
24
25java_plugin {
26    name: "dagger2-auto-factory",
27    processor_class: "com.google.auto.factory.processor.AutoFactoryProcessor",
28    static_libs: [
29        "dagger2-auto-factory-jar",
30        "dagger2-auto-common",
31        "guava",
32    ],
33}
34
35java_import_host {
36    name: "dagger2-auto-service-jar",
37    jars: ["lib/auto-service-1.0-rc2.jar"],
38}
39
40java_plugin {
41    name: "dagger2-auto-service",
42    processor_class: "com.google.auto.service.processor.AutoServiceProcessor",
43    static_libs: ["dagger2-auto-service-jar"],
44}
45
46java_import_host {
47    name: "dagger2-auto-value-jar",
48    jars: ["lib/auto-value-1.4.1.jar"],
49}
50
51java_plugin {
52    name: "dagger2-auto-value",
53    processor_class: "com.google.auto.value.processor.AutoValueProcessor",
54    static_libs: ["dagger2-auto-value-jar"],
55}
56
57java_plugin {
58    name: "dagger2-auto-annotation",
59    processor_class: "com.google.auto.value.processor.AutoAnnotationProcessor",
60    static_libs: ["dagger2-auto-value-jar"],
61}
62
63java_import_host {
64    name: "dagger2-google-java-format",
65    jars: ["lib/google-java-format-0.1-20151017.042846-2.jar"],
66}
67
68java_import_host {
69    name: "dagger2-inject",
70    jars: ["lib/javax-inject.jar"],
71}
72
73java_library_host {
74    name: "dagger2",
75
76    srcs: ["core/src/main/java/**/*.java"],
77
78    static_libs: ["dagger2-inject"],
79
80    libs: ["guava"],
81
82    java_version: "1.7",
83}
84
85// build dagger2 producers plugin
86// ============================================================
87
88java_plugin {
89    name: "dagger2-producers",
90
91    srcs: ["producers/src/main/java/**/*.java"],
92
93    static_libs: ["dagger2-inject"],
94
95    libs: [
96        "dagger2",
97        "guava",
98    ],
99
100    java_version: "1.7",
101}
102
103// build dagger2 compiler plugin
104// ============================================================
105
106java_plugin {
107    name: "dagger2-compiler",
108    processor_class: "dagger.internal.codegen.ComponentProcessor",
109    generates_api: true,
110
111    // Required for use of javax.annotation.Generated per http://b/62050818
112    javacflags: ["-J--add-modules=java.xml.ws.annotation"],
113    srcs: ["compiler/src/main/java/**/*.java"],
114
115    // Manually include META-INF/services/javax.annotation.processing.Processor
116    // as the AutoService processor doesn't work properly.
117    java_resource_dirs: ["resources"],
118
119    static_libs: [
120        "dagger2",
121        "dagger2-auto-common",
122        "dagger2-auto-factory",
123        "dagger2-auto-service",
124        "dagger2-auto-value",
125        "dagger2-google-java-format",
126        "dagger2-inject",
127        "dagger2-producers",
128        "guava",
129    ],
130
131    plugins: [
132        "dagger2-auto-factory",
133        "dagger2-auto-service",
134        "dagger2-auto-value",
135        "dagger2-auto-annotation",
136    ],
137
138    java_version: "1.7",
139}
140