blob: ab9ceeb995cf6984bc69ea181db58546157ce505 [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 Cross2c429dc2017-08-31 16:45:16 -070040 if library.properties.Installable != nil && *library.properties.Installable == false {
41 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 }
Nan Zhangea568a42017-11-08 21:20:04 -080059 fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", String(library.deviceProperties.Sdk_version))
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
66 // Temporary hack: export sources used to compile framework.jar to Make
67 // to be used for droiddoc
68 // TODO(ccross): remove this once droiddoc is in soong
69 if library.Name() == "framework" {
70 fmt.Fprintln(w, "SOONG_FRAMEWORK_SRCS :=", strings.Join(library.compiledJavaSrcs.Strings(), " "))
71 fmt.Fprintln(w, "SOONG_FRAMEWORK_SRCJARS :=", strings.Join(library.compiledSrcJars.Strings(), " "))
72 }
Colin Crossa18e9cf2017-08-10 17:00:19 -070073 },
74 },
Colin Cross92430102017-10-09 14:59:32 -070075 Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
76 android.WriteAndroidMkData(w, data)
77
Colin Crossff3ae9d2018-04-10 16:15:18 -070078 if Bool(library.deviceProperties.Hostdex) && !library.Host() {
Colin Cross92430102017-10-09 14:59:32 -070079 fmt.Fprintln(w, "include $(CLEAR_VARS)")
80 fmt.Fprintln(w, "LOCAL_MODULE := "+name+"-hostdex")
81 fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true")
82 fmt.Fprintln(w, "LOCAL_MODULE_CLASS := JAVA_LIBRARIES")
Nan Zhanged19fc32017-10-19 13:06:22 -070083 fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", library.implementationJarFile.String())
Colin Cross92430102017-10-09 14:59:32 -070084 if library.properties.Installable != nil && *library.properties.Installable == false {
85 fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
86 }
87 if library.dexJarFile != nil {
88 fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", library.dexJarFile.String())
89 }
Nan Zhanged19fc32017-10-19 13:06:22 -070090 fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", library.implementationJarFile.String())
Colin Cross92430102017-10-09 14:59:32 -070091 fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES := "+strings.Join(data.Required, " "))
92 fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_java_prebuilt.mk")
93 }
94 },
Colin Crossa18e9cf2017-08-10 17:00:19 -070095 }
Dan Willemsen218f6562015-07-08 18:13:11 -070096}
97
Colin Cross05638fc2018-04-09 18:40:24 -070098func (j *Test) AndroidMk() android.AndroidMkData {
99 data := j.Library.AndroidMk()
100 data.Extra = append(data.Extra, func(w io.Writer, outputFile android.Path) {
101 fmt.Fprintln(w, "LOCAL_MODULE_TAGS := tests")
102 if len(j.testProperties.Test_suites) > 0 {
103 fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE :=",
104 strings.Join(j.testProperties.Test_suites, " "))
105 }
106 })
107
108 return data
109}
110
Colin Crossa18e9cf2017-08-10 17:00:19 -0700111func (prebuilt *Import) AndroidMk() android.AndroidMkData {
112 return android.AndroidMkData{
113 Class: "JAVA_LIBRARIES",
114 OutputFile: android.OptionalPathForPath(prebuilt.combinedClasspathFile),
Colin Cross53499412017-09-07 13:20:25 -0700115 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
Colin Crossa18e9cf2017-08-10 17:00:19 -0700116 Extra: []android.AndroidMkExtraFunc{
117 func(w io.Writer, outputFile android.Path) {
Colin Crossff3ae9d2018-04-10 16:15:18 -0700118 fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := ", !Bool(prebuilt.properties.Installable))
Nan Zhanged19fc32017-10-19 13:06:22 -0700119 fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", prebuilt.combinedClasspathFile.String())
Nan Zhangea568a42017-11-08 21:20:04 -0800120 fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", String(prebuilt.properties.Sdk_version))
Colin Crossa18e9cf2017-08-10 17:00:19 -0700121 },
122 },
123 }
Dan Willemsen218f6562015-07-08 18:13:11 -0700124}
Colin Cross10a03492017-08-10 17:09:43 -0700125
Colin Crossfabb6082018-02-20 17:22:23 -0800126func (prebuilt *AARImport) AndroidMk() android.AndroidMkData {
127 return android.AndroidMkData{
128 Class: "JAVA_LIBRARIES",
129 OutputFile: android.OptionalPathForPath(prebuilt.classpathFile),
130 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
131 Extra: []android.AndroidMkExtraFunc{
132 func(w io.Writer, outputFile android.Path) {
133 fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
134 fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
135 fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", prebuilt.classpathFile.String())
136 fmt.Fprintln(w, "LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=", prebuilt.exportPackage.String())
137 fmt.Fprintln(w, "LOCAL_SOONG_EXPORT_PROGUARD_FLAGS :=", prebuilt.proguardFlags.String())
Colin Cross66f78822018-05-02 12:58:28 -0700138 fmt.Fprintln(w, "LOCAL_SOONG_STATIC_LIBRARY_EXTRA_PACKAGES :=", prebuilt.extraAaptPackagesFile.String())
Colin Cross10f7c4a2018-05-23 10:59:28 -0700139 fmt.Fprintln(w, "LOCAL_FULL_MANIFEST_FILE :=", prebuilt.manifest.String())
Colin Crossfabb6082018-02-20 17:22:23 -0800140 fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", String(prebuilt.properties.Sdk_version))
141 },
142 },
143 }
144}
145
Colin Cross10a03492017-08-10 17:09:43 -0700146func (binary *Binary) AndroidMk() android.AndroidMkData {
Colin Cross10a03492017-08-10 17:09:43 -0700147
Colin Cross6b4a32d2017-12-05 13:42:45 -0800148 if !binary.isWrapperVariant {
149 return android.AndroidMkData{
150 Class: "JAVA_LIBRARIES",
151 OutputFile: android.OptionalPathForPath(binary.implementationJarFile),
152 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
153 Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
154 android.WriteAndroidMkData(w, data)
Colin Cross19655682017-09-07 17:00:22 -0700155
Colin Cross6b4a32d2017-12-05 13:42:45 -0800156 fmt.Fprintln(w, "jar_installed_module := $(LOCAL_INSTALLED_MODULE)")
157 },
158 }
159 } else {
160 return android.AndroidMkData{
161 Class: "EXECUTABLES",
162 OutputFile: android.OptionalPathForPath(binary.wrapperFile),
163 Extra: []android.AndroidMkExtraFunc{
164 func(w io.Writer, outputFile android.Path) {
165 fmt.Fprintln(w, "LOCAL_STRIP_MODULE := false")
166 },
167 },
168 Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
169 android.WriteAndroidMkData(w, data)
170
171 // Ensure that the wrapper script timestamp is always updated when the jar is updated
172 fmt.Fprintln(w, "$(LOCAL_INSTALLED_MODULE): $(jar_installed_module)")
173 fmt.Fprintln(w, "jar_installed_module :=")
174 },
175 }
Colin Cross10a03492017-08-10 17:09:43 -0700176 }
177}
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800178
179func (app *AndroidApp) AndroidMk() android.AndroidMkData {
180 return android.AndroidMkData{
181 Class: "APPS",
182 OutputFile: android.OptionalPathForPath(app.outputFile),
183 Include: "$(BUILD_SYSTEM)/soong_app_prebuilt.mk",
184 Extra: []android.AndroidMkExtraFunc{
185 func(w io.Writer, outputFile android.Path) {
Colin Cross70798562017-12-13 22:42:59 -0800186 fmt.Fprintln(w, "LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=", app.exportPackage.String())
187 if app.dexJarFile != nil {
188 fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", app.dexJarFile.String())
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800189 }
Colin Cross5dfabfb2017-12-14 13:19:01 -0800190 if app.implementationJarFile != nil {
191 fmt.Fprintln(w, "LOCAL_SOONG_CLASSES_JAR :=", app.implementationJarFile)
192 }
193 if app.headerJarFile != nil {
194 fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", app.headerJarFile.String())
195 }
Colin Cross70798562017-12-13 22:42:59 -0800196 if app.jacocoReportClassesFile != nil {
197 fmt.Fprintln(w, "LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR :=", app.jacocoReportClassesFile.String())
198 }
Colin Cross66dbc0b2017-12-28 12:23:20 -0800199 if app.proguardDictionary != nil {
200 fmt.Fprintln(w, "LOCAL_SOONG_PROGUARD_DICT :=", app.proguardDictionary.String())
201 }
Colin Cross70798562017-12-13 22:42:59 -0800202
203 if app.Name() == "framework-res" {
204 fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)")
205 // Make base_rules.mk not put framework-res in a subdirectory called
206 // framework_res.
207 fmt.Fprintln(w, "LOCAL_NO_STANDARD_LIBRARIES := true")
208 }
209
210 if len(app.rroDirs) > 0 {
Colin Crossa140bb02018-04-17 10:52:26 -0700211 // Reverse the order, Soong stores rroDirs in aapt2 order (low to high priority), but Make
212 // expects it in LOCAL_RESOURCE_DIRS order (high to low priority).
213 fmt.Fprintln(w, "LOCAL_SOONG_RRO_DIRS :=", strings.Join(android.ReversePaths(app.rroDirs).Strings(), " "))
Colin Cross70798562017-12-13 22:42:59 -0800214 }
215
216 if Bool(app.appProperties.Export_package_resources) {
217 fmt.Fprintln(w, "LOCAL_EXPORT_PACKAGE_RESOURCES := true")
218 }
219
220 fmt.Fprintln(w, "LOCAL_FULL_MANIFEST_FILE :=", app.manifestPath.String())
221
Colin Cross16056062017-12-13 22:46:28 -0800222 if Bool(app.appProperties.Privileged) {
223 fmt.Fprintln(w, "LOCAL_PRIVILEGED_MODULE := true")
224 }
Colin Crosse1731a52017-12-14 11:22:55 -0800225
226 fmt.Fprintln(w, "LOCAL_CERTIFICATE :=", app.certificate.pem.String())
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800227 },
228 },
229 }
Colin Crossa97c5d32018-03-28 14:58:31 -0700230}
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800231
Colin Crossae5caf52018-05-22 11:11:52 -0700232func (a *AndroidTest) AndroidMk() android.AndroidMkData {
233 data := a.AndroidApp.AndroidMk()
234 data.Extra = append(data.Extra, func(w io.Writer, outputFile android.Path) {
235 fmt.Fprintln(w, "LOCAL_MODULE_TAGS := tests")
236 if len(a.testProperties.Test_suites) > 0 {
237 fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE :=",
238 strings.Join(a.testProperties.Test_suites, " "))
239 }
240 })
241
242 return data
243}
244
Colin Crossa97c5d32018-03-28 14:58:31 -0700245func (a *AndroidLibrary) AndroidMk() android.AndroidMkData {
246 data := a.Library.AndroidMk()
247
248 data.Extra = append(data.Extra, func(w io.Writer, outputFile android.Path) {
249 if a.proguardDictionary != nil {
250 fmt.Fprintln(w, "LOCAL_SOONG_PROGUARD_DICT :=", a.proguardDictionary.String())
251 }
252
253 if a.Name() == "framework-res" {
254 fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)")
255 // Make base_rules.mk not put framework-res in a subdirectory called
256 // framework_res.
257 fmt.Fprintln(w, "LOCAL_NO_STANDARD_LIBRARIES := true")
258 }
259
260 fmt.Fprintln(w, "LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=", a.exportPackage.String())
Colin Cross66f78822018-05-02 12:58:28 -0700261 fmt.Fprintln(w, "LOCAL_SOONG_STATIC_LIBRARY_EXTRA_PACKAGES :=", a.extraAaptPackagesFile.String())
Colin Crossa97c5d32018-03-28 14:58:31 -0700262 fmt.Fprintln(w, "LOCAL_FULL_MANIFEST_FILE :=", a.manifestPath.String())
Colin Cross89c31582018-04-30 15:55:11 -0700263 fmt.Fprintln(w, "LOCAL_SOONG_EXPORT_PROGUARD_FLAGS :=",
264 strings.Join(a.exportedProguardFlagFiles.Strings(), " "))
Colin Crossa97c5d32018-03-28 14:58:31 -0700265 fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
266 fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
267 })
268
269 return data
Colin Cross5ab4e6d2017-11-22 16:20:45 -0800270}
Nan Zhang581fd212018-01-10 16:06:12 -0800271
272func (jd *Javadoc) AndroidMk() android.AndroidMkData {
273 return android.AndroidMkData{
274 Class: "JAVA_LIBRARIES",
Nan Zhangccff0f72018-03-08 17:26:16 -0800275 OutputFile: android.OptionalPathForPath(jd.stubsSrcJar),
Nan Zhang581fd212018-01-10 16:06:12 -0800276 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
277 Extra: []android.AndroidMkExtraFunc{
278 func(w io.Writer, outputFile android.Path) {
Colin Cross38b40df2018-04-10 16:14:46 -0700279 if BoolDefault(jd.properties.Installable, true) {
Nan Zhang581fd212018-01-10 16:06:12 -0800280 fmt.Fprintln(w, "LOCAL_DROIDDOC_DOC_ZIP := ", jd.docZip.String())
281 }
Nan Zhangccff0f72018-03-08 17:26:16 -0800282 if jd.stubsSrcJar != nil {
283 fmt.Fprintln(w, "LOCAL_DROIDDOC_STUBS_SRCJAR := ", jd.stubsSrcJar.String())
Nan Zhang581fd212018-01-10 16:06:12 -0800284 }
285 },
286 },
287 }
288}
289
290func (ddoc *Droiddoc) AndroidMk() android.AndroidMkData {
291 return android.AndroidMkData{
292 Class: "JAVA_LIBRARIES",
Nan Zhangccff0f72018-03-08 17:26:16 -0800293 OutputFile: android.OptionalPathForPath(ddoc.stubsSrcJar),
Nan Zhang581fd212018-01-10 16:06:12 -0800294 Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
295 Extra: []android.AndroidMkExtraFunc{
296 func(w io.Writer, outputFile android.Path) {
Colin Cross38b40df2018-04-10 16:14:46 -0700297 if BoolDefault(ddoc.Javadoc.properties.Installable, true) {
Nan Zhang581fd212018-01-10 16:06:12 -0800298 fmt.Fprintln(w, "LOCAL_DROIDDOC_DOC_ZIP := ", ddoc.Javadoc.docZip.String())
299 }
Nan Zhangccff0f72018-03-08 17:26:16 -0800300 if ddoc.Javadoc.stubsSrcJar != nil {
301 fmt.Fprintln(w, "LOCAL_DROIDDOC_STUBS_SRCJAR := ", ddoc.Javadoc.stubsSrcJar.String())
Nan Zhang581fd212018-01-10 16:06:12 -0800302 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700303 if ddoc.checkCurrentApiTimestamp != nil {
304 fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-current-api")
305 fmt.Fprintln(w, ddoc.Name()+"-check-current-api:",
306 ddoc.checkCurrentApiTimestamp.String())
307
308 fmt.Fprintln(w, ".PHONY: checkapi")
Jiyong Parkeeb8a642018-05-12 22:21:20 +0900309 fmt.Fprintln(w, "checkapi:",
Nan Zhang61819ce2018-05-04 18:49:16 -0700310 ddoc.checkCurrentApiTimestamp.String())
311
312 fmt.Fprintln(w, ".PHONY: droidcore")
313 fmt.Fprintln(w, "droidcore: checkapi")
314 }
315 if ddoc.updateCurrentApiTimestamp != nil {
316 fmt.Fprintln(w, ".PHONY:", ddoc.Name(), "-update-current-api")
317 fmt.Fprintln(w, ddoc.Name()+"-update-current-api:",
318 ddoc.updateCurrentApiTimestamp.String())
319
320 fmt.Fprintln(w, ".PHONY: update-api")
321 fmt.Fprintln(w, "update-api:",
322 ddoc.updateCurrentApiTimestamp.String())
323 }
324 if ddoc.checkLastReleasedApiTimestamp != nil {
325 fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-last-released-api")
326 fmt.Fprintln(w, ddoc.Name()+"-check-last-released-api:",
327 ddoc.checkLastReleasedApiTimestamp.String())
328 }
Nan Zhang28c68b92018-03-13 16:17:01 -0700329 apiFilePrefix := "INTERNAL_PLATFORM_"
330 if String(ddoc.properties.Api_tag_name) != "" {
331 apiFilePrefix += String(ddoc.properties.Api_tag_name) + "_"
332 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700333 if ddoc.apiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700334 fmt.Fprintln(w, apiFilePrefix+"API_FILE := ", ddoc.apiFile.String())
335 }
David Brazdilfbe4cc32018-05-31 13:56:46 +0100336 if ddoc.dexApiFile != nil {
337 fmt.Fprintln(w, apiFilePrefix+"DEX_API_FILE := ", ddoc.dexApiFile.String())
338 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700339 if ddoc.privateApiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700340 fmt.Fprintln(w, apiFilePrefix+"PRIVATE_API_FILE := ", ddoc.privateApiFile.String())
341 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700342 if ddoc.privateDexApiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700343 fmt.Fprintln(w, apiFilePrefix+"PRIVATE_DEX_API_FILE := ", ddoc.privateDexApiFile.String())
344 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700345 if ddoc.removedApiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700346 fmt.Fprintln(w, apiFilePrefix+"REMOVED_API_FILE := ", ddoc.removedApiFile.String())
347 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700348 if ddoc.removedDexApiFile != nil {
David Brazdilaac0c3c2018-04-24 16:23:29 +0100349 fmt.Fprintln(w, apiFilePrefix+"REMOVED_DEX_API_FILE := ", ddoc.removedDexApiFile.String())
350 }
Nan Zhang61819ce2018-05-04 18:49:16 -0700351 if ddoc.exactApiFile != nil {
Nan Zhang28c68b92018-03-13 16:17:01 -0700352 fmt.Fprintln(w, apiFilePrefix+"EXACT_API_FILE := ", ddoc.exactApiFile.String())
353 }
Nan Zhang581fd212018-01-10 16:06:12 -0800354 },
355 },
356 }
357}