Skip to content

Commit

Permalink
Merge pull request #1437 from microsoft/feature/distribute-play-app
Browse files Browse the repository at this point in the history
Modify the test app to test the new Distribute library
  • Loading branch information
MatkovIvan committed Jul 16, 2020
2 parents c41047a + 17e3465 commit c5d26b0
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions apps/sasquatch/build.gradle
Expand Up @@ -11,7 +11,7 @@ evaluationDependsOn(':apps')

android {

flavorDimensions "dependency", "pushLibrary"
flavorDimensions "dependency", "distribute"

defaultConfig {
externalNativeBuild {
Expand All @@ -31,11 +31,11 @@ android {
dimension "dependency"
applicationIdSuffix ".jcenter"
}
vanilla {
dimension "pushLibrary"
appCenter {
dimension "distribute"
}
firebase {
dimension "pushLibrary"
googlePlay {
dimension "distribute"
}
}

Expand Down Expand Up @@ -68,25 +68,28 @@ 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}"

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'
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
Expand Down

0 comments on commit c5d26b0

Please sign in to comment.