|
1 | | -def safeExtGet(prop, fallback) { |
2 | | - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback |
| 1 | +buildscript { |
| 2 | + if (project == rootProject) { |
| 3 | + repositories { |
| 4 | + google() |
| 5 | + jcenter() |
| 6 | + } |
| 7 | + |
| 8 | + dependencies { |
| 9 | + classpath 'com.android.tools.build:gradle:3.5.3' |
| 10 | + } |
| 11 | + } |
3 | 12 | } |
4 | 13 |
|
5 | 14 | apply plugin: 'com.android.library' |
6 | 15 |
|
7 | | -android { |
8 | | - compileSdkVersion safeExtGet('compileSdkVersion', 28) |
9 | | - buildToolsVersion safeExtGet('buildToolsVersion', "28.0.3") |
| 16 | +def safeExtGet(prop, fallback) { |
| 17 | + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback |
| 18 | +} |
10 | 19 |
|
| 20 | +android { |
| 21 | + compileSdkVersion safeExtGet('compileSdkVersion', 29) |
| 22 | + buildToolsVersion safeExtGet('buildToolsVersion', '29.0.2') |
11 | 23 | defaultConfig { |
12 | 24 | minSdkVersion safeExtGet('minSdkVersion', 16) |
13 | | - targetSdkVersion safeExtGet('targetSdkVersion', 28) |
| 25 | + targetSdkVersion safeExtGet('targetSdkVersion', 29) |
14 | 26 | versionCode 1 |
15 | 27 | versionName "1.0" |
16 | | - ndk { |
17 | | - abiFilters "armeabi-v7a", "x86" |
| 28 | + |
| 29 | + } |
| 30 | + |
| 31 | + buildTypes { |
| 32 | + release { |
| 33 | + minifyEnabled false |
18 | 34 | } |
19 | 35 | } |
20 | 36 | lintOptions { |
21 | | - warning 'InvalidPackage' |
| 37 | + disable 'GradleCompatible' |
| 38 | + } |
| 39 | + compileOptions { |
| 40 | + sourceCompatibility JavaVersion.VERSION_1_8 |
| 41 | + targetCompatibility JavaVersion.VERSION_1_8 |
22 | 42 | } |
23 | 43 | } |
24 | 44 |
|
25 | | -dependencies { |
26 | | - implementation 'com.facebook.react:react-native:+' |
| 45 | +repositories { |
| 46 | + mavenLocal() |
| 47 | + maven { |
| 48 | + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm |
| 49 | + url("$rootDir/../node_modules/react-native/android") |
| 50 | + } |
| 51 | + google() |
| 52 | + jcenter() |
27 | 53 | } |
28 | 54 |
|
| 55 | +dependencies { |
| 56 | + //noinspection GradleDynamicVersion |
| 57 | + implementation "com.facebook.react:react-native:+" // From node_modules |
| 58 | +} |
0 commit comments