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

@@ -127,8 +127,8 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries {
entries.AddStrings("LOCAL_ADDITIONAL_CHECKED_MODULE", library.additionalCheckedModules.Strings()...)
}
if library.proguardDictionary != nil {
entries.SetPath("LOCAL_SOONG_PROGUARD_DICT", library.proguardDictionary)
if library.dexer.proguardDictionary.Valid() {
entries.SetPath("LOCAL_SOONG_PROGUARD_DICT", library.dexer.proguardDictionary.Path())
}
entries.SetString("LOCAL_MODULE_STEM", library.Stem())
@@ -332,8 +332,8 @@ func (app *AndroidApp) AndroidMkEntries() []android.AndroidMkEntries {
if app.jacocoReportClassesFile != nil {
entries.SetPath("LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR", app.jacocoReportClassesFile)
}
if app.proguardDictionary != nil {
entries.SetPath("LOCAL_SOONG_PROGUARD_DICT", app.proguardDictionary)
if app.dexer.proguardDictionary.Valid() {
entries.SetPath("LOCAL_SOONG_PROGUARD_DICT", app.dexer.proguardDictionary.Path())
}
if app.Name() == "framework-res" {