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.6.2") } } } apply plugin: 'com.android.library' def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback } android { compileSdkVersion safeExtGet('compileSdkVersion', 28) buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3') defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 16) targetSdkVersion safeExtGet('targetSdkVersion', 22) versionCode 1 versionName "1.0" } lintOptions { abortOnError false } } repositories { maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm // Matches the RN Hello World template // https://github.com/facebook/react-native/blob/1e8f3b11027fe0a7514b4fc97d0798d3c64bc895/local-cli/templates/HelloWorld/android/build.gradle#L21 url "$projectDir/../node_modules/react-native/android" } mavenCentral() mavenLocal() google() jcenter() } dependencies { implementation 'com.facebook.react:react-native:+' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.fragment:fragment:1.2.1' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' implementation 'com.google.android.material:material:1.1.0' }