/
build.gradle
297 lines (275 loc) · 10.4 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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'com.jakewharton.butterknife'
// WHEN_VERSIONING_REMOVE_FROM_HERE
//maven repository info
group = 'host.exp.exponent'
version = '30.0.0'
//Upload android library to maven with javadoc and android sources
configurations {
deployerJars
}
//Creating sources with comments
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
//Put the androidSources and javadoc to the artifacts
artifacts {
archives androidSourcesJar
}
uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
repository(url: mavenLocal().url) {
//if your repository needs authentication
// authentication(userName: "username", password: "password")
}
}
}
}
// WHEN_VERSIONING_REMOVE_TO_HERE
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
mavenCentral()
maven { url "https://maven.google.com" }
google()
jcenter()
}
dependencies {
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
// WHEN_VERSIONING_REMOVE_FROM_HERE
manifestPlaceholders = [
'appAuthRedirectScheme': 'host.exp.exponent'
]
// WHEN_VERSIONING_REMOVE_TO_HERE
}
buildTypes {
debug {
ext.enableCrashlytics = false
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
// WHEN_VERSIONING_REMOVE_FROM_HERE
import org.apache.tools.ant.taskdefs.condition.Os
task generateDynamicMacros(type: Exec) {
environment "EXPO_ANDROID_GRADLE_TASK_NAMES", "${gradle.startParameter.taskNames}"
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
// This gets run from the 'app' directory
workingDir '../../tools-public'
def command = 'gulp generate-dynamic-macros --buildConstantsPath ../android/expoview/src/main/java/host/exp/exponent/generated/ExponentBuildConstants.java --platform android'
commandLine 'cmd.exe', '/c', command
} else {
commandLine '../../tools-public/generate-dynamic-macros-android.sh'
}
}
preBuild.dependsOn generateDynamicMacros
// WHEN_VERSIONING_REMOVE_TO_HERE
configurations.all {
resolutionStrategy {
force 'org.webkit:android-jsc:r224109'
}
}
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api 'com.android.support:multidex:1.0.3'
// WHEN_VERSIONING_REPLACE_WITH_DEPENDENCIES
// WHEN_VERSIONING_REMOVE_FROM_HERE
// Current react native
/* UNCOMMENT WHEN DISTRIBUTING
api 'com.facebook.react:react-native:30.0.0'
api 'host.exp.exponent:expo-core:1.1.0'
api 'host.exp.exponent:expo-react-native-adapter:1.1.1'
api 'host.exp.exponent:expo-camera:1.1.1'
api 'host.exp.exponent:expo-camera-interface:1.0.2'
api 'host.exp.exponent:expo-sensors:1.0.2'
api 'host.exp.exponent:expo-sensors-interface:1.0.2'
api 'host.exp.exponent:expo-face-detector:1.0.2'
api 'host.exp.exponent:expo-file-system:1.0.2'
api 'host.exp.exponent:expo-file-system-interface:1.0.2'
api 'host.exp.exponent:expo-payments-stripe:1.0.1'
api 'host.exp.exponent:expo-permissions:1.1.0'
api 'host.exp.exponent:expo-permissions-interface:1.1.0'
api 'host.exp.exponent:expo-constants:1.0.2'
api 'host.exp.exponent:expo-constants-interface:1.0.2'
api 'host.exp.exponent:expo-image-loader-interface:1.0.0'
api 'host.exp.exponent:expo-gl:1.0.2'
api 'host.exp.exponent:expo-gl-cpp:1.0.2'
api 'host.exp.exponent:expo-sms:1.0.2'
api 'host.exp.exponent:expo-print:1.0.0'
api 'host.exp.exponent:expo-media-library:1.0.0'
api 'host.exp.exponent:expo-analytics-segment:1.0.0'
api 'host.exp.exponent:expo-font:1.0.0'
api 'host.exp.exponent:expo-location:1.0.0'
api 'host.exp.exponent:expo-barcode-scanner-interface:1.0.0'
api 'host.exp.exponent:expo-barcode-scanner:1.0.0'
api 'host.exp.exponent:expo-contacts:1.0.0'
api 'host.exp.exponent:expo-ads-admob:1.0.0'
api 'host.exp.exponent:expo-local-authentication:1.0.0'
api 'host.exp.exponent:expo-localization:1.0.0'
api 'host.exp.exponent:expo-task-manager:1.0.0'
api 'host.exp.exponent:expo-task-manager-interface:1.0.0'
api 'host.exp.exponent:expo-background-fetch:1.0.0'
api 'host.exp.exponent:expo-app-loader-provider:1.0.0'
END UNCOMMENT WHEN DISTRIBUTING */
// WHEN_DISTRIBUTING_REMOVE_FROM_HERE
api project(':ReactAndroid')
// Universal modules
api project(':expo-react-native-adapter')
api project(':expo-core')
api project(':expo-camera')
api project(':expo-camera-interface')
api project(':expo-sensors')
api project(':expo-sensors-interface')
api project(':expo-face-detector')
api project(':expo-file-system')
api project(':expo-file-system-interface')
api project(':expo-font')
api project(':expo-payments-stripe')
api project(':expo-permissions')
api project(':expo-permissions-interface')
api project(':expo-constants')
api project(':expo-constants-interface')
api project(':expo-image-loader-interface')
api project(':expo-gl')
api project(':expo-gl-cpp')
api project(':expo-sms')
api project(':expo-print')
api project(':expo-media-library')
api project(':expo-analytics-segment')
api project(':expo-location')
api project(':expo-barcode-scanner')
api project(':expo-barcode-scanner-interface')
api project(':expo-contacts')
api project(':expo-ads-admob')
api project(':expo-local-authentication')
api project(':expo-localization')
api project(':expo-task-manager')
api project(':expo-task-manager-interface')
api project(':expo-background-fetch')
api project(':expo-app-loader-provider')
// WHEN_DISTRIBUTING_REMOVE_TO_HERE
// Versioned react native
// WHEN_PREPARING_SHELL_REMOVE_FROM_HERE
// THIS COMMENT IS USED BY android-build-aar.sh DO NOT MODIFY
// BEGIN_SDK_30
api 'host.exp:reactandroid-abi30_0_0:1.0.0'
// END_SDK_30
// BEGIN_SDK_29
api'host.exp:reactandroid-abi29_0_0:1.0.0'
// END_SDK_29
// BEGIN_SDK_28
api 'host.exp:reactandroid-abi28_0_0:1.0.0'
// END_SDK_28
// BEGIN_SDK_27
api 'host.exp:reactandroid-abi27_0_0:1.0.0'
// END_SDK_27
// BEGIN_SDK_26
api 'host.exp:reactandroid-abi26_0_0:1.0.0'
// END_SDK_26
// BEGIN_SDK_25
api 'host.exp:reactandroid-abi25_0_0:1.0.0'
// END_SDK_25
// BEGIN_SDK_24
api 'host.exp:reactandroid-abi24_0_0:1.0.0'
// END_SDK_24
// WHEN_PREPARING_SHELL_REMOVE_TO_HERE
// WHEN_VERSIONING_REMOVE_TO_HERE
// WHEN_DISTRIBUTING_REMOVE_TO_HERE
// React native dependencies
// We use a different version of appcompat
api 'com.facebook.fresco:fresco:1.0.1'
api 'com.facebook.fresco:animated-gif:1.0.1'
api 'com.facebook.fresco:animated-webp:1.0.1'
api 'com.facebook.fresco:webpsupport:1.0.1'
api 'expolib_v1.com.facebook.fresco:expolib_v1-imagepipeline-okhttp3:1.0.1'
api 'com.facebook.stetho:stetho:1.3.1'
api 'com.facebook.stetho:stetho-okhttp3:1.3.1'
provided 'com.facebook.soloader:soloader:0.5.1'
api 'com.fasterxml.jackson.core:jackson-core:2.2.3'
api 'com.google.code.findbugs:jsr305:3.0.0'
api 'expolib_v1.com.squareup.okhttp3:okhttp:3.6.0'
api 'expolib_v1.com.squareup.okhttp3:okhttp-urlconnection:3.6.0'
api 'expolib_v1.com.squareup.okio:okio:1.13.0'
api 'org.webkit:android-jsc:r224109'
// Our dependencies
api 'com.android.support:appcompat-v7:27.1.1'
api 'com.android.support:customtabs:27.1.1'
api('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
api 'com.facebook.android:facebook-android-sdk:4.34.0'
api('com.facebook.android:audience-network-sdk:4.99.0') {
exclude module: 'play-services-ads'
}
compileOnly 'org.glassfish:javax.annotation:3.1.1'
api 'de.greenrobot:eventbus:2.4.0'
api 'com.amplitude:android-sdk:2.9.2' // Be careful when upgrading! Upgrading might break experience scoping. Check with Jesse. See Analytics.resetAmplitudeDatabaseHelper
api 'com.squareup.picasso:picasso:2.5.2'
api 'com.google.android.gms:play-services-gcm:15.0.1'
api 'com.google.android.gms:play-services-analytics:16.0.1'
api 'com.google.android.gms:play-services-maps:15.0.1'
api 'com.google.android.gms:play-services-auth:15.0.1'
api 'com.google.android.gms:play-services-location:15.0.1'
api 'com.google.android.gms:play-services-fitness:15.0.1'
api 'com.google.android.gms:play-services-wallet:15.0.1' //may need 10.+
annotationProcessor 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
api "com.raizlabs.android:DBFlow-Core:2.2.1"
api "com.raizlabs.android:DBFlow:2.2.1"
api "com.madgag.spongycastle:core:1.53.0.0"
api "com.madgag.spongycastle:prov:1.53.0.0"
debugApi 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
// debugApi 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
releaseApi 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
api 'commons-io:commons-io:1.3.2'
// Newer version introduces dependency versions conflict
// on 'com.android.support:support-annotations'
api 'com.google.android.exoplayer:exoplayer:2.6.1'
// expolib_v1-extension-okhttp is an exoplayer:extension-okhttp using expolib_v1.okhttp,
// created with tools/android-versioning and distributed in expokit-npm-package.
api 'expolib_v1.com.google.android.exoplayer:expolib_v1-extension-okhttp:2.6.1@aar'
api 'me.leolin:ShortcutBadger:1.1.4@aar'
api 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
api 'com.theartofdev.edmodo:android-image-cropper:2.4.7'
api 'com.yqritc:android-scalablevideoview:1.0.1'
api 'commons-codec:commons-codec:1.10'
api 'net.openid:appauth:0.4.1'
api('com.airbnb.android:lottie:2.5.5') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
api 'io.branch.sdk.android:library:2.17.1'
api 'com.android.support:exifinterface:27.1.1'
api 'com.google.firebase:firebase-core:16.0.1'
api 'com.google.firebase:firebase-messaging:17.1.0'
api 'com.google.maps.android:android-maps-utils:0.5+'
api 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
// Remember to update DetachAppTemplate build.gradle if you add any excludes or transitive = false here!
// expo-file-system
api 'com.squareup.okhttp3:okhttp:3.10.0'
api 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0'
}