Skip to content

Commit a79f753

Browse files
committed
Merge remote-tracking branch 'origin/master' into ss-firestore-emulator-settings
2 parents 85b6170 + 037282f commit a79f753

File tree

20 files changed

+1060
-97
lines changed

20 files changed

+1060
-97
lines changed

build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ ext {
4949
playServicesVersion = '16.0.1'
5050
supportAnnotationsVersion = '28.0.0'
5151
googleTruthVersion = '0.45'
52+
grpcVersion = '1.28.0'
5253
robolectricVersion = '4.3.1'
54+
protocVersion = '3.11.0'
55+
javaliteVersion = '3.11.0'
5356
}
5457

5558
apply plugin: com.google.firebase.gradle.plugins.publish.PublishingPlugin

firebase-abt/firebase-abt.gradle

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,12 @@ firebaseLibrary {
2525
// TODO(issue/568): Remove this once legacy logic is removed from Remote Config.
2626
protobuf {
2727
protoc {
28-
artifact = 'com.google.protobuf:protoc:3.4.0'
29-
}
30-
plugins {
31-
javalite {
32-
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
33-
}
28+
artifact = "com.google.protobuf:protoc:$protocVersion"
3429
}
3530
generateProtoTasks {
3631
all().each { task ->
3732
task.builtins {
38-
remove java
39-
}
40-
task.plugins {
41-
javalite {}
33+
java { option 'lite' }
4234
}
4335
}
4436
}
@@ -86,7 +78,7 @@ dependencies {
8678
exclude group: "com.google.firebase", module: "firebase-common"
8779
}
8880
implementation 'com.google.android.gms:play-services-basement:17.0.0'
89-
implementation 'com.google.protobuf:protobuf-lite:3.0.1'
81+
implementation "com.google.protobuf:protobuf-javalite:$javaliteVersion"
9082
testImplementation 'org.mockito:mockito-core:2.25.0'
9183
testImplementation 'com.google.truth:truth:0.44'
9284
testImplementation 'junit:junit:4.13-beta-2'

firebase-config/bandwagoner/bandwagoner.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ dependencies {
7373
implementation 'com.google.android.gms:play-services-tasks:17.0.0'
7474

7575
// Support Libraries
76-
implementation 'com.google.guava:guava:27.1-android'
76+
implementation 'com.google.guava:guava:28.1-android'
7777
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
7878

7979
implementation 'androidx.appcompat:appcompat:1.0.2'

firebase-config/firebase-config.gradle

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,12 @@ protobuf {
2828
// Configure the protoc executable
2929
protoc {
3030
// Download from repositories
31-
artifact = 'com.google.protobuf:protoc:3.4.0'
32-
}
33-
plugins {
34-
javalite {
35-
// The codegen for lite comes as a separate artifact
36-
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
37-
}
31+
artifact = "com.google.protobuf:protoc:$protocVersion"
3832
}
3933
generateProtoTasks {
4034
all().each { task ->
4135
task.builtins {
42-
// In most cases you don't need the full Java output
43-
// if you use the lite output.
44-
remove java
45-
}
46-
task.plugins {
47-
javalite {}
36+
java { option 'lite' }
4837
}
4938
}
5039
}
@@ -89,7 +78,7 @@ dependencies {
8978
runtimeOnly project(':firebase-installations')
9079

9180
implementation 'com.google.firebase:firebase-measurement-connector:18.0.0'
92-
implementation 'com.google.protobuf:protobuf-lite:3.0.1'
81+
implementation "com.google.protobuf:protobuf-javalite:$javaliteVersion"
9382
implementation 'com.google.android.gms:play-services-tasks:17.0.2'
9483

9584
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'

firebase-crashlytics-ndk/firebase-crashlytics-ndk.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ dependencies {
7171
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
7272
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
7373
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.25.0'
74-
androidTestImplementation 'com.google.protobuf:protobuf-java:3.6.1'
74+
androidTestImplementation "com.google.protobuf:protobuf-javalite:$javaliteVersion"
7575
}

firebase-firestore/firebase-firestore.gradle

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,22 @@ protobuf {
2626
// Configure the protoc executable
2727
protoc {
2828
// Download from repositories
29-
artifact = 'com.google.protobuf:protoc:3.4.0'
29+
artifact = "com.google.protobuf:protoc:$protocVersion"
3030
}
3131
plugins {
3232
grpc {
33-
artifact = 'io.grpc:protoc-gen-grpc-java:1.21.0'
34-
}
35-
javalite {
36-
// The codegen for lite comes as a separate artifact
37-
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
33+
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
3834
}
3935
}
4036
generateProtoTasks {
4137
all().each { task ->
4238
task.builtins {
43-
// In most cases you don't need the full Java output
44-
// if you use the lite output.
45-
remove java
39+
java { option 'lite' }
4640
}
4741
task.plugins {
4842
grpc {
4943
option 'lite'
5044
}
51-
javalite {}
5245
}
5346
}
5447
}
@@ -108,9 +101,10 @@ configurations.all {
108101
if(it.name.contains('AndroidTestRuntimeClasspath')) {
109102
it.resolutionStrategy {
110103
force 'org.checkerframework:checker-compat-qual:2.5.5'
111-
force 'com.google.guava:guava:27.0.1-android'
104+
force 'com.google.guava:guava:28.1-android'
112105
}
113106
}
107+
exclude group: "com.google.protobuf", module: "protobuf-java"
114108
}
115109

116110
dependencies {
@@ -124,10 +118,10 @@ dependencies {
124118
compileOnly 'javax.annotation:jsr250-api:1.0'
125119

126120
implementation 'androidx.annotation:annotation:1.1.0'
127-
implementation 'io.grpc:grpc-stub:1.21.0'
128-
implementation 'io.grpc:grpc-protobuf-lite:1.21.0'
129-
implementation 'io.grpc:grpc-okhttp:1.21.0'
130-
implementation 'io.grpc:grpc-android:1.21.0'
121+
implementation "io.grpc:grpc-stub:$grpcVersion"
122+
implementation "io.grpc:grpc-protobuf-lite:$grpcVersion"
123+
implementation "io.grpc:grpc-okhttp:$grpcVersion"
124+
implementation "io.grpc:grpc-android:$grpcVersion"
131125
implementation 'com.google.android.gms:play-services-basement:17.0.0'
132126
implementation 'com.google.android.gms:play-services-tasks:17.0.0'
133127
implementation 'com.google.android.gms:play-services-base:17.0.0'
@@ -148,7 +142,9 @@ dependencies {
148142
testImplementation 'com.google.guava:guava-testlib:12.0-rc2'
149143

150144
androidTestImplementation 'junit:junit:4.12'
151-
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
145+
androidTestImplementation("com.google.truth:truth:$googleTruthVersion"){
146+
exclude group: "org.codehaus.mojo", module: "animal-sniffer-annotations"
147+
}
152148
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
153149
androidTestImplementation 'org.mockito:mockito-android:2.25.0'
154150
androidTestImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'

firebase-firestore/ktx/ktx.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ dependencies {
5555
testImplementation 'org.mockito:mockito-core:2.25.0'
5656
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
5757
testImplementation 'com.google.android.gms:play-services-tasks:16.0.1'
58-
testImplementation 'com.google.protobuf:protobuf-lite:3.0.1'
5958
testImplementation "org.robolectric:robolectric:$robolectricVersion"
6059
testImplementation 'junit:junit:4.12'
6160
testImplementation "com.google.truth:truth:$googleTruthVersion"

firebase-firestore/src/main/java/com/google/firebase/firestore/remote/GrpcCallProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private ManagedChannel initChannel(Context context, DatabaseInfo databaseInfo) {
125125
// Wrap the ManagedChannelBuilder in an AndroidChannelBuilder. This allows the channel to
126126
// respond more gracefully to network change events (such as switching from cell to wifi).
127127
AndroidChannelBuilder androidChannelBuilder =
128-
AndroidChannelBuilder.fromBuilder(channelBuilder).context(context);
128+
AndroidChannelBuilder.usingBuilder(channelBuilder).context(context);
129129

130130
return androidChannelBuilder.build();
131131
}

firebase-inappmessaging-display/api.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Signature format: 2.0
22
package com.google.firebase.inappmessaging.display {
33

4-
@Keep public class FirebaseInAppMessagingDisplay implements android.app.Application.ActivityLifecycleCallbacks com.google.firebase.inappmessaging.FirebaseInAppMessagingDisplay {
4+
public class FirebaseInAppMessagingDisplay implements android.app.Application.ActivityLifecycleCallbacks com.google.firebase.inappmessaging.FirebaseInAppMessagingDisplay {
55
method public void displayMessage(com.google.firebase.inappmessaging.model.InAppMessage, com.google.firebase.inappmessaging.FirebaseInAppMessagingDisplayCallbacks);
6-
method @NonNull @Keep public static com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay getInstance();
6+
method @NonNull public static com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay getInstance();
77
method public void onActivityCreated(android.app.Activity, android.os.Bundle);
8-
method @Keep public void onActivityDestroyed(android.app.Activity);
9-
method @Keep public void onActivityPaused(android.app.Activity);
10-
method @Keep public void onActivityResumed(android.app.Activity);
8+
method public void onActivityDestroyed(android.app.Activity);
9+
method public void onActivityPaused(android.app.Activity);
10+
method public void onActivityResumed(android.app.Activity);
1111
method public void onActivitySaveInstanceState(android.app.Activity, android.os.Bundle);
12-
method @Keep public void onActivityStarted(android.app.Activity);
12+
method public void onActivityStarted(android.app.Activity);
1313
method public void onActivityStopped(android.app.Activity);
1414
}
1515

firebase-inappmessaging/api.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package com.google.firebase.inappmessaging {
1818
method public void setAutomaticDataCollectionEnabled(boolean);
1919
method public void setMessageDisplayComponent(@NonNull com.google.firebase.inappmessaging.FirebaseInAppMessagingDisplay);
2020
method public void setMessagesSuppressed(@NonNull Boolean);
21-
method public void triggerEvent(String);
21+
method public void triggerEvent(@NonNull String);
2222
}
2323

2424
public interface FirebaseInAppMessagingClickListener {

firebase-inappmessaging/firebase-inappmessaging.gradle

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,22 @@ protobuf {
2525
// Configure the protoc executable
2626
protoc {
2727
// Download from repositories
28-
artifact = 'com.google.protobuf:protoc:3.4.0'
28+
artifact = "com.google.protobuf:protoc:$protocVersion"
2929
}
3030
plugins {
3131
grpc {
32-
artifact = 'io.grpc:protoc-gen-grpc-java:1.21.0'
33-
}
34-
javalite {
35-
// The codegen for lite comes as a separate artifact
36-
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
32+
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
3733
}
3834
}
3935
generateProtoTasks {
4036
all().each { task ->
4137
task.builtins {
42-
// In most cases you don't need the full Java output
43-
// if you use the lite output.
44-
remove java
38+
java { option 'lite' }
4539
}
4640
task.plugins {
4741
grpc {
4842
option 'lite'
4943
}
50-
javalite {}
5144
}
5245
}
5346
}
@@ -104,7 +97,7 @@ configurations.all {
10497
if(it.name.contains('AndroidTestRuntimeClasspath')) {
10598
it.resolutionStrategy {
10699
force 'org.checkerframework:checker-compat-qual:2.5.5'
107-
force 'com.google.guava:guava:27.0.1-android'
100+
force 'com.google.guava:guava:28.1-android'
108101
}
109102
}
110103
}
@@ -123,10 +116,10 @@ dependencies {
123116
compileOnly 'javax.annotation:jsr250-api:1.0'
124117

125118
implementation 'com.google.android.gms:play-services-tasks:17.0.2'
126-
implementation 'io.grpc:grpc-stub:1.21.0'
127-
implementation 'io.grpc:grpc-protobuf-lite:1.21.0'
128-
implementation 'io.grpc:grpc-okhttp:1.21.0'
129-
implementation 'com.google.dagger:dagger:2.27'
119+
implementation "io.grpc:grpc-stub:$grpcVersion"
120+
implementation "io.grpc:grpc-protobuf-lite:$grpcVersion"
121+
implementation "io.grpc:grpc-okhttp:$grpcVersion"
122+
implementation 'com.google.dagger:dagger:2.24'
130123
implementation 'io.reactivex.rxjava2:rxjava:2.1.14'
131124
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
132125
implementation 'com.google.auto.value:auto-value-annotations:1.6.6'
@@ -146,15 +139,15 @@ dependencies {
146139
testImplementation ("org.robolectric:robolectric:$robolectricVersion") {
147140
exclude group: 'com.google.protobuf', module: 'protobuf-java'
148141
}
149-
testImplementation 'io.grpc:grpc-testing:1.21.0'
142+
testImplementation "io.grpc:grpc-testing:$grpcVersion"
150143
testImplementation 'com.google.guava:guava:27.1-android'
151144

152145
androidTestImplementation 'junit:junit:4.12'
153146
androidTestImplementation 'androidx.test:runner:1.2.0'
154147
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
155148
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
156149
androidTestImplementation 'org.awaitility:awaitility:3.1.0'
157-
androidTestImplementation 'io.grpc:grpc-testing:1.21.0'
150+
androidTestImplementation "io.grpc:grpc-testing:$grpcVersion"
158151
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
159152
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.25.0'
160153

firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public Thread newThread(Runnable r) {
139139
TimeUnit.SECONDS,
140140
new LinkedBlockingQueue<>(),
141141
THREAD_FACTORY);
142+
preConditionChecks();
142143
}
143144

144145
/**
@@ -216,7 +217,6 @@ String getName() {
216217
@NonNull
217218
@Override
218219
public Task<String> getId() {
219-
preConditionChecks();
220220
return Tasks.forResult(doGetId());
221221
}
222222

@@ -231,7 +231,6 @@ public Task<String> getId() {
231231
@NonNull
232232
@Override
233233
public Task<InstallationTokenResult> getToken(boolean forceRefresh) {
234-
preConditionChecks();
235234
Task<InstallationTokenResult> task = addGetAuthTokenListener();
236235
backgroundExecutor.execute(() -> doGetAuthToken(forceRefresh));
237236
return task;

protolite-well-known-types/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,22 @@ A typical grpc and protobuf-lite configuration should look like
2929
```groovy
3030
protobuf {
3131
protoc {
32-
artifact = 'com.google.protobuf:protoc:3.4.0'
32+
artifact = "com.google.protobuf:protoc:$protocVersion"
3333
}
3434
plugins {
3535
grpc {
3636
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
3737
}
38-
javalite {
39-
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
40-
}
4138
}
4239
generateProtoTasks {
4340
all().each { task ->
4441
task.builtins {
45-
remove java
42+
java { option 'lite' }
4643
}
4744
task.plugins {
4845
grpc {
4946
option 'lite'
5047
}
51-
javalite { }
5248
}
5349
}
5450
}

protolite-well-known-types/api.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Signature format: 2.0

0 commit comments

Comments
 (0)