1def _ext = rootProject.ext 2def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 26 3def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '29.0.2' 4def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 21 5def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 26 6 7buildscript { 8 repositories { 9 mavenLocal() 10 mavenCentral() 11 jcenter() 12 google() 13 } 14 dependencies { 15 classpath "com.android.tools.build:gradle:3.5.1" 16 } 17} 18 19apply plugin: 'com.android.library' 20 21android { 22 compileSdkVersion _compileSdkVersion 23 buildToolsVersion _buildToolsVersion 24 25 defaultConfig { 26 minSdkVersion _minSdkVersion 27 targetSdkVersion _targetSdkVersion 28 versionCode 1 29 versionName "1.0" 30 } 31 32 lintOptions { 33 abortOnError false 34 } 35 36 compileOptions { 37 sourceCompatibility JavaVersion.VERSION_1_8 38 targetCompatibility JavaVersion.VERSION_1_8 39 } 40 41 sourceSets.main { 42 jni.srcDirs = [] 43 jniLibs.srcDir 'libs' 44 } 45} 46 47allprojects { 48 repositories { 49 mavenLocal() 50 maven { 51 // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 52 url("$rootDir/../node_modules/react-native/android") 53 } 54 maven { 55 // Android JSC is installed from npm 56 url("$rootDir/../node_modules/jsc-android/dist") 57 } 58 google() 59 jcenter() 60 } 61} 62 63 64dependencies { 65 implementation fileTree(include: ['*.jar'], dir: 'libs') 66 implementation 'com.facebook.react:react-native:+' 67} 68