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
diff --git a/java/androidmk.go b/java/androidmk.go
index 25dd329..a140b7d 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -127,8 +127,8 @@
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 @@
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" {