[ml] fix build model detection when using parallel gradle builds

This commit is contained in:
Salakar
2019-06-04 11:39:40 +01:00
parent 930b2b13af
commit 4ee00a7c49

View File

@@ -1,3 +1,5 @@
apply from: file("./../../app/android/firebase-json.gradle")
def mlModels = [
// TODO not available on iOS until SDK 6.0.0
// 'ml_natural_language_translate_model',
@@ -6,7 +8,7 @@ def mlModels = [
]
dependencies {
if (rootProject.ext.firebaseJson) {
if (rootProject.ext && rootProject.ext.firebaseJson) {
mlModels.each { modelFlag ->
if (rootProject.ext.firebaseJson.isFlagEnabled(modelFlag) == true) {
rootProject.logger.info ":${project.name} model enabled: '${modelFlag}'"