summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index 45eb69339..2bbb5b102 100644
--- a/java/java.go
+++ b/java/java.go
@@ -57,6 +57,10 @@ func registerJavaBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType("java_host_for_device", HostForDeviceFactory)
ctx.RegisterModuleType("dex_import", DexImportFactory)
+ // This mutator registers dependencies on dex2oat for modules that should be
+ // dexpreopted. This is done late when the final variants have been
+ // established, to not get the dependencies split into the wrong variants and
+ // to support the checks in dexpreoptDisabled().
ctx.FinalDepsMutators(func(ctx android.RegisterMutatorsContext) {
ctx.BottomUp("dexpreopt_tool_deps", dexpreoptToolDepsMutator).Parallel()
})