-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
build.gradle
232 lines (196 loc) · 7.56 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
buildscript {
// Simple helper that allows the root project to override versions declared by this library.
ext.safeExtGet = { prop, fallback ->
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.6.10')}")
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion safeExtGet("compileSdkVersion", 33)
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}
defaultConfig {
applicationId 'host.exp.exponent'
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 31)
// ADD VERSIONS HERE
// BEGIN VERSIONS
versionCode 173
versionName '2.25.1'
// 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
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
consumerProguardFiles 'proguard-rules.pro'
if (!System.getenv("ANDROID_UNSIGNED")) {
signingConfig signingConfigs.release
}
}
}
// WHEN_DISTRIBUTING_REMOVE_FROM_HERE
// WHEN_PREPARING_SHELL_REMOVE_FROM_HERE
flavorDimensions "versioning"
productFlavors {
versioned {
dimension "versioning"
manifestPlaceholders = [appLabel:"@string/versioned_app_name"]
}
unversioned {
dimension "versioning"
getIsDefault().set(true)
manifestPlaceholders = [appLabel: "@string/unversioned_app_name"]
}
}
// WHEN_PREPARING_SHELL_REMOVE_TO_HERE
// WHEN_DISTRIBUTING_REMOVE_TO_HERE
// `productFlavors` must be defined before this block
defaultConfig {
if (android.productFlavors.empty) {
// when preparing shell app, the above flavor declarations are removed
// this falls back :expoview to versioned flavor
missingDimensionStrategy 'versioning', 'versioned'
manifestPlaceholders = [appLabel:"@string/versioned_app_name"]
}
}
lintOptions {
abortOnError false
}
packagingOptions {
// libfbjni.so is prebuilt library shared between all ABIs
pickFirst "lib/**/libfbjni.so"
}
}
configurations.all {
resolutionStrategy {
force 'org.webkit:android-jsc:r245459'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.multidex:multidex:2.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.6.10')}"
// Our dependencies
implementation ('androidx.appcompat:appcompat:1.4.1')
// 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.4.1')
compileOnly 'org.glassfish:javax.annotation:3.1.1'
implementation 'com.jakewharton:butterknife:10.2.1'
implementation 'de.greenrobot:eventbus:2.4.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.gms:play-services-analytics:16.0.1'
implementation 'com.google.android.gms:play-services-maps:18.0.0'
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.github.CanHub:Android-Image-Cropper:1.1.1'
implementation 'commons-codec:commons-codec:1.10'
implementation 'com.google.zxing:core:3.3.3'
implementation 'net.openid:appauth:0.4.1'
implementation 'com.airbnb.android:lottie:3.4.0'
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.8.2'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
// 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.4.0'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation "androidx.annotation:annotation:1.3.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.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
testImplementation 'androidx.test:runner:1.4.0'
testImplementation 'androidx.test:rules:1.4.0'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
/* UNCOMMENT WHEN DISTRIBUTING
implementation('host.exp.exponent:expoview:45.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(':expoview'))
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
// END_SDK_UNVERSIONED
// WHEN_PREPARING_SHELL_REMOVE_FROM_HERE
// ADD_NEW_SDKS_HERE
// BEGIN_SDK_46
versionedImplementation(project(':expoview-abi46_0_0'))
// END_SDK_46
// BEGIN_SDK_45
versionedImplementation(project(':expoview-abi45_0_0'))
// END_SDK_45
// 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:+'
END UNCOMMENT WHEN DISTRIBUTING */
// WHEN_DETACHING_REMOVE_FROM_HERE
/* UNCOMMENT WHEN DISTRIBUTING
implementation project(':expo')
implementation 'host.exp.exponent:expo-random:+'
END UNCOMMENT WHEN DISTRIBUTING */
// WHEN_DETACHING_REMOVE_TO_HERE
}
// This has to be down here for some reason
apply plugin: 'com.google.gms.google-services'