From dec33966a0a148a0d7a9e2ee0fbf95238ce700c9 Mon Sep 17 00:00:00 2001 From: Martin Kouba Date: Thu, 7 Apr 2022 14:48:32 +0200 Subject: [PATCH] Get rid of the split package in the gRPC extension artifacts - resolves #21919 --- bom/application/pom.xml | 7 +++- extensions/grpc/api/pom.xml | 38 +++++++++++++++++++ .../io/quarkus/grpc/GlobalInterceptor.java | 0 .../main/java/io/quarkus/grpc/GrpcClient.java | 0 .../java/io/quarkus/grpc/GrpcClientUtils.java | 1 - .../java/io/quarkus/grpc/GrpcService.java | 0 .../java/io/quarkus/grpc}/MutinyBean.java | 2 +- .../java/io/quarkus/grpc}/MutinyClient.java | 2 +- .../java/io/quarkus/grpc}/MutinyGrpc.java | 2 +- .../java/io/quarkus/grpc}/MutinyService.java | 2 +- .../java/io/quarkus/grpc}/MutinyStub.java | 2 +- .../grpc/RegisterClientInterceptor.java | 0 .../io/quarkus/grpc/RegisterInterceptor.java | 0 .../io/quarkus/grpc/RegisterInterceptors.java | 0 .../quarkus/grpc/deployment/GrpcDotNames.java | 10 ++--- extensions/grpc/pom.xml | 1 + .../src/main/resources/MutinyBean.mustache | 2 +- .../src/main/resources/MutinyClient.mustache | 2 +- .../main/resources/MutinyInterface.mustache | 2 +- .../src/main/resources/MutinyStub.mustache | 16 ++++---- extensions/grpc/runtime/pom.xml | 4 ++ .../devmode/DevModeStreamsCollector.java | 2 +- .../runtime/devmode/GrpcServerReloader.java | 4 +- .../devmode/StreamCollectorInterceptor.java | 4 +- .../runtime/ClientAndServerCallsTest.java | 2 + extensions/grpc/stubs/pom.xml | 4 ++ .../grpc/{runtime => stubs}/ClientCalls.java | 2 +- .../MultiStreamObserver.java | 2 +- .../grpc/{runtime => stubs}/ServerCalls.java | 2 +- .../{runtime => stubs}/StreamCollector.java | 2 +- .../{runtime => stubs}/UniStreamObserver.java | 2 +- 31 files changed, 86 insertions(+), 33 deletions(-) create mode 100644 extensions/grpc/api/pom.xml rename extensions/grpc/{runtime => api}/src/main/java/io/quarkus/grpc/GlobalInterceptor.java (100%) rename extensions/grpc/{stubs => api}/src/main/java/io/quarkus/grpc/GrpcClient.java (100%) rename extensions/grpc/{runtime => api}/src/main/java/io/quarkus/grpc/GrpcClientUtils.java (96%) rename extensions/grpc/{stubs => api}/src/main/java/io/quarkus/grpc/GrpcService.java (100%) rename extensions/grpc/{stubs/src/main/java/io/quarkus/grpc/runtime => api/src/main/java/io/quarkus/grpc}/MutinyBean.java (77%) rename extensions/grpc/{stubs/src/main/java/io/quarkus/grpc/runtime => api/src/main/java/io/quarkus/grpc}/MutinyClient.java (90%) rename extensions/grpc/{stubs/src/main/java/io/quarkus/grpc/runtime => api/src/main/java/io/quarkus/grpc}/MutinyGrpc.java (73%) rename extensions/grpc/{stubs/src/main/java/io/quarkus/grpc/runtime => api/src/main/java/io/quarkus/grpc}/MutinyService.java (78%) rename extensions/grpc/{stubs/src/main/java/io/quarkus/grpc/runtime => api/src/main/java/io/quarkus/grpc}/MutinyStub.java (76%) rename extensions/grpc/{runtime => api}/src/main/java/io/quarkus/grpc/RegisterClientInterceptor.java (100%) rename extensions/grpc/{runtime => api}/src/main/java/io/quarkus/grpc/RegisterInterceptor.java (100%) rename extensions/grpc/{runtime => api}/src/main/java/io/quarkus/grpc/RegisterInterceptors.java (100%) rename extensions/grpc/stubs/src/main/java/io/quarkus/grpc/{runtime => stubs}/ClientCalls.java (99%) rename extensions/grpc/stubs/src/main/java/io/quarkus/grpc/{runtime => stubs}/MultiStreamObserver.java (94%) rename extensions/grpc/stubs/src/main/java/io/quarkus/grpc/{runtime => stubs}/ServerCalls.java (99%) rename extensions/grpc/stubs/src/main/java/io/quarkus/grpc/{runtime => stubs}/StreamCollector.java (92%) rename extensions/grpc/stubs/src/main/java/io/quarkus/grpc/{runtime => stubs}/UniStreamObserver.java (94%) diff --git a/bom/application/pom.xml b/bom/application/pom.xml index 32b2746d36f92..62b24b23a4bca 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -1742,7 +1742,12 @@ - io.quarkus + io.quarkus + quarkus-grpc-api + ${project.version} + + + io.quarkus quarkus-grpc-common ${project.version} diff --git a/extensions/grpc/api/pom.xml b/extensions/grpc/api/pom.xml new file mode 100644 index 0000000000000..559976aee7e68 --- /dev/null +++ b/extensions/grpc/api/pom.xml @@ -0,0 +1,38 @@ + + + 4.0.0 + + quarkus-grpc-parent + io.quarkus + 999-SNAPSHOT + + + quarkus-grpc-api + Quarkus - gRPC - API + + + + io.grpc + grpc-stub + + + com.google.code.findbugs + jsr305 + + + org.checkerframework + checker-qual + + + org.codehaus.mojo + animal-sniffer-annotations + + + + + jakarta.enterprise + jakarta.enterprise.cdi-api + + + + \ No newline at end of file diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/GlobalInterceptor.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/GlobalInterceptor.java similarity index 100% rename from extensions/grpc/runtime/src/main/java/io/quarkus/grpc/GlobalInterceptor.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/GlobalInterceptor.java diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/GrpcClient.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/GrpcClient.java similarity index 100% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/GrpcClient.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/GrpcClient.java diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/GrpcClientUtils.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/GrpcClientUtils.java similarity index 96% rename from extensions/grpc/runtime/src/main/java/io/quarkus/grpc/GrpcClientUtils.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/GrpcClientUtils.java index 4d9ac2cea4207..eb34eac5ddeb4 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/GrpcClientUtils.java +++ b/extensions/grpc/api/src/main/java/io/quarkus/grpc/GrpcClientUtils.java @@ -3,7 +3,6 @@ import io.grpc.Metadata; import io.grpc.stub.AbstractStub; import io.grpc.stub.MetadataUtils; -import io.quarkus.grpc.runtime.MutinyClient; /** * gRPC client utilities diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/GrpcService.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/GrpcService.java similarity index 100% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/GrpcService.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/GrpcService.java diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyBean.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyBean.java similarity index 77% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyBean.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyBean.java index 29167baf8e86f..6447cf6153f22 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyBean.java +++ b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyBean.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc; /** * Used to mark a convenient Mutiny bean generated for a gRPC service. diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyClient.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyClient.java similarity index 90% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyClient.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyClient.java index b74e779e56150..bcbf69283f0bd 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyClient.java +++ b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyClient.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc; import io.grpc.stub.AbstractStub; diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyGrpc.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyGrpc.java similarity index 73% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyGrpc.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyGrpc.java index 890f67db8d07a..f1fc72f10b18e 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyGrpc.java +++ b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyGrpc.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc; /** * Used to mark a generated Mutiny gRPC service. diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyService.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyService.java similarity index 78% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyService.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyService.java index 6431828eeacc3..f2f664c45a931 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyService.java +++ b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyService.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc; /** * Used to mark a Mutiny service interface generated for a gRPC service. diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyStub.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyStub.java similarity index 76% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyStub.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyStub.java index 46f312d2e9a68..1bf59ebd9b601 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MutinyStub.java +++ b/extensions/grpc/api/src/main/java/io/quarkus/grpc/MutinyStub.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc; /** * A marker interface that represents a generated Mutiny gRPC stub. diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/RegisterClientInterceptor.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/RegisterClientInterceptor.java similarity index 100% rename from extensions/grpc/runtime/src/main/java/io/quarkus/grpc/RegisterClientInterceptor.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/RegisterClientInterceptor.java diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/RegisterInterceptor.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/RegisterInterceptor.java similarity index 100% rename from extensions/grpc/runtime/src/main/java/io/quarkus/grpc/RegisterInterceptor.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/RegisterInterceptor.java diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/RegisterInterceptors.java b/extensions/grpc/api/src/main/java/io/quarkus/grpc/RegisterInterceptors.java similarity index 100% rename from extensions/grpc/runtime/src/main/java/io/quarkus/grpc/RegisterInterceptors.java rename to extensions/grpc/api/src/main/java/io/quarkus/grpc/RegisterInterceptors.java diff --git a/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcDotNames.java b/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcDotNames.java index de9c7c462dc1c..b59cafd4d8ebe 100644 --- a/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcDotNames.java +++ b/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcDotNames.java @@ -16,14 +16,14 @@ import io.quarkus.grpc.GlobalInterceptor; import io.quarkus.grpc.GrpcClient; import io.quarkus.grpc.GrpcService; +import io.quarkus.grpc.MutinyBean; +import io.quarkus.grpc.MutinyClient; +import io.quarkus.grpc.MutinyGrpc; +import io.quarkus.grpc.MutinyService; +import io.quarkus.grpc.MutinyStub; import io.quarkus.grpc.RegisterClientInterceptor; import io.quarkus.grpc.RegisterInterceptor; import io.quarkus.grpc.RegisterInterceptors; -import io.quarkus.grpc.runtime.MutinyBean; -import io.quarkus.grpc.runtime.MutinyClient; -import io.quarkus.grpc.runtime.MutinyGrpc; -import io.quarkus.grpc.runtime.MutinyService; -import io.quarkus.grpc.runtime.MutinyStub; import io.quarkus.grpc.runtime.supports.Channels; import io.quarkus.grpc.runtime.supports.GrpcClientConfigProvider; import io.smallrye.common.annotation.Blocking; diff --git a/extensions/grpc/pom.xml b/extensions/grpc/pom.xml index 17349a62f9db1..27cb1447a3e96 100644 --- a/extensions/grpc/pom.xml +++ b/extensions/grpc/pom.xml @@ -16,6 +16,7 @@ protoc codegen + api stubs deployment runtime diff --git a/extensions/grpc/protoc/src/main/resources/MutinyBean.mustache b/extensions/grpc/protoc/src/main/resources/MutinyBean.mustache index a81a1d03b9c11..ac6e65301832e 100644 --- a/extensions/grpc/protoc/src/main/resources/MutinyBean.mustache +++ b/extensions/grpc/protoc/src/main/resources/MutinyBean.mustache @@ -4,7 +4,7 @@ package {{packageName}}; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; @javax.annotation.Generated( value = "by {{classPrefix}} Grpc generator", diff --git a/extensions/grpc/protoc/src/main/resources/MutinyClient.mustache b/extensions/grpc/protoc/src/main/resources/MutinyClient.mustache index 5e020147b321c..07064f661e80d 100644 --- a/extensions/grpc/protoc/src/main/resources/MutinyClient.mustache +++ b/extensions/grpc/protoc/src/main/resources/MutinyClient.mustache @@ -4,7 +4,7 @@ package {{packageName}}; import java.util.function.BiFunction; -import io.quarkus.grpc.runtime.MutinyClient; +import io.quarkus.grpc.MutinyClient; @javax.annotation.Generated( value = "by {{classPrefix}} Grpc generator", diff --git a/extensions/grpc/protoc/src/main/resources/MutinyInterface.mustache b/extensions/grpc/protoc/src/main/resources/MutinyInterface.mustache index d6dbfd5eade31..83fa0f922e720 100644 --- a/extensions/grpc/protoc/src/main/resources/MutinyInterface.mustache +++ b/extensions/grpc/protoc/src/main/resources/MutinyInterface.mustache @@ -2,7 +2,7 @@ package {{packageName}}; {{/packageName}} -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; @javax.annotation.Generated( value = "by {{classPrefix}} Grpc generator", diff --git a/extensions/grpc/protoc/src/main/resources/MutinyStub.mustache b/extensions/grpc/protoc/src/main/resources/MutinyStub.mustache index af1015401d75b..a7f27ee291e80 100644 --- a/extensions/grpc/protoc/src/main/resources/MutinyStub.mustache +++ b/extensions/grpc/protoc/src/main/resources/MutinyStub.mustache @@ -14,7 +14,7 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; @javax.annotation.Generated( value = "by {{classPrefix}} Grpc generator", comments = "Source: {{protoName}}") -public final class {{className}} implements io.quarkus.grpc.runtime.MutinyGrpc { +public final class {{className}} implements io.quarkus.grpc.MutinyGrpc { private {{className}}() {} public static {{classPrefix}}{{serviceName}}Stub new{{classPrefix}}Stub(io.grpc.Channel channel) { @@ -22,7 +22,7 @@ public final class {{className}} implements io.quarkus.grpc.runtime.MutinyGrpc { } {{#javaDoc}}{{{javaDoc}}}{{/javaDoc}} - public static final class {{classPrefix}}{{serviceName}}Stub extends io.grpc.stub.AbstractStub<{{classPrefix}}{{serviceName}}Stub> implements io.quarkus.grpc.runtime.MutinyStub { + public static final class {{classPrefix}}{{serviceName}}Stub extends io.grpc.stub.AbstractStub<{{classPrefix}}{{serviceName}}Stub> implements io.quarkus.grpc.MutinyStub { private {{serviceName}}Grpc.{{serviceName}}Stub delegateStub; private {{classPrefix}}{{serviceName}}Stub(io.grpc.Channel channel) { @@ -43,28 +43,28 @@ public final class {{className}} implements io.quarkus.grpc.runtime.MutinyGrpc { {{#unaryUnaryMethods}} {{{methodHeader}}} public io.smallrye.mutiny.Uni<{{outputType}}> {{methodName}}({{inputType}} request) { - return io.quarkus.grpc.runtime.ClientCalls.{{mutinyCallsMethodName}}(request, delegateStub::{{methodName}}); + return io.quarkus.grpc.stubs.ClientCalls.{{mutinyCallsMethodName}}(request, delegateStub::{{methodName}}); } {{/unaryUnaryMethods}} {{#unaryManyMethods}} {{{methodHeader}}} public io.smallrye.mutiny.Multi<{{outputType}}> {{methodName}}({{inputType}} request) { - return io.quarkus.grpc.runtime.ClientCalls.{{mutinyCallsMethodName}}(request, delegateStub::{{methodName}}); + return io.quarkus.grpc.stubs.ClientCalls.{{mutinyCallsMethodName}}(request, delegateStub::{{methodName}}); } {{/unaryManyMethods}} {{#manyUnaryMethods}} {{{methodHeader}}} public io.smallrye.mutiny.Uni<{{outputType}}> {{methodName}}(io.smallrye.mutiny.Multi<{{inputType}}> request) { - return io.quarkus.grpc.runtime.ClientCalls.{{mutinyCallsMethodName}}(request, delegateStub::{{methodName}}); + return io.quarkus.grpc.stubs.ClientCalls.{{mutinyCallsMethodName}}(request, delegateStub::{{methodName}}); } {{/manyUnaryMethods}} {{#manyManyMethods}} {{{methodHeader}}} public io.smallrye.mutiny.Multi<{{outputType}}> {{methodName}}(io.smallrye.mutiny.Multi<{{inputType}}> request) { - return io.quarkus.grpc.runtime.ClientCalls.{{mutinyCallsMethodName}}(request, delegateStub::{{methodName}}); + return io.quarkus.grpc.stubs.ClientCalls.{{mutinyCallsMethodName}}(request, delegateStub::{{methodName}}); } {{/manyManyMethods}} } @@ -153,7 +153,7 @@ public final class {{className}} implements io.quarkus.grpc.runtime.MutinyGrpc { {{#methods}} {{^isManyInput}} case METHODID_{{methodNameUpperUnderscore}}: - io.quarkus.grpc.runtime.ServerCalls.{{mutinyCallsMethodName}}(({{inputType}}) request, + io.quarkus.grpc.stubs.ServerCalls.{{mutinyCallsMethodName}}(({{inputType}}) request, (io.grpc.stub.StreamObserver<{{outputType}}>) responseObserver, compression, serviceImpl::{{methodName}}); @@ -172,7 +172,7 @@ public final class {{className}} implements io.quarkus.grpc.runtime.MutinyGrpc { {{#methods}} {{#isManyInput}} case METHODID_{{methodNameUpperUnderscore}}: - return (io.grpc.stub.StreamObserver) io.quarkus.grpc.runtime.ServerCalls.{{mutinyCallsMethodName}}( + return (io.grpc.stub.StreamObserver) io.quarkus.grpc.stubs.ServerCalls.{{mutinyCallsMethodName}}( (io.grpc.stub.StreamObserver<{{outputType}}>) responseObserver, serviceImpl::{{methodName}}); {{/isManyInput}} diff --git a/extensions/grpc/runtime/pom.xml b/extensions/grpc/runtime/pom.xml index 0c4baa4be920a..6cbe6b9ac312e 100644 --- a/extensions/grpc/runtime/pom.xml +++ b/extensions/grpc/runtime/pom.xml @@ -17,6 +17,10 @@ jakarta.annotation jakarta.annotation-api + + io.quarkus + quarkus-grpc-api + io.quarkus quarkus-grpc-common diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/DevModeStreamsCollector.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/DevModeStreamsCollector.java index a8193e9633bf7..eac2a8ed58ddf 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/DevModeStreamsCollector.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/DevModeStreamsCollector.java @@ -6,7 +6,7 @@ import java.util.Set; import io.grpc.stub.StreamObserver; -import io.quarkus.grpc.runtime.StreamCollector; +import io.quarkus.grpc.stubs.StreamCollector; public class DevModeStreamsCollector implements StreamCollector { private final Set> streamObservers = new HashSet<>(); diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/GrpcServerReloader.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/GrpcServerReloader.java index 6c56b683b0f64..0817e6f7df5ef 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/GrpcServerReloader.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/GrpcServerReloader.java @@ -9,8 +9,8 @@ import io.grpc.ServerServiceDefinition; import io.grpc.internal.ServerImpl; import io.quarkus.dev.testing.GrpcWebSocketProxy; -import io.quarkus.grpc.runtime.ServerCalls; -import io.quarkus.grpc.runtime.StreamCollector; +import io.quarkus.grpc.stubs.ServerCalls; +import io.quarkus.grpc.stubs.StreamCollector; import io.quarkus.runtime.LaunchMode; import io.quarkus.runtime.configuration.ProfileManager; import io.vertx.grpc.VertxServer; diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/StreamCollectorInterceptor.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/StreamCollectorInterceptor.java index 95281821719c1..3d962de2780e3 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/StreamCollectorInterceptor.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/devmode/StreamCollectorInterceptor.java @@ -6,8 +6,8 @@ import javax.interceptor.InvocationContext; import io.grpc.stub.StreamObserver; -import io.quarkus.grpc.runtime.ServerCalls; -import io.quarkus.grpc.runtime.StreamCollector; +import io.quarkus.grpc.stubs.ServerCalls; +import io.quarkus.grpc.stubs.StreamCollector; @CollectStreams @Priority(1) diff --git a/extensions/grpc/runtime/src/test/java/io/quarkus/grpc/runtime/ClientAndServerCallsTest.java b/extensions/grpc/runtime/src/test/java/io/quarkus/grpc/runtime/ClientAndServerCallsTest.java index fa9a0bc11a70f..fc273065cfc9e 100644 --- a/extensions/grpc/runtime/src/test/java/io/quarkus/grpc/runtime/ClientAndServerCallsTest.java +++ b/extensions/grpc/runtime/src/test/java/io/quarkus/grpc/runtime/ClientAndServerCallsTest.java @@ -12,6 +12,8 @@ import io.grpc.Status; import io.grpc.StatusException; +import io.quarkus.grpc.stubs.ClientCalls; +import io.quarkus.grpc.stubs.ServerCalls; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; diff --git a/extensions/grpc/stubs/pom.xml b/extensions/grpc/stubs/pom.xml index c5dc127a2a8b9..8e1ec7c3ed1bd 100644 --- a/extensions/grpc/stubs/pom.xml +++ b/extensions/grpc/stubs/pom.xml @@ -13,6 +13,10 @@ Quarkus - gRPC - Stubs for health and reflection + + io.quarkus + quarkus-grpc-api + io.quarkus quarkus-grpc-codegen diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/ClientCalls.java b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/ClientCalls.java similarity index 99% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/ClientCalls.java rename to extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/ClientCalls.java index 0ea0abbc8e339..9bcbc1f59809b 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/ClientCalls.java +++ b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/ClientCalls.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc.stubs; import java.util.function.BiConsumer; import java.util.function.Consumer; diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MultiStreamObserver.java b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/MultiStreamObserver.java similarity index 94% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MultiStreamObserver.java rename to extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/MultiStreamObserver.java index 175d0b9e1a189..a51998f0f5de9 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/MultiStreamObserver.java +++ b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/MultiStreamObserver.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc.stubs; import io.grpc.stub.StreamObserver; import io.smallrye.mutiny.subscription.MultiEmitter; diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/ServerCalls.java b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/ServerCalls.java similarity index 99% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/ServerCalls.java rename to extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/ServerCalls.java index 18319d4d2c062..a731f5c1d9530 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/ServerCalls.java +++ b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/ServerCalls.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc.stubs; import java.util.function.Consumer; import java.util.function.Function; diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/StreamCollector.java b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/StreamCollector.java similarity index 92% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/StreamCollector.java rename to extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/StreamCollector.java index f606625883d92..ea04ea0c93f68 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/StreamCollector.java +++ b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/StreamCollector.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc.stubs; import io.grpc.stub.StreamObserver; diff --git a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/UniStreamObserver.java b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/UniStreamObserver.java similarity index 94% rename from extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/UniStreamObserver.java rename to extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/UniStreamObserver.java index 2047ec6fc775f..381bf690924a0 100644 --- a/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/runtime/UniStreamObserver.java +++ b/extensions/grpc/stubs/src/main/java/io/quarkus/grpc/stubs/UniStreamObserver.java @@ -1,4 +1,4 @@ -package io.quarkus.grpc.runtime; +package io.quarkus.grpc.stubs; import io.grpc.stub.StreamObserver; import io.smallrye.mutiny.subscription.UniEmitter;