From e916e72417bcd590791fdb9a55ab42ff70e5e2a6 Mon Sep 17 00:00:00 2001 From: Anastasia Kubova Date: Fri, 10 Jul 2020 08:31:51 +0300 Subject: [PATCH 1/5] Add a build variant to test app --- apps/sasquatch/build.gradle | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apps/sasquatch/build.gradle b/apps/sasquatch/build.gradle index 62917a07f3..09e2c44c52 100644 --- a/apps/sasquatch/build.gradle +++ b/apps/sasquatch/build.gradle @@ -31,6 +31,14 @@ android { dimension "dependency" applicationIdSuffix ".jcenter" } + projectGooglePlay { + dimension "dependency" + applicationIdSuffix ".project" + } + jcenterGooglePlay { + dimension "dependency" + applicationIdSuffix ".jcenter" + } vanilla { dimension "pushLibrary" } @@ -77,6 +85,16 @@ dependencies { jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}" jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-push:${appCenterSdkVersion}" + projectGooglePlayImplementation project(':sdk:appcenter-analytics') + projectGooglePlayImplementation project(':sdk:appcenter-crashes') + projectGooglePlayImplementation project(':sdk:appcenter-push') + projectGooglePlayImplementation project(':sdk:appcenter-distribute-play') + + jcenterGooglePlayImplementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}" + jcenterGooglePlayImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" + jcenterGooglePlayImplementation "com.microsoft.appcenter:appcenter-distribute-play:${appCenterSdkVersion}" + jcenterGooglePlayImplementation "com.microsoft.appcenter:appcenter-push:${appCenterSdkVersion}" + androidTestImplementation 'com.android.support.test:rules:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.2' From e8c9fc0c82855667c6748c6fadd1a502c319820b Mon Sep 17 00:00:00 2001 From: Anastasia Kubova Date: Fri, 10 Jul 2020 17:48:58 +0300 Subject: [PATCH 2/5] Resolve feedback --- apps/sasquatch/build.gradle | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/apps/sasquatch/build.gradle b/apps/sasquatch/build.gradle index 09e2c44c52..4390225957 100644 --- a/apps/sasquatch/build.gradle +++ b/apps/sasquatch/build.gradle @@ -11,7 +11,7 @@ evaluationDependsOn(':apps') android { - flavorDimensions "dependency", "pushLibrary" + flavorDimensions "dependency", "pushLibrary", "distribute" defaultConfig { externalNativeBuild { @@ -31,13 +31,11 @@ android { dimension "dependency" applicationIdSuffix ".jcenter" } - projectGooglePlay { - dimension "dependency" - applicationIdSuffix ".project" + appCenter { + dimension "distribute" } - jcenterGooglePlay { - dimension "dependency" - applicationIdSuffix ".jcenter" + googlePlay { + dimension "distribute" } vanilla { dimension "pushLibrary" @@ -76,24 +74,21 @@ dependencies { projectDependencyImplementation project(':sdk:appcenter-analytics') projectDependencyImplementation project(':sdk:appcenter-crashes') - projectDependencyImplementation project(':sdk:appcenter-distribute') projectDependencyImplementation project(':sdk:appcenter-push') def appCenterSdkVersion = "3.2.2" jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}" jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" - jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}" jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-push:${appCenterSdkVersion}" - projectGooglePlayImplementation project(':sdk:appcenter-analytics') - projectGooglePlayImplementation project(':sdk:appcenter-crashes') - projectGooglePlayImplementation project(':sdk:appcenter-push') - projectGooglePlayImplementation project(':sdk:appcenter-distribute-play') - - jcenterGooglePlayImplementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}" - jcenterGooglePlayImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" - jcenterGooglePlayImplementation "com.microsoft.appcenter:appcenter-distribute-play:${appCenterSdkVersion}" - jcenterGooglePlayImplementation "com.microsoft.appcenter:appcenter-push:${appCenterSdkVersion}" + def taskRequests = getGradle().getStartParameter().getTaskRequests().toString() + if (taskRequests.contains("GooglePlay")) { + projectDependencyImplementation project(':sdk:appcenter-distribute-play') + jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-distribute-play:${appCenterSdkVersion}" + } else { + projectDependencyImplementation project(':sdk:appcenter-distribute') + jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}" + } androidTestImplementation 'com.android.support.test:rules:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' From 52304d2f2d4370955f5171d9b91322f3c550267f Mon Sep 17 00:00:00 2001 From: Anastasia Kubova Date: Tue, 14 Jul 2020 15:40:25 +0300 Subject: [PATCH 3/5] Fix build javadoc --- gradlew | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gradlew b/gradlew index cccdd3d517..1af86943e4 100755 --- a/gradlew +++ b/gradlew @@ -106,7 +106,8 @@ fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" + # Increase the size of memory is a workaround to avoid error 'OutOfMemoryError: Java heap space' during perform command 'assemble javadoc lint'. + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\" \"-Xmx1024m\" \"-Xms256m\" \"-XX:MaxPermSize=1024m\"" fi # For Cygwin, switch paths to Windows format before running java From 41c29a07fb8b0b45473e089ba077e5393fdfffc3 Mon Sep 17 00:00:00 2001 From: Anastasia Kubova Date: Wed, 15 Jul 2020 10:18:23 +0300 Subject: [PATCH 4/5] Remove pushLibrary dimension --- apps/sasquatch/build.gradle | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/apps/sasquatch/build.gradle b/apps/sasquatch/build.gradle index 4390225957..2c37fb1e10 100644 --- a/apps/sasquatch/build.gradle +++ b/apps/sasquatch/build.gradle @@ -11,7 +11,7 @@ evaluationDependsOn(':apps') android { - flavorDimensions "dependency", "pushLibrary", "distribute" + flavorDimensions "dependency", "distribute" defaultConfig { externalNativeBuild { @@ -37,12 +37,6 @@ android { googlePlay { dimension "distribute" } - vanilla { - dimension "pushLibrary" - } - firebase { - dimension "pushLibrary" - } } buildTypes { @@ -95,11 +89,7 @@ dependencies { implementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.2' } -// We are interested in excluding the plugin only for the vanilla sasquatch build variant. -def taskRequests = getGradle().getStartParameter().getTaskRequests().toString() -if (!taskRequests.contains("sasquatch") || taskRequests.contains("Firebase")) { - apply plugin: 'com.google.gms.google-services' -} +apply plugin: 'com.google.gms.google-services' /* * Project and jcenter conflict since they are not using same version of Push and From 17e34650e170e01174da51476f36b2c09fa45e53 Mon Sep 17 00:00:00 2001 From: Anastasia Kubova Date: Thu, 16 Jul 2020 11:21:34 +0300 Subject: [PATCH 5/5] Remove fix for oom error --- gradlew | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gradlew b/gradlew index 1af86943e4..cccdd3d517 100755 --- a/gradlew +++ b/gradlew @@ -106,8 +106,7 @@ fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then - # Increase the size of memory is a workaround to avoid error 'OutOfMemoryError: Java heap space' during perform command 'assemble javadoc lint'. - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\" \"-Xmx1024m\" \"-Xms256m\" \"-XX:MaxPermSize=1024m\"" + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin, switch paths to Windows format before running java