-
Notifications
You must be signed in to change notification settings - Fork 3k
/
build.gradle
74 lines (65 loc) · 2.92 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
androidXCore = "1.0.2"
multiDexEnabled = true
googlePlayServicesVersion = "17.0.0"
kotlinVersion = '1.8.10'
// This property configures the type of Mapbox SDK used by the @rnmapbox/maps library.
// "mapbox" indicates the usage of the Mapbox SDK.
RNMapboxMapsImpl = "mapbox"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("com.google.gms:google-services:4.3.4")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.7.1")
classpath("com.google.firebase:perf-plugin:1.4.1")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
allprojects {
configurations.all {
resolutionStrategy {
force 'org.xerial:sqlite-jdbc:3.34.0'
// Manually set the react-native version to resolve this upstream issue: https://github.com/facebook/react-native/issues/35210
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
force "com.facebook.react:hermes-engine:" + REACT_NATIVE_VERSION
}
}
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Mapbox SDK requires authentication to download from Mapbox's private Maven repository.
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// 'mapbox' is the fixed username for Mapbox's Maven repository.
username = 'mapbox'
// The value for password is read from the 'MAPBOX_DOWNLOADS_TOKEN' gradle property.
// Run "npm run setup-mapbox-sdk" to set this property in «USER_HOME»/.gradle/gradle.properties
// Example gradle.properties entry:
// MAPBOX_DOWNLOADS_TOKEN=YOUR_SECRET_TOKEN_HERE
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
}
apply plugin: "com.facebook.react.rootproject"