summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/androidmk.go3
-rw-r--r--java/java.go4
2 files changed, 7 insertions, 0 deletions
diff --git a/java/androidmk.go b/java/androidmk.go
index e349de4ae..97924f32a 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -36,6 +36,9 @@ func (library *Library) AndroidMk() android.AndroidMkData {
}
if library.dexJarFile != nil {
fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", library.dexJarFile.String())
+ if library.deviceProperties.Dex_preopt == nil || *library.deviceProperties.Dex_preopt == false {
+ fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
+ }
}
fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", library.deviceProperties.Sdk_version)
},
diff --git a/java/java.go b/java/java.go
index 5310bc800..69739155b 100644
--- a/java/java.go
+++ b/java/java.go
@@ -143,6 +143,10 @@ type CompilerDeviceProperties struct {
// If true, export a copy of the module as a -hostdex module for host testing.
Hostdex *bool
+ // If false, prevent dexpreopting and stripping the dex file from the final jar. Defaults to
+ // true.
+ Dex_preopt *bool
+
// When targeting 1.9, override the modules to use with --system
System_modules *string
}