Cache for jar -> jack conversion, using the Jill tool. Since we cannot yet have a single task for each library that needs to be run through Jill (because there is no task-level parallelization), this class allows reusing the output of the jill process for a library in a project in other projects. Because different project could use different build-tools, both the library to be converted and the version of the build tools are used as keys in the cache. The API is fairly simple, just call convertLibrary(java.io.File, java.io.File, com.android.builder.core.DexOptions, com.android.sdklib.BuildToolInfo, boolean, com.android.ide.common.internal.CommandLineRunner) The call will be blocking until the conversion happened, either through actually running Jill or through copying the output of a previous Jill run. After a build a call to clear(java.io.File, com.android.utils.ILogger) with a file will allow saving the known converted libraries for future reuse.
Type | Name and description |
---|---|
void |
convertLibrary(File inputFile, File outFile, DexOptions dexOptions, com.android.sdklib.BuildToolInfo buildToolInfo, boolean verbose, com.android.ide.common.internal.CommandLineRunner commandLineRunner) Converts a given library to a given output with Jill, using a specific version of the build-tools. |
static JackConversionCache |
getCache() |
protected KeyFactory<Key> |
getKeyFactory() |
Methods inherited from class | Name |
---|---|
class PreProcessCache |
clear, createItemNode, getItem, getKeyFactory, incrementHits, incrementMisses, load, saveItems |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Converts a given library to a given output with Jill, using a specific version of the build-tools.
inputFile
- the jar to pre-dexoutFile
- the output file.dexOptions
- the dex options to run pre-dexbuildToolInfo
- the build tools infoverbose
- verbose flagcommandLineRunner
- the command line runner.