Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 1 | // Copyright 2019 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 ( |
Paul Duffin | d2aceca | 2019-02-28 16:13:20 +0000 | [diff] [blame] | 18 | "strings" |
| 19 | |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 20 | "github.com/google/blueprint" |
| 21 | |
| 22 | "android/soong/android" |
| 23 | ) |
| 24 | |
| 25 | var hiddenAPIGenerateCSVRule = pctx.AndroidStaticRule("hiddenAPIGenerateCSV", blueprint.RuleParams{ |
Andrei Onea | 23fea04 | 2020-08-12 16:48:23 +0100 | [diff] [blame] | 26 | Command: "${config.Class2NonSdkList} --stub-api-flags ${stubAPIFlags} $in $outFlag $out", |
| 27 | CommandDeps: []string{"${config.Class2NonSdkList}"}, |
David Brazdil | 0f670a2 | 2019-01-18 16:30:03 +0000 | [diff] [blame] | 28 | }, "outFlag", "stubAPIFlags") |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 29 | |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 30 | type hiddenAPI struct { |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 31 | // True if the module containing this structure contributes to the hiddenapi information. |
| 32 | active bool |
| 33 | |
| 34 | // True if the module only contains additional annotations and so does not require hiddenapi |
| 35 | // information to be encoded in its dex file and should not be used to generate the |
| 36 | // hiddenAPISingletonPathsStruct.stubFlags file. |
| 37 | annotationsOnly bool |
| 38 | |
Paul Duffin | ff774a0 | 2021-01-29 12:53:15 +0000 | [diff] [blame] | 39 | // The path to the dex jar that is in the boot class path. If this is nil then the associated |
| 40 | // module is not a boot jar, but could be one of the <x>-hiddenapi modules that provide additional |
| 41 | // annotations for the <x> boot dex jar but which do not actually provide a boot dex jar |
| 42 | // themselves. |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 43 | // |
| 44 | // This must be the path to the unencoded dex jar as the encoded dex jar indirectly depends on |
| 45 | // this file so using the encoded dex jar here would result in a cycle in the ninja rules. |
Paul Duffin | ff774a0 | 2021-01-29 12:53:15 +0000 | [diff] [blame] | 46 | bootDexJarPath android.Path |
| 47 | |
| 48 | // The path to the CSV file that contains mappings from Java signature to various flags derived |
| 49 | // from annotations in the source, e.g. whether it is public or the sdk version above which it |
| 50 | // can no longer be used. |
| 51 | // |
| 52 | // It is created by the Class2NonSdkList tool which processes the .class files in the class |
| 53 | // implementation jar looking for UnsupportedAppUsage and CovariantReturnType annotations. The |
| 54 | // tool also consumes the hiddenAPISingletonPathsStruct.stubFlags file in order to perform |
| 55 | // consistency checks on the information in the annotations and to filter out bridge methods |
| 56 | // that are already part of the public API. |
| 57 | flagsCSVPath android.Path |
| 58 | |
| 59 | // The path to the CSV file that contains mappings from Java signature to the value of properties |
| 60 | // specified on UnsupportedAppUsage annotations in the source. |
| 61 | // |
| 62 | // Like the flagsCSVPath file this is also created by the Class2NonSdkList in the same way. |
| 63 | // Although the two files could potentially be created in a single invocation of the |
| 64 | // Class2NonSdkList at the moment they are created using their own invocation, with the behavior |
| 65 | // being determined by the property that is used. |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 66 | metadataCSVPath android.Path |
Paul Duffin | ff774a0 | 2021-01-29 12:53:15 +0000 | [diff] [blame] | 67 | |
| 68 | // The path to the CSV file that contains mappings from Java signature to source location |
| 69 | // information. |
| 70 | // |
| 71 | // It is created by the merge_csv tool which processes the class implementation jar, extracting |
| 72 | // all the files ending in .uau (which are CSV files) and merges them together. The .uau files are |
| 73 | // created by the unsupported app usage annotation processor during compilation of the class |
| 74 | // implementation jar. |
| 75 | indexCSVPath android.Path |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | func (h *hiddenAPI) flagsCSV() android.Path { |
| 79 | return h.flagsCSVPath |
| 80 | } |
| 81 | |
| 82 | func (h *hiddenAPI) metadataCSV() android.Path { |
| 83 | return h.metadataCSVPath |
| 84 | } |
| 85 | |
| 86 | func (h *hiddenAPI) bootDexJar() android.Path { |
| 87 | return h.bootDexJarPath |
| 88 | } |
| 89 | |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 90 | func (h *hiddenAPI) indexCSV() android.Path { |
| 91 | return h.indexCSVPath |
| 92 | } |
| 93 | |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 94 | type hiddenAPIIntf interface { |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 95 | bootDexJar() android.Path |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 96 | flagsCSV() android.Path |
| 97 | indexCSV() android.Path |
| 98 | metadataCSV() android.Path |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | var _ hiddenAPIIntf = (*hiddenAPI)(nil) |
| 102 | |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 103 | // Initialize the hiddenapi structure |
| 104 | func (h *hiddenAPI) initHiddenAPI(ctx android.BaseModuleContext, name string) { |
| 105 | // If hiddenapi processing is disabled treat this as inactive. |
| 106 | if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") { |
| 107 | return |
| 108 | } |
| 109 | |
| 110 | // Modules whose names are of the format <x>-hiddenapi provide hiddenapi information for the boot |
| 111 | // jar module <x>. Otherwise, the module provides information for itself. Either way extract the |
| 112 | // name of the boot jar module. |
| 113 | bootJarName := strings.TrimSuffix(name, "-hiddenapi") |
| 114 | |
| 115 | // It is important that hiddenapi information is only gathered for/from modules that are actually |
| 116 | // on the boot jars list because the runtime only enforces access to the hidden API for the |
| 117 | // bootclassloader. If information is gathered for modules not on the list then that will cause |
| 118 | // failures in the CtsHiddenApiBlocklist... tests. |
| 119 | h.active = inList(bootJarName, ctx.Config().BootJars()) |
| 120 | |
| 121 | // If this module has a suffix of -hiddenapi then it only provides additional annotation |
| 122 | // information for a module on the boot jars list. |
| 123 | h.annotationsOnly = strings.HasSuffix(name, "-hiddenapi") |
| 124 | } |
| 125 | |
Paul Duffin | 4fd997b | 2021-02-03 20:06:33 +0000 | [diff] [blame^] | 126 | // hiddenAPIExtractAndEncode is called by any module that could contribute to the hiddenapi |
| 127 | // processing. |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 128 | // |
| 129 | // It ignores any module that has not had initHiddenApi() called on it and which is not in the boot |
| 130 | // jar list. |
| 131 | // |
| 132 | // Otherwise, it generates ninja rules to do the following: |
Paul Duffin | 4fd997b | 2021-02-03 20:06:33 +0000 | [diff] [blame^] | 133 | // 1. Extract information needed for hiddenapi processing from the module and output it into CSV |
| 134 | // files. |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 135 | // 2. Conditionally adds the supplied dex file to the list of files used to generate the |
| 136 | // hiddenAPISingletonPathsStruct.stubsFlag file. |
| 137 | // 3. Conditionally creates a copy of the supplied dex file into which it has encoded the hiddenapi |
| 138 | // flags and returns this instead of the supplied dex jar, otherwise simply returns the supplied |
| 139 | // dex jar. |
Paul Duffin | 4fd997b | 2021-02-03 20:06:33 +0000 | [diff] [blame^] | 140 | func (h *hiddenAPI) hiddenAPIExtractAndEncode(ctx android.ModuleContext, name string, primary bool, dexJar android.OutputPath, |
Paul Duffin | 612e610 | 2021-02-02 13:38:13 +0000 | [diff] [blame] | 141 | implementationJar android.Path, uncompressDex bool) android.OutputPath { |
Paul Duffin | d2aceca | 2019-02-28 16:13:20 +0000 | [diff] [blame] | 142 | |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 143 | if !h.active { |
| 144 | return dexJar |
| 145 | } |
Paul Duffin | d2aceca | 2019-02-28 16:13:20 +0000 | [diff] [blame] | 146 | |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 147 | // More than one library with the same classes may need to be encoded but only one should be |
| 148 | // used as a source of information for hidden API processing otherwise it will result in |
| 149 | // duplicate entries in the files. |
| 150 | if primary { |
Paul Duffin | 4fd997b | 2021-02-03 20:06:33 +0000 | [diff] [blame^] | 151 | h.hiddenAPIExtractInformation(ctx, dexJar, implementationJar) |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 152 | } |
Paul Duffin | d2aceca | 2019-02-28 16:13:20 +0000 | [diff] [blame] | 153 | |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 154 | if !h.annotationsOnly { |
| 155 | hiddenAPIJar := android.PathForModuleOut(ctx, "hiddenapi", name+".jar").OutputPath |
Paul Duffin | a2058f8 | 2020-06-24 16:22:38 +0100 | [diff] [blame] | 156 | |
Paul Duffin | 4103e92 | 2021-02-01 19:01:34 +0000 | [diff] [blame] | 157 | // Create a copy of the dex jar which has been encoded with hiddenapi flags. |
| 158 | hiddenAPIEncodeDex(ctx, hiddenAPIJar, dexJar, uncompressDex) |
| 159 | |
| 160 | // Use the encoded dex jar from here onwards. |
| 161 | dexJar = hiddenAPIJar |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 162 | } |
| 163 | |
| 164 | return dexJar |
| 165 | } |
| 166 | |
Paul Duffin | 4fd997b | 2021-02-03 20:06:33 +0000 | [diff] [blame^] | 167 | // hiddenAPIExtractInformation generates ninja rules to extract the information from the classes |
| 168 | // jar, and outputs it to the appropriate module specific CSV file. |
| 169 | // |
| 170 | // It also makes the dex jar available for use when generating the |
| 171 | // hiddenAPISingletonPathsStruct.stubFlags. |
| 172 | func (h *hiddenAPI) hiddenAPIExtractInformation(ctx android.ModuleContext, dexJar, classesJar android.Path) { |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 173 | stubFlagsCSV := hiddenAPISingletonPaths(ctx).stubFlags |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 174 | |
Paul Duffin | 34982f1 | 2021-01-27 15:11:42 +0000 | [diff] [blame] | 175 | flagsCSV := android.PathForModuleOut(ctx, "hiddenapi", "flags.csv") |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 176 | ctx.Build(pctx, android.BuildParams{ |
| 177 | Rule: hiddenAPIGenerateCSVRule, |
| 178 | Description: "hiddenapi flags", |
| 179 | Input: classesJar, |
| 180 | Output: flagsCSV, |
David Brazdil | 0f670a2 | 2019-01-18 16:30:03 +0000 | [diff] [blame] | 181 | Implicit: stubFlagsCSV, |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 182 | Args: map[string]string{ |
David Brazdil | 0f670a2 | 2019-01-18 16:30:03 +0000 | [diff] [blame] | 183 | "outFlag": "--write-flags-csv", |
| 184 | "stubAPIFlags": stubFlagsCSV.String(), |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 185 | }, |
| 186 | }) |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 187 | h.flagsCSVPath = flagsCSV |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 188 | |
Paul Duffin | 34982f1 | 2021-01-27 15:11:42 +0000 | [diff] [blame] | 189 | metadataCSV := android.PathForModuleOut(ctx, "hiddenapi", "metadata.csv") |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 190 | ctx.Build(pctx, android.BuildParams{ |
| 191 | Rule: hiddenAPIGenerateCSVRule, |
| 192 | Description: "hiddenapi metadata", |
| 193 | Input: classesJar, |
| 194 | Output: metadataCSV, |
David Brazdil | 0f670a2 | 2019-01-18 16:30:03 +0000 | [diff] [blame] | 195 | Implicit: stubFlagsCSV, |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 196 | Args: map[string]string{ |
David Brazdil | 0f670a2 | 2019-01-18 16:30:03 +0000 | [diff] [blame] | 197 | "outFlag": "--write-metadata-csv", |
| 198 | "stubAPIFlags": stubFlagsCSV.String(), |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 199 | }, |
| 200 | }) |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 201 | h.metadataCSVPath = metadataCSV |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 202 | |
Paul Duffin | 34982f1 | 2021-01-27 15:11:42 +0000 | [diff] [blame] | 203 | indexCSV := android.PathForModuleOut(ctx, "hiddenapi", "index.csv") |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 204 | rule := android.NewRuleBuilder(pctx, ctx) |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 205 | rule.Command(). |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 206 | BuiltTool("merge_csv"). |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 207 | FlagWithInput("--zip_input=", classesJar). |
| 208 | FlagWithOutput("--output=", indexCSV) |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 209 | rule.Build("merged-hiddenapi-index", "Merged Hidden API index") |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 210 | h.indexCSVPath = indexCSV |
Paul Duffin | 4fd997b | 2021-02-03 20:06:33 +0000 | [diff] [blame^] | 211 | |
| 212 | // Save the unencoded dex jar so it can be used when generating the |
| 213 | // hiddenAPISingletonPathsStruct.stubFlags file. |
| 214 | h.bootDexJarPath = dexJar |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | var hiddenAPIEncodeDexRule = pctx.AndroidStaticRule("hiddenAPIEncodeDex", blueprint.RuleParams{ |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 218 | Command: `rm -rf $tmpDir && mkdir -p $tmpDir && mkdir $tmpDir/dex-input && mkdir $tmpDir/dex-output && |
Colin Cross | d783bbb | 2020-07-11 22:30:45 -0700 | [diff] [blame] | 219 | unzip -qoDD $in 'classes*.dex' -d $tmpDir/dex-input && |
Artur Satayev | b5df8a0 | 2020-02-19 16:39:59 +0000 | [diff] [blame] | 220 | for INPUT_DEX in $$(find $tmpDir/dex-input -maxdepth 1 -name 'classes*.dex' | sort); do |
| 221 | echo "--input-dex=$${INPUT_DEX}"; |
| 222 | echo "--output-dex=$tmpDir/dex-output/$$(basename $${INPUT_DEX})"; |
| 223 | done | xargs ${config.HiddenAPI} encode --api-flags=$flagsCsv $hiddenapiFlags && |
| 224 | ${config.SoongZipCmd} $soongZipFlags -o $tmpDir/dex.jar -C $tmpDir/dex-output -f "$tmpDir/dex-output/classes*.dex" && |
| 225 | ${config.MergeZipsCmd} -D -zipToNotStrip $tmpDir/dex.jar -stripFile "classes*.dex" -stripFile "**/*.uau" $out $tmpDir/dex.jar $in`, |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 226 | CommandDeps: []string{ |
| 227 | "${config.HiddenAPI}", |
| 228 | "${config.SoongZipCmd}", |
| 229 | "${config.MergeZipsCmd}", |
| 230 | }, |
David Brazdil | 91b4e3e | 2019-01-23 21:04:05 +0000 | [diff] [blame] | 231 | }, "flagsCsv", "hiddenapiFlags", "tmpDir", "soongZipFlags") |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 232 | |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 233 | func hiddenAPIEncodeDex(ctx android.ModuleContext, output android.WritablePath, dexInput android.Path, |
Colin Cross | cd964b3 | 2019-01-18 22:03:02 -0800 | [diff] [blame] | 234 | uncompressDex bool) { |
| 235 | |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 236 | flagsCSV := hiddenAPISingletonPaths(ctx).flags |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 237 | |
Colin Cross | cd964b3 | 2019-01-18 22:03:02 -0800 | [diff] [blame] | 238 | // The encode dex rule requires unzipping and rezipping the classes.dex files, ensure that if it was uncompressed |
| 239 | // in the input it stays uncompressed in the output. |
| 240 | soongZipFlags := "" |
David Brazdil | 91b4e3e | 2019-01-23 21:04:05 +0000 | [diff] [blame] | 241 | hiddenapiFlags := "" |
Nicolas Geoffray | 65fd8ba | 2019-01-21 23:20:23 +0000 | [diff] [blame] | 242 | tmpOutput := output |
| 243 | tmpDir := android.PathForModuleOut(ctx, "hiddenapi", "dex") |
Colin Cross | cd964b3 | 2019-01-18 22:03:02 -0800 | [diff] [blame] | 244 | if uncompressDex { |
| 245 | soongZipFlags = "-L 0" |
Nicolas Geoffray | 65fd8ba | 2019-01-21 23:20:23 +0000 | [diff] [blame] | 246 | tmpOutput = android.PathForModuleOut(ctx, "hiddenapi", "unaligned", "unaligned.jar") |
| 247 | tmpDir = android.PathForModuleOut(ctx, "hiddenapi", "unaligned") |
Colin Cross | cd964b3 | 2019-01-18 22:03:02 -0800 | [diff] [blame] | 248 | } |
Jiyong Park | 93e57a0 | 2020-02-21 16:04:53 +0900 | [diff] [blame] | 249 | |
| 250 | enforceHiddenApiFlagsToAllMembers := true |
David Brazdil | 91b4e3e | 2019-01-23 21:04:05 +0000 | [diff] [blame] | 251 | // If frameworks/base doesn't exist we must be building with the 'master-art' manifest. |
| 252 | // Disable assertion that all methods/fields have hidden API flags assigned. |
| 253 | if !ctx.Config().FrameworksBaseDirExists(ctx) { |
Jiyong Park | 93e57a0 | 2020-02-21 16:04:53 +0900 | [diff] [blame] | 254 | enforceHiddenApiFlagsToAllMembers = false |
| 255 | } |
| 256 | // b/149353192: when a module is instrumented, jacoco adds synthetic members |
| 257 | // $jacocoData and $jacocoInit. Since they don't exist when building the hidden API flags, |
| 258 | // don't complain when we don't find hidden API flags for the synthetic members. |
Paul Duffin | c495d2b | 2020-05-19 21:07:52 +0100 | [diff] [blame] | 259 | if j, ok := ctx.Module().(interface { |
| 260 | shouldInstrument(android.BaseModuleContext) bool |
| 261 | }); ok && j.shouldInstrument(ctx) { |
Jiyong Park | 93e57a0 | 2020-02-21 16:04:53 +0900 | [diff] [blame] | 262 | enforceHiddenApiFlagsToAllMembers = false |
| 263 | } |
| 264 | |
| 265 | if !enforceHiddenApiFlagsToAllMembers { |
David Brazdil | 91b4e3e | 2019-01-23 21:04:05 +0000 | [diff] [blame] | 266 | hiddenapiFlags = "--no-force-assign-all" |
| 267 | } |
Colin Cross | cd964b3 | 2019-01-18 22:03:02 -0800 | [diff] [blame] | 268 | |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 269 | ctx.Build(pctx, android.BuildParams{ |
| 270 | Rule: hiddenAPIEncodeDexRule, |
| 271 | Description: "hiddenapi encode dex", |
| 272 | Input: dexInput, |
Nicolas Geoffray | 65fd8ba | 2019-01-21 23:20:23 +0000 | [diff] [blame] | 273 | Output: tmpOutput, |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 274 | Implicit: flagsCSV, |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 275 | Args: map[string]string{ |
Colin Cross | f24a22a | 2019-01-31 14:12:44 -0800 | [diff] [blame] | 276 | "flagsCsv": flagsCSV.String(), |
David Brazdil | 91b4e3e | 2019-01-23 21:04:05 +0000 | [diff] [blame] | 277 | "tmpDir": tmpDir.String(), |
| 278 | "soongZipFlags": soongZipFlags, |
| 279 | "hiddenapiFlags": hiddenapiFlags, |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 280 | }, |
| 281 | }) |
| 282 | |
Nicolas Geoffray | 65fd8ba | 2019-01-21 23:20:23 +0000 | [diff] [blame] | 283 | if uncompressDex { |
| 284 | TransformZipAlign(ctx, output, tmpOutput) |
| 285 | } |
Colin Cross | 8faf8fc | 2019-01-16 15:15:52 -0800 | [diff] [blame] | 286 | } |