mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-06-19 01:46:27 +08:00
fix(android,build): conditionally check app dependency, fixes… (#3215)
This commit is contained in:
@@ -79,7 +79,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-ads"
|
||||
implementation "com.google.android.ads.consent:consent-library:${ReactNative.ext.getVersion("ads", "consent")}"
|
||||
|
||||
@@ -62,7 +62,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-analytics"
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ plugins {
|
||||
project.ext {
|
||||
set('react-native', [
|
||||
versions: [
|
||||
android : [
|
||||
android : [
|
||||
minSdk : 16,
|
||||
targetSdk : 28,
|
||||
compileSdk: 28,
|
||||
@@ -29,7 +29,6 @@ project.ext {
|
||||
// overriding here though to match the version RN uses
|
||||
buildTools: "28.0.3"
|
||||
],
|
||||
|
||||
firebase : [
|
||||
bom : "24.1.0",
|
||||
],
|
||||
@@ -57,7 +56,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-auth"
|
||||
}
|
||||
|
||||
@@ -58,7 +58,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
// don't use firebase bom here as crashlytics-ndk is not included in the bom, trying to partially use bom here fails
|
||||
implementation "com.crashlytics.sdk.android:crashlytics:${ReactNative.ext.getVersion("firebase", "crashlytics")}"
|
||||
// ndk not in Firebase BoM
|
||||
|
||||
@@ -62,7 +62,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-database"
|
||||
}
|
||||
|
||||
@@ -57,7 +57,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-dynamic-links"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-firestore"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-functions"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-iid"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-inappmessaging-display"
|
||||
}
|
||||
|
||||
@@ -68,7 +68,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-messaging"
|
||||
}
|
||||
|
||||
@@ -66,7 +66,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-ml-natural-language"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-ml-vision"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-perf"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-config"
|
||||
}
|
||||
|
||||
@@ -57,7 +57,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':@react-native-firebase_app')
|
||||
if (findProject(':@react-native-firebase_app')) {
|
||||
api project(':@react-native-firebase_app')
|
||||
} else if (findProject(':react-native-firebase_app')) {
|
||||
api project(':react-native-firebase_app')
|
||||
} else {
|
||||
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
|
||||
}
|
||||
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
|
||||
implementation "com.google.firebase:firebase-storage"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user