xref: /MusicFree/android/build.gradle (revision bf6e62f27bf21a011995d7561e0093fae1a2d72e)
1import org.apache.tools.ant.taskdefs.condition.Os
2
3// Top-level build file where you can add configuration options common to all sub-projects/modules.
4
5buildscript {
6    ext {
7        buildToolsVersion = "31.0.0"
8        minSdkVersion = 21
9        compileSdkVersion = 31
10        targetSdkVersion = 31
11
12        if (System.properties['os.arch'] == "aarch64") {
13            // For M1 Users we need to use the NDK 24 which added support for aarch64
14            ndkVersion = "24.0.8215888"
15        } else {
16            // Otherwise we default to the side-by-side NDK version from AGP.
17            ndkVersion = "21.4.7075529"
18        }
19    }
20    repositories {
21        google()
22        mavenCentral()
23    }
24    dependencies {
25        classpath("com.android.tools.build:gradle:7.1.1")
26        classpath("com.facebook.react:react-native-gradle-plugin")
27        classpath("de.undercouch:gradle-download-task:5.0.1")
28        // NOTE: Do not place your application dependencies here; they belong
29        // in the individual module build.gradle files
30    }
31}
32
33allprojects {
34    repositories {
35        maven {
36            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
37            url("$rootDir/../node_modules/react-native/android")
38        }
39        maven {
40            // Android JSC is installed from npm
41            url("$rootDir/../node_modules/jsc-android/dist")
42        }
43        mavenCentral {
44            // We don't want to fetch react-native from Maven Central as there are
45            // older versions over there.
46            content {
47                excludeGroup "com.facebook.react"
48            }
49        }
50        google()
51        jcenter()
52        maven { url 'https://www.jitpack.io' }
53    }
54}
55