Skip to content

Commit 1a0b6c7

Browse files
committed
Update to 1.76.2 and modify rewrite rules for release
1 parent 678a02c commit 1a0b6c7

5 files changed

Lines changed: 68 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ example, current released versions:
8484
|-----------|----------|-----------------------------------------------------------------------------------------|
8585
| 1.63.1 | 1.63.1-1 | Initial release |
8686
| 1.63.1 | 1.63.1-2 | Add support for canceling server streaming calls via Context, some missing super-source |
87+
| 1.76.2 | 1.76.2-1 | Update to gRPC 1.76.2 |
8788

8889
Replace/exclude any existing grpc-java dependencies with this library. Add an inherits in your project's GWT module:
8990
```xml

example/gwt-client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<dependency>
3939
<groupId>com.vertispan.grpc</groupId>
4040
<artifactId>grpc-gwt</artifactId>
41-
<version>1.63.1-2</version>
41+
<version>1.76.2-1-SNAPSHOT</version>
4242
</dependency>
4343
<dependency>
4444
<groupId>com.vertispan.grpc</groupId>

example/gwt-client/src/main/java/helloworld/GreeterGrpc.java

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
* The greeting service definition.
88
* </pre>
99
*/
10-
@javax.annotation.Generated(
11-
value = "by gRPC proto compiler (version 1.63.1)",
12-
comments = "Source: hello.proto")
1310
@io.grpc.stub.annotations.GrpcGenerated
1411
public final class GreeterGrpc {
1512

@@ -63,6 +60,21 @@ public GreeterStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOpti
6360
return GreeterStub.newStub(factory, channel);
6461
}
6562

63+
/**
64+
* Creates a new blocking-style stub that supports all types of calls on the service
65+
*/
66+
public static GreeterBlockingV2Stub newBlockingV2Stub(
67+
io.grpc.Channel channel) {
68+
io.grpc.stub.AbstractStub.StubFactory<GreeterBlockingV2Stub> factory =
69+
new io.grpc.stub.AbstractStub.StubFactory<GreeterBlockingV2Stub>() {
70+
@java.lang.Override
71+
public GreeterBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
72+
return new GreeterBlockingV2Stub(channel, callOptions);
73+
}
74+
};
75+
return GreeterBlockingV2Stub.newStub(factory, channel);
76+
}
77+
6678
/**
6779
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
6880
*/
@@ -162,6 +174,36 @@ public void sayHello(helloworld.HelloRequest request,
162174
* The greeting service definition.
163175
* </pre>
164176
*/
177+
public static final class GreeterBlockingV2Stub
178+
extends io.grpc.stub.AbstractBlockingStub<GreeterBlockingV2Stub> {
179+
private GreeterBlockingV2Stub(
180+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
181+
super(channel, callOptions);
182+
}
183+
184+
@java.lang.Override
185+
protected GreeterBlockingV2Stub build(
186+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
187+
return new GreeterBlockingV2Stub(channel, callOptions);
188+
}
189+
190+
/**
191+
* <pre>
192+
* Sends a greeting
193+
* </pre>
194+
*/
195+
public helloworld.HelloReply sayHello(helloworld.HelloRequest request) throws io.grpc.StatusException {
196+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
197+
getChannel(), getSayHelloMethod(), getCallOptions(), request);
198+
}
199+
}
200+
201+
/**
202+
* A stub to allow clients to do limited synchronous rpc calls to service Greeter.
203+
* <pre>
204+
* The greeting service definition.
205+
* </pre>
206+
*/
165207
public static final class GreeterBlockingStub
166208
extends io.grpc.stub.AbstractBlockingStub<GreeterBlockingStub> {
167209
private GreeterBlockingStub(

grpc-gwt/pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
</parent>
1111

1212
<artifactId>grpc-gwt</artifactId>
13-
<version>1.63.1-3-SNAPSHOT</version>
13+
<version>1.76.2-1</version>
1414
<packaging>gwt-lib</packaging>
1515
<name>gRPC for GWT</name>
1616
<description>
1717
A GWT compatible version of a subset of gRPC-java's api, stub, and protobuf artifacts
1818
</description>
1919

2020
<properties>
21-
<grpc.version>1.63.1</grpc.version>
21+
<grpc.version>1.76.2</grpc.version>
2222

2323
<maven.compiler.source>11</maven.compiler.source>
2424
<maven.compiler.target>11</maven.compiler.target>
@@ -55,6 +55,11 @@
5555
<classifier>sources</classifier>
5656
</dependency>
5757

58+
<dependency>
59+
<groupId>org.codehaus.mojo</groupId>
60+
<artifactId>animal-sniffer-annotations</artifactId>
61+
<version>1.23</version>
62+
</dependency>
5863

5964
<dependency>
6065
<groupId>org.gwtproject</groupId>

grpc-gwt/rewrite.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,27 @@ recipeList:
1010
- com.vertispan.recipes.RemoveClassInternals:
1111
fullyQualifiedClassName: io.grpc.stub.ServerCalls
1212

13+
- com.vertispan.recipes.RemoveClassInternals:
14+
fullyQualifiedClassName: io.grpc.stub.BlockingClientCall
15+
- com.vertispan.recipes.RemoveMethod:
16+
target: io.grpc.stub.BlockingClientCall <constructor>(..)
17+
1318
- com.vertispan.recipes.MethodThrowsException:
1419
target: io.grpc.stub.ClientCalls blockingUnaryCall(..)
1520
- com.vertispan.recipes.MethodThrowsException:
1621
target: io.grpc.stub.ClientCalls blockingServerStreamingCall(..)
1722
- com.vertispan.recipes.MethodThrowsException:
1823
target: io.grpc.stub.ClientCalls futureUnaryCall(..)
24+
- com.vertispan.recipes.MethodThrowsException:
25+
target: io.grpc.stub.ClientCalls blockingBidiStreamingCall(..)
1926

2027
# Remove this annotation, so the Grpc class itself can be pruned by the build
2128
- org.openrewrite.java.RemoveAnnotation:
2229
annotationPattern: '@io.grpc.Grpc.TransportAttr'
2330

2431
- org.openrewrite.java.ReplaceConstantWithAnotherConstant:
25-
existingFullyQualifiedConstantName: com.google.common.base.Charsets.US_ASCII
26-
fullyQualifiedConstantName: com.google.common.base.Charsets.UTF_8
32+
existingFullyQualifiedConstantName: java.nio.charset.StandardCharsets.US_ASCII
33+
fullyQualifiedConstantName: java.nio.charset.StandardCharsets.UTF_8
2734

2835
- com.vertispan.recipes.EliminateUnreachableTypes:
2936
entrypointTypes:
@@ -86,3 +93,8 @@ recipeList:
8693
replacement: new io.grpc.ThreadLocalContextStorage()
8794
- com.vertispan.recipes.RemoveMethod:
8895
target: io.grpc.Context$LazyStorage createStorage(..)
96+
97+
- com.vertispan.recipes.RemoveMethod:
98+
target: io.grpc.stub.AbstractStub withDeadlineAfter(java.time.Duration)
99+
- com.vertispan.recipes.RemoveMethod:
100+
target: io.grpc.CallOptions withDeadlineAfter(java.time.Duration)

0 commit comments

Comments
 (0)