mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-21 10:34:39 +08:00
71 lines
1.7 KiB
Groovy
71 lines
1.7 KiB
Groovy
buildscript {
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:3.3.0'
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id "io.invertase.gradle.build" version "1.3"
|
|
}
|
|
|
|
project.ext {
|
|
set('react-native', [
|
|
versions: [
|
|
android : [
|
|
minSdk : 16,
|
|
targetSdk : 28,
|
|
compileSdk: 28,
|
|
// optional as gradle.buildTools comes with one by default
|
|
// overriding here though to match the version RN uses
|
|
buildTools: "28.0.3"
|
|
],
|
|
|
|
googlePlayServices: [
|
|
base: "16.1.0",
|
|
],
|
|
|
|
firebase : [
|
|
mlkitVision: "19.0.2",
|
|
mlkitCommon: "16.2.1",
|
|
mlkitNaturalLanguage: "18.1.1",
|
|
],
|
|
],
|
|
])
|
|
}
|
|
|
|
android {
|
|
defaultConfig {
|
|
multiDexEnabled true
|
|
}
|
|
lintOptions {
|
|
disable 'GradleCompatible'
|
|
abortOnError false
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
api project(':@react-native-firebase/app')
|
|
implementation "com.google.firebase:firebase-ml-common:${ReactNative.ext.getVersion("firebase", "mlkitCommon")}"
|
|
implementation "com.google.firebase:firebase-ml-vision:${ReactNative.ext.getVersion("firebase", "mlkitVision")}"
|
|
implementation "com.google.firebase:firebase-ml-natural-language:${ReactNative.ext.getVersion("firebase", "mlkitNaturalLanguage")}"
|
|
implementation "com.google.android.gms:play-services-base:${ReactNative.ext.getVersion("googlePlayServices", "base")}"
|
|
}
|
|
|
|
ReactNative.shared.applyPackageVersion()
|
|
ReactNative.shared.applyDefaultExcludes()
|
|
ReactNative.module.applyAndroidVersions()
|
|
ReactNative.module.applyReactNativeDependency("api")
|