Bug 1255914 - Part 2: mostly back out multiDex (changeset 6972bef6693c). r=sebastian
Since we're Proguarding the automation build now, we shouldn't need to
multiDex anymore -- even in beta.
MozReview-Commit-ID: 6Yc73Vi9Fhd
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -76,40 +76,26 @@ android {
// For API 21+ - with multi dex, this will be faster for local development.
local {
// For multi dex, setting `minSdkVersion 21` allows the Android gradle plugin to
// pre-DEX each module and produce an APK that can be tested on
// Android Lollipop without time consuming DEX merging processes.
minSdkVersion 21
dexOptions {
preDexLibraries true
- // We only call `MultiDex.install()` for the automation build flavor
- // so this may not work. However, I don't think the multidex support
- // library is necessary for 21+, so I expect that it will work.
multiDexEnabled true
}
}
// For API < 21 - does not support multi dex because local development
// is slow in that case. Most builds will not require multi dex so this
// should not be an issue.
localOld {
}
// Automation builds.
automation {
- dexOptions {
- // As of FF48 on beta, the "test", "lint", etc. treeherder jobs fail because they
- // exceed the method limit. Beta includes Adjust and its GPS dependencies, which
- // increase the method count & explain the failures. Furthermore, this error only
- // occurs on debug builds because we don't proguard.
- //
- // We enable multidex as an easy, quick-fix with minimal side effects but before we
- // move to gradle for our production builds, we should re-evaluate this decision
- // (bug 1286677).
- multiDexEnabled true
- }
}
}
sourceSets {
main {
manifest.srcFile "${project.buildDir}/generated/source/preprocessed_manifest/AndroidManifest.xml"
aidl {
@@ -214,18 +200,16 @@ android {
// we have tests that start test servers and the bound ports
// collide. We'll fix this soon to have much faster test cycles.
maxParallelForks 1
}
}
}
dependencies {
- compile 'com.android.support:multidex:1.0.0'
-
compile "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "com.android.support:appcompat-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "com.android.support:cardview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "com.android.support:recyclerview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "com.android.support:design:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "com.android.support:customtabs:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
--- a/mobile/android/base/AppConstants.java.in
+++ b/mobile/android/base/AppConstants.java.in
@@ -1,21 +1,17 @@
//#filter substitution
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko;
-import android.content.Context;
import android.os.Build;
-//#ifdef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
-import android.support.multidex.MultiDex;
-//#endif
/**
* A collection of constants that pertain to the build and runtime state of the
* application. Typically these are sourced from build-time definitions (see
* Makefile.in). This is a Java-side substitute for nsIXULAppInfo, amongst
* other things.
*
* See also SysInfo.java, which includes some of the values available from
@@ -318,32 +314,15 @@ public class AppConstants {
true;
//#else
false;
//#endif
// (bug 1266820) Temporarily disabled since no one is working on it.
public static final boolean SCREENSHOTS_IN_BOOKMARKS_ENABLED = false;
- /**
- * Enables multidex depending on build flags. For more information,
- * see `multiDexEnabled true` in mobile/android/app/build.gradle.
- *
- * As a method, this shouldn't be in AppConstants, but it's
- * the only semi-relevant Java file that we pre-process.
- */
- public static void maybeInstallMultiDex(final Context context) {
-//#ifdef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
- if (BuildConfig.FLAVOR.equals("automation")) {
- MultiDex.install(context);
- }
-//#else
- // Do nothing.
-//#endif
- }
-
public static final boolean MOZ_ANDROID_ACTIVITY_STREAM =
//#ifdef MOZ_ANDROID_ACTIVITY_STREAM
true;
//#else
false;
//#endif
}
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java
@@ -142,22 +142,16 @@ public class GeckoApplication extends Ap
GeckoBatteryManager.getInstance().start(this);
GeckoNetworkManager.getInstance().start(this);
mInBackground = false;
}
@Override
- protected void attachBaseContext(Context base) {
- super.attachBaseContext(base);
- AppConstants.maybeInstallMultiDex(base);
- }
-
- @Override
public void onCreate() {
Log.i(LOG_TAG, "zerdatime " + SystemClock.uptimeMillis() + " - Fennec application start");
mRefWatcher = LeakCanary.install(this);
final Context context = getApplicationContext();
GeckoAppShell.setApplicationContext(context);
HardwareUtils.init(context);