@NonNull @Override public Map<String, Object> getParameterInputs() { try { // ATTENTION: if you add something here, consider adding the value to DexKey - it needs // to be saved if affects how dx is invoked. Map<String, Object> params = Maps.newHashMapWithExpectedSize(4); params.put("optimize", true); params.put("predex", dexOptions.getPreDexLibraries()); params.put("jumbo", dexOptions.getJumboMode()); params.put("multidex", multiDex); params.put("multidex-legacy", multiDex && mainDexListFile != null); params.put("java-max-heap-size", dexOptions.getJavaMaxHeapSize()); params.put( "additional-parameters", Iterables.toString(dexOptions.getAdditionalParameters())); TargetInfo targetInfo = androidBuilder.getTargetInfo(); Preconditions.checkState(targetInfo != null, "androidBuilder.targetInfo required for task '%s'.", getName()); BuildToolInfo buildTools = targetInfo.getBuildTools(); params.put("build-tools", buildTools.getRevision().toString()); return params; } catch (Exception e) { throw new RuntimeException(e); } }
args.forceJumbo = dexOptions.getJumboMode();
inputFile, buildToolInfo.getRevision(), dexOptions.getJumboMode());
FileCacheInputParams.BUILD_TOOLS_REVISION.name(), buildToolsRevision.toString()) .putBoolean(FileCacheInputParams.JUMBO_MODE.name(), dexOptions.getJumboMode()) .putBoolean(FileCacheInputParams.OPTIMIZE.name(), true) .putBoolean(FileCacheInputParams.MULTI_DEX.name(), multiDex);
if (dexOptions.getJumboMode()) { builder.addArgs("--force-jumbo");
inputFile, builder.getTargetInfo().getBuildTools().getRevision(), dexOptions.getJumboMode(), optimize, dexOptions.getAdditionalParameters(),
if (dexOptions.getJumboMode()) { builder.addArgs("--force-jumbo");
public static DefaultDexOptions copyOf(DexOptions dexOptions) { DefaultDexOptions result = new DefaultDexOptions(); result.setPreDexLibraries(dexOptions.getPreDexLibraries()); result.setJumboMode(dexOptions.getJumboMode()); result.setDexInProcess(dexOptions.getDexInProcess()); result.setThreadCount(dexOptions.getThreadCount()); result.setJavaMaxHeapSize(dexOptions.getJavaMaxHeapSize()); result.setAdditionalParameters(dexOptions.getAdditionalParameters()); result.setMaxProcessCount(dexOptions.getMaxProcessCount()); result.setKeepRuntimeAnnotatedClasses( dexOptions.getKeepRuntimeAnnotatedClasses()); return result; }