Compile using Jack.

This allows to compile dex targeted java sources using Jack and Jill.
Default is still to compile with the legacy toolchain. Default can be
switched to the new toolchain by setting environement variable:
export ANDROID_COMPILE_WITH_JACK=true
Toolchain can also be forced for one module by defining
LOCAL_USE_JACK:=true # false
in the mk portion defining the module.

Jack execution environement can be controlled with:

Global variable ANDROID_JACK_VM allow to change the jvm executing Jack.
Global variable ANDROID_JACK_VM_ARGS allows to change default args given
to the jvm.
Global variable ANDROID_JACK_EXTRA_ARGS allows to define some default args
to give to Jack

LOCAL_JACK_VM_ARGS allows to override default args given to the jvm for
the module.
LOCAL_JACK_EXTRA_ARGS allows to override default args passed to Jack.

Change-Id: Ib81a0fd5f86a51d1e0edbb81cc791d828a05dd29
This commit is contained in:
Yohann Roussel
2014-09-08 14:45:14 +02:00
parent 7fcb9209ac
commit b4c49cba57
11 changed files with 464 additions and 17 deletions

View File

@@ -72,7 +72,11 @@ $(common_javalib.jar) : $(built_dex) $(java_resource_sources)
@echo "target Jar: $(PRIVATE_MODULE) ($@)"
$(create-empty-package)
$(add-dex-to-package)
ifneq ($(strip $(LOCAL_USE_JACK)),true)
$(add-carried-java-resources)
else
$(add-carried-jack-resources)
endif
ifneq ($(extra_jar_args),)
$(add-java-resources-to-package)
endif