diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-06-27 01:08:36 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-06-27 01:08:36 +0000 |
commit | 6b0b3faf73fb1dff73dd408d1e1f636534789d39 (patch) | |
tree | 3ab8dd6f8c982103b80b2789f262e7f844ea1dbb /java/java.go | |
parent | 76db5d66913c7398f54d59634de930149caf90b6 (diff) | |
parent | c4422106a7cf4731e27d664646bc0d57ad3f37fa (diff) | |
download | build_soong-6b0b3faf73fb1dff73dd408d1e1f636534789d39.tar.gz build_soong-6b0b3faf73fb1dff73dd408d1e1f636534789d39.tar.bz2 build_soong-6b0b3faf73fb1dff73dd408d1e1f636534789d39.zip |
Snap for 6634012 from c4422106a7cf4731e27d664646bc0d57ad3f37fa to rvc-release
Change-Id: Idfd3a3487b11fdc16265d015d34aa79237cab6e8
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go index 90e9b1f6..5632ff58 100644 --- a/java/java.go +++ b/java/java.go @@ -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 @@ -1617,8 +1623,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 @@ -1872,6 +1881,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 } |