Apply hiddenapi encoding to java_sdk_library .impl am: c4422106a7

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

Change-Id: I9e257b70bc401b8b69273c787b74d0f4c04870f1
This commit is contained in:
Paul Duffin
2020-06-26 20:11:30 +00:00
committed by Automerger Merge Worker
3 changed files with 33 additions and 7 deletions

View File

@@ -342,6 +342,12 @@ type CompilerDeviceProperties struct {
// otherwise provides defaults libraries to add to the bootclasspath.
System_modules *string
// The name of the module as used in build configuration.
//
// Allows a library to separate its actual name from the name used in
// build configuration, e.g.ctx.Config().BootJars().
ConfigurationName *string `blueprint:"mutated"`
// set the name of the output
Stem *string
@@ -1635,8 +1641,11 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) {
return
}
configurationName := j.ConfigurationName()
primary := configurationName == ctx.ModuleName()
// Hidden API CSV generation and dex encoding
dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile,
dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, configurationName, primary, dexOutputFile, j.implementationJarFile,
proptools.Bool(j.deviceProperties.Uncompress_dex))
// merge dex jar with resources if necessary
@@ -1913,6 +1922,10 @@ func (j *Module) Stem() string {
return proptools.StringDefault(j.deviceProperties.Stem, j.Name())
}
func (j *Module) ConfigurationName() string {
return proptools.StringDefault(j.deviceProperties.ConfigurationName, j.BaseModuleName())
}
func (j *Module) JacocoReportClassesFile() android.Path {
return j.jacocoReportClassesFile
}