forked from expo/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
268 lines (230 loc) · 8.54 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
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven'
apply plugin: 'com.jakewharton.butterknife'
// WHEN_VERSIONING_REMOVE_FROM_HERE
//maven repository info
group = 'host.exp.exponent'
version = '35.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
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
// If you have maven { url "https://jitpack.io" } as your resolving url,
// then Jitpack will only return the POM for the Android dependency causing the Gradle sync to fail.
// However, when you change url to "https://www.jitpack.io", Jitpack returns POM, AAR, and sources.jar.
// That is why we were adding www even though jitpacks docs don't say so.
// See https://github.com/jitpack/jitpack.io/issues/4002.
maven { url "https://www.jitpack.io" }
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0'
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://www.jitpack.io" }
mavenCentral()
}
android {
compileSdkVersion safeExtGet("compileSdkVersion", 28)
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 28)
versionCode 1
versionName "1.0"
// 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'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
// WHEN_VERSIONING_REMOVE_FROM_HERE
import org.apache.tools.ant.taskdefs.condition.Os
class GenerateDynamicMacrosPlugin implements Plugin<Project> {
@Override
void apply(Project target) {
target.exec {
def configuration = target.gradle.startParameter.taskNames.any {
it.toLowerCase().contains("release")
} ? "release" : "debug"
workingDir '../../tools/expotools/bin'
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd.exe', '/c', "expotools.js android-generate-dynamic-macros --configuration ${configuration}"
} else {
commandLine "./expotools.js", "android-generate-dynamic-macros", "--configuration", configuration
}
}
}
}
apply plugin: GenerateDynamicMacrosPlugin
configurations.all {
resolutionStrategy {
force 'org.webkit:android-jsc:r245459'
}
}
// Import gradle helpers for unimodules.
apply from: "../../node_modules/react-native-unimodules/gradle.groovy"
// WHEN_VERSIONING_REMOVE_TO_HERE
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api 'androidx.multidex:multidex:2.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
testImplementation 'junit:junit:4.12'
// WHEN_VERSIONING_REPLACE_WITH_DEPENDENCIES
// WHEN_VERSIONING_REMOVE_FROM_HERE
api 'org.webkit:android-jsc:r245459' // needs to be before react-native
/* UNCOMMENT WHEN DISTRIBUTING
api 'com.facebook.react:react-native:35.0.0'
addUnimodulesDependencies([
modulesPaths : ['../../packages'],
configuration: 'compileOnly',
target : 'react-native',
exclude : ['expo-bluetooth', 'expo-in-app-purchases', 'expo-updates']
])
END UNCOMMENT WHEN DISTRIBUTING */
// WHEN_DISTRIBUTING_REMOVE_FROM_HERE
api project(':ReactAndroid')
// Universal modules
// In distribution they're "compileOnly" and it's the app/build.gradle who manages them.
addUnimodulesDependencies([
modulesPaths : ['../../packages'],
configuration: 'api',
target : 'react-native',
exclude : [
'expo-bluetooth',
'expo-in-app-purchases',
'expo-updates',
]
])
// Versioned react native
// WHEN_PREPARING_SHELL_REMOVE_FROM_HERE
// THIS COMMENT IS USED BY android-build-aar.sh DO NOT MODIFY
// BEGIN_SDK_35
api 'host.exp:reactandroid-abi35_0_0:1.0.0'
// END_SDK_35
// BEGIN_SDK_34
api 'host.exp:reactandroid-abi34_0_0:1.0.0'
// END_SDK_34
// BEGIN_SDK_33
api 'host.exp:reactandroid-abi33_0_0:1.0.0'
// END_SDK_33
// WHEN_PREPARING_SHELL_REMOVE_TO_HERE
// WHEN_VERSIONING_REMOVE_TO_HERE
// WHEN_DISTRIBUTING_REMOVE_TO_HERE
// React native dependencies
api 'com.facebook.fresco:fresco:1.10.0'
api 'com.facebook.fresco:animated-gif:1.10.0'
api 'com.facebook.fresco:animated-webp:1.10.0'
api 'com.facebook.fresco:webpsupport:1.10.0'
api 'com.facebook.fresco:imagepipeline-okhttp3:1.0.1'
api 'com.facebook.stetho:stetho:1.3.1' // do we need this?
api 'com.facebook.stetho:stetho-okhttp3:1.3.1' // do we need this?
compileOnly 'com.facebook.soloader:soloader:0.6.0'
api 'com.google.code.findbugs:jsr305:3.0.2'
api 'com.squareup.okhttp3:okhttp:3.6.0'
api 'com.squareup.okhttp3:okhttp-urlconnection:3.6.0'
api 'com.squareup.okio:okio:1.13.0'
api 'com.facebook.infer.annotation:infer-annotation:0.11.2'
api 'javax.inject:javax.inject:1'
// Our dependencies
api "androidx.appcompat:appcompat:1.0.0"
api('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
transitive = true;
}
compileOnly 'org.glassfish:javax.annotation:3.1.1'
api 'de.greenrobot:eventbus:2.4.0'
// Be careful when upgrading! Upgrading might break experience scoping. Check with Jesse. See Analytics.resetAmplitudeDatabaseHelper
compileOnly 'com.amplitude:android-sdk:2.9.2'
api 'com.squareup.picasso:picasso:2.5.2'
api 'com.google.android.gms:play-services-gcm:16.1.0'
api 'com.google.android.gms:play-services-analytics:16.0.8'
api 'com.google.android.gms:play-services-maps:16.1.0'
api 'com.google.android.gms:play-services-auth:16.0.1'
api 'com.google.android.gms:play-services-location:16.0.0'
api 'com.google.android.gms:play-services-fitness:16.0.1'
api 'com.google.android.gms:play-services-wallet:16.0.1' //may need 10.+
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:2.6'
api 'me.leolin:ShortcutBadger:1.1.4@aar'
api 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
api 'commons-codec:commons-codec:1.10'
api 'net.openid:appauth:0.7.1'
api 'com.airbnb.android:lottie:2.5.6'
compileOnly 'io.branch.sdk.android:library:2.17.1'
api "androidx.exifinterface:exifinterface:1.0.0"
api "androidx.legacy:legacy-support-v4:1.0.0"
api "androidx.browser:browser:1.0.0"
api "com.google.android.material:material:1.0.0"
api 'com.google.firebase:firebase-core:16.0.9'
api 'com.google.firebase:firebase-messaging:18.0.0'
api 'com.google.maps.android:android-maps-utils:0.5'
api 'com.jakewharton:butterknife:9.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0'
// 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'
// expo-av
// See explanation in expo-av/build.gradle
api 'com.google.android.exoplayer:extension-okhttp:2.9.2'
// expo-application
api 'com.android.installreferrer:installreferrer:1.0'
//dbflow
annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:${safeExtGet('dbFlowVersion', '4.2.4')}"
api "com.github.Raizlabs.DBFlow:dbflow-core:${safeExtGet('dbFlowVersion', '4.2.4')}"
api "com.github.Raizlabs.DBFlow:dbflow:${safeExtGet('dbFlowVersion', '4.2.4')}"
implementation 'com.cronutils:cron-utils:4.1.3'
}