Skip to content

Commit bdfe418

Browse files
authored
Upgrade grpc from 1.16.1 to 1.21.0 for firestore (#465)
1 parent 31625bd commit bdfe418

File tree

4 files changed

+37
-16
lines changed

4 files changed

+37
-16
lines changed

buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/license/LicenseResolverPlugin.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import com.google.firebase.gradle.plugins.license.RemoteLicenseFetcher.BSDLicens
2323
import com.google.firebase.gradle.plugins.license.RemoteLicenseFetcher.CreativeCommonsLicenseFetcher
2424
import com.google.firebase.gradle.plugins.license.RemoteLicenseFetcher.GnuClasspathLicenseFetcher
2525
import com.google.firebase.gradle.plugins.license.RemoteLicenseFetcher.MITLicenseFetcher
26+
import com.google.firebase.gradle.plugins.license.RemoteLicenseFetcher.YetAnotherApache2LicenseFetcher
2627
import org.gradle.api.Plugin
2728
import org.gradle.api.Project
2829
import org.gradle.api.artifacts.Configuration
@@ -50,8 +51,9 @@ class LicenseResolverPlugin implements Plugin<Project> {
5051
List<RemoteLicenseFetcher> remoteLicenseFetchers =
5152
[new AndroidSdkTermsFetcher(),
5253
new Apache2LicenseFetcher(),
53-
new BSDLicenseFetcher(),
5454
new AnotherApache2LicenseFetcher(),
55+
new YetAnotherApache2LicenseFetcher(),
56+
new BSDLicenseFetcher(),
5557
new CreativeCommonsLicenseFetcher(), new MITLicenseFetcher(), new AnotherMITLicenseFetcher(), new GnuClasspathLicenseFetcher()]
5658
final static ANDROID_PLUGINS = ["com.android.application", "com.android.library",
5759
"com.android.test"]

buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/license/RemoteLicenseFetcher.groovy

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@ interface RemoteLicenseFetcher extends Serializable {
5656
}
5757
}
5858

59-
static final class BSDLicenseFetcher implements RemoteLicenseFetcher {
60-
private URI BSD_LICENSE_URI = URI.create("http://www.opensource.org/licenses/bsd-license.php")
59+
static final class AnotherApache2LicenseFetcher implements RemoteLicenseFetcher {
60+
private URI APACHE_2_LICENSE_URI = URI.create("https://opensource.org/licenses/Apache-2.0")
6161

6262
@Override
6363
URI getServiceUri() {
64-
BSD_LICENSE_URI
64+
APACHE_2_LICENSE_URI
6565
}
6666

6767
@Override
6868
String get() {
69-
def doc = Jsoup.connect(BSD_LICENSE_URI.toString()).get()
69+
def doc = Jsoup.connect(APACHE_2_LICENSE_URI.toString()).get()
7070

71-
TEXT_FORMATTER.getPlainText(doc.select('#content-wrapper')[0])
71+
TEXT_FORMATTER.getPlainText(doc.select('#content-wrapper'))
7272
}
7373
}
7474

75-
static final class AnotherApache2LicenseFetcher implements RemoteLicenseFetcher {
76-
private URI APACHE_2_LICENSE_URI = URI.create("https://opensource.org/licenses/Apache-2.0")
75+
static final class YetAnotherApache2LicenseFetcher implements RemoteLicenseFetcher {
76+
private URI APACHE_2_LICENSE_URI = URI.create("http://www.apache.org/licenses/LICENSE-2.0")
7777

7878
@Override
7979
URI getServiceUri() {
@@ -82,9 +82,23 @@ interface RemoteLicenseFetcher extends Serializable {
8282

8383
@Override
8484
String get() {
85-
def doc = Jsoup.connect(APACHE_2_LICENSE_URI.toString()).get()
85+
APACHE_2_LICENSE_URI.toURL().getText()
86+
}
87+
}
8688

87-
TEXT_FORMATTER.getPlainText(doc.select('#content-wrapper'))
89+
static final class BSDLicenseFetcher implements RemoteLicenseFetcher {
90+
private URI BSD_LICENSE_URI = URI.create("http://www.opensource.org/licenses/bsd-license.php")
91+
92+
@Override
93+
URI getServiceUri() {
94+
BSD_LICENSE_URI
95+
}
96+
97+
@Override
98+
String get() {
99+
def doc = Jsoup.connect(BSD_LICENSE_URI.toString()).get()
100+
101+
TEXT_FORMATTER.getPlainText(doc.select('#content-wrapper')[0])
88102
}
89103
}
90104

@@ -151,4 +165,4 @@ interface RemoteLicenseFetcher extends Serializable {
151165
TEXT_FORMATTER.getPlainText(doc.select('body > table > tbody > tr:nth-child(2) > td:nth-child(2) > table > tbody > tr:nth-child(3) > td > en > blockquote'))
152166
}
153167
}
154-
}
168+
}

firebase-firestore/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Unreleased
2+
- [fixed] Updated gRPC to 1.21.0. A bug in the prior version would occasionally
3+
cause a crash if a network state change occurred concurrently with an RPC.
4+
(#428)
5+
6+
# 19.0.1
27
- [fixed] Fixed an issue that prevented schema migrations for clients with
38
large offline datasets (#370).
49

firebase-firestore/firebase-firestore.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protobuf {
3030
}
3131
plugins {
3232
grpc {
33-
artifact = 'io.grpc:protoc-gen-grpc-java:1.16.1'
33+
artifact = 'io.grpc:protoc-gen-grpc-java:1.21.0'
3434
}
3535
javalite {
3636
// The codegen for lite comes as a separate artifact
@@ -102,10 +102,10 @@ dependencies {
102102
//To provide @Generated annotations
103103
compileOnly 'javax.annotation:jsr250-api:1.0'
104104

105-
implementation 'io.grpc:grpc-stub:1.16.1'
106-
implementation 'io.grpc:grpc-protobuf-lite:1.16.1'
107-
implementation 'io.grpc:grpc-okhttp:1.16.1'
108-
implementation 'io.grpc:grpc-android:1.16.1'
105+
implementation 'io.grpc:grpc-stub:1.21.0'
106+
implementation 'io.grpc:grpc-protobuf-lite:1.21.0'
107+
implementation 'io.grpc:grpc-okhttp:1.21.0'
108+
implementation 'io.grpc:grpc-android:1.21.0'
109109
implementation "com.google.android.gms:play-services-basement:$playServicesVersion"
110110
implementation "com.google.android.gms:play-services-tasks:$playServicesVersion"
111111
implementation "com.google.android.gms:play-services-base:$playServicesVersion"

0 commit comments

Comments
 (0)