UNPKG

1.16 kBPlain TextView Raw
1buildscript {
2 // The Android Gradle plugin is only required when opening the android folder stand-alone.
3 // This avoids unnecessary downloads and potential conflicts when the library is included as a
4 // module dependency in an application project.
5 if (project == rootProject) {
6 repositories {
7 google()
8 jcenter()
9 }
10
11 dependencies {
12 classpath("com.android.tools.build:gradle:3.5.3")
13 }
14 }
15}
16
17apply plugin: 'com.android.library'
18
19def safeExtGet(prop, fallback) {
20 rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
21}
22
23
24android {
25 compileSdkVersion safeExtGet('compileSdkVersion', 28)
26
27 defaultConfig {
28 minSdkVersion safeExtGet('minSdkVersion', 16)
29 targetSdkVersion safeExtGet('targetSdkVersion', 28)
30 versionCode 1
31 versionName "1.0"
32 }
33 lintOptions {
34 abortOnError false
35 }
36}
37
38repositories {
39 mavenLocal()
40 google()
41 jcenter()
42 maven {
43 // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
44 url "$rootDir/../node_modules/react-native/android"
45 }
46}
47
48dependencies {
49 implementation "com.facebook.react:react-native:+"
50}