/
build.gradle
267 lines (227 loc) · 8.21 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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
buildscript {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.31.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'devicefarm'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
android {
compileSdkVersion safeExtGet("compileSdkVersion", 28)
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId 'host.exp.exponent'
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 28)
// ADD VERSIONS HERE
// BEGIN VERSIONS
versionCode 120
versionName '2.14.0'
// END VERSIONS
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Deprecated. Used by net.openid:appauth
manifestPlaceholders = [
'appAuthRedirectScheme': 'host.exp.exponent'
]
}
dexOptions {
javaMaxHeapSize System.getenv("DISABLE_DEX_MAX_HEAP") ? null : "8g"
}
signingConfigs {
debug {
storeFile file('../debug.keystore')
}
release {
storeFile file(System.getenv("ANDROID_KEYSTORE_PATH") ?: "release-key.jks")
storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD")
keyAlias System.getenv("ANDROID_KEY_ALIAS")
keyPassword System.getenv("ANDROID_KEY_PASSWORD")
}
}
buildTypes {
debug {
debuggable true
ext.enableCrashlytics = false
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
consumerProguardFiles 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
lintOptions {
abortOnError false
}
packagingOptions {
pickFirst "**"
}
}
devicefarm {
projectName System.getenv("DEVICEFARM_PROJECT_NAME")
devicePool System.getenv("DEVICEFARM_DEVICE_POOL")
executionTimeoutMinutes 40
authentication {
accessKey System.getenv("AWS_ACCESS_KEY_ID")
secretKey System.getenv("AWS_SECRET_ACCESS_KEY")
}
}
configurations.all {
resolutionStrategy {
force 'org.webkit:android-jsc:r245459'
}
// WHEN_DISTRIBUTING_REMOVE_FROM_HERE
resolutionStrategy.dependencySubstitution {
substitute module("com.facebook.react:react-native:+") with project(":ReactAndroid")
}
// WHEN_DISTRIBUTING_REMOVE_TO_HERE
}
// WHEN_PREPARING_SHELL_REMOVE_FROM_HERE
/* UNCOMMENT WHEN DISTRIBUTING
apply from: 'expo.gradle'
END UNCOMMENT WHEN DISTRIBUTING */
// WHEN_PREPARING_SHELL_REMOVE_TO_HERE
apply from: "../../node_modules/react-native-unimodules/gradle.groovy"
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.multidex:multidex:2.0.0'
// Our dependencies
implementation 'androidx.appcompat:appcompat:1.1.0'
// Our dependencies from ExpoView
// DON'T ADD ANYTHING HERE THAT ISN'T IN EXPOVIEW. ONLY COPY THINGS FROM EXPOVIEW TO HERE.
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation('com.facebook.android:audience-network-sdk:5.1.1') {
exclude module: 'play-services-ads'
}
compileOnly 'org.glassfish:javax.annotation:3.1.1'
implementation 'com.jakewharton:butterknife:10.2.0'
implementation 'de.greenrobot:eventbus:2.4.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-analytics:16.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
debugImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
implementation 'com.facebook.device.yearclass:yearclass:2.1.0'
implementation 'commons-io:commons-io:1.4'
implementation 'me.leolin:ShortcutBadger:1.1.4@aar'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'commons-codec:commons-codec:1.10'
implementation 'com.segment.analytics.android:analytics:4.3.0'
implementation 'com.google.zxing:core:3.3.3'
implementation 'net.openid:appauth:0.4.1'
implementation 'com.airbnb.android:lottie:2.5.6'
implementation('io.nlopez.smartlocation:library:3.2.11') {
transitive = false
}
implementation "androidx.exifinterface:exifinterface:1.0.0"
implementation 'com.squareup.okio:okio:1.9.0'
implementation 'com.facebook.soloader:soloader:0.6.0'
// expo-file-system
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0'
// Testing
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
// We use a modified build of com.android.support.test:runner:1.0.1. Explanation in maven-test/README
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation "androidx.annotation:annotation:1.0.0"
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.0'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'com.azimolabs.conditionwatcher:conditionwatcher:0.2'
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.robolectric:robolectric:3.8'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
testImplementation 'androidx.test:runner:1.1.0'
testImplementation 'androidx.test:rules:1.2.0'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
/* UNCOMMENT WHEN DISTRIBUTING
implementation('host.exp.exponent:expoview:36.0.0@aar') {
transitive = true
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection'
}
END UNCOMMENT WHEN DISTRIBUTING */
// WHEN_DISTRIBUTING_REMOVE_FROM_HERE
// BEGIN_SDK_UNVERSIONED
implementation(project(path: ':expoview'))
// END_SDK_UNVERSIONED
// WHEN_PREPARING_SHELL_REMOVE_FROM_HERE
// ADD_NEW_SDKS_HERE
// BEGIN_SDK_36
implementation(project(':expoview-abi36_0_0'))
// END_SDK_36
// BEGIN_SDK_35
implementation(project(':expoview-abi35_0_0'))
// END_SDK_35
// BEGIN_SDK_34
implementation(project(':expoview-abi34_0_0'))
// END_SDK_34
// BEGIN_SDK_33
implementation(project(':expoview-abi33_0_0'))
// END_SDK_33
// This is not needed in shell apps, the Amplitude module will include this dep if installed
implementation 'com.amplitude:android-sdk:2.23.2'
// WHEN_PREPARING_SHELL_REMOVE_TO_HERE
// WHEN_DISTRIBUTING_REMOVE_TO_HERE
/* UNCOMMENT WHEN DISTRIBUTING
api 'org.webkit:android-jsc:r245459' // needs to be before react-native
api 'com.facebook.react:react-native:33.0.0'
END UNCOMMENT WHEN DISTRIBUTING */
// WHEN_DETACHING_REMOVE_FROM_HERE
/* UNCOMMENT WHEN DISTRIBUTING
addMavenUnimodulesDependencies([
modulesPaths : [
'../enabled-modules'
],
configuration: 'api',
target : 'react-native',
exclude : [
'expo-module-template',
'expo-bluetooth',
'expo-in-app-purchases',
'expo-notifications',
'expo-payments-stripe',
'expo-updates'
]
])
END UNCOMMENT WHEN DISTRIBUTING */
// WHEN_DETACHING_REMOVE_TO_HERE
/* UNCOMMENT WHEN DETACHING
addUnimodulesDependencies([
modulesPaths : [
'../../node_modules'
],
configuration: 'api',
target : 'react-native',
exclude : [
// You can exclude unneeded modules here, eg.
// 'unimodules-face-detector-interface',
// 'expo-face-detector'
// Adding a name here will also remove the package
// from auto-generated BasePackageList.java
]
])
END UNCOMMENT WHEN DETACHING */
}
// This has to be down here for some reason
apply plugin: 'com.google.gms.google-services'