Merge "Make bootclasspath_fragments always perform hidden API processing" into sc-dev am: f4a65fee98

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15171637

Change-Id: I9aedbf6f53cdff3ef80692b65e8e22f4884b09b8
This commit is contained in:
Paul Duffin
2021-07-01 14:36:53 +00:00
committed by Automerger Merge Worker
3 changed files with 23 additions and 57 deletions

View File

@@ -583,25 +583,9 @@ func (b *BootclasspathFragmentModule) generateHiddenAPIBuildActions(ctx android.
// Create hidden API input structure.
input := b.createHiddenAPIFlagInput(ctx, contents, fragments)
var output *HiddenAPIOutput
// Hidden API processing is conditional as a temporary workaround as not all
// bootclasspath_fragments provide the appropriate information needed for hidden API processing
// which leads to breakages of the build.
// TODO(b/179354495): Stop hidden API processing being conditional once all bootclasspath_fragment
// modules have been updated to support it.
if input.canPerformHiddenAPIProcessing(ctx, b.properties) {
// Delegate the production of the hidden API all-flags.csv file to a module type specific method.
common := ctx.Module().(commonBootclasspathFragment)
output = common.produceHiddenAPIOutput(ctx, contents, input)
} else {
// As hidden API processing cannot be performed fall back to trying to retrieve the legacy
// encoded boot dex files, i.e. those files encoded by the individual libraries and returned
// from the DexJarBuildPath() method.
output = &HiddenAPIOutput{
EncodedBootDexFilesByModule: retrieveLegacyEncodedBootDexFiles(ctx, contents),
}
}
// Delegate the production of the hidden API all-flags.csv file to a module type specific method.
common := ctx.Module().(commonBootclasspathFragment)
output := common.produceHiddenAPIOutput(ctx, contents, input)
// Initialize a HiddenAPIInfo structure.
hiddenAPIInfo := HiddenAPIInfo{