Refactor java compileDex

We want to support a compile_dex property for java_import. This splits
dex-related properties into a dexer struct which can be embedded in
relevant modules.

Test: m
Test: soong tests
Bug: 160455085
Change-Id: If56a51dac43f630d49483a36db29cd50e9ccd529
This commit is contained in:
Liz Kammer
2020-07-09 15:16:41 -07:00
parent bbec4c4325
commit a7a64f3c5b
5 changed files with 112 additions and 106 deletions

View File

@@ -1112,6 +1112,7 @@ func (module *SdkLibrary) createImplLibrary(mctx android.DefaultableHookContext)
&module.properties,
&module.protoProperties,
&module.deviceProperties,
&module.dexProperties,
&module.dexpreoptProperties,
&module.linter.properties,
&props,
@@ -1171,8 +1172,8 @@ func (module *SdkLibrary) createStubsLibrary(mctx android.DefaultableHookContext
// We compile the stubs for 1.8 in line with the main android.jar stubs, and potential
// interop with older developer tools that don't support 1.9.
props.Java_version = proptools.StringPtr("1.8")
if module.deviceProperties.Compile_dex != nil {
props.Compile_dex = module.deviceProperties.Compile_dex
if module.dexProperties.Compile_dex != nil {
props.Compile_dex = module.dexProperties.Compile_dex
}
// Dist the class jar artifact for sdk builds.