Narrowing down google play services dependencies we avoid multi dex (multi dex does...
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Tue, 30 Aug 2016 14:02:41 +0000 (16:02 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Tue, 30 Aug 2016 14:02:41 +0000 (16:02 +0200)
Also, when debugging and using Jack with Java 8 we can not see local variables' values. What sucks. Skipping Jack and Java 8 when debugging.

app/build.gradle
app/src/main/java/name/gumartinm/weather/information/app/WeatherInformationApp.java

index 6e6689f..4ccb636 100644 (file)
@@ -18,13 +18,9 @@ android {
 
         testApplicationId "name.gumartinm.weather.information.test"
         testInstrumentationRunner "android.test.InstrumentationTestRunner"
-        // WARNING: Jack requires a lot of memory :(
         jackOptions {
             enabled true
         }
-        // Enabling multidex support. Since the last upgrade my application does not compile
-        // without multi dex :(
-        multiDexEnabled true
     }
     buildTypes {
         release {
@@ -38,9 +34,17 @@ android {
             minifyEnabled false
             buildConfigField "boolean", "DEBUG_MODE", "true"
             debuggable true
+            testCoverageEnabled = false
+            // when debugging we must disable Jack and Java 8 :(
+            // see: https://code.google.com/p/android/issues/detail?id=219615
+            jackOptions {
+                enabled true
+            }
         }
     }
     compileOptions {
+        // when debugging we must disable Jack and Java 8 :(
+        // see: https://code.google.com/p/android/issues/detail?id=219615
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
     }
@@ -48,8 +52,8 @@ android {
 
 dependencies {
     compile 'com.android.support:support-v4:+'
-    compile 'com.google.android.gms:play-services:+'
+    compile 'com.google.android.gms:play-services-maps:+'
+    compile 'com.google.android.gms:play-services-analytics:+'
     compile 'com.fasterxml.jackson.core:jackson-core:2.3.3'
     compile 'com.jakewharton.timber:timber:2.5.0'
-    compile 'com.android.support:multidex:+'
 }
index f076ad3..b5e438d 100644 (file)
@@ -17,7 +17,6 @@ package name.gumartinm.weather.information.app;
 
 import android.app.Application;
 import android.content.Context;
-import android.support.multidex.MultiDex;
 
 import com.google.android.gms.analytics.GoogleAnalytics;
 import com.google.android.gms.analytics.HitBuilders;
@@ -49,12 +48,6 @@ public class WeatherInformationApp extends Application {
         }
     }
 
-    @Override
-    protected void attachBaseContext(Context base) {
-        super.attachBaseContext(base);
-        MultiDex.install(this);
-    }
-
     private static class GoogleAnalyticsTrackers {
 
         private enum TrackerName {