forked from invertase/react-native-firebase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
81 lines (69 loc) · 1.86 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
import io.invertase.gradle.common.PackageJson
buildscript {
// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
// module dependency in an application project.
if (project == rootProject) {
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.2")
}
}
}
plugins {
id "io.invertase.gradle.build" version "1.4"
}
def packageJson = PackageJson.getForProject(project)
def firebaseBomVersion = packageJson['sdkVersions']['android']['firebase']
project.ext {
set('react-native', [
versions: [
android : [
minSdk : 16,
targetSdk : 28,
compileSdk: 28,
// optional as gradle.buildTools comes with one by default
// overriding here though to match the version RN uses
buildTools: "28.0.3"
],
firebase: [
bom: firebaseBomVersion,
],
],
])
}
android {
defaultConfig {
multiDexEnabled true
}
lintOptions {
disable 'GradleCompatible'
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
java.srcDirs = ['src/main/java', 'src/reactnative/java']
}
}
}
repositories {
google()
jcenter()
}
dependencies {
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
implementation "com.google.firebase:firebase-core"
implementation "com.google.firebase:firebase-common"
}
apply from: file("./firebase-json.gradle")
ReactNative.shared.applyPackageVersion()
ReactNative.shared.applyDefaultExcludes()
ReactNative.module.applyAndroidVersions()
ReactNative.module.applyReactNativeDependency("api")