Repository: salesforce/reactive-grpc
Pull request #235 (2021-04-16 17:06:29)

Feature/java8
Starting with 1.1.0, >= java 8 will be required. (Re #215)


Patch:
diff --git a/README.md b/README.md
index cdabd87..2bbcc55 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ See the readme in each technology-specific sub-directory for usage details.
 # Android support
 Reactive gRPC supports Android to the same level of the underlying reactive technologies.
 
-* Rx-Java - Generated code targets Java 6, so it _should_ work with all versions of Android >= 2.3 (SDK 9).
+* Rx-Java - Generated code targets Java 8, so it _should_ work with Android.
 * Spring Reactor - [Not officially supported.](http://projectreactor.io/docs/core/release/reference/docs/index.html#prerequisites) 
   "Reactor 3 does not officially support or target Android, however, it should work fine with Android SDK 26 (Android O) and above."
 
diff --git a/common/reactive-grpc-benchmarks/pom.xml b/common/reactive-grpc-benchmarks/pom.xml
index 8f6b2d6..b142bdc 100644
--- a/common/reactive-grpc-benchmarks/pom.xml
+++ b/common/reactive-grpc-benchmarks/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -102,16 +102,6 @@
                 </configuration>
             </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${compiler.plugin.version}</version>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-
             <plugin>
                 <groupId>org.xolstice.maven.plugins</groupId>
                 <artifactId>protobuf-maven-plugin</artifactId>
diff --git a/common/reactive-grpc-common/pom.xml b/common/reactive-grpc-common/pom.xml
index 5823dce..9559db5 100644
--- a/common/reactive-grpc-common/pom.xml
+++ b/common/reactive-grpc-common/pom.xml
@@ -12,20 +12,13 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>reactive-grpc-common</artifactId>
 
-    <properties>
-        <java.version>1.7</java.version>
-        <java.test.version>1.8</java.test.version>
-        <maven.compiler.source>${java.version}</maven.compiler.source>
-        <maven.compiler.target>${java.version}</maven.compiler.target>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>javax.annotation</groupId>
@@ -97,29 +90,7 @@
                 </configuration>
             </plugin>
 
-            <!-- Fail the build if Java7+ sneak in, because Android -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>animal-sniffer-maven-plugin</artifactId>
-                <version>1.7</version>
-                <executions>
-                    <execution>
-                        <id>signature-check</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>check</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <signature>
-                        <groupId>org.codehaus.mojo.signature</groupId>
-                        <artifactId>java16</artifactId>
-                        <version>1.0</version>
-                    </signature>
-                </configuration>
-            </plugin>
-
+            <!-- Jar and Bundle plugin used for OSGI support -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
@@ -133,7 +104,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>4.1.0</version>
+                <version>5.1.2</version>
                 <executions>
                     <execution>
                         <id>bundle-manifest</id>
diff --git a/common/reactive-grpc-gencommon/pom.xml b/common/reactive-grpc-gencommon/pom.xml
index 171310f..038263c 100644
--- a/common/reactive-grpc-gencommon/pom.xml
+++ b/common/reactive-grpc-gencommon/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <artifactId>reactive-grpc</artifactId>
         <groupId>com.salesforce.servicelibs</groupId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/pom.xml b/pom.xml
index e49179b..9aafa96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
 
     <groupId>com.salesforce.servicelibs</groupId>
     <artifactId>reactive-grpc</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.1.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>reactive-grpc</name>
@@ -222,6 +222,29 @@
                 </configuration>
             </plugin>
 
+            <!-- Fail the build if >Java8 sneak in -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>animal-sniffer-maven-plugin</artifactId>
+                <version>1.20</version>
+                <executions>
+                    <execution>
+                        <id>signature-check</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <signature>
+                        <groupId>org.codehaus.mojo.signature</groupId>
+                        <artifactId>java18</artifactId>
+                        <version>1.0</version>
+                    </signature>
+                </configuration>
+            </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
@@ -253,18 +276,6 @@
             <plugin>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <version>3.0.0-M3</version>
-                <dependencies>
-<!--                    <dependency>-->
-<!--                        <groupId>org.apache.maven.surefire</groupId>-->
-<!--                        <artifactId>surefire-junit3</artifactId>-->
-<!--                        <version>3.0.0-M3</version>-->
-<!--                    </dependency>-->
-<!--                    <dependency>-->
-<!--                        <groupId>org.apache.maven.surefire</groupId>-->
-<!--                        <artifactId>surefire-testng</artifactId>-->
-<!--                        <version>3.0.0-M3</version>-->
-<!--                    </dependency>-->
-                </dependencies>
                 <configuration>
                     <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
                 </configuration>
diff --git a/reactor/reactor-grpc-stub/pom.xml b/reactor/reactor-grpc-stub/pom.xml
index 6375eab..a9c12ce 100644
--- a/reactor/reactor-grpc-stub/pom.xml
+++ b/reactor/reactor-grpc-stub/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -79,16 +79,8 @@
                     <suppressionsLocation>../../checkstyle_ignore.xml</suppressionsLocation>
                 </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${compiler.plugin.version}</version>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
 
+            <!-- Jar and Bundle plugin used for OSGI support -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
@@ -102,7 +94,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>4.1.0</version>
+                <version>5.1.2</version>
                 <executions>
                     <execution>
                         <id>bundle-manifest</id>
diff --git a/reactor/reactor-grpc-tck/pom.xml b/reactor/reactor-grpc-tck/pom.xml
index 0c41268..e8367bd 100644
--- a/reactor/reactor-grpc-tck/pom.xml
+++ b/reactor/reactor-grpc-tck/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -79,16 +79,6 @@
                 </configuration>
             </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${compiler.plugin.version}</version>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-
             <plugin>
                 <groupId>org.xolstice.maven.plugins</groupId>
                 <artifactId>protobuf-maven-plugin</artifactId>
diff --git a/reactor/reactor-grpc/pom.xml b/reactor/reactor-grpc/pom.xml
index 0803eeb..aa16ab2 100644
--- a/reactor/reactor-grpc/pom.xml
+++ b/reactor/reactor-grpc/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/reactor/reactor-grpc/src/main/resources/ReactorStub.mustache b/reactor/reactor-grpc/src/main/resources/ReactorStub.mustache
index 5c972b2..5a54b02 100644
--- a/reactor/reactor-grpc/src/main/resources/ReactorStub.mustache
+++ b/reactor/reactor-grpc/src/main/resources/ReactorStub.mustache
@@ -51,7 +51,7 @@ public final class {{className}} {
         @java.lang.Deprecated
             {{/deprecated}}
         public {{#isManyOutput}}reactor.core.publisher.Flux{{/isManyOutput}}{{^isManyOutput}}reactor.core.publisher.Mono{{/isManyOutput}}<{{outputType}}> {{methodName}}({{#isManyInput}}reactor.core.publisher.Flux{{/isManyInput}}{{^isManyInput}}reactor.core.publisher.Mono{{/isManyInput}}<{{inputType}}> reactorRequest) {
-            return com.salesforce.reactorgrpc.stub.ClientCalls.{{reactiveCallsMethodName}}(reactorRequest, delegateStub::{{methodName}}, getCallOptions());
+            return com.salesforce.reactorgrpc.stub.ClientCalls.{{reactiveCallsMethodName}}(reactorRequest, delegateStub::{{methodNameCamelCase}}, getCallOptions());
         }
 
         {{/methods}}
@@ -63,7 +63,7 @@ public final class {{className}} {
         @java.lang.Deprecated
            {{/deprecated}}
         public {{#isManyOutput}}reactor.core.publisher.Flux{{/isManyOutput}}{{^isManyOutput}}reactor.core.publisher.Mono{{/isManyOutput}}<{{outputType}}> {{methodName}}({{inputType}} reactorRequest) {
-           return com.salesforce.reactorgrpc.stub.ClientCalls.{{reactiveCallsMethodName}}(reactor.core.publisher.Mono.just(reactorRequest), delegateStub::{{methodName}}, getCallOptions());
+           return com.salesforce.reactorgrpc.stub.ClientCalls.{{reactiveCallsMethodName}}(reactor.core.publisher.Mono.just(reactorRequest), delegateStub::{{methodNameCamelCase}}, getCallOptions());
         }
 
         {{/unaryRequestMethods}}
@@ -81,7 +81,7 @@ public final class {{className}} {
             {{#deprecated}}
         @java.lang.Deprecated
             {{/deprecated}}
-        public {{#isManyOutput}}reactor.core.publisher.Flux{{/isManyOutput}}{{^isManyOutput}}reactor.core.publisher.Mono{{/isManyOutput}}<{{outputType}}> {{methodName}}({{#isManyInput}}reactor.core.publisher.Flux{{/isManyInput}}{{^isManyInput}}reactor.core.publisher.Mono{{/isManyInput}}<{{inputType}}> request) {
+        public {{#isManyOutput}}reactor.core.publisher.Flux{{/isManyOutput}}{{^isManyOutput}}reactor.core.publisher.Mono{{/isManyOutput}}<{{outputType}}> {{methodNameCamelCase}}({{#isManyInput}}reactor.core.publisher.Flux{{/isManyInput}}{{^isManyInput}}reactor.core.publisher.Mono{{/isManyInput}}<{{inputType}}> request) {
             throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
         }
 
@@ -132,7 +132,7 @@ public final class {{className}} {
                 case METHODID_{{methodNameUpperUnderscore}}:
                     com.salesforce.reactorgrpc.stub.ServerCalls.{{reactiveCallsMethodName}}(({{inputType}}) request,
                             (io.grpc.stub.StreamObserver<{{outputType}}>) responseObserver,
-                            serviceImpl::{{methodName}});
+                            serviceImpl::{{methodNameCamelCase}});
                     break;
                 {{/isManyInput}}
                 {{/methods}}
@@ -150,7 +150,7 @@ public final class {{className}} {
                 case METHODID_{{methodNameUpperUnderscore}}:
                     return (io.grpc.stub.StreamObserver<Req>) com.salesforce.reactorgrpc.stub.ServerCalls.{{reactiveCallsMethodName}}(
                             (io.grpc.stub.StreamObserver<{{outputType}}>) responseObserver,
-                            serviceImpl::{{methodName}}, serviceImpl.getCallOptions(methodId));
+                            serviceImpl::{{methodNameCamelCase}}, serviceImpl.getCallOptions(methodId));
                 {{/isManyInput}}
                 {{/methods}}
                 default:
diff --git a/rx-java/rxgrpc-stub/pom.xml b/rx-java/rxgrpc-stub/pom.xml
index f718687..3f289e3 100644
--- a/rx-java/rxgrpc-stub/pom.xml
+++ b/rx-java/rxgrpc-stub/pom.xml
@@ -12,19 +12,13 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>rxgrpc-stub</artifactId>
 
-    <properties>
-        <java.version>1.7</java.version>
-        <maven.compiler.source>${java.version}</maven.compiler.source>
-        <maven.compiler.target>${java.version}</maven.compiler.target>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
@@ -86,28 +80,7 @@
                 </configuration>
             </plugin>
 
-            <!-- Fail the build if Java7+ sneak in, because Android -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>animal-sniffer-maven-plugin</artifactId>
-                <version>1.7</version>
-                <executions>
-                    <execution>
-                        <id>signature-check</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>check</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <signature>
-                        <groupId>org.codehaus.mojo.signature</groupId>
-                        <artifactId>java16</artifactId>
-                        <version>1.0</version>
-                    </signature>
-                </configuration>
-            </plugin>
+            <!-- Jar and Bundle plugin used for OSGI support -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
@@ -121,7 +94,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>4.1.0</version>
+                <version>5.1.2</version>
                 <executions>
                     <execution>
                         <id>bundle-manifest</id>
diff --git a/rx-java/rxgrpc-tck/pom.xml b/rx-java/rxgrpc-tck/pom.xml
index 18eca33..e3b9656 100644
--- a/rx-java/rxgrpc-tck/pom.xml
+++ b/rx-java/rxgrpc-tck/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/rx-java/rxgrpc/pom.xml b/rx-java/rxgrpc/pom.xml
index 9cd288b..511587f 100644
--- a/rx-java/rxgrpc/pom.xml
+++ b/rx-java/rxgrpc/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>


Test patch:
diff --git a/reactor/reactor-grpc-test-32/pom.xml b/reactor/reactor-grpc-test-32/pom.xml
index bef6911..079d9f8 100644
--- a/reactor/reactor-grpc-test-32/pom.xml
+++ b/reactor/reactor-grpc-test-32/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <artifactId>reactive-grpc</artifactId>
         <groupId>com.salesforce.servicelibs</groupId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -102,16 +102,6 @@
                 </configuration>
             </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${compiler.plugin.version}</version>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-
             <plugin>
                 <groupId>org.xolstice.maven.plugins</groupId>
                 <artifactId>protobuf-maven-plugin</artifactId>
diff --git a/reactor/reactor-grpc-test/pom.xml b/reactor/reactor-grpc-test/pom.xml
index 1a1b5b8..36f8f9d 100644
--- a/reactor/reactor-grpc-test/pom.xml
+++ b/reactor/reactor-grpc-test/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -123,16 +123,6 @@
                 </configuration>
             </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${compiler.plugin.version}</version>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-
             <plugin>
                 <groupId>org.xolstice.maven.plugins</groupId>
                 <artifactId>protobuf-maven-plugin</artifactId>
diff --git a/reactor/reactor-grpc-test/src/test/proto/com/example/v1/frontend.proto b/reactor/reactor-grpc-test/src/test/proto/com/example/v1/frontend.proto
new file mode 100644
index 0000000..efc6cf1
--- /dev/null
+++ b/reactor/reactor-grpc-test/src/test/proto/com/example/v1/frontend.proto
@@ -0,0 +1,13 @@
+syntax = "proto3";
+
+package com.example.v1;
+
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/empty.proto";
+
+service Frontend {
+    rpc Heartbeat(HeartbeatRequest) returns (google.protobuf.Empty);
+}
+message HeartbeatRequest {
+    google.protobuf.Timestamp timestamp = 1;
+}
\ No newline at end of file
diff --git a/reactor/reactor-grpc-test/src/test/proto/com/example/v1/settingsgetclassic.proto b/reactor/reactor-grpc-test/src/test/proto/com/example/v1/settingsgetclassic.proto
new file mode 100644
index 0000000..e5601d3
--- /dev/null
+++ b/reactor/reactor-grpc-test/src/test/proto/com/example/v1/settingsgetclassic.proto
@@ -0,0 +1,15 @@
+syntax = "proto3";
+
+package com.example.v1;
+
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/empty.proto";
+
+service Settings {
+    rpc SettingsGet_Classic_1 (google.protobuf.Empty) returns (Settings_Classic_1);
+    rpc SettingsGetClassic2 (google.protobuf.Empty) returns (Settings_Classic_1);
+}
+
+message Settings_Classic_1 {
+    google.protobuf.Timestamp timestamp = 1;
+}
\ No newline at end of file
diff --git a/reactor/reactor-grpc-test/src/test/proto/some_parameter.proto b/reactor/reactor-grpc-test/src/test/proto/some_parameter.proto
new file mode 100644
index 0000000..2a63948
--- /dev/null
+++ b/reactor/reactor-grpc-test/src/test/proto/some_parameter.proto
@@ -0,0 +1,14 @@
+syntax = "proto3";
+
+// Test file for https://github.com/salesforce/reactive-grpc/issues/26
+// If this proto compiles, then the test passes.
+
+package my.someparameters;
+
+message SomeParameter {
+    string id = 1;
+}
+
+service WithParameter {
+    rpc SayGoodbye (SomeParameter) returns (SomeParameter) {}
+}
\ No newline at end of file
diff --git a/rx-java/rxgrpc-test/pom.xml b/rx-java/rxgrpc-test/pom.xml
index f896330..7492740 100644
--- a/rx-java/rxgrpc-test/pom.xml
+++ b/rx-java/rxgrpc-test/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <groupId>com.salesforce.servicelibs</groupId>
         <artifactId>reactive-grpc</artifactId>
-        <version>1.0.2-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>