E-TWOW-Connect/android/build.gradle

110 lines
3.8 KiB
Groovy
Executable File

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "32.0.0"
minSdkVersion = 24
compileSdkVersion = 32
targetSdkVersion = 32
ndkVersion = "23.1.7779620"
kotlinVersion = '1.6.21'
// mapbox start
RNMapboxMapsImpl = "maplibre"
useCustomMapbox = false
if (System.getenv('CI_MAP_IMPL').equals('maplibre')) {
RNMapboxMapsImpl = "maplibre"
} else if (System.getenv('CI_MAP_IMPL').equals('mapbox')) {
RNMapboxMapsImpl = "mapbox"
} else if (System.getenv('CI_MAP_IMPL').equals('mapbox-gl')) {
RNMapboxMapsImpl = "mapbox-gl"
}
// Mapbox deps
if (useCustomMapbox) {
RNMapboxMapsLibs = {
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.7.1'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:5.8.0'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.8.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-gestures:0.7.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.8.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v9:0.14.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-markerview-v9:0.4.0'
}
}
// mapbox end
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.0.4")
classpath("com.google.gms:google-services:4.3.10")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter() {
content {
includeModule("com.yqritc", "android-scalablevideoview")
}
}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
// mapbox start
if (rootProject.ext.get("RNMapboxMapsImpl") == "mapbox") {
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be `mapbox` (not your username).
username = 'mapbox'
// Use the secret token you stored in gradle.properties as the password
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
if (rootProject.ext.get('useCustomMapbox')) {
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
// mapbox end
google()
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
maven { url 'https://www.jitpack.io' }
}
}