// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { minSdkVersion = 21 targetSdkVersion = 30 compileSdkVersion = 30 dbFlowVersion = '4.2.4' buildToolsVersion = '30.0.5' supportLibVersion = '29.0.0' kotlinVersion = '1.4.21' gradlePluginVersion = '4.1.2' gradleDownloadTaskVersion = '3.4.3' repositoryUrl = "file:${System.env.HOME}/.m2/repository/" } repositories { google() jcenter() maven { url 'https://dl.bintray.com/android/android-tools/' } } dependencies { classpath "com.android.tools.build:gradle:${gradlePluginVersion}" classpath 'com.google.gms:google-services:3.2.1' classpath "de.undercouch:gradle-download-task:$gradleDownloadTaskVersion" // https://github.com/awslabs/aws-device-farm-gradle-plugin/releases classpath 'com.amazonaws:aws-devicefarm-gradle-plugin:1.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } allprojects { repositories { // For non-detach maven { url "$rootDir/maven" } // For old expoviews to work maven { url "$rootDir/versioned-abis/expoview-abi41_0_0/maven" } maven { url "$rootDir/versioned-abis/expoview-abi40_0_0/maven" } maven { url "$rootDir/versioned-abis/expoview-abi39_0_0/maven" } maven { url "$rootDir/versioned-abis/expoview-abi38_0_0/maven" } maven { url "$rootDir/versioned-abis/maven" } google() jcenter() maven { // Local Maven repo containing AARs with JSC built for Android url "$rootDir/../node_modules/jsc-android/dist" } maven { // Local expo-camera Maven repo containing our slightly modified // Google's cameraview from expo/cameraview. url "$rootDir/../packages/expo-camera/android/maven" } flatDir { dirs 'libs' // dirs project(':expoview').file('libs') } // https://github.com/google/ExoPlayer/issues/5225#issuecomment-445739013 maven { url 'https://google.bintray.com/exoplayer' } // Using www.jitpack.io instead of plain jitpack.io due to // https://github.com/jitpack/jitpack.io/issues/4002 maven { url "https://www.jitpack.io" } // Want this last so that we never end up with a stale cache mavenLocal() } configurations.all { // WHEN_DISTRIBUTING_REMOVE_FROM_HERE resolutionStrategy.dependencySubstitution { substitute module("com.facebook.react:react-native:+") with project(":ReactAndroid") // Gradle needs another hint (apart from plain dependency substitution) // to know that it should first evaluate the replacing project before resolving // classpaths etc. Without this block an error is thrown when running tests // in a project that depends on react-native (eg. expo-updates): // > No matching configuration of project :ReactAndroid was found. // > The consumer was configured to find a runtime of a component, // > as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' // > with value 'debug' but: // > - None of the consumable configurations have attributes. all { if (requested.displayName == "com.facebook.react:react-native:+") { evaluationDependsOn(":ReactAndroid") } } } // WHEN_DISTRIBUTING_REMOVE_TO_HERE } } task clean(type: Delete) { delete rootProject.buildDir }