Move boot jars package check into platform_bootclasspath

Bug: 177892522
Bug: 189298093
Test: m check-boot-jars
      m SOONG_CONFIG_art_module_source_build=false check-boot-jars
      - Ran both commands with and without java.lang in the
        package_allowed_list.txt
Change-Id: Iba1a881c8f6b6919d5c0c0520eb3073658f3b8d2
This commit is contained in:
Paul Duffin
2021-06-07 19:28:15 +01:00
parent 58e7586b3d
commit c8ead41ba9
3 changed files with 34 additions and 97 deletions

View File

@@ -189,7 +189,8 @@ func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.Mo
b.generateClasspathProtoBuildActions(ctx)
b.generateHiddenAPIBuildActions(ctx, b.configuredModules, b.fragments)
bootDexJarByModule := b.generateHiddenAPIBuildActions(ctx, b.configuredModules, b.fragments)
buildRuleForBootJarsPackageCheck(ctx, bootDexJarByModule)
// Nothing to do if skipping the dexpreopt of boot image jars.
if SkipDexpreoptBootJars(ctx) {
@@ -258,7 +259,7 @@ func (b *platformBootclasspathModule) getImageConfig(ctx android.EarlyModuleCont
}
// generateHiddenAPIBuildActions generates all the hidden API related build rules.
func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.ModuleContext, modules []android.Module, fragments []android.Module) {
func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.ModuleContext, modules []android.Module, fragments []android.Module) bootDexJarByModule {
// Save the paths to the monolithic files for retrieval via OutputFiles().
b.hiddenAPIFlagsCSV = hiddenAPISingletonPaths(ctx).flags
@@ -276,7 +277,7 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.
Output: path,
})
}
return
return nil
}
monolithicInfo := b.createAndProvideMonolithicHiddenAPIInfo(ctx, fragments)
@@ -322,6 +323,8 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.
// jars.
indexCSV := hiddenAPISingletonPaths(ctx).index
buildRuleToGenerateIndex(ctx, "monolithic hidden API index", classesJars, indexCSV)
return bootDexJarByModule
}
// createAndProvideMonolithicHiddenAPIInfo creates a MonolithicHiddenAPIInfo and provides it for