From 6d5ded3217ea1d7542188232108c8cce51619732 Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 21 Aug 2016 11:55:06 +0200 Subject: [PATCH] Update deps, fix compilation issues and enable multidex in debug builds --- app/build.gradle | 17 ++++++++++------- .../android/widget/menu/CustomPopupMenu.java | 9 +++++++-- build.gradle | 3 ++- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 28b359f3..5180f172 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,6 +45,9 @@ android { debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-debug.cfg' + // multidex is enabled only in debug builds as in release builds proguard should + // strip all unused methods + multiDexEnabled true } } lintOptions { @@ -78,9 +81,9 @@ dependencies { } compile 'org.solovyev.android:checkout:0.7.5@aar' compile 'org.solovyev.android:material:0.1.4@aar' - compile 'com.google.android.gms:play-services-ads:9.0.2' - compile 'com.google.android.gms:play-services-base:9.0.2' - compile 'com.google.android.gms:play-services-analytics:9.0.2' + compile "com.google.android.gms:play-services-ads:${versions.gpsLib}" + compile "com.google.android.gms:play-services-base:${versions.gpsLib}" + compile "com.google.android.gms:play-services-analytics:${versions.gpsLib}" compile(name: 'plotter', ext: 'aar') compile 'com.google.guava:guava:19.0' compile('org.simpleframework:simple-xml:2.6.1') { @@ -102,11 +105,11 @@ dependencies { testCompile 'org.skyscreamer:jsonassert:1.2.3' testCompile(name: 'org.apache.http.legacy', ext: 'jar') - androidTestCompile 'com.android.support:support-annotations:23.4.0' - androidTestCompile 'com.android.support.test:runner:0.4.1' - androidTestCompile 'com.android.support.test:rules:0.4.1' + androidTestCompile "com.android.support:support-annotations:${versions.supportLib}" + androidTestCompile 'com.android.support.test:runner:0.5' + androidTestCompile 'com.android.support.test:rules:0.5' androidTestCompile 'org.hamcrest:hamcrest-library:1.3' - androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1' + androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' } apt { diff --git a/app/src/main/java/org/solovyev/android/widget/menu/CustomPopupMenu.java b/app/src/main/java/org/solovyev/android/widget/menu/CustomPopupMenu.java index 66710b1f..c307b4eb 100644 --- a/app/src/main/java/org/solovyev/android/widget/menu/CustomPopupMenu.java +++ b/app/src/main/java/org/solovyev/android/widget/menu/CustomPopupMenu.java @@ -23,9 +23,14 @@ import android.support.v7.view.SupportMenuInflater; import android.support.v7.view.menu.MenuBuilder; import android.support.v7.view.menu.MenuPresenter; import android.support.v7.view.menu.SubMenuBuilder; +import android.support.v7.widget.ForwardingListener; import android.support.v7.widget.ListPopupWindow; import android.support.v7.widget.PopupMenu; -import android.view.*; +import android.view.Gravity; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.view.View; /** * Static library support version of the framework's {@link android.widget.PopupMenu}. @@ -141,7 +146,7 @@ public class CustomPopupMenu implements MenuBuilder.Callback, MenuPresenter.Call */ public View.OnTouchListener getDragToOpenListener() { if (mDragListener == null) { - mDragListener = new ListPopupWindow.ForwardingListener(mAnchor) { + mDragListener = new ForwardingListener(mAnchor) { @Override protected boolean onForwardingStarted() { show(); diff --git a/build.gradle b/build.gradle index 5b53b408..918a0519 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,8 @@ buildscript { } ext { - versions = [supportLib: "23.4.0", + versions = [supportLib: "24.2.0", + gpsLib : "9.4.0", sdk : [compile: 23, buildTools: "23.0.3", min: 9, target: 23]] } }