-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.gradle
206 lines (184 loc) · 8.44 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
plugins {
id 'com.android.application'
id 'kotlin-android'
}
Properties properties = new Properties()
if (project.rootProject.file('local.properties').canRead()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}
if (properties.containsKey("ENABLE_GOOGLE_SERVICES") && properties.getProperty("ENABLE_GOOGLE_SERVICES").toBoolean()) {
apply plugin: 'com.google.gms.google-services'
}
android {
compileSdk 34
defaultConfig {
applicationId "com.azure.android.communication.ui.callingcompositedemoapp"
targetSdkVersion 34
versionCode ui_library_version_code
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField 'String', 'TOKEN_FUNCTION_URL', properties.getProperty('TOKEN_FUNCTION_URL', '""')
buildConfigField 'String', 'USER_NAME', properties.getProperty('USER_NAME', '""')
buildConfigField 'String', 'GROUP_CALL_ID', properties.getProperty('GROUP_CALL_ID', '""')
buildConfigField 'String', 'TEAMS_MEETING_LINK', properties.getProperty('TEAMS_MEETING_LINK', '""')
buildConfigField 'String', 'ACS_TOKEN', properties.getProperty('ACS_TOKEN', '""')
buildConfigField 'String', 'APP_SECRET', properties.getProperty('APP_SECRET', '""')
buildConfigField 'String', 'REMOTE_PARTICIPANT_AVATAR_TEST_URL', properties.getProperty('REMOTE_PARTICIPANT_AVATAR_TEST_URL', '""')
buildConfigField 'String', 'ACS_TOKEN_EXPIRED', properties.getProperty('ACS_TOKEN_EXPIRED', '""')
buildConfigField 'String', 'IDENTITY', properties.getProperty('IDENTITY', '""')
buildConfigField 'boolean', 'CHECK_TASK_ROOT', String.valueOf(!shouldNotCheckTaskRoot())
buildConfigField 'String', 'THREAD_ID', properties.getProperty('THREAD_ID', '""')
buildConfigField 'String', 'END_POINT_URL', properties.getProperty('END_POINT_URL', '""')
buildConfigField 'String', 'SUPPORT_END_POINT_URL', properties.getProperty('SUPPORT_END_POINT_URL', '""')
buildConfigField 'String', 'PARTICIPANT_MRIS', properties.getProperty('PARTICIPANT_MRIS', '""')
buildConfigField "String", 'AAD_TOKEN', properties.getProperty('AAD_TOKEN', '""')
buildConfigField "String", 'ACS_IDENTITY', properties.getProperty('ACS_IDENTITY', '""')
/* <ROOMS_SUPPORT:0> */
buildConfigField 'String', 'ROOM_ID', properties.getProperty('ROOM_ID', '""')
/* </ROOMS_SUPPORT:0> */
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
release {
storeFile file(String.valueOf(System.getenv("KEYSTORE_FILEPATH")))
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("KEY_PASSWORD")
}
}
buildFeatures {
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
testOptions {
animationsDisabled = true
packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}
unitTests {
returnDefaultValues = true
all {
failFast = true
}
}
}
sourceSets {
calling {
java.srcDirs = ['src/main/java', 'src/calling/java']
res.srcDirs = ['src/main/res', 'src/calling/res']
manifest.srcFile 'src/calling/AndroidManifest.xml'
androidTest {
java.srcDirs = ['src/calling-test/java']
}
}
chat {
java.srcDirs = ['src/main/java', 'src/chat/java']
res.srcDirs = ['src/main/res', 'src/chat/res']
manifest.srcFile 'src/chat/AndroidManifest.xml'
}
}
flavorDimensions "product"
productFlavors {
calling {
minSdkVersion 26
dimension "product"
matchingFallbacks = ["calling"]
versionName "$call_library_version_name"
buildTypes {
release {
minifyEnabled true
shrinkResources true
manifestPlaceholders = [
appIcon : "@mipmap/ic_launcher",
appIconRound: "@mipmap/ic_launcher_round"
]
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'acs-ui-library.pro'
if (file(String.valueOf(System.getenv("KEYSTORE_FILEPATH"))).canRead()) {
signingConfig signingConfigs.release
}
}
debug {
applicationIdSuffix = ".debug"
manifestPlaceholders = [
appIcon : "@mipmap/ic_launcher_debug",
appIconRound: "@mipmap/ic_launcher_debug_round"
]
}
}
}
chat {
minSdkVersion 23
dimension "product"
matchingFallbacks = ["chat"]
versionName "$chat_library_version_name"
buildTypes {
release {
minifyEnabled false
shrinkResources false
manifestPlaceholders = [
appIcon : "@mipmap/ic_launcher",
appIconRound: "@mipmap/ic_launcher_round"
]
if (file(String.valueOf(System.getenv("KEYSTORE_FILEPATH"))).canRead()) {
signingConfig signingConfigs.release
}
}
debug {
applicationIdSuffix = ".debug"
manifestPlaceholders = [
appIcon : "@mipmap/ic_launcher_debug",
appIconRound: "@mipmap/ic_launcher_debug_round"
]
}
}
}
}
packagingOptions {
resources.excludes.add("META-INF/*")
}
}
dependencies {
def app_center_sdk_version = '4.1.0'
callingImplementation project(path: ':calling')
chatImplementation project(path: ':chat')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.core:core-ktx:$androidx_core_ktx_version"
implementation "androidx.appcompat:appcompat:$androidx_appcompat_version"
implementation "androidx.activity:activity-ktx:$androidx_activity_ktx_version"
implementation 'com.google.android.material:material:1.6.1'
implementation "androidx.constraintlayout:constraintlayout:$androidx_constraint_layout_version"
implementation 'com.github.kittinunf.fuel:fuel:2.3.1'
implementation "com.microsoft.appcenter:appcenter-analytics:$app_center_sdk_version"
implementation "com.microsoft.appcenter:appcenter-crashes:$app_center_sdk_version"
implementation 'com.google.code.gson:gson:2.8.9'
implementation "com.microsoft.appcenter:appcenter-distribute:$app_center_sdk_version"
implementation files('lib/magnifier-0.0.17.aar')
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
testImplementation "junit:junit:$junit_version"
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.google.firebase:firebase-messaging:24.0.0'
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.0")
androidTestImplementation('com.microsoft.appcenter:espresso-test-extension:1.4')
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'net.java.dev.jna:jna:5.10.0'
androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$jetbrains_kotlinx_coroutines_test_version") {
exclude group: "net.java.dev.jna", module: "jna"
}
androidTestImplementation "androidx.test.ext:junit:$androidx_junit_version"
androidTestImplementation "androidx.test:rules:$androidx_test_rules_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_espresso_core_version"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$androidx_espresso_contrib_version"
androidTestImplementation "com.squareup.leakcanary:leakcanary-android-instrumentation:2.9.1"
}