diff --git a/android/build.gradle b/android/build.gradle index 6aee0482ac..96bcdce715 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -40,52 +40,48 @@ apply from: 'secure.properties' apply plugin: 'io.fabric' dependencies { - // android support libs - implementation ('com.android.support:support-v4:26.1.0') { - force = true; - } - implementation 'com.android.support:appcompat-v7:26.1.0' - implementation 'com.android.support:recyclerview-v7:26.1.0' - implementation 'com.android.support:design:26.1.0' - implementation 'com.android.support:cardview-v7:26.1.0' - implementation 'com.android.support:preference-v7:26.1.0' - implementation 'com.android.support:preference-v14:26.1.0' - implementation 'com.android.support:customtabs:26.1.0' - // google play services - implementation 'com.google.android.gms:play-services-location:11.8.0' - implementation 'com.google.android.gms:play-services-analytics:11.8.0' - implementation 'com.google.android.gms:play-services-plus:11.8.0' - implementation 'com.google.android.gms:play-services-gcm:11.8.0' - implementation 'com.google.android.gms:play-services-ads:11.8.0' - implementation 'com.google.android.gms:play-services-auth:11.8.0' + implementation 'com.android.support:multidex:' + propMultiDexVersion + + implementation 'com.android.support:support-v4:' + propSupportLibraryVersion + implementation 'com.android.support:appcompat-v7:' + propSupportLibraryVersion + implementation 'com.android.support:recyclerview-v7:'+ propSupportLibraryVersion + implementation 'com.android.support:design:'+ propSupportLibraryVersion + implementation 'com.android.support:cardview-v7:'+ propSupportLibraryVersion + implementation 'com.android.support:preference-v7:'+ propSupportLibraryVersion + implementation 'com.android.support:preference-v14:'+ propSupportLibraryVersion + implementation 'com.android.support:customtabs:'+ propSupportLibraryVersion + implementation 'com.android.support:support-annotations:'+ propSupportLibraryVersion + implementation 'com.android.support:support-compat:27.1.1'+ propSupportLibraryVersion + + implementation 'com.google.android.gms:play-services-ads:' + propPlayServicesVersion + implementation 'com.google.android.gms:play-services-location:' + propPlayServicesVersion + implementation 'com.google.android.gms:play-services-analytics:' + propPlayServicesVersion + implementation 'com.google.android.gms:play-services-plus:' + propPlayServicesVersion + implementation 'com.google.android.gms:play-services-gcm:' + propPlayServicesVersion + implementation 'com.google.android.gms:play-services-ads:' + propPlayServicesVersion + implementation 'com.google.android.gms:play-services-auth:' + propPlayServicesVersion + implementation 'com.google.android.gms:play-services-basement:' + propPlayServicesVersion + // statistics implementation 'com.flurry.android:analytics:11.0.0@aar' // crash reporting implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') { transitive = true } implementation('com.crashlytics.sdk.android:crashlytics-ndk:2.0.4@aar') { transitive = true } // 3-party - implementation ('com.facebook.android:facebook-android-sdk:4.26.0') { - exclude group: 'com.google.android.gms' - exclude group: 'com.android.support' - } - implementation('com.facebook.android:audience-network-sdk:4.27.0') { - exclude group: 'com.google.android.gms' - exclude group: 'com.android.support' - } + implementation 'com.facebook.android:facebook-android-sdk:4.26.0' + implementation 'com.facebook.android:audience-network-sdk:4.27.0' implementation 'com.google.code.gson:gson:2.6.1' implementation 'com.pushwoosh:pushwoosh:5.9.0' implementation 'com.pushwoosh:pushwoosh-gcm:5.9.0' implementation 'com.my.tracker:mytracker-sdk:1.5.3' implementation ('com.my.target:mytarget-sdk:5.2.2') { - exclude group: 'com.android.support' exclude group: 'com.google.android.exoplayer', module:'exoplayer-core' exclude group: 'com.google.android.exoplayer', module:'exoplayer-dash' exclude group: 'com.google.android.exoplayer', module:'exoplayer-hls' } implementation('com.mopub:mopub-sdk-native-static:5.0.0@aar') { - exclude group: 'com.android.support' - transitive = true + transitive = true; } implementation fileTree(dir: '3rd_party', include: '*.jar') // BottomSheet @@ -101,17 +97,14 @@ dependencies { implementation 'com.android.support:multidex:1.0.3' implementation 'com.appsflyer:af-android-sdk:4.8.7' implementation ("ru.mail:libnotify:0.1.177-notify-support-v107-sdk-26@aar") { - transitive = true; - changing = true; - exclude group: 'com.android.support' - exclude group: 'com.google.android.gms' + transitive = true + changing = true } implementation ("ru.mail:libnotify-debug:0.1.177-notify-support-v107-sdk-26@aar") { - transitive = true; - changing = true; - exclude group: 'com.android.support' - exclude group: 'com.google.android.gms' + transitive = true + changing = true } + implementation 'com.android.support.constraint:constraint-layout:1.1.0' implementation 'com.android.billingclient:billing:1.1' implementation 'uk.co.samuelwall:material-tap-target-prompt:2.12.1' @@ -134,6 +127,34 @@ crashlytics { enableNdk true } +configurations.all { + resolutionStrategy { + force 'com.android.support:multidex:' + propMultiDexVersion + + force 'com.android.support:support-v4:' + propSupportLibraryVersion + force 'com.android.support:appcompat-v7:' + propSupportLibraryVersion + force 'com.android.support:recyclerview-v7:' + propSupportLibraryVersion + force 'com.android.support:design:' + propSupportLibraryVersion + force 'com.android.support:cardview-v7:' + propSupportLibraryVersion + force 'com.android.support:preference-v7:' + propSupportLibraryVersion + force 'com.android.support:preference-v14:' + propSupportLibraryVersion + force 'com.android.support:customtabs:' + propSupportLibraryVersion + force 'com.android.support:support-annotations:' + propSupportLibraryVersion + force 'com.android.support:support-compat:' + propSupportLibraryVersion + + force 'com.google.android.gms:play-services-ads:' + propPlayServicesVersion + force 'com.google.android.gms:play-services-location:' + propPlayServicesVersion + force 'com.google.android.gms:play-services-analytics:' + propPlayServicesVersion + force 'com.google.android.gms:play-services-plus:' + propPlayServicesVersion + force 'com.google.android.gms:play-services-gcm:' + propPlayServicesVersion + force 'com.google.android.gms:play-services-ads:' + propPlayServicesVersion + force 'com.google.android.gms:play-services-auth:' + propPlayServicesVersion + force 'com.google.android.gms:play-services-basement:' + propPlayServicesVersion + + failOnVersionConflict(); + } +} + android { // All properties are read from gradle.properties file compileSdkVersion propCompileSdkVersion.toInteger() diff --git a/android/gradle.properties b/android/gradle.properties index dbecbc9077..7e6db644ae 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -6,6 +6,9 @@ propVersionCode=862 propVersionName=8.6.2 propDebugNdkFlags=V=1 NDK_DEBUG=1 DEBUG=1 propReleaseNdkFlags=V=1 NDK_DEBUG=0 PRODUCTION=1 +propSupportLibraryVersion=27.1.1 +propPlayServicesVersion=11.8.0 +propMultiDexVersion=1.0.3 # list of files for obb-s propObbFonts ../data/01_dejavusans.ttf \ diff --git a/android/src/com/mapswithme/maps/widget/WheelProgressView.java b/android/src/com/mapswithme/maps/widget/WheelProgressView.java index 6ede0fb1ef..14115254a3 100644 --- a/android/src/com/mapswithme/maps/widget/WheelProgressView.java +++ b/android/src/com/mapswithme/maps/widget/WheelProgressView.java @@ -1,5 +1,6 @@ package com.mapswithme.maps.widget; +import android.annotation.SuppressLint; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Bitmap; @@ -11,9 +12,9 @@ import android.graphics.RectF; import android.graphics.drawable.AnimationDrawable; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.v4.graphics.drawable.DrawableWrapper; +import android.support.v7.graphics.drawable.DrawableWrapper; +import android.support.v7.widget.AppCompatImageView; import android.util.AttributeSet; -import android.widget.ImageView; import com.mapswithme.maps.R; import com.mapswithme.util.Graphics; @@ -22,7 +23,7 @@ import com.mapswithme.util.ThemeUtils; /** * Draws progress wheel, consisting of circle with background and 'stop' button in the center of the circle. */ -public class WheelProgressView extends ImageView +public class WheelProgressView extends AppCompatImageView { private static final int DEFAULT_THICKNESS = 4; @@ -109,8 +110,8 @@ public class WheelProgressView extends ImageView mCenter.set(left + width / 2, top + height / 2); mProgressRect.set(mCenter.x - mRadius, mCenter.y - mRadius, mCenter.x + mRadius, mCenter.y + mRadius); - Drawable d = ((mCenterDrawable instanceof DrawableWrapper) ? ((DrawableWrapper)mCenterDrawable).getWrappedDrawable() - : mCenterDrawable); + Drawable d = ((mCenterDrawable instanceof DrawableWrapper) ? ((DrawableWrapper) mCenterDrawable) + .getWrappedDrawable() : mCenterDrawable); if (d instanceof BitmapDrawable) { Bitmap bmp = ((BitmapDrawable)d).getBitmap();