@@ -50,6 +50,7 @@ protobuf {
50
50
}
51
51
}
52
52
}
53
+
53
54
android {
54
55
adbOptions {
55
56
timeOutInMs 60 * 1000
@@ -64,15 +65,23 @@ android {
64
65
multiDexEnabled true
65
66
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
66
67
consumerProguardFiles ' proguard.txt'
68
+
69
+ def targetBackend = findProperty(" targetBackend" ) ?: " emulator"
70
+ buildConfigField(" String" , " TARGET_BACKEND" , " \" $targetBackend \" " )
71
+
72
+ def localProps = new Properties ()
73
+
74
+ try {
75
+ file(" local.properties" ). withInputStream { localProps. load(it) }
76
+ } catch (FileNotFoundException e) {
77
+ }
67
78
}
68
79
69
80
sourceSets {
70
81
main {
71
82
proto {
72
83
srcDir ' src/proto'
73
84
}
74
- java {
75
- }
76
85
}
77
86
test {
78
87
java {
@@ -92,30 +101,12 @@ android {
92
101
}
93
102
testOptions. unitTests. includeAndroidResources = true
94
103
95
- // Acceptable values are: 'emulator', 'qa', 'nightly', and 'prod'.
96
- ext. targetBackend = ' emulator'
97
104
}
98
105
99
106
tasks. withType(Test ) {
100
107
maxParallelForks = Runtime . runtime. availableProcessors(). intdiv(2 ) ?: 1
101
108
}
102
109
103
- android. libraryVariants. all { variant ->
104
- if (findProperty(' targetBackend' )) {
105
- variant. buildConfigField(" String" , " TARGET_BACKEND" , " \" ${ property("targetBackend")} \" " )
106
- } else {
107
- // By default set the target backend to 'emulator'
108
- variant. buildConfigField(" String" , " TARGET_BACKEND" , " \" emulator\" " )
109
- }
110
-
111
- def localProps = new Properties ()
112
-
113
- try {
114
- file(" local.properties" ). withInputStream { localProps. load(it) }
115
- } catch (FileNotFoundException e) {
116
- }
117
- }
118
-
119
110
googleJavaFormat {
120
111
exclude ' src/testUtil/java/com/google/firebase/firestore/testutil/Assert.java'
121
112
exclude ' src/testUtil/java/com/google/firebase/firestore/testutil/ThrowingRunnable.java'
@@ -161,7 +152,6 @@ dependencies {
161
152
testImplementation ' com.fasterxml.jackson.core:jackson-databind:2.9.8'
162
153
testImplementation ' com.google.guava:guava-testlib:12.0-rc2'
163
154
164
- androidTestImplementation project(' :firebase-firestore' )
165
155
androidTestImplementation ' junit:junit:4.13.2'
166
156
androidTestImplementation(" com.google.truth:truth:$googleTruthVersion " ){
167
157
exclude group : " org.codehaus.mojo" , module : " animal-sniffer-annotations"
@@ -170,9 +160,9 @@ dependencies {
170
160
androidTestImplementation ' org.mockito:mockito-android:2.25.0'
171
161
androidTestImplementation ' com.fasterxml.jackson.core:jackson-databind:2.9.8'
172
162
androidTestImplementation " androidx.annotation:annotation:1.1.0"
173
- androidTestImplementation ' androidx.test:runner:1.2.0 '
174
- androidTestImplementation ' androidx.test:rules:1.2 .0'
175
- androidTestImplementation ' androidx.test.ext:junit:1.1.1 '
163
+ androidTestImplementation ' androidx.test:runner:1.5.2 '
164
+ androidTestImplementation ' androidx.test:rules:1.5 .0'
165
+ androidTestImplementation ' androidx.test.ext:junit:1.1.4 '
176
166
}
177
167
178
168
gradle. projectsEvaluated {
0 commit comments