Skip to content

Commit a671c46

Browse files
authored
build.gradle: Add targets and abiFilters (#1344)
1 parent 39c8aa6 commit a671c46

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

firestore/integration_test_internal/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ android {
5252
}
5353
}
5454

55+
Properties localProperties = new Properties()
56+
try {
57+
localProperties.load(project.rootProject.file('local.properties').newDataInputStream())
58+
} catch (FileNotFoundException e) {
59+
// Ignore the situation where local.properties does not exist, effectively treating it the same
60+
// as if it existed but was empty.
61+
}
62+
5563
defaultConfig {
5664
applicationId 'com.google.firebase.cpp.firestore.testapp'
5765
minSdkVersion 19
@@ -60,6 +68,13 @@ android {
6068
versionName '1.0'
6169
externalNativeBuild.cmake {
6270
arguments "-DFIREBASE_CPP_SDK_DIR=$gradle.firebase_cpp_sdk_dir"
71+
// Only build the targets that Firestore needs, instead of everything.
72+
targets 'firebase_firestore', 'firebase_auth', 'android_integration_test_main'
73+
// Add the line `abiFilter=<abi>` to `local.properties` to speed up local builds by only
74+
// building the required ABI, where `<abi>` is x86, x86_64, or arm64-v8a (for Mac M1).
75+
if (localProperties["abiFilter"] != null) {
76+
abiFilters localProperties["abiFilter"]
77+
}
6378
}
6479
multiDexEnabled true
6580
}

0 commit comments

Comments
 (0)