public class JackToolchain
extends java.lang.Object
Jack is used for processing java libraries that are packaged in the final apk, and also for the source compilation. It can produce Jack library format or .dex files.
Jill is used for processing classpath libraries (these are not in the final apk). It accepts .jar file as input, and produces Jack library format as output. E.g. we are using Jill to convert android.jar to android.jack. This .jack library is later on added to the classpath when compiling the sources.
| Modifier and Type | Class and Description |
|---|---|
static class |
JackToolchain.ToolchainException
Jack toolchain exception.
|
| Constructor and Description |
|---|
JackToolchain(com.android.sdklib.BuildToolInfo buildToolInfo,
com.android.utils.ILogger logger,
ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
void |
convert(JackProcessOptions options,
com.android.ide.common.process.JavaProcessExecutor javaProcessExecutor,
boolean isInProcess)
Converts Java source code or Java byte code into android byte code or Jack library format
using the Jack toolchain.
|
public JackToolchain(@NonNull
com.android.sdklib.BuildToolInfo buildToolInfo,
@NonNull
com.android.utils.ILogger logger,
@NonNull
ErrorReporter errorReporter)
public void convert(@NonNull
JackProcessOptions options,
@NonNull
com.android.ide.common.process.JavaProcessExecutor javaProcessExecutor,
boolean isInProcess)
throws JackToolchain.ToolchainException,
com.android.ide.common.process.ProcessException,
java.lang.ClassNotFoundException,
java.io.IOException
options - options for configuring Jack.javaProcessExecutor - java executor to be used for out of process executionisInProcess - whether to run Jack in memory or spawn another Java process.JackToolchain.ToolchainException - if there is an exception related to running Jack toolchaincom.android.ide.common.process.ProcessException - if a process in which the conversion is run failsjava.lang.ClassNotFoundException - if running in process, and unable to load the classes required
for the conversionjava.io.IOException