Separate hidden API flag info for sdk from platform_bootclasspath
Previously, the sdk snapshot and platform_bootclasspath both used the HiddenAPIInfo/Provider to retrieve the hidden API related information they needed. This change separates them by adding a new HiddenAPIInfoForSdk/Provider that is used to provide the information needed by the sdk snapshot. This allows a follow up change to generate different information for the sdk and for the platform depending on the target build release of the sdk snapshot. Bug: 240406019 Test: packages/modules/common/build/mainline_modules_sdks.sh # Ran the previous command with and without this change to make # sure that this change does not change the sdk snapshot # contents. Change-Id: I30cea6cf8dae1be467b7063430d6197e5baa684b
This commit is contained in:
@@ -905,6 +905,14 @@ func (b *BootclasspathFragmentModule) produceHiddenAPIOutput(ctx android.ModuleC
|
|||||||
EncodedBootDexFilesByModule: encodedBootDexFilesByModule,
|
EncodedBootDexFilesByModule: encodedBootDexFilesByModule,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flagFilesByCategory := input.FlagFilesByCategory
|
||||||
|
|
||||||
|
// Make the information available for the sdk snapshot.
|
||||||
|
ctx.SetProvider(HiddenAPIInfoForSdkProvider, HiddenAPIInfoForSdk{
|
||||||
|
FlagFilesByCategory: flagFilesByCategory,
|
||||||
|
HiddenAPIFlagOutput: flagOutput,
|
||||||
|
})
|
||||||
|
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1069,7 +1077,7 @@ func (b *bootclasspathFragmentSdkMemberProperties) PopulateFromVariant(ctx andro
|
|||||||
|
|
||||||
// Get the hidden API information from the module.
|
// Get the hidden API information from the module.
|
||||||
mctx := ctx.SdkModuleContext()
|
mctx := ctx.SdkModuleContext()
|
||||||
hiddenAPIInfo := mctx.OtherModuleProvider(module, HiddenAPIInfoProvider).(HiddenAPIInfo)
|
hiddenAPIInfo := mctx.OtherModuleProvider(module, HiddenAPIInfoForSdkProvider).(HiddenAPIInfoForSdk)
|
||||||
b.Flag_files_by_category = hiddenAPIInfo.FlagFilesByCategory
|
b.Flag_files_by_category = hiddenAPIInfo.FlagFilesByCategory
|
||||||
|
|
||||||
// Copy all the generated file paths.
|
// Copy all the generated file paths.
|
||||||
|
@@ -594,6 +594,23 @@ func (i *HiddenAPIInfo) FlagSubset() SignatureCsvSubset {
|
|||||||
|
|
||||||
var HiddenAPIInfoProvider = blueprint.NewProvider(HiddenAPIInfo{})
|
var HiddenAPIInfoProvider = blueprint.NewProvider(HiddenAPIInfo{})
|
||||||
|
|
||||||
|
// HiddenAPIInfoForSdk contains information provided by the hidden API processing for use
|
||||||
|
// by the sdk snapshot.
|
||||||
|
//
|
||||||
|
// That includes paths resolved from HiddenAPIFlagFileProperties and also generated by hidden API
|
||||||
|
// processing.
|
||||||
|
type HiddenAPIInfoForSdk struct {
|
||||||
|
// FlagFilesByCategory maps from the flag file category to the paths containing information for
|
||||||
|
// that category.
|
||||||
|
FlagFilesByCategory FlagFilesByCategory
|
||||||
|
|
||||||
|
// The output from the hidden API processing needs to be made available to other modules.
|
||||||
|
HiddenAPIFlagOutput
|
||||||
|
}
|
||||||
|
|
||||||
|
// Provides hidden API info for the sdk snapshot.
|
||||||
|
var HiddenAPIInfoForSdkProvider = blueprint.NewProvider(HiddenAPIInfoForSdk{})
|
||||||
|
|
||||||
// ModuleStubDexJars contains the stub dex jars provided by a single module.
|
// ModuleStubDexJars contains the stub dex jars provided by a single module.
|
||||||
//
|
//
|
||||||
// It maps a *HiddenAPIScope to the path to stub dex jars appropriate for that scope. See
|
// It maps a *HiddenAPIScope to the path to stub dex jars appropriate for that scope. See
|
||||||
|
Reference in New Issue
Block a user