blob: c6ecfbce5912d0834cef89ecafc61254640f79ed [file] [log] [blame]
Dan Willemsen218f6562015-07-08 18:13:11 -07001// Copyright 2015 Google Inc. All rights reserved.
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
15package java
16
17import (
Colin Cross74d73e22017-08-02 11:05:49 -070018 "fmt"
19 "io"
Colin Cross10a03492017-08-10 17:09:43 -070020 "strings"
Colin Cross74d73e22017-08-02 11:05:49 -070021
Colin Cross635c3b02016-05-18 15:37:25 -070022 "android/soong/android"
Dan Willemsen218f6562015-07-08 18:13:11 -070023)
24
Colin Crossa18e9cf2017-08-10 17:00:19 -070025func (library *Library) AndroidMk() android.AndroidMkData {
26 return android.AndroidMkData{
27 Class: "JAVA_LIBRARIES",
Nan Zhanged19fc32017-10-19 13:06:22 -070028 OutputFile: android.OptionalPathForPath(library.implementationJarFile),
Colin Cross53499412017-09-07 13:20:25 -070029 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
Colin Crossa18e9cf2017-08-10 17:00:19 -070030 Extra: []android.AndroidMkExtraFunc{
31 func(w io.Writer, outputFile android.Path) {
Colin Cross5beccee2017-12-07 15:28:59 -080032 if len(library.logtagsSrcs) > 0 {
33 var logtags []string
34 for _, l := range library.logtagsSrcs {
35 logtags = append(logtags, l.Rel())
36 }
37 fmt.Fprintln(w, "LOCAL_LOGTAGS_FILES :=", strings.Join(logtags, " "))
38 }
39
Colin Cross9ae1b922018-06-26 17:59:05 -070040 if library.installFile == nil {
Colin Cross2c429dc2017-08-31 16:45:16 -070041 fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
42 }
Colin Cross6ade34f2017-09-15 13:00:47 -070043 if library.dexJarFile != nil {
44 fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", library.dexJarFile.String())
Colin Cross1bd87802017-12-05 15:31:19 -080045 if library.deviceProperties.Dex_preopt.Enabled != nil {
46 fmt.Fprintln(w, "LOCAL_DEX_PREOPT :=", *library.deviceProperties.Dex_preopt.Enabled)
47 }
48 if library.deviceProperties.Dex_preopt.App_image != nil {
49 fmt.Fprintln(w, "LOCAL_DEX_PREOPT_APP_IMAGE :=", *library.deviceProperties.Dex_preopt.App_image)
50 }
51 if library.deviceProperties.Dex_preopt.Profile_guided != nil {
52 fmt.Fprintln(w, "LOCAL_DEX_PREOPT_GENERATE_PROFILE :=", *library.deviceProperties.Dex_preopt.Profile_guided)
53 }
54 if library.deviceProperties.Dex_preopt.Profile != nil {
55 fmt.Fprintln(w, "LOCAL_DEX_PREOPT_GENERATE_PROFILE := true")
56 fmt.Fprintln(w, "LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING := $(LOCAL_PATH)/"+*library.deviceProperties.Dex_preopt.Profile)
Colin Crossa22116e2017-10-19 14:18:58 -070057 }
Colin Cross6ade34f2017-09-15 13:00:47 -070058 }
Colin Cross83bb3162018-06-25 15:48:06 -070059 fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", library.sdkVersion())
Nan Zhanged19fc32017-10-19 13:06:22 -070060 fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", library.headerJarFile.String())
Colin Crosscb933592017-11-22 13:49:43 -080061
62 if library.jacocoReportClassesFile != nil {
63 fmt.Fprintln(w, "LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR :=", library.jacocoReportClassesFile.String())
64 }
Colin Cross5ab4e6d2017-11-22 16:20:45 -080065
Jiyong Park1be96912018-05-28 18:02:19 +090066 if len(library.exportedSdkLibs) != 0 {
67 fmt.Fprintln(w, "LOCAL_EXPORT_SDK_LIBRARIES :=", strings.Join(library.exportedSdkLibs, " "))
68 }
69
Colin Cross5ab4e6d2017-11-22 16:20:45 -080070 // Temporary hack: export sources used to compile framework.jar to Make
71 // to be used for droiddoc
72 // TODO(ccross): remove this once droiddoc is in soong
73 if library.Name() == "framework" {
74 fmt.Fprintln(w, "SOONG_FRAMEWORK_SRCS :=", strings.Join(library.compiledJavaSrcs.Strings(), " "))
75 fmt.Fprintln(w, "SOONG_FRAMEWORK_SRCJARS :=", strings.Join(library.compiledSrcJars.Strings(), " "))
76 }
Colin Crossa18e9cf2017-08-10 17:00:19 -070077 },
78 },
Colin Cross92430102017-10-09 14:59:32 -070079 Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
80 android.WriteAndroidMkData(w, data)
81
Colin Crossff3ae9d2018-04-10 16:15:18 -070082 if Bool(library.deviceProperties.Hostdex) && !library.Host() {
Colin Cross92430102017-10-09 14:59:32 -070083 fmt.Fprintln(w, "include $(CLEAR_VARS)")
84 fmt.Fprintln(w, "LOCAL_MODULE := "+name+"-hostdex")
85 fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true")
86 fmt.Fprintln(w, "LOCAL_MODULE_CLASS := JAVA_LIBRARIES")
Nan Zhanged19fc32017-10-19 13:06:22 -070087 fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", library.implementationJarFile.String())
Colin Cross9ae1b922018-06-26 17:59:05 -070088 if library.installFile == nil {
Colin Cross92430102017-10-09 14:59:32 -070089 fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
90 }
91 if library.dexJarFile != nil {
92 fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", library.dexJarFile.String())
93 }
Nan Zhanged19fc32017-10-19 13:06:22 -070094 fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", library.implementationJarFile.String())
Colin Cross92430102017-10-09 14:59:32 -070095 fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES := "+strings.Join(data.Required, " "))
96 fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_java_prebuilt.mk")
97 }
98 },
Colin Crossa18e9cf2017-08-10 17:00:19 -070099 }
Dan Willemsen218f6562015-07-08 18:13:11 -0700100}
101
Colin Cross05638fc2018-04-09 18:40:24 -0700102func (j *Test) AndroidMk() android.AndroidMkData {
103 data := j.Library.AndroidMk()
104 data.Extra = append(data.Extra, func(w io.Writer, outputFile android.Path) {
105 fmt.Fprintln(w, "LOCAL_MODULE_TAGS := tests")
106 if len(j.testProperties.Test_suites) > 0 {
107 fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE :=",
108 strings.Join(j.testProperties.Test_suites, " "))
109 }
110 })
111
112 return data
113}
114
Colin Crossa18e9cf2017-08-10 17:00:19 -0700115func (prebuilt *Import) AndroidMk() android.AndroidMkData {
116 return android.AndroidMkData{
117 Class: "JAVA_LIBRARIES",
118 OutputFile: android.OptionalPathForPath(prebuilt.combinedClasspathFile),
Colin Cross53499412017-09-07 13:20:25 -0700119 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
Colin Crossa18e9cf2017-08-10 17:00:19 -0700120 Extra: []android.AndroidMkExtraFunc{
121 func(w io.Writer, outputFile android.Path) {
Colin Crossff3ae9d2018-04-10 16:15:18 -0700122 fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := ", !Bool(prebuilt.properties.Installable))
Nan Zhanged19fc32017-10-19 13:06:22 -0700123 fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", prebuilt.combinedClasspathFile.String())
Colin Cross83bb3162018-06-25 15:48:06 -0700124 fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", prebuilt.sdkVersion())
Colin Crossa18e9cf2017-08-10 17:00:19 -0700125 },
126 },
127 }
Dan Willemsen218f6562015-07-08 18:13:11 -0700128}
Colin Cross10a03492017-08-10 17:09:43 -0700129
Colin Crossfabb6082018-02-20 17:22:23 -0800130func (prebuilt *AARImport) AndroidMk() android.AndroidMkData {
131 return android.AndroidMkData{
132 Class: "JAVA_LIBRARIES",
133 OutputFile: android.OptionalPathForPath(prebuilt.classpathFile),
134 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
135 Extra: []android.AndroidMkExtraFunc{
136 func(w io.Writer, outputFile android.Path) {
137 fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
138 fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
139 fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", prebuilt.classpathFile.String())
140 fmt.Fprintln(w, "LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=", prebuilt.exportPackage.String())
141 fmt.Fprintln(w, "LOCAL_SOONG_EXPORT_PROGUARD_FLAGS :=", prebuilt.proguardFlags.String())
Colin Cross66f78822018-05-02 12:58:28 -0700142 fmt.Fprintln(w, "LOCAL_SOONG_STATIC_LIBRARY_EXTRA_PACKAGES :=", prebuilt.extraAaptPackagesFile.String())
Colin Cross10f7c4a2018-05-23 10:59:28 -0700143 fmt.Fprintln(w, "LOCAL_FULL_MANIFEST_FILE :=", prebuilt.manifest.String())
Colin Cross83bb3162018-06-25 15:48:06 -0700144 fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", prebuilt.sdkVersion())
Colin Crossfabb6082018-02-20 17:22:23 -0800145 },
146 },
147 }
148}
149
Colin Cross10a03492017-08-10 17:09:43 -0700150func (binary *Binary) AndroidMk() android.AndroidMkData {
Colin Cross10a03492017-08-10 17:09:43 -0700151
Colin Cross6b4a32d2017-12-05 13:42:45 -0800152 if !binary.isWrapperVariant {
153 return android.AndroidMkData{
154 Class: "JAVA_LIBRARIES",
155 OutputFile: android.OptionalPathForPath(binary.implementationJarFile),
156 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
157 Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
158 android.WriteAndroidMkData(w, data)
Colin Cross19655682017-09-07 17:00:22 -0700159
Colin Cross6b4a32d2017-12-05 13:42:45 -0800160 fmt.Fprintln(w, "jar_installed_module := $(LOCAL_INSTALLED_MODULE)")
161 },
162 }
163 } else {
164 return android.AndroidMkData{
165 Class: "EXECUTABLES",
166 OutputFile: android.OptionalPathForPath(binary.wrapperFile),
167 Extra: []android.AndroidMkExtraFunc{
168 func(w io.Writer, outputFile android.Path) {
169 fmt.Fprintln(w, "LOCAL_STRIP_MODULE := false")
170 },
171 },
172 Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
173 android.WriteAndroidMkData(w, data)
174
175 // Ensure that the wrapper script timestamp is always updated when the jar is updated
176 fmt.Fprintln(w, "$(LOCAL_INSTALLED_MODULE): $(jar_installed_module)")
177 fmt.Fprintln(w, "jar_installed_module :=")
178 },
179 }
Colin Cross10a03492017-08-10 17:09:43 -0700180 }
181}
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800182
183func (app *AndroidApp) AndroidMk() android.AndroidMkData {
184 return android.AndroidMkData{
185 Class: "APPS",
186 OutputFile: android.OptionalPathForPath(app.outputFile),
187 Include: "$(BUILD_SYSTEM)/soong_app_prebuilt.mk",
188 Extra: []android.AndroidMkExtraFunc{
189 func(w io.Writer, outputFile android.Path) {
Colin Cross70798562017-12-13 22:42:59 -0800190 fmt.Fprintln(w, "LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=", app.exportPackage.String())
191 if app.dexJarFile != nil {
192 fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", app.dexJarFile.String())
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800193 }
Colin Cross5dfabfb2017-12-14 13:19:01 -0800194 if app.implementationJarFile != nil {
195 fmt.Fprintln(w, "LOCAL_SOONG_CLASSES_JAR :=", app.implementationJarFile)
196 }
197 if app.headerJarFile != nil {
198 fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", app.headerJarFile.String())
199 }
Colin Cross70798562017-12-13 22:42:59 -0800200 if app.jacocoReportClassesFile != nil {
201 fmt.Fprintln(w, "LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR :=", app.jacocoReportClassesFile.String())
202 }
Colin Cross66dbc0b2017-12-28 12:23:20 -0800203 if app.proguardDictionary != nil {
204 fmt.Fprintln(w, "LOCAL_SOONG_PROGUARD_DICT :=", app.proguardDictionary.String())
205 }
Colin Cross70798562017-12-13 22:42:59 -0800206
207 if app.Name() == "framework-res" {
208 fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)")
209 // Make base_rules.mk not put framework-res in a subdirectory called
210 // framework_res.
211 fmt.Fprintln(w, "LOCAL_NO_STANDARD_LIBRARIES := true")
212 }
213
214 if len(app.rroDirs) > 0 {
Colin Crossa140bb02018-04-17 10:52:26 -0700215 // Reverse the order, Soong stores rroDirs in aapt2 order (low to high priority), but Make
216 // expects it in LOCAL_RESOURCE_DIRS order (high to low priority).
217 fmt.Fprintln(w, "LOCAL_SOONG_RRO_DIRS :=", strings.Join(android.ReversePaths(app.rroDirs).Strings(), " "))
Colin Cross70798562017-12-13 22:42:59 -0800218 }
219
220 if Bool(app.appProperties.Export_package_resources) {
221 fmt.Fprintln(w, "LOCAL_EXPORT_PACKAGE_RESOURCES := true")
222 }
223
224 fmt.Fprintln(w, "LOCAL_FULL_MANIFEST_FILE :=", app.manifestPath.String())
225
Colin Cross16056062017-12-13 22:46:28 -0800226 if Bool(app.appProperties.Privileged) {
227 fmt.Fprintln(w, "LOCAL_PRIVILEGED_MODULE := true")
228 }
Colin Crosse1731a52017-12-14 11:22:55 -0800229
230 fmt.Fprintln(w, "LOCAL_CERTIFICATE :=", app.certificate.pem.String())
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800231 },
232 },
233 }
Colin Crossa97c5d32018-03-28 14:58:31 -0700234}
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800235
Colin Crossae5caf52018-05-22 11:11:52 -0700236func (a *AndroidTest) AndroidMk() android.AndroidMkData {
237 data := a.AndroidApp.AndroidMk()
238 data.Extra = append(data.Extra, func(w io.Writer, outputFile android.Path) {
239 fmt.Fprintln(w, "LOCAL_MODULE_TAGS := tests")
240 if len(a.testProperties.Test_suites) > 0 {
241 fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE :=",
242 strings.Join(a.testProperties.Test_suites, " "))
243 }
244 })
245
246 return data
247}
248
Colin Crossa97c5d32018-03-28 14:58:31 -0700249func (a *AndroidLibrary) AndroidMk() android.AndroidMkData {
250 data := a.Library.AndroidMk()
251
252 data.Extra = append(data.Extra, func(w io.Writer, outputFile android.Path) {
253 if a.proguardDictionary != nil {
254 fmt.Fprintln(w, "LOCAL_SOONG_PROGUARD_DICT :=", a.proguardDictionary.String())
255 }
256
257 if a.Name() == "framework-res" {
258 fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)")
259 // Make base_rules.mk not put framework-res in a subdirectory called
260 // framework_res.
261 fmt.Fprintln(w, "LOCAL_NO_STANDARD_LIBRARIES := true")
262 }
263
264 fmt.Fprintln(w, "LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=", a.exportPackage.String())
Colin Cross66f78822018-05-02 12:58:28 -0700265 fmt.Fprintln(w, "LOCAL_SOONG_STATIC_LIBRARY_EXTRA_PACKAGES :=", a.extraAaptPackagesFile.String())
Colin Crossa97c5d32018-03-28 14:58:31 -0700266 fmt.Fprintln(w, "LOCAL_FULL_MANIFEST_FILE :=", a.manifestPath.String())
Colin Cross89c31582018-04-30 15:55:11 -0700267 fmt.Fprintln(w, "LOCAL_SOONG_EXPORT_PROGUARD_FLAGS :=",
268 strings.Join(a.exportedProguardFlagFiles.Strings(), " "))
Colin Crossa97c5d32018-03-28 14:58:31 -0700269 fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
270 fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
271 })
272
273 return data
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800274}
Nan Zhang581fd212018-01-10 16:06:12 -0800275
276func (jd *Javadoc) AndroidMk() android.AndroidMkData {
277 return android.AndroidMkData{
278 Class: "JAVA_LIBRARIES",
Nan Zhangccff0f72018-03-08 17:26:16 -0800279 OutputFile: android.OptionalPathForPath(jd.stubsSrcJar),
Nan Zhang581fd212018-01-10 16:06:12 -0800280 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
281 Extra: []android.AndroidMkExtraFunc{
282 func(w io.Writer, outputFile android.Path) {
Colin Cross38b40df2018-04-10 16:14:46 -0700283 if BoolDefault(jd.properties.Installable, true) {
Nan Zhang581fd212018-01-10 16:06:12 -0800284 fmt.Fprintln(w, "LOCAL_DROIDDOC_DOC_ZIP := ", jd.docZip.String())
285 }
Nan Zhangccff0f72018-03-08 17:26:16 -0800286 if jd.stubsSrcJar != nil {
287 fmt.Fprintln(w, "LOCAL_DROIDDOC_STUBS_SRCJAR := ", jd.stubsSrcJar.String())
Nan Zhang581fd212018-01-10 16:06:12 -0800288 }
289 },
290 },
291 }
292}
293
294func (ddoc *Droiddoc) AndroidMk() android.AndroidMkData {
295 return android.AndroidMkData{
296 Class: "JAVA_LIBRARIES",
Nan Zhangccff0f72018-03-08 17:26:16 -0800297 OutputFile: android.OptionalPathForPath(ddoc.stubsSrcJar),
Nan Zhang581fd212018-01-10 16:06:12 -0800298 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
299 Extra: []android.AndroidMkExtraFunc{
300 func(w io.Writer, outputFile android.Path) {
Colin Cross38b40df2018-04-10 16:14:46 -0700301 if BoolDefault(ddoc.Javadoc.properties.Installable, true) {
Nan Zhang581fd212018-01-10 16:06:12 -0800302 fmt.Fprintln(w, "LOCAL_DROIDDOC_DOC_ZIP := ", ddoc.Javadoc.docZip.String())
303 }
Nan Zhangccff0f72018-03-08 17:26:16 -0800304 if ddoc.Javadoc.stubsSrcJar != nil {
305 fmt.Fprintln(w, "LOCAL_DROIDDOC_STUBS_SRCJAR := ", ddoc.Javadoc.stubsSrcJar.String())
Nan Zhang581fd212018-01-10 16:06:12 -0800306 }
Nan Zhang03b733c2018-06-26 13:24:05 -0700307 if ddoc.annotationsZip != nil {
308 fmt.Fprintln(w, "LOCAL_DROIDDOC_ANNOTATIONS_ZIP := ", ddoc.annotationsZip.String())
309 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700310 if ddoc.checkCurrentApiTimestamp != nil {
311 fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-current-api")
312 fmt.Fprintln(w, ddoc.Name()+"-check-current-api:",
313 ddoc.checkCurrentApiTimestamp.String())
314
315 fmt.Fprintln(w, ".PHONY: checkapi")
Jiyong Parkeeb8a642018-05-12 22:21:20 +0900316 fmt.Fprintln(w, "checkapi:",
Nan Zhang61819ce2018-05-04 18:49:16 -0700317 ddoc.checkCurrentApiTimestamp.String())
318
319 fmt.Fprintln(w, ".PHONY: droidcore")
320 fmt.Fprintln(w, "droidcore: checkapi")
321 }
322 if ddoc.updateCurrentApiTimestamp != nil {
323 fmt.Fprintln(w, ".PHONY:", ddoc.Name(), "-update-current-api")
324 fmt.Fprintln(w, ddoc.Name()+"-update-current-api:",
325 ddoc.updateCurrentApiTimestamp.String())
326
327 fmt.Fprintln(w, ".PHONY: update-api")
328 fmt.Fprintln(w, "update-api:",
329 ddoc.updateCurrentApiTimestamp.String())
330 }
331 if ddoc.checkLastReleasedApiTimestamp != nil {
332 fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-last-released-api")
333 fmt.Fprintln(w, ddoc.Name()+"-check-last-released-api:",
334 ddoc.checkLastReleasedApiTimestamp.String())
335 }
Nan Zhang28c68b92018-03-13 16:17:01 -0700336 apiFilePrefix := "INTERNAL_PLATFORM_"
337 if String(ddoc.properties.Api_tag_name) != "" {
338 apiFilePrefix += String(ddoc.properties.Api_tag_name) + "_"
339 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700340 if ddoc.apiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700341 fmt.Fprintln(w, apiFilePrefix+"API_FILE := ", ddoc.apiFile.String())
342 }
David Brazdilfbe4cc32018-05-31 13:56:46 +0100343 if ddoc.dexApiFile != nil {
344 fmt.Fprintln(w, apiFilePrefix+"DEX_API_FILE := ", ddoc.dexApiFile.String())
345 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700346 if ddoc.privateApiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700347 fmt.Fprintln(w, apiFilePrefix+"PRIVATE_API_FILE := ", ddoc.privateApiFile.String())
348 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700349 if ddoc.privateDexApiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700350 fmt.Fprintln(w, apiFilePrefix+"PRIVATE_DEX_API_FILE := ", ddoc.privateDexApiFile.String())
351 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700352 if ddoc.removedApiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700353 fmt.Fprintln(w, apiFilePrefix+"REMOVED_API_FILE := ", ddoc.removedApiFile.String())
354 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700355 if ddoc.removedDexApiFile != nil {
David Brazdilaac0c3c2018-04-24 16:23:29 +0100356 fmt.Fprintln(w, apiFilePrefix+"REMOVED_DEX_API_FILE := ", ddoc.removedDexApiFile.String())
357 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700358 if ddoc.exactApiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700359 fmt.Fprintln(w, apiFilePrefix+"EXACT_API_FILE := ", ddoc.exactApiFile.String())
360 }
Nan Zhang581fd212018-01-10 16:06:12 -0800361 },
362 },
363 }
364}