-
Notifications
You must be signed in to change notification settings - Fork 136
/
build.gradle
119 lines (101 loc) · 4.33 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
//
// :apps:sasquatch
//
evaluationDependsOn(':apps')
android {
flavorDimensions "dependency", "distribute"
defaultConfig {
versionCode 300
versionName "5.0.0"
externalNativeBuild {
ndkBuild {
arguments "NDK_APPLICATION_MK=Application.mk", "V=1"
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
}
}
productFlavors {
projectDependency {
dimension "dependency"
applicationIdSuffix ".project"
buildConfigField "String", "APP_SECRET", "\"${System.getenv("ANDROID_INT")}\""
buildConfigField "String", "TARGET_TOKEN", "\"${System.getenv("ANDROID_TARGET_TOKEN_INT")}\""
buildConfigField "String", "TARGET_TOKEN1", "\"${System.getenv("ANDROID_TARGET_TOKEN1_INT")}\""
buildConfigField "String", "TARGET_TOKEN2", "\"${System.getenv("ANDROID_TARGET_TOKEN2_INT")}\""
buildConfigField "String", "TARGET_TOKEN3", "\"${System.getenv("ANDROID_TARGET_TOKEN3_INT")}\""
}
mavenCentralDependency {
dimension "dependency"
applicationIdSuffix ".mavenCentral"
buildConfigField "String", "APP_SECRET", "\"${System.getenv("ANDROID_PROD")}\""
buildConfigField "String", "TARGET_TOKEN", "\"${System.getenv("ANDROID_TARGET_TOKEN_PROD")}\""
buildConfigField "String", "TARGET_TOKEN1", "\"${System.getenv("ANDROID_TARGET_TOKEN1_PROD")}\""
buildConfigField "String", "TARGET_TOKEN2", "\"${System.getenv("ANDROID_TARGET_TOKEN2_PROD")}\""
buildConfigField "String", "TARGET_TOKEN3", "\"${System.getenv("ANDROID_TARGET_TOKEN3_PROD")}\""
}
appCenter {
dimension "distribute"
}
googlePlay {
dimension "distribute"
}
}
buildTypes {
releaseProguard {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
matchingFallbacks = ['release']
}
}
externalNativeBuild {
ndkBuild {
path "Android.mk"
}
}
}
repositories {
// Load credentials from local.properties file.
File propertiesFile = project.rootProject.file('local.properties')
def AZURE_USERNAME = null
def AZURE_PASSWORD = null
// Check that file exist.
if (propertiesFile.exists()) {
Properties properties = new Properties()
properties.load(propertiesFile.newDataInputStream())
// Get properties. If properties aren't exist it returns null.
AZURE_USERNAME = properties.getProperty('AZURE_USERNAME')
AZURE_PASSWORD = properties.getProperty('AZURE_PASSWORD')
}
maven {
credentials {
username = AZURE_USERNAME
password = AZURE_PASSWORD
}
url "https://msmobilecenter.pkgs.visualstudio.com/_packaging/AppCenter/maven/v1/"
}
}
dependencies {
implementation "androidx.appcompat:appcompat:1.0.2"
implementation "androidx.browser:browser:1.0.0"
implementation "androidx.recyclerview:recyclerview:1.1.0"
projectDependencyImplementation project(':sdk:appcenter-analytics')
projectDependencyImplementation project(':sdk:appcenter-crashes')
def appCenterSdkVersion = "5.0.1"
mavenCentralDependencyImplementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
mavenCentralDependencyImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
def taskRequests = getGradle().getStartParameter().getTaskRequests().toString()
if (taskRequests.contains("GooglePlay")) {
projectDependencyImplementation project(':sdk:appcenter-distribute-play')
mavenCentralDependencyImplementation "com.microsoft.appcenter:appcenter-distribute-play:${appCenterSdkVersion}"
} else {
projectDependencyImplementation project(':sdk:appcenter-distribute')
mavenCentralDependencyImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}"
}
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.test.espresso:espresso-idling-resource:3.1.0'
}