|
1 | 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. |
2 | 2 |
|
3 | 3 | buildscript { |
4 | | - ext { |
5 | | - buildToolsVersion = findProperty('android.buildToolsVersion') ?: '35.0.0' |
6 | | - minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '24') |
7 | | - compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '35') |
8 | | - targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34') |
9 | | - kotlinVersion = findProperty('android.kotlinVersion') ?: '1.9.24' |
10 | | - |
11 | | - ndkVersion = "26.1.10909125" |
12 | | - } |
13 | | - repositories { |
14 | | - google() |
15 | | - mavenCentral() |
16 | | - } |
17 | | - dependencies { |
18 | | - classpath('com.android.tools.build:gradle') |
19 | | - classpath('com.facebook.react:react-native-gradle-plugin') |
20 | | - classpath('org.jetbrains.kotlin:kotlin-gradle-plugin') |
21 | | - } |
| 4 | + repositories { |
| 5 | + google() |
| 6 | + mavenCentral() |
| 7 | + } |
| 8 | + dependencies { |
| 9 | + classpath('com.android.tools.build:gradle') |
| 10 | + classpath('com.facebook.react:react-native-gradle-plugin') |
| 11 | + classpath('org.jetbrains.kotlin:kotlin-gradle-plugin') |
| 12 | + } |
22 | 13 | } |
23 | 14 |
|
24 | | -apply plugin: "com.facebook.react.rootproject" |
| 15 | +def reactNativeAndroidDir = new File( |
| 16 | + providers.exec { |
| 17 | + workingDir(rootDir) |
| 18 | + commandLine("node", "--print", "require.resolve('react-native/package.json')") |
| 19 | + }.standardOutput.asText.get().trim(), |
| 20 | + "../android" |
| 21 | +) |
25 | 22 |
|
26 | 23 | allprojects { |
27 | | - repositories { |
28 | | - maven { |
29 | | - // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm |
30 | | - url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android')) |
31 | | - } |
32 | | - maven { |
33 | | - // Android JSC is installed from npm |
34 | | - url(new File(['node', '--print', "require.resolve('jsc-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), '../dist')) |
35 | | - } |
36 | | - |
37 | | - google() |
38 | | - mavenCentral() |
39 | | - maven { url 'https://www.jitpack.io' } |
| 24 | + repositories { |
| 25 | + maven { |
| 26 | + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm |
| 27 | + url(reactNativeAndroidDir) |
40 | 28 | } |
| 29 | + |
| 30 | + google() |
| 31 | + mavenCentral() |
| 32 | + maven { url 'https://www.jitpack.io' } |
| 33 | + } |
41 | 34 | } |
| 35 | + |
| 36 | +apply plugin: "expo-root-project" |
| 37 | +apply plugin: "com.facebook.react.rootproject" |
0 commit comments