Package com.android.builder.core
Class DefaultDexOptions
java.lang.Object
com.android.builder.core.DefaultDexOptions
- All Implemented Interfaces:
DexOptions
Deprecated.
Concrete implementation of DexOptions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultDexOptionscopyOf(DexOptions dexOptions) Deprecated.Deprecated.List of additional parameters to be passed todx.booleanDeprecated.Whether to run thedxcompiler as a separate process or inside the Gradle daemon JVM.Deprecated.Specifies the-Xmxvalue when calling dx.booleanDeprecated.Enable jumbo mode in dx (--force-jumbo).booleanDeprecated.Keep all classes with runtime annotations in the main dex in legacy multidex.Deprecated.Returns the maximum number of concurrent processes that can be used to dex.Deprecated.Dex is always optimized.booleanDeprecated.Whether to pre-dex libraries.Deprecated.Number of threads to use when running dx.voidsetAdditionalParameters(List<String> additionalParameters) Deprecated.voidsetDexInProcess(boolean dexInProcess) Deprecated.voidsetJavaMaxHeapSize(String javaMaxHeapSize) Deprecated.voidsetJumboMode(boolean jumboMode) Deprecated.voidsetKeepRuntimeAnnotatedClasses(boolean keepRuntimeAnnotatedClasses) Deprecated.voidsetMaxProcessCount(Integer maxProcessCount) Deprecated.voidsetPreDexLibraries(boolean preDexLibraries) Deprecated.voidsetThreadCount(Integer threadCount) Deprecated.
-
Constructor Details
-
DefaultDexOptions
public DefaultDexOptions()Deprecated.
-
-
Method Details
-
copyOf
Deprecated. -
getPreDexLibraries
public boolean getPreDexLibraries()Deprecated.Whether to pre-dex libraries. This can improve incremental builds, but clean builds may be slower.- Specified by:
getPreDexLibrariesin interfaceDexOptions
-
setPreDexLibraries
public void setPreDexLibraries(boolean preDexLibraries) Deprecated. -
getJumboMode
public boolean getJumboMode()Deprecated.Enable jumbo mode in dx (--force-jumbo).- Specified by:
getJumboModein interfaceDexOptions
-
setJumboMode
public void setJumboMode(boolean jumboMode) Deprecated. -
getDexInProcess
public boolean getDexInProcess()Deprecated.Whether to run thedxcompiler as a separate process or inside the Gradle daemon JVM.Running
dxin-process can greatly improve performance, but is still experimental.- Specified by:
getDexInProcessin interfaceDexOptions
-
setDexInProcess
public void setDexInProcess(boolean dexInProcess) Deprecated. -
getKeepRuntimeAnnotatedClasses
public boolean getKeepRuntimeAnnotatedClasses()Deprecated.Keep all classes with runtime annotations in the main dex in legacy multidex.This is enabled by default and works around an issue that will cause the app to crash when using java.lang.reflect.Field.getDeclaredAnnotations on older android versions.
This can be disabled for for apps that do not use reflection and need more space in their main dex.
- Specified by:
getKeepRuntimeAnnotatedClassesin interfaceDexOptions
-
setKeepRuntimeAnnotatedClasses
public void setKeepRuntimeAnnotatedClasses(boolean keepRuntimeAnnotatedClasses) Deprecated. -
getThreadCount
Deprecated.Number of threads to use when running dx. Defaults to 4.- Specified by:
getThreadCountin interfaceDexOptions
-
setThreadCount
Deprecated. -
getJavaMaxHeapSize
Deprecated.Specifies the-Xmxvalue when calling dx. Example value is"2048m".- Specified by:
getJavaMaxHeapSizein interfaceDexOptions
-
setJavaMaxHeapSize
Deprecated. -
getAdditionalParameters
Deprecated.List of additional parameters to be passed todx.- Specified by:
getAdditionalParametersin interfaceDexOptions
-
setAdditionalParameters
Deprecated. -
getMaxProcessCount
Deprecated.Returns the maximum number of concurrent processes that can be used to dex. Defaults to 4.Be aware that the number of concurrent process times the memory requirement represent the minimum amount of memory that will be used by the dx processes:
Total Memory = maxProcessCount * javaMaxHeapSizeTo avoid thrashing, keep these two settings appropriate for your configuration.
- Specified by:
getMaxProcessCountin interfaceDexOptions- Returns:
- the max number of concurrent dx processes.
-
setMaxProcessCount
Deprecated. -
getOptimize
Deprecated.Dex is always optimized. This returnstruealways.Whether to run thedxcompiler with the--no-optimizeflag.
-