Dan Willemsen | 218f656 | 2015-07-08 18:13:11 -0700 | [diff] [blame] | 1 | // 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 | |
| 15 | package java |
| 16 | |
| 17 | import ( |
Colin Cross | 74d73e2 | 2017-08-02 11:05:49 -0700 | [diff] [blame] | 18 | "fmt" |
| 19 | "io" |
| 20 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 21 | "android/soong/android" |
Dan Willemsen | 218f656 | 2015-07-08 18:13:11 -0700 | [diff] [blame] | 22 | ) |
| 23 | |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 24 | func (library *Library) AndroidMkEntriesHostDex() android.AndroidMkEntries { |
| 25 | hostDexNeeded := Bool(library.deviceProperties.Hostdex) && !library.Host() |
| 26 | if !library.IsForPlatform() { |
Jiyong Park | b02bb40 | 2019-12-03 00:43:57 +0900 | [diff] [blame] | 27 | // Don't emit hostdex modules from the APEX variants |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 28 | hostDexNeeded = false |
Sundong Ahn | 054b19a | 2018-10-19 13:46:09 +0900 | [diff] [blame] | 29 | } |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 30 | |
| 31 | if hostDexNeeded { |
| 32 | var output android.Path |
| 33 | if library.dexJarFile != nil { |
| 34 | output = library.dexJarFile |
| 35 | } else { |
| 36 | output = library.implementationAndResourcesJar |
| 37 | } |
| 38 | return android.AndroidMkEntries{ |
| 39 | Class: "JAVA_LIBRARIES", |
| 40 | SubName: "-hostdex", |
| 41 | OutputFile: android.OptionalPathForPath(output), |
| 42 | Required: library.deviceProperties.Target.Hostdex.Required, |
| 43 | Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk", |
| 44 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 45 | func(entries *android.AndroidMkEntries) { |
| 46 | entries.SetBool("LOCAL_IS_HOST_MODULE", true) |
| 47 | entries.SetPath("LOCAL_PREBUILT_MODULE_FILE", output) |
| 48 | if library.dexJarFile != nil { |
| 49 | entries.SetPath("LOCAL_SOONG_DEX_JAR", library.dexJarFile) |
| 50 | } |
| 51 | entries.SetPath("LOCAL_SOONG_HEADER_JAR", library.headerJarFile) |
| 52 | entries.SetPath("LOCAL_SOONG_CLASSES_JAR", library.implementationAndResourcesJar) |
| 53 | entries.SetString("LOCAL_MODULE_STEM", library.Stem()+"-hostdex") |
| 54 | }, |
| 55 | }, |
| 56 | } |
| 57 | } |
| 58 | return android.AndroidMkEntries{Disabled: true} |
Sundong Ahn | 054b19a | 2018-10-19 13:46:09 +0900 | [diff] [blame] | 59 | } |
| 60 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 61 | func (library *Library) AndroidMkEntries() []android.AndroidMkEntries { |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 62 | var entriesList []android.AndroidMkEntries |
| 63 | |
| 64 | mainEntries := android.AndroidMkEntries{Disabled: true} |
Jiyong Park | b02bb40 | 2019-12-03 00:43:57 +0900 | [diff] [blame] | 65 | |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 66 | // For a java library built for an APEX, we don't need Make module |
Jiyong Park | b02bb40 | 2019-12-03 00:43:57 +0900 | [diff] [blame] | 67 | hideFromMake := !library.IsForPlatform() |
| 68 | // If not available for platform, don't emit to make. |
| 69 | if !library.ApexModuleBase.AvailableFor(android.AvailableToPlatform) { |
| 70 | hideFromMake = true |
| 71 | } |
| 72 | if !hideFromMake { |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 73 | mainEntries = android.AndroidMkEntries{ |
| 74 | Class: "JAVA_LIBRARIES", |
Anton Hansson | 78156ef | 2020-03-27 19:39:48 +0000 | [diff] [blame] | 75 | DistFile: android.OptionalPathForPath(library.distFile), |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 76 | OutputFile: android.OptionalPathForPath(library.outputFile), |
| 77 | Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk", |
| 78 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 79 | func(entries *android.AndroidMkEntries) { |
| 80 | if len(library.logtagsSrcs) > 0 { |
| 81 | var logtags []string |
| 82 | for _, l := range library.logtagsSrcs { |
| 83 | logtags = append(logtags, l.Rel()) |
| 84 | } |
| 85 | entries.AddStrings("LOCAL_LOGTAGS_FILES", logtags...) |
Colin Cross | 5beccee | 2017-12-07 15:28:59 -0800 | [diff] [blame] | 86 | } |
Colin Cross | 5beccee | 2017-12-07 15:28:59 -0800 | [diff] [blame] | 87 | |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 88 | if library.installFile == nil { |
| 89 | entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true) |
| 90 | } |
| 91 | if library.dexJarFile != nil { |
| 92 | entries.SetPath("LOCAL_SOONG_DEX_JAR", library.dexJarFile) |
| 93 | } |
| 94 | if len(library.dexpreopter.builtInstalled) > 0 { |
| 95 | entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", library.dexpreopter.builtInstalled) |
| 96 | } |
Jiyong Park | 6a927c4 | 2020-01-21 02:03:43 +0900 | [diff] [blame] | 97 | entries.SetString("LOCAL_SDK_VERSION", library.sdkVersion().raw) |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 98 | entries.SetPath("LOCAL_SOONG_CLASSES_JAR", library.implementationAndResourcesJar) |
| 99 | entries.SetPath("LOCAL_SOONG_HEADER_JAR", library.headerJarFile) |
Colin Cross | cb93359 | 2017-11-22 13:49:43 -0800 | [diff] [blame] | 100 | |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 101 | if library.jacocoReportClassesFile != nil { |
| 102 | entries.SetPath("LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR", library.jacocoReportClassesFile) |
| 103 | } |
Colin Cross | 5ab4e6d | 2017-11-22 16:20:45 -0800 | [diff] [blame] | 104 | |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 105 | entries.AddStrings("LOCAL_EXPORT_SDK_LIBRARIES", library.exportedSdkLibs...) |
Jiyong Park | 1be9691 | 2018-05-28 18:02:19 +0900 | [diff] [blame] | 106 | |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 107 | if len(library.additionalCheckedModules) != 0 { |
| 108 | entries.AddStrings("LOCAL_ADDITIONAL_CHECKED_MODULE", library.additionalCheckedModules.Strings()...) |
| 109 | } |
Vladimir Marko | 0975ee0 | 2019-04-02 10:29:55 +0100 | [diff] [blame] | 110 | |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 111 | if library.proguardDictionary != nil { |
| 112 | entries.SetPath("LOCAL_SOONG_PROGUARD_DICT", library.proguardDictionary) |
| 113 | } |
| 114 | entries.SetString("LOCAL_MODULE_STEM", library.Stem()) |
| 115 | }, |
Colin Cross | a18e9cf | 2017-08-10 17:00:19 -0700 | [diff] [blame] | 116 | }, |
Jiyong Park | 55bd98b | 2019-12-11 17:27:07 +0900 | [diff] [blame] | 117 | } |
| 118 | } |
| 119 | |
| 120 | hostDexEntries := library.AndroidMkEntriesHostDex() |
| 121 | |
| 122 | entriesList = append(entriesList, mainEntries, hostDexEntries) |
| 123 | return entriesList |
Dan Willemsen | 218f656 | 2015-07-08 18:13:11 -0700 | [diff] [blame] | 124 | } |
| 125 | |
Paul Duffin | 42df144 | 2019-03-20 12:45:53 +0000 | [diff] [blame] | 126 | // Called for modules that are a component of a test suite. |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 127 | func testSuiteComponent(entries *android.AndroidMkEntries, test_suites []string) { |
Jaewoong Jung | b28eb5f | 2019-08-27 15:01:50 -0700 | [diff] [blame] | 128 | entries.SetString("LOCAL_MODULE_TAGS", "tests") |
| 129 | if len(test_suites) > 0 { |
| 130 | entries.AddStrings("LOCAL_COMPATIBILITY_SUITE", test_suites...) |
| 131 | } else { |
| 132 | entries.SetString("LOCAL_COMPATIBILITY_SUITE", "null-suite") |
| 133 | } |
| 134 | } |
| 135 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 136 | func (j *Test) AndroidMkEntries() []android.AndroidMkEntries { |
| 137 | entriesList := j.Library.AndroidMkEntries() |
| 138 | entries := &entriesList[0] |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 139 | entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) { |
| 140 | testSuiteComponent(entries, j.testProperties.Test_suites) |
Colin Cross | 303e21f | 2018-08-07 16:49:25 -0700 | [diff] [blame] | 141 | if j.testConfig != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 142 | entries.SetPath("LOCAL_FULL_TEST_CONFIG", j.testConfig) |
Julien Desprez | e146e39 | 2018-08-02 15:00:46 -0700 | [diff] [blame] | 143 | } |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 144 | androidMkWriteTestData(j.data, entries) |
Dan Shi | 2468d01 | 2020-01-06 15:47:57 -0800 | [diff] [blame] | 145 | if !BoolDefault(j.testProperties.Auto_gen_config, true) { |
| 146 | entries.SetString("LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG", "true") |
| 147 | } |
Colin Cross | 05638fc | 2018-04-09 18:40:24 -0700 | [diff] [blame] | 148 | }) |
| 149 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 150 | return entriesList |
Colin Cross | 05638fc | 2018-04-09 18:40:24 -0700 | [diff] [blame] | 151 | } |
| 152 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 153 | func (j *TestHelperLibrary) AndroidMkEntries() []android.AndroidMkEntries { |
| 154 | entriesList := j.Library.AndroidMkEntries() |
| 155 | entries := &entriesList[0] |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 156 | entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) { |
| 157 | testSuiteComponent(entries, j.testHelperLibraryProperties.Test_suites) |
Paul Duffin | 42df144 | 2019-03-20 12:45:53 +0000 | [diff] [blame] | 158 | }) |
| 159 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 160 | return entriesList |
Paul Duffin | 42df144 | 2019-03-20 12:45:53 +0000 | [diff] [blame] | 161 | } |
| 162 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 163 | func (prebuilt *Import) AndroidMkEntries() []android.AndroidMkEntries { |
Jiyong Park | 9b409bc | 2019-10-11 14:59:13 +0900 | [diff] [blame] | 164 | if !prebuilt.IsForPlatform() || !prebuilt.ContainingSdk().Unversioned() { |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 165 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Jiyong Park | 7f7766d | 2019-07-25 22:02:35 +0900 | [diff] [blame] | 166 | Disabled: true, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 167 | }} |
Jiyong Park | 7f7766d | 2019-07-25 22:02:35 +0900 | [diff] [blame] | 168 | } |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 169 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Colin Cross | a18e9cf | 2017-08-10 17:00:19 -0700 | [diff] [blame] | 170 | Class: "JAVA_LIBRARIES", |
| 171 | OutputFile: android.OptionalPathForPath(prebuilt.combinedClasspathFile), |
Colin Cross | 5349941 | 2017-09-07 13:20:25 -0700 | [diff] [blame] | 172 | Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk", |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 173 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 174 | func(entries *android.AndroidMkEntries) { |
| 175 | entries.SetBool("LOCAL_UNINSTALLABLE_MODULE", !Bool(prebuilt.properties.Installable)) |
| 176 | entries.SetPath("LOCAL_SOONG_HEADER_JAR", prebuilt.combinedClasspathFile) |
| 177 | entries.SetPath("LOCAL_SOONG_CLASSES_JAR", prebuilt.combinedClasspathFile) |
Jiyong Park | 6a927c4 | 2020-01-21 02:03:43 +0900 | [diff] [blame] | 178 | entries.SetString("LOCAL_SDK_VERSION", prebuilt.sdkVersion().raw) |
Jiyong Park | 0b23875 | 2019-10-29 11:23:10 +0900 | [diff] [blame] | 179 | entries.SetString("LOCAL_MODULE_STEM", prebuilt.Stem()) |
Colin Cross | a18e9cf | 2017-08-10 17:00:19 -0700 | [diff] [blame] | 180 | }, |
| 181 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 182 | }} |
Dan Willemsen | 218f656 | 2015-07-08 18:13:11 -0700 | [diff] [blame] | 183 | } |
Colin Cross | 10a0349 | 2017-08-10 17:09:43 -0700 | [diff] [blame] | 184 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 185 | func (prebuilt *DexImport) AndroidMkEntries() []android.AndroidMkEntries { |
Jiyong Park | 7f7766d | 2019-07-25 22:02:35 +0900 | [diff] [blame] | 186 | if !prebuilt.IsForPlatform() { |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 187 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Jiyong Park | 7f7766d | 2019-07-25 22:02:35 +0900 | [diff] [blame] | 188 | Disabled: true, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 189 | }} |
Jiyong Park | 7f7766d | 2019-07-25 22:02:35 +0900 | [diff] [blame] | 190 | } |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 191 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Colin Cross | 42be761 | 2019-02-21 18:12:14 -0800 | [diff] [blame] | 192 | Class: "JAVA_LIBRARIES", |
| 193 | OutputFile: android.OptionalPathForPath(prebuilt.maybeStrippedDexJarFile), |
| 194 | Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk", |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 195 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 196 | func(entries *android.AndroidMkEntries) { |
Colin Cross | 42be761 | 2019-02-21 18:12:14 -0800 | [diff] [blame] | 197 | if prebuilt.dexJarFile != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 198 | entries.SetPath("LOCAL_SOONG_DEX_JAR", prebuilt.dexJarFile) |
Colin Cross | 42be761 | 2019-02-21 18:12:14 -0800 | [diff] [blame] | 199 | // TODO(b/125517186): export the dex jar as a classes jar to match some mis-uses in Make until |
| 200 | // boot_jars_package_check.mk can check dex jars. |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 201 | entries.SetPath("LOCAL_SOONG_HEADER_JAR", prebuilt.dexJarFile) |
| 202 | entries.SetPath("LOCAL_SOONG_CLASSES_JAR", prebuilt.dexJarFile) |
Colin Cross | 42be761 | 2019-02-21 18:12:14 -0800 | [diff] [blame] | 203 | } |
| 204 | if len(prebuilt.dexpreopter.builtInstalled) > 0 { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 205 | entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", prebuilt.dexpreopter.builtInstalled) |
Colin Cross | 42be761 | 2019-02-21 18:12:14 -0800 | [diff] [blame] | 206 | } |
Jiyong Park | 0b23875 | 2019-10-29 11:23:10 +0900 | [diff] [blame] | 207 | entries.SetString("LOCAL_MODULE_STEM", prebuilt.Stem()) |
Colin Cross | 42be761 | 2019-02-21 18:12:14 -0800 | [diff] [blame] | 208 | }, |
| 209 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 210 | }} |
Colin Cross | 42be761 | 2019-02-21 18:12:14 -0800 | [diff] [blame] | 211 | } |
| 212 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 213 | func (prebuilt *AARImport) AndroidMkEntries() []android.AndroidMkEntries { |
| 214 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Colin Cross | fabb608 | 2018-02-20 17:22:23 -0800 | [diff] [blame] | 215 | Class: "JAVA_LIBRARIES", |
| 216 | OutputFile: android.OptionalPathForPath(prebuilt.classpathFile), |
| 217 | Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk", |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 218 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 219 | func(entries *android.AndroidMkEntries) { |
| 220 | entries.SetBool("LOCAL_UNINSTALLABLE_MODULE", true) |
| 221 | entries.SetPath("LOCAL_SOONG_HEADER_JAR", prebuilt.classpathFile) |
| 222 | entries.SetPath("LOCAL_SOONG_CLASSES_JAR", prebuilt.classpathFile) |
| 223 | entries.SetPath("LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE", prebuilt.exportPackage) |
| 224 | entries.SetPath("LOCAL_SOONG_EXPORT_PROGUARD_FLAGS", prebuilt.proguardFlags) |
| 225 | entries.SetPath("LOCAL_SOONG_STATIC_LIBRARY_EXTRA_PACKAGES", prebuilt.extraAaptPackagesFile) |
| 226 | entries.SetPath("LOCAL_FULL_MANIFEST_FILE", prebuilt.manifest) |
Jiyong Park | 6a927c4 | 2020-01-21 02:03:43 +0900 | [diff] [blame] | 227 | entries.SetString("LOCAL_SDK_VERSION", prebuilt.sdkVersion().raw) |
Colin Cross | fabb608 | 2018-02-20 17:22:23 -0800 | [diff] [blame] | 228 | }, |
| 229 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 230 | }} |
Colin Cross | fabb608 | 2018-02-20 17:22:23 -0800 | [diff] [blame] | 231 | } |
| 232 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 233 | func (binary *Binary) AndroidMkEntries() []android.AndroidMkEntries { |
Colin Cross | 10a0349 | 2017-08-10 17:09:43 -0700 | [diff] [blame] | 234 | |
Colin Cross | 6b4a32d | 2017-12-05 13:42:45 -0800 | [diff] [blame] | 235 | if !binary.isWrapperVariant { |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 236 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Colin Cross | 6b4a32d | 2017-12-05 13:42:45 -0800 | [diff] [blame] | 237 | Class: "JAVA_LIBRARIES", |
Colin Cross | 331a121 | 2018-08-15 20:40:52 -0700 | [diff] [blame] | 238 | OutputFile: android.OptionalPathForPath(binary.outputFile), |
Colin Cross | 6b4a32d | 2017-12-05 13:42:45 -0800 | [diff] [blame] | 239 | Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk", |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 240 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 241 | func(entries *android.AndroidMkEntries) { |
| 242 | entries.SetPath("LOCAL_SOONG_HEADER_JAR", binary.headerJarFile) |
| 243 | entries.SetPath("LOCAL_SOONG_CLASSES_JAR", binary.implementationAndResourcesJar) |
Colin Cross | 12fc2af | 2019-01-14 12:35:45 -0800 | [diff] [blame] | 244 | if binary.dexJarFile != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 245 | entries.SetPath("LOCAL_SOONG_DEX_JAR", binary.dexJarFile) |
Colin Cross | 12fc2af | 2019-01-14 12:35:45 -0800 | [diff] [blame] | 246 | } |
| 247 | if len(binary.dexpreopter.builtInstalled) > 0 { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 248 | entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", binary.dexpreopter.builtInstalled) |
Colin Cross | 12fc2af | 2019-01-14 12:35:45 -0800 | [diff] [blame] | 249 | } |
Colin Cross | 331a121 | 2018-08-15 20:40:52 -0700 | [diff] [blame] | 250 | }, |
| 251 | }, |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 252 | ExtraFooters: []android.AndroidMkExtraFootersFunc{ |
| 253 | func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) { |
| 254 | fmt.Fprintln(w, "jar_installed_module := $(LOCAL_INSTALLED_MODULE)") |
| 255 | }, |
Colin Cross | 6b4a32d | 2017-12-05 13:42:45 -0800 | [diff] [blame] | 256 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 257 | }} |
Colin Cross | 6b4a32d | 2017-12-05 13:42:45 -0800 | [diff] [blame] | 258 | } else { |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 259 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Colin Cross | 6b4a32d | 2017-12-05 13:42:45 -0800 | [diff] [blame] | 260 | Class: "EXECUTABLES", |
| 261 | OutputFile: android.OptionalPathForPath(binary.wrapperFile), |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 262 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 263 | func(entries *android.AndroidMkEntries) { |
| 264 | entries.SetBool("LOCAL_STRIP_MODULE", false) |
Colin Cross | 6b4a32d | 2017-12-05 13:42:45 -0800 | [diff] [blame] | 265 | }, |
| 266 | }, |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 267 | ExtraFooters: []android.AndroidMkExtraFootersFunc{ |
| 268 | func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) { |
| 269 | // Ensure that the wrapper script timestamp is always updated when the jar is updated |
| 270 | fmt.Fprintln(w, "$(LOCAL_INSTALLED_MODULE): $(jar_installed_module)") |
| 271 | fmt.Fprintln(w, "jar_installed_module :=") |
| 272 | }, |
Colin Cross | 6b4a32d | 2017-12-05 13:42:45 -0800 | [diff] [blame] | 273 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 274 | }} |
Colin Cross | 10a0349 | 2017-08-10 17:09:43 -0700 | [diff] [blame] | 275 | } |
| 276 | } |
Colin Cross | 5ab4e6d | 2017-11-22 16:20:45 -0800 | [diff] [blame] | 277 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 278 | func (app *AndroidApp) AndroidMkEntries() []android.AndroidMkEntries { |
Jaewoong Jung | 87a33e7 | 2020-03-26 14:01:48 -0700 | [diff] [blame] | 279 | if !app.IsForPlatform() || app.appProperties.HideFromMake { |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 280 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Jiyong Park | 52cd06f | 2019-11-11 10:14:32 +0900 | [diff] [blame] | 281 | Disabled: true, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 282 | }} |
Jiyong Park | 52cd06f | 2019-11-11 10:14:32 +0900 | [diff] [blame] | 283 | } |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 284 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Colin Cross | 5ab4e6d | 2017-11-22 16:20:45 -0800 | [diff] [blame] | 285 | Class: "APPS", |
| 286 | OutputFile: android.OptionalPathForPath(app.outputFile), |
| 287 | Include: "$(BUILD_SYSTEM)/soong_app_prebuilt.mk", |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 288 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 289 | func(entries *android.AndroidMkEntries) { |
| 290 | // App module names can be overridden. |
| 291 | entries.SetString("LOCAL_MODULE", app.installApkName) |
Jaewoong Jung | 87a33e7 | 2020-03-26 14:01:48 -0700 | [diff] [blame] | 292 | entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", app.appProperties.PreventInstall) |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 293 | entries.SetPath("LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE", app.exportPackage) |
Colin Cross | 7079856 | 2017-12-13 22:42:59 -0800 | [diff] [blame] | 294 | if app.dexJarFile != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 295 | entries.SetPath("LOCAL_SOONG_DEX_JAR", app.dexJarFile) |
Colin Cross | 5ab4e6d | 2017-11-22 16:20:45 -0800 | [diff] [blame] | 296 | } |
Colin Cross | 331a121 | 2018-08-15 20:40:52 -0700 | [diff] [blame] | 297 | if app.implementationAndResourcesJar != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 298 | entries.SetPath("LOCAL_SOONG_CLASSES_JAR", app.implementationAndResourcesJar) |
Colin Cross | 5dfabfb | 2017-12-14 13:19:01 -0800 | [diff] [blame] | 299 | } |
| 300 | if app.headerJarFile != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 301 | entries.SetPath("LOCAL_SOONG_HEADER_JAR", app.headerJarFile) |
Colin Cross | 5dfabfb | 2017-12-14 13:19:01 -0800 | [diff] [blame] | 302 | } |
Colin Cross | f623721 | 2018-10-29 23:14:58 -0700 | [diff] [blame] | 303 | if app.bundleFile != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 304 | entries.SetPath("LOCAL_SOONG_BUNDLE", app.bundleFile) |
Colin Cross | f623721 | 2018-10-29 23:14:58 -0700 | [diff] [blame] | 305 | } |
Colin Cross | 7079856 | 2017-12-13 22:42:59 -0800 | [diff] [blame] | 306 | if app.jacocoReportClassesFile != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 307 | entries.SetPath("LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR", app.jacocoReportClassesFile) |
Colin Cross | 7079856 | 2017-12-13 22:42:59 -0800 | [diff] [blame] | 308 | } |
Colin Cross | 66dbc0b | 2017-12-28 12:23:20 -0800 | [diff] [blame] | 309 | if app.proguardDictionary != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 310 | entries.SetPath("LOCAL_SOONG_PROGUARD_DICT", app.proguardDictionary) |
Colin Cross | 66dbc0b | 2017-12-28 12:23:20 -0800 | [diff] [blame] | 311 | } |
Colin Cross | 7079856 | 2017-12-13 22:42:59 -0800 | [diff] [blame] | 312 | |
| 313 | if app.Name() == "framework-res" { |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 314 | entries.SetString("LOCAL_MODULE_PATH", "$(TARGET_OUT_JAVA_LIBRARIES)") |
Colin Cross | 7079856 | 2017-12-13 22:42:59 -0800 | [diff] [blame] | 315 | // Make base_rules.mk not put framework-res in a subdirectory called |
| 316 | // framework_res. |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 317 | entries.SetBoolIfTrue("LOCAL_NO_STANDARD_LIBRARIES", true) |
Colin Cross | 7079856 | 2017-12-13 22:42:59 -0800 | [diff] [blame] | 318 | } |
| 319 | |
Anton Hansson | 53c8844 | 2019-03-18 15:53:16 +0000 | [diff] [blame] | 320 | filterRRO := func(filter overlayType) android.Paths { |
| 321 | var paths android.Paths |
| 322 | for _, d := range app.rroDirs { |
| 323 | if d.overlayType == filter { |
| 324 | paths = append(paths, d.path) |
| 325 | } |
| 326 | } |
Colin Cross | a140bb0 | 2018-04-17 10:52:26 -0700 | [diff] [blame] | 327 | // Reverse the order, Soong stores rroDirs in aapt2 order (low to high priority), but Make |
| 328 | // expects it in LOCAL_RESOURCE_DIRS order (high to low priority). |
Anton Hansson | 53c8844 | 2019-03-18 15:53:16 +0000 | [diff] [blame] | 329 | return android.ReversePaths(paths) |
| 330 | } |
| 331 | deviceRRODirs := filterRRO(device) |
| 332 | if len(deviceRRODirs) > 0 { |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 333 | entries.AddStrings("LOCAL_SOONG_DEVICE_RRO_DIRS", deviceRRODirs.Strings()...) |
Anton Hansson | 53c8844 | 2019-03-18 15:53:16 +0000 | [diff] [blame] | 334 | } |
| 335 | productRRODirs := filterRRO(product) |
| 336 | if len(productRRODirs) > 0 { |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 337 | entries.AddStrings("LOCAL_SOONG_PRODUCT_RRO_DIRS", productRRODirs.Strings()...) |
Colin Cross | 7079856 | 2017-12-13 22:42:59 -0800 | [diff] [blame] | 338 | } |
| 339 | |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 340 | entries.SetBoolIfTrue("LOCAL_EXPORT_PACKAGE_RESOURCES", Bool(app.appProperties.Export_package_resources)) |
Colin Cross | 7079856 | 2017-12-13 22:42:59 -0800 | [diff] [blame] | 341 | |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 342 | entries.SetPath("LOCAL_FULL_MANIFEST_FILE", app.manifestPath) |
Colin Cross | 7079856 | 2017-12-13 22:42:59 -0800 | [diff] [blame] | 343 | |
Jiyong Park | f748731 | 2019-10-17 12:54:30 +0900 | [diff] [blame] | 344 | entries.SetBoolIfTrue("LOCAL_PRIVILEGED_MODULE", app.Privileged()) |
Colin Cross | e1731a5 | 2017-12-14 11:22:55 -0800 | [diff] [blame] | 345 | |
Jaewoong Jung | 78ec5d8 | 2020-01-31 10:11:47 -0800 | [diff] [blame] | 346 | entries.SetString("LOCAL_CERTIFICATE", app.certificate.AndroidMkString()) |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 347 | entries.AddStrings("LOCAL_OVERRIDES_PACKAGES", app.getOverriddenPackages()...) |
Colin Cross | a4f0881 | 2018-10-02 22:03:40 -0700 | [diff] [blame] | 348 | |
| 349 | for _, jniLib := range app.installJniLibs { |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 350 | entries.AddStrings("LOCAL_SOONG_JNI_LIBS_"+jniLib.target.Arch.ArchType.String(), jniLib.name) |
Colin Cross | a4f0881 | 2018-10-02 22:03:40 -0700 | [diff] [blame] | 351 | } |
Jaewoong Jung | 87a33e7 | 2020-03-26 14:01:48 -0700 | [diff] [blame] | 352 | if len(app.jniCoverageOutputs) > 0 { |
| 353 | entries.AddStrings("LOCAL_PREBUILT_COVERAGE_ARCHIVE", app.jniCoverageOutputs.Strings()...) |
| 354 | } |
Colin Cross | 43f08db | 2018-11-12 10:13:39 -0800 | [diff] [blame] | 355 | if len(app.dexpreopter.builtInstalled) > 0 { |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 356 | entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", app.dexpreopter.builtInstalled) |
Colin Cross | 43f08db | 2018-11-12 10:13:39 -0800 | [diff] [blame] | 357 | } |
Jaewoong Jung | 5a49881 | 2019-11-07 14:14:38 -0800 | [diff] [blame] | 358 | for _, extra := range app.extraOutputFiles { |
| 359 | install := app.onDeviceDir + "/" + extra.Base() |
| 360 | entries.AddStrings("LOCAL_SOONG_BUILT_INSTALLED", extra.String()+":"+install) |
Colin Cross | e560c4a | 2019-03-19 16:03:11 -0700 | [diff] [blame] | 361 | } |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 362 | }, |
| 363 | }, |
| 364 | ExtraFooters: []android.AndroidMkExtraFootersFunc{ |
| 365 | func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) { |
Jaewoong Jung | 9877279 | 2019-07-01 17:15:13 -0700 | [diff] [blame] | 366 | if app.noticeOutputs.Merged.Valid() { |
| 367 | fmt.Fprintf(w, "$(call dist-for-goals,%s,%s:%s)\n", |
| 368 | app.installApkName, app.noticeOutputs.Merged.String(), app.installApkName+"_NOTICE") |
| 369 | } |
| 370 | if app.noticeOutputs.TxtOutput.Valid() { |
| 371 | fmt.Fprintf(w, "$(call dist-for-goals,%s,%s:%s)\n", |
| 372 | app.installApkName, app.noticeOutputs.TxtOutput.String(), app.installApkName+"_NOTICE.txt") |
| 373 | } |
| 374 | if app.noticeOutputs.HtmlOutput.Valid() { |
| 375 | fmt.Fprintf(w, "$(call dist-for-goals,%s,%s:%s)\n", |
| 376 | app.installApkName, app.noticeOutputs.HtmlOutput.String(), app.installApkName+"_NOTICE.html") |
| 377 | } |
Colin Cross | 5ab4e6d | 2017-11-22 16:20:45 -0800 | [diff] [blame] | 378 | }, |
| 379 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 380 | }} |
Colin Cross | a97c5d3 | 2018-03-28 14:58:31 -0700 | [diff] [blame] | 381 | } |
Colin Cross | 5ab4e6d | 2017-11-22 16:20:45 -0800 | [diff] [blame] | 382 | |
Jaewoong Jung | 9109d72 | 2019-01-30 13:13:52 -0800 | [diff] [blame] | 383 | func (a *AndroidApp) getOverriddenPackages() []string { |
| 384 | var overridden []string |
| 385 | if len(a.appProperties.Overrides) > 0 { |
| 386 | overridden = append(overridden, a.appProperties.Overrides...) |
| 387 | } |
| 388 | if a.Name() != a.installApkName { |
| 389 | overridden = append(overridden, a.Name()) |
| 390 | } |
| 391 | return overridden |
| 392 | } |
| 393 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 394 | func (a *AndroidTest) AndroidMkEntries() []android.AndroidMkEntries { |
| 395 | entriesList := a.AndroidApp.AndroidMkEntries() |
| 396 | entries := &entriesList[0] |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 397 | entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) { |
| 398 | testSuiteComponent(entries, a.testProperties.Test_suites) |
Colin Cross | 303e21f | 2018-08-07 16:49:25 -0700 | [diff] [blame] | 399 | if a.testConfig != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 400 | entries.SetPath("LOCAL_FULL_TEST_CONFIG", a.testConfig) |
Julien Desprez | e146e39 | 2018-08-02 15:00:46 -0700 | [diff] [blame] | 401 | } |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 402 | androidMkWriteTestData(a.data, entries) |
Colin Cross | 252fc6f | 2018-10-04 15:22:03 -0700 | [diff] [blame] | 403 | }) |
| 404 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 405 | return entriesList |
Colin Cross | 252fc6f | 2018-10-04 15:22:03 -0700 | [diff] [blame] | 406 | } |
| 407 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 408 | func (a *AndroidTestHelperApp) AndroidMkEntries() []android.AndroidMkEntries { |
| 409 | entriesList := a.AndroidApp.AndroidMkEntries() |
| 410 | entries := &entriesList[0] |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 411 | entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) { |
| 412 | testSuiteComponent(entries, a.appTestHelperAppProperties.Test_suites) |
| 413 | }) |
Colin Cross | a97c5d3 | 2018-03-28 14:58:31 -0700 | [diff] [blame] | 414 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 415 | return entriesList |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 416 | } |
| 417 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 418 | func (a *AndroidLibrary) AndroidMkEntries() []android.AndroidMkEntries { |
| 419 | entriesList := a.Library.AndroidMkEntries() |
| 420 | entries := &entriesList[0] |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 421 | |
| 422 | entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) { |
Colin Cross | a54974c | 2018-10-29 23:15:37 -0700 | [diff] [blame] | 423 | if a.aarFile != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 424 | entries.SetPath("LOCAL_SOONG_AAR", a.aarFile) |
Colin Cross | a54974c | 2018-10-29 23:15:37 -0700 | [diff] [blame] | 425 | } |
Colin Cross | a97c5d3 | 2018-03-28 14:58:31 -0700 | [diff] [blame] | 426 | |
| 427 | if a.Name() == "framework-res" { |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 428 | entries.SetString("LOCAL_MODULE_PATH", "$(TARGET_OUT_JAVA_LIBRARIES)") |
Colin Cross | a97c5d3 | 2018-03-28 14:58:31 -0700 | [diff] [blame] | 429 | // Make base_rules.mk not put framework-res in a subdirectory called |
| 430 | // framework_res. |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 431 | entries.SetBoolIfTrue("LOCAL_NO_STANDARD_LIBRARIES", true) |
Colin Cross | a97c5d3 | 2018-03-28 14:58:31 -0700 | [diff] [blame] | 432 | } |
| 433 | |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 434 | entries.SetPath("LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE", a.exportPackage) |
| 435 | entries.SetPath("LOCAL_SOONG_STATIC_LIBRARY_EXTRA_PACKAGES", a.extraAaptPackagesFile) |
| 436 | entries.SetPath("LOCAL_FULL_MANIFEST_FILE", a.mergedManifestFile) |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 437 | entries.AddStrings("LOCAL_SOONG_EXPORT_PROGUARD_FLAGS", a.exportedProguardFlagFiles.Strings()...) |
| 438 | entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true) |
Colin Cross | a97c5d3 | 2018-03-28 14:58:31 -0700 | [diff] [blame] | 439 | }) |
| 440 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 441 | return entriesList |
Colin Cross | 5ab4e6d | 2017-11-22 16:20:45 -0800 | [diff] [blame] | 442 | } |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 443 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 444 | func (jd *Javadoc) AndroidMkEntries() []android.AndroidMkEntries { |
| 445 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 446 | Class: "JAVA_LIBRARIES", |
Nan Zhang | ccff0f7 | 2018-03-08 17:26:16 -0800 | [diff] [blame] | 447 | OutputFile: android.OptionalPathForPath(jd.stubsSrcJar), |
Colin Cross | 5fa9d6f | 2018-08-08 21:44:48 -0700 | [diff] [blame] | 448 | Include: "$(BUILD_SYSTEM)/soong_droiddoc_prebuilt.mk", |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 449 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 450 | func(entries *android.AndroidMkEntries) { |
Colin Cross | 38b40df | 2018-04-10 16:14:46 -0700 | [diff] [blame] | 451 | if BoolDefault(jd.properties.Installable, true) { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 452 | entries.SetPath("LOCAL_DROIDDOC_DOC_ZIP", jd.docZip) |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 453 | } |
Nan Zhang | ccff0f7 | 2018-03-08 17:26:16 -0800 | [diff] [blame] | 454 | if jd.stubsSrcJar != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 455 | entries.SetPath("LOCAL_DROIDDOC_STUBS_SRCJAR", jd.stubsSrcJar) |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 456 | } |
| 457 | }, |
| 458 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 459 | }} |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 460 | } |
| 461 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 462 | func (ddoc *Droiddoc) AndroidMkEntries() []android.AndroidMkEntries { |
| 463 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 464 | Class: "JAVA_LIBRARIES", |
Nan Zhang | ccff0f7 | 2018-03-08 17:26:16 -0800 | [diff] [blame] | 465 | OutputFile: android.OptionalPathForPath(ddoc.stubsSrcJar), |
Colin Cross | 5fa9d6f | 2018-08-08 21:44:48 -0700 | [diff] [blame] | 466 | Include: "$(BUILD_SYSTEM)/soong_droiddoc_prebuilt.mk", |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 467 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 468 | func(entries *android.AndroidMkEntries) { |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 469 | if BoolDefault(ddoc.Javadoc.properties.Installable, true) && ddoc.Javadoc.docZip != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 470 | entries.SetPath("LOCAL_DROIDDOC_DOC_ZIP", ddoc.Javadoc.docZip) |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 471 | } |
Nan Zhang | ccff0f7 | 2018-03-08 17:26:16 -0800 | [diff] [blame] | 472 | if ddoc.Javadoc.stubsSrcJar != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 473 | entries.SetPath("LOCAL_DROIDDOC_STUBS_SRCJAR", ddoc.Javadoc.stubsSrcJar) |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 474 | } |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 475 | }, |
| 476 | }, |
| 477 | ExtraFooters: []android.AndroidMkExtraFootersFunc{ |
| 478 | func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) { |
Nan Zhang | 61819ce | 2018-05-04 18:49:16 -0700 | [diff] [blame] | 479 | if ddoc.checkCurrentApiTimestamp != nil { |
| 480 | fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-current-api") |
| 481 | fmt.Fprintln(w, ddoc.Name()+"-check-current-api:", |
| 482 | ddoc.checkCurrentApiTimestamp.String()) |
| 483 | |
| 484 | fmt.Fprintln(w, ".PHONY: checkapi") |
Jiyong Park | eeb8a64 | 2018-05-12 22:21:20 +0900 | [diff] [blame] | 485 | fmt.Fprintln(w, "checkapi:", |
Nan Zhang | 61819ce | 2018-05-04 18:49:16 -0700 | [diff] [blame] | 486 | ddoc.checkCurrentApiTimestamp.String()) |
| 487 | |
| 488 | fmt.Fprintln(w, ".PHONY: droidcore") |
| 489 | fmt.Fprintln(w, "droidcore: checkapi") |
| 490 | } |
| 491 | if ddoc.updateCurrentApiTimestamp != nil { |
Dan Willemsen | a03c43a | 2018-07-24 13:00:52 -0700 | [diff] [blame] | 492 | fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-update-current-api") |
Nan Zhang | 61819ce | 2018-05-04 18:49:16 -0700 | [diff] [blame] | 493 | fmt.Fprintln(w, ddoc.Name()+"-update-current-api:", |
| 494 | ddoc.updateCurrentApiTimestamp.String()) |
| 495 | |
| 496 | fmt.Fprintln(w, ".PHONY: update-api") |
| 497 | fmt.Fprintln(w, "update-api:", |
| 498 | ddoc.updateCurrentApiTimestamp.String()) |
| 499 | } |
| 500 | if ddoc.checkLastReleasedApiTimestamp != nil { |
| 501 | fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-last-released-api") |
| 502 | fmt.Fprintln(w, ddoc.Name()+"-check-last-released-api:", |
| 503 | ddoc.checkLastReleasedApiTimestamp.String()) |
Adrian Roos | e3fe481 | 2019-01-23 14:51:55 +0100 | [diff] [blame] | 504 | |
Adrian Roos | 62e34b9 | 2019-01-30 19:51:39 +0100 | [diff] [blame] | 505 | if ddoc.Name() == "api-stubs-docs" || ddoc.Name() == "system-api-stubs-docs" { |
Adrian Roos | e3fe481 | 2019-01-23 14:51:55 +0100 | [diff] [blame] | 506 | fmt.Fprintln(w, ".PHONY: checkapi") |
| 507 | fmt.Fprintln(w, "checkapi:", |
| 508 | ddoc.checkLastReleasedApiTimestamp.String()) |
| 509 | |
| 510 | fmt.Fprintln(w, ".PHONY: droidcore") |
| 511 | fmt.Fprintln(w, "droidcore: checkapi") |
| 512 | } |
Nan Zhang | 61819ce | 2018-05-04 18:49:16 -0700 | [diff] [blame] | 513 | } |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 514 | }, |
| 515 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 516 | }} |
Nan Zhang | 581fd21 | 2018-01-10 16:06:12 -0800 | [diff] [blame] | 517 | } |
Colin Cross | d96ca35 | 2018-08-10 16:06:24 -0700 | [diff] [blame] | 518 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 519 | func (dstubs *Droidstubs) AndroidMkEntries() []android.AndroidMkEntries { |
Paul Duffin | 3ae2951 | 2020-04-08 18:18:03 +0100 | [diff] [blame] | 520 | // If the stubsSrcJar is not generated (because generate_stubs is false) then |
| 521 | // use the api file as the output file to ensure the relevant phony targets |
| 522 | // are created in make if only the api txt file is being generated. This is |
| 523 | // needed because an invalid output file would prevent the make entries from |
| 524 | // being written. |
| 525 | // TODO(b/146727827): Revert when we do not need to generate stubs and API separately. |
| 526 | distFile := android.OptionalPathForPath(dstubs.apiFile) |
| 527 | outputFile := android.OptionalPathForPath(dstubs.stubsSrcJar) |
| 528 | if !outputFile.Valid() { |
| 529 | outputFile = distFile |
| 530 | } |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 531 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 532 | Class: "JAVA_LIBRARIES", |
Paul Duffin | 3ae2951 | 2020-04-08 18:18:03 +0100 | [diff] [blame] | 533 | DistFile: distFile, |
| 534 | OutputFile: outputFile, |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 535 | Include: "$(BUILD_SYSTEM)/soong_droiddoc_prebuilt.mk", |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 536 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 537 | func(entries *android.AndroidMkEntries) { |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 538 | if dstubs.Javadoc.stubsSrcJar != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 539 | entries.SetPath("LOCAL_DROIDDOC_STUBS_SRCJAR", dstubs.Javadoc.stubsSrcJar) |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 540 | } |
Nan Zhang | d23ac69 | 2018-09-18 10:41:33 -0700 | [diff] [blame] | 541 | if dstubs.apiVersionsXml != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 542 | entries.SetPath("LOCAL_DROIDDOC_API_VERSIONS_XML", dstubs.apiVersionsXml) |
Nan Zhang | d23ac69 | 2018-09-18 10:41:33 -0700 | [diff] [blame] | 543 | } |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 544 | if dstubs.annotationsZip != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 545 | entries.SetPath("LOCAL_DROIDDOC_ANNOTATIONS_ZIP", dstubs.annotationsZip) |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 546 | } |
Nan Zhang | 71bbe63 | 2018-09-17 14:32:21 -0700 | [diff] [blame] | 547 | if dstubs.jdiffDocZip != nil { |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 548 | entries.SetPath("LOCAL_DROIDDOC_JDIFF_DOC_ZIP", dstubs.jdiffDocZip) |
Nan Zhang | 71bbe63 | 2018-09-17 14:32:21 -0700 | [diff] [blame] | 549 | } |
Jerome Gaillard | 0f59903 | 2019-10-10 19:29:11 +0100 | [diff] [blame] | 550 | if dstubs.metadataZip != nil { |
| 551 | entries.SetPath("LOCAL_DROIDDOC_METADATA_ZIP", dstubs.metadataZip) |
| 552 | } |
Jaewoong Jung | 9a1e8bd | 2019-09-04 20:17:54 -0700 | [diff] [blame] | 553 | }, |
| 554 | }, |
| 555 | ExtraFooters: []android.AndroidMkExtraFootersFunc{ |
| 556 | func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) { |
Anton Hansson | 27d9ec1 | 2020-04-17 11:48:24 +0100 | [diff] [blame] | 557 | if dstubs.apiFile != nil { |
| 558 | fmt.Fprintf(w, ".PHONY: %s %s.txt\n", dstubs.Name(), dstubs.Name()) |
| 559 | fmt.Fprintf(w, "%s %s.txt: %s\n", dstubs.Name(), dstubs.Name(), dstubs.apiFile) |
| 560 | } |
| 561 | if dstubs.removedApiFile != nil { |
| 562 | fmt.Fprintf(w, ".PHONY: %s %s.txt\n", dstubs.Name(), dstubs.Name()) |
| 563 | fmt.Fprintf(w, "%s %s.txt: %s\n", dstubs.Name(), dstubs.Name(), dstubs.removedApiFile) |
| 564 | } |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 565 | if dstubs.checkCurrentApiTimestamp != nil { |
| 566 | fmt.Fprintln(w, ".PHONY:", dstubs.Name()+"-check-current-api") |
| 567 | fmt.Fprintln(w, dstubs.Name()+"-check-current-api:", |
| 568 | dstubs.checkCurrentApiTimestamp.String()) |
| 569 | |
| 570 | fmt.Fprintln(w, ".PHONY: checkapi") |
| 571 | fmt.Fprintln(w, "checkapi:", |
| 572 | dstubs.checkCurrentApiTimestamp.String()) |
| 573 | |
| 574 | fmt.Fprintln(w, ".PHONY: droidcore") |
| 575 | fmt.Fprintln(w, "droidcore: checkapi") |
| 576 | } |
| 577 | if dstubs.updateCurrentApiTimestamp != nil { |
| 578 | fmt.Fprintln(w, ".PHONY:", dstubs.Name()+"-update-current-api") |
| 579 | fmt.Fprintln(w, dstubs.Name()+"-update-current-api:", |
| 580 | dstubs.updateCurrentApiTimestamp.String()) |
| 581 | |
| 582 | fmt.Fprintln(w, ".PHONY: update-api") |
| 583 | fmt.Fprintln(w, "update-api:", |
| 584 | dstubs.updateCurrentApiTimestamp.String()) |
| 585 | } |
| 586 | if dstubs.checkLastReleasedApiTimestamp != nil { |
| 587 | fmt.Fprintln(w, ".PHONY:", dstubs.Name()+"-check-last-released-api") |
| 588 | fmt.Fprintln(w, dstubs.Name()+"-check-last-released-api:", |
| 589 | dstubs.checkLastReleasedApiTimestamp.String()) |
Adrian Roos | e3fe481 | 2019-01-23 14:51:55 +0100 | [diff] [blame] | 590 | |
Makoto Onuki | a573f19 | 2020-04-21 11:52:39 -0700 | [diff] [blame] | 591 | fmt.Fprintln(w, ".PHONY: checkapi") |
| 592 | fmt.Fprintln(w, "checkapi:", |
| 593 | dstubs.checkLastReleasedApiTimestamp.String()) |
Adrian Roos | e3fe481 | 2019-01-23 14:51:55 +0100 | [diff] [blame] | 594 | |
Makoto Onuki | a573f19 | 2020-04-21 11:52:39 -0700 | [diff] [blame] | 595 | fmt.Fprintln(w, ".PHONY: droidcore") |
| 596 | fmt.Fprintln(w, "droidcore: checkapi") |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 597 | } |
Adrian Roos | 075eedc | 2019-10-10 12:07:03 +0200 | [diff] [blame] | 598 | if dstubs.apiLintTimestamp != nil { |
| 599 | fmt.Fprintln(w, ".PHONY:", dstubs.Name()+"-api-lint") |
| 600 | fmt.Fprintln(w, dstubs.Name()+"-api-lint:", |
| 601 | dstubs.apiLintTimestamp.String()) |
| 602 | |
| 603 | fmt.Fprintln(w, ".PHONY: checkapi") |
| 604 | fmt.Fprintln(w, "checkapi:", |
Adrian Roos | 3b8f1cd | 2019-11-01 13:42:39 +0100 | [diff] [blame] | 605 | dstubs.Name()+"-api-lint") |
Adrian Roos | 075eedc | 2019-10-10 12:07:03 +0200 | [diff] [blame] | 606 | |
| 607 | fmt.Fprintln(w, ".PHONY: droidcore") |
| 608 | fmt.Fprintln(w, "droidcore: checkapi") |
Adrian Roos | 3b8f1cd | 2019-11-01 13:42:39 +0100 | [diff] [blame] | 609 | |
| 610 | if dstubs.apiLintReport != nil { |
| 611 | fmt.Fprintf(w, "$(call dist-for-goals,%s,%s:%s)\n", dstubs.Name()+"-api-lint", |
| 612 | dstubs.apiLintReport.String(), "apilint/"+dstubs.Name()+"-lint-report.txt") |
| 613 | } |
Adrian Roos | 075eedc | 2019-10-10 12:07:03 +0200 | [diff] [blame] | 614 | } |
Pete Gillin | 581d608 | 2018-10-22 15:55:04 +0100 | [diff] [blame] | 615 | if dstubs.checkNullabilityWarningsTimestamp != nil { |
| 616 | fmt.Fprintln(w, ".PHONY:", dstubs.Name()+"-check-nullability-warnings") |
| 617 | fmt.Fprintln(w, dstubs.Name()+"-check-nullability-warnings:", |
| 618 | dstubs.checkNullabilityWarningsTimestamp.String()) |
| 619 | |
| 620 | fmt.Fprintln(w, ".PHONY:", "droidcore") |
| 621 | fmt.Fprintln(w, "droidcore: ", dstubs.Name()+"-check-nullability-warnings") |
| 622 | } |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 623 | }, |
| 624 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 625 | }} |
Nan Zhang | 1598a9e | 2018-09-04 17:14:32 -0700 | [diff] [blame] | 626 | } |
| 627 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 628 | func (a *AndroidAppImport) AndroidMkEntries() []android.AndroidMkEntries { |
Jiyong Park | 592a6a4 | 2020-04-21 22:34:28 +0900 | [diff] [blame] | 629 | if !a.IsForPlatform() { |
| 630 | // The non-platform variant is placed inside APEX. No reason to |
| 631 | // make it available to Make. |
| 632 | return nil |
| 633 | } |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 634 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
Jaewoong Jung | ccbb393 | 2019-04-15 09:48:31 -0700 | [diff] [blame] | 635 | Class: "APPS", |
Jaewoong Jung | 8aae22e | 2019-07-17 10:21:49 -0700 | [diff] [blame] | 636 | OutputFile: android.OptionalPathForPath(a.outputFile), |
Jaewoong Jung | ccbb393 | 2019-04-15 09:48:31 -0700 | [diff] [blame] | 637 | Include: "$(BUILD_SYSTEM)/soong_app_prebuilt.mk", |
Jaewoong Jung | e0dc8df | 2019-08-27 17:33:16 -0700 | [diff] [blame] | 638 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 639 | func(entries *android.AndroidMkEntries) { |
Jiyong Park | f748731 | 2019-10-17 12:54:30 +0900 | [diff] [blame] | 640 | entries.SetBoolIfTrue("LOCAL_PRIVILEGED_MODULE", a.Privileged()) |
Colin Cross | 503c1d0 | 2020-01-28 14:00:53 -0800 | [diff] [blame] | 641 | entries.SetString("LOCAL_CERTIFICATE", a.certificate.AndroidMkString()) |
Jaewoong Jung | e0dc8df | 2019-08-27 17:33:16 -0700 | [diff] [blame] | 642 | entries.AddStrings("LOCAL_OVERRIDES_PACKAGES", a.properties.Overrides...) |
| 643 | if len(a.dexpreopter.builtInstalled) > 0 { |
| 644 | entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", a.dexpreopter.builtInstalled) |
| 645 | } |
| 646 | entries.AddStrings("LOCAL_INSTALLED_MODULE_STEM", a.installPath.Rel()) |
| 647 | }, |
Jaewoong Jung | ccbb393 | 2019-04-15 09:48:31 -0700 | [diff] [blame] | 648 | }, |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 649 | }} |
Jaewoong Jung | ccbb393 | 2019-04-15 09:48:31 -0700 | [diff] [blame] | 650 | } |
| 651 | |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 652 | func (a *AndroidTestImport) AndroidMkEntries() []android.AndroidMkEntries { |
| 653 | entriesList := a.AndroidAppImport.AndroidMkEntries() |
| 654 | entries := &entriesList[0] |
Jaewoong Jung | b28eb5f | 2019-08-27 15:01:50 -0700 | [diff] [blame] | 655 | entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) { |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 656 | testSuiteComponent(entries, a.testProperties.Test_suites) |
| 657 | androidMkWriteTestData(a.data, entries) |
Jaewoong Jung | b28eb5f | 2019-08-27 15:01:50 -0700 | [diff] [blame] | 658 | }) |
Jiyong Park | 0b0e1b9 | 2019-12-03 13:24:29 +0900 | [diff] [blame] | 659 | return entriesList |
Jaewoong Jung | b28eb5f | 2019-08-27 15:01:50 -0700 | [diff] [blame] | 660 | } |
| 661 | |
Jaewoong Jung | b0c127c | 2019-08-29 14:56:03 -0700 | [diff] [blame] | 662 | func androidMkWriteTestData(data android.Paths, entries *android.AndroidMkEntries) { |
Jaewoong Jung | b28eb5f | 2019-08-27 15:01:50 -0700 | [diff] [blame] | 663 | var testFiles []string |
| 664 | for _, d := range data { |
| 665 | testFiles = append(testFiles, d.String()+":"+d.Rel()) |
| 666 | } |
| 667 | entries.AddStrings("LOCAL_COMPATIBILITY_SUPPORT_FILES", testFiles...) |
| 668 | } |
Jaewoong Jung | 9befb0c | 2020-01-18 10:33:43 -0800 | [diff] [blame] | 669 | |
| 670 | func (r *RuntimeResourceOverlay) AndroidMkEntries() []android.AndroidMkEntries { |
| 671 | return []android.AndroidMkEntries{android.AndroidMkEntries{ |
| 672 | Class: "ETC", |
| 673 | OutputFile: android.OptionalPathForPath(r.outputFile), |
| 674 | Include: "$(BUILD_SYSTEM)/soong_app_prebuilt.mk", |
| 675 | ExtraEntries: []android.AndroidMkExtraEntriesFunc{ |
| 676 | func(entries *android.AndroidMkEntries) { |
Jaewoong Jung | 78ec5d8 | 2020-01-31 10:11:47 -0800 | [diff] [blame] | 677 | entries.SetString("LOCAL_CERTIFICATE", r.certificate.AndroidMkString()) |
Jaewoong Jung | 9befb0c | 2020-01-18 10:33:43 -0800 | [diff] [blame] | 678 | entries.SetPath("LOCAL_MODULE_PATH", r.installDir.ToMakePath()) |
Jaewoong Jung | ad0177b | 2020-04-24 15:22:40 -0700 | [diff] [blame^] | 679 | entries.AddStrings("LOCAL_OVERRIDES_PACKAGES", r.properties.Overrides...) |
Jaewoong Jung | 9befb0c | 2020-01-18 10:33:43 -0800 | [diff] [blame] | 680 | }, |
| 681 | }, |
| 682 | }} |
| 683 | } |