From 9eff830fa2484d531b3af670c51b061958b97e58 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 27 Apr 2017 15:05:44 -0700 Subject: [PATCH] Make javac checkbuilds match jack Building all java to dex is very slow. Make javac checkbuilds act like jack checkbuilds and only build to class files for unused modules, and add a java-dex target that can be used to build everything to dex. Test: m -j checkbuild Change-Id: Idcf9c9e0223b9dd88aaa53beb0cb50a230034b0f --- core/java.mk | 6 ++---- core/main.mk | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core/java.mk b/core/java.mk index f6c66d5f2..ed05484cd 100644 --- a/core/java.mk +++ b/core/java.mk @@ -346,11 +346,7 @@ else LOCAL_CHECKED_MODULE := $(jack_check_timestamp) endif else -ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true) LOCAL_CHECKED_MODULE := $(full_classes_compiled_jar) -else -LOCAL_CHECKED_MODULE := $(built_dex) -endif endif endif endif @@ -663,6 +659,8 @@ $(built_dex): $(built_dex_intermediate) $(hide) rm -f $(dir $@)/classes*.dex $(hide) cp -fp $(dir $<)/classes*.dex $(dir $@) +java-dex: $(built_dex) + endif # !LOCAL_IS_STATIC_JAVA_LIBRARY findbugs_xml := $(intermediates.COMMON)/findbugs.xml diff --git a/core/main.mk b/core/main.mk index 4e9a90131..354ba72af 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1236,7 +1236,7 @@ $(call dist-for-goals,sdk win_sdk, \ # umbrella targets to assit engineers in verifying builds .PHONY: java native target host java-host java-target native-host native-target \ java-host-tests java-target-tests native-host-tests native-target-tests \ - java-tests native-tests host-tests target-tests tests + java-tests native-tests host-tests target-tests tests java-dex # some synonyms .PHONY: host-java target-java host-native target-native \ target-java-tests target-native-tests