From b51a78567fc685e641e979150ffd460c6855b80e Mon Sep 17 00:00:00 2001 From: serso Date: Tue, 27 Jan 2015 23:23:59 +0100 Subject: [PATCH] Google Play Services libraries are added separately now --- android-app/android-app.iml | 3 ++- android-app/build.gradle | 25 ++++++++++++++++++++++++- android-app/proguard-debug.cfg | 18 +++--------------- android-app/proguard.cfg | 24 ++++++------------------ 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/android-app/android-app.iml b/android-app/android-app.iml index 3397c804..c7441375 100644 --- a/android-app/android-app.iml +++ b/android-app/android-app.iml @@ -83,8 +83,8 @@ - + @@ -98,6 +98,7 @@ + diff --git a/android-app/build.gradle b/android-app/build.gradle index 560488ab..065466b9 100644 --- a/android-app/build.gradle +++ b/android-app/build.gradle @@ -70,7 +70,8 @@ dependencies { exclude(module: 'xercesImpl') } compile 'org.solovyev.android:checkout:0.6.0@aar' - compile 'com.google.android.gms:play-services:6.5.87@aar' + compile 'com.google.android.gms:play-services-ads:6.5.87@aar' + compile 'com.google.android.gms:play-services-base:6.5.87@aar' compile 'com.melnykov:floatingactionbutton:1.1.0' } @@ -100,6 +101,28 @@ signing { sign configurations.archives } +gradle.taskGraph.afterTask { Task task -> + if (task.project.name == 'android-app') { + if (task.name == 'mergeReleaseResources') { + cleanGoogleServicesResources('release') + } else if (task.name == 'mergeDebugResources') { + cleanGoogleServicesResources('debug') + } + } +} + +private void cleanGoogleServicesResources(buildType) { + ant.delete(includeEmptyDirs: 'true') { + fileset(dir: file('./build/intermediates/res/' + buildType), includes: '**/common_signin*') + } + ant.delete(includeEmptyDirs: 'true') { + fileset(dir: file('./build/intermediates/res/' + buildType), includes: '**/ic_plusone*') + } + ant.delete(includeEmptyDirs: 'true') { + fileset(dir: file('./build/intermediates/res/' + buildType), includes: '**/powered_by_google*') + } +} + group = "org.solovyev.android" archivesBaseName = "calculatorpp-android-app" version = version_name() diff --git a/android-app/proguard-debug.cfg b/android-app/proguard-debug.cfg index 7c237aa5..12a5e548 100644 --- a/android-app/proguard-debug.cfg +++ b/android-app/proguard-debug.cfg @@ -65,28 +65,16 @@ -dontwarn com.google.ads.** -dontwarn com.sun.org.apache.xerces.internal.impl.dv.util.Base64 -dontwarn com.actionbarsherlock.BuildConfig --dontwarn com.google.android.gms.** --dontwarn com.melnykov.fab.** --dontwarn android.support.v7.** --keep class android.support.v7.** { *; } --keep interface android.support.v7.** { *; } +-dontwarn com.google.android.gms.internal.* -keep class org.simpleframework.xml.** { *; } -keep class * implements org.solovyev.android.calculator.model.MathPersistenceEntity -keep class * implements org.solovyev.android.calculator.MathEntityPersistenceContainer -# -#********************************************************************* -# -# SHERLOCK -# -#********************************************************************* -# - -keep class android.support.v4.app.** { *; } -keep interface android.support.v4.app.** { *; } --keep class com.actionbarsherlock.** { *; } --keep interface com.actionbarsherlock.** { *; } +-keep class android.support.v7.** { *; } +-keep interface android.support.v7.** { *; } # diff --git a/android-app/proguard.cfg b/android-app/proguard.cfg index 10f6c572..a62000ad 100644 --- a/android-app/proguard.cfg +++ b/android-app/proguard.cfg @@ -64,16 +64,17 @@ -dontwarn com.google.ads.** -dontwarn com.sun.org.apache.xerces.internal.impl.dv.util.Base64 -dontwarn com.actionbarsherlock.BuildConfig --dontwarn com.google.android.gms.** --dontwarn com.melnykov.fab.** --dontwarn android.support.v7.** --keep class android.support.v7.** { *; } --keep interface android.support.v7.** { *; } +-dontwarn com.google.android.gms.internal.* -keep class org.simpleframework.xml.** { *; } -keep class * implements org.solovyev.android.calculator.model.MathPersistenceEntity -keep class * implements org.solovyev.android.calculator.MathEntityPersistenceContainer +-keep class android.support.v4.app.** { *; } +-keep interface android.support.v4.app.** { *; } +-keep class android.support.v7.** { *; } +-keep interface android.support.v7.** { *; } + # #********************************************************************* # @@ -90,19 +91,6 @@ public static int e(...); } -# -#********************************************************************* -# -# SHERLOCK -# -#********************************************************************* -# - --keep class android.support.v4.app.** { *; } --keep interface android.support.v4.app.** { *; } --keep class com.actionbarsherlock.** { *; } --keep interface com.actionbarsherlock.** { *; } - # #********************************************************************* #