diff options
Diffstat (limited to 'eclipse')
4 files changed, 21 insertions, 8 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtConstants.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtConstants.java index f83bd3c..edfc30c 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtConstants.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtConstants.java @@ -18,9 +18,9 @@ package com.android.ide.eclipse.adt; import static com.android.SdkConstants.DOT_AIDL; import static com.android.SdkConstants.DOT_DEP; +import static com.android.SdkConstants.DOT_FS; import static com.android.SdkConstants.DOT_JAVA; import static com.android.SdkConstants.DOT_RS; -import static com.android.SdkConstants.DOT_FS; import com.android.SdkConstants; import com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder; @@ -223,4 +223,5 @@ public class AdtConstants { public static final String DOC_HIDE = "@hide"; //$NON-NLS-1$ public static final String DEX_OPTIONS_FORCEJUMBO = "dex.force.jumbo"; //$NON-NLS-1$ + public static final String DEX_OPTIONS_DISABLE_MERGER = "dex.disable.merger"; //$NON-NLS-1$ } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java index 5ffe2b3..c94ef9a 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java @@ -109,6 +109,7 @@ public class BuildHelper { private final AndroidPrintStream mOutStream; private final AndroidPrintStream mErrStream; private final boolean mForceJumbo; + private final boolean mDisableDexMerger; private final boolean mVerbose; private final boolean mDebugMode; @@ -140,7 +141,7 @@ public class BuildHelper { public BuildHelper(@NonNull IProject project, @NonNull AndroidPrintStream outStream, @NonNull AndroidPrintStream errStream, - boolean forceJumbo, boolean debugMode, + boolean forceJumbo, boolean disableDexMerger, boolean debugMode, boolean verbose, ResourceMarker resMarker) throws CoreException { mProject = project; mOutStream = outStream; @@ -148,6 +149,7 @@ public class BuildHelper { mDebugMode = debugMode; mVerbose = verbose; mForceJumbo = forceJumbo; + mDisableDexMerger = disableDexMerger; gatherPaths(resMarker); } @@ -712,13 +714,12 @@ public class BuildHelper { // replace the libs by their dexed versions (dexing them if needed.) List<String> finalInputPaths = new ArrayList<String>(inputPaths.size()); - if (inputPaths.size() == 1) { + if (mDisableDexMerger || inputPaths.size() == 1) { // only one input, no need to put a pre-dexed version, even if this path is // just a jar file (case for proguard'ed builds) finalInputPaths.addAll(inputPaths); } else { - for (String input : inputPaths) { File inputFile = new File(input); if (inputFile.isDirectory()) { diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java index 3dfcd1e..6e3dce3 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java @@ -372,6 +372,7 @@ public class PostCompilerBuilder extends BaseBuilder { BuildHelper helper = new BuildHelper(project, mOutStream, mErrStream, false /*jumbo mode doesn't matter here*/, + false /*dex merger doesn't matter here*/, true /*debugMode*/, AdtPrefs.getPrefs().getBuildVerbosity() == BuildVerbosity.VERBOSE, mResourceMarker); @@ -477,10 +478,16 @@ public class PostCompilerBuilder extends BaseBuilder { if (mPackageResources || mConvertToDex || mBuildFinalPackage) { String forceJumboStr = projectState.getProperty( AdtConstants.DEX_OPTIONS_FORCEJUMBO); - Boolean b = Boolean.valueOf(forceJumboStr); + Boolean jumbo = Boolean.valueOf(forceJumboStr); + + String dexMergerStr = projectState.getProperty( + AdtConstants.DEX_OPTIONS_DISABLE_MERGER); + Boolean dexMerger = Boolean.valueOf(dexMergerStr); + BuildHelper helper = new BuildHelper(project, mOutStream, mErrStream, - b.booleanValue(), + jumbo.booleanValue(), + dexMerger.booleanValue(), true /*debugMode*/, AdtPrefs.getPrefs().getBuildVerbosity() == BuildVerbosity.VERBOSE, mResourceMarker); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ExportHelper.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ExportHelper.java index d048f43..d215f2f 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ExportHelper.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ExportHelper.java @@ -127,11 +127,15 @@ public final class ExportHelper { // get the jumbo mode option String forceJumboStr = projectState.getProperty(AdtConstants.DEX_OPTIONS_FORCEJUMBO); - Boolean b = Boolean.valueOf(forceJumboStr); + Boolean jumbo = Boolean.valueOf(forceJumboStr); + + String dexMergerStr = projectState.getProperty(AdtConstants.DEX_OPTIONS_DISABLE_MERGER); + Boolean dexMerger = Boolean.valueOf(dexMergerStr); BuildHelper helper = new BuildHelper(project, fakeStream, fakeStream, - b.booleanValue(), + jumbo.booleanValue(), + dexMerger.booleanValue(), debugMode, false /*verbose*/, null /*resourceMarker*/); |