diff options
| author | 2020-06-30 10:41:42 +0000 | |
|---|---|---|
| committer | 2020-06-30 10:41:42 +0000 | |
| commit | 452bf390148d0b4b3569191752e7e1ea6d8232d6 (patch) | |
| tree | 8517df187d5bb2ca32165aa48ed8dcc804585323 /java/java.go | |
| parent | a66f571e010fef50d0680cd54e8afa944c3859ac (diff) | |
| parent | a2058f8b7d8f616f8749eb185e6c2f43ecaf8d4c (diff) | |
Merge "Apply hiddenapi encoding to java_sdk_library .impl"
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 2829be731..aa843ee27 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 @@ -1631,8 +1637,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 @@ -1909,6 +1918,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 } |