diff --git a/grpc/core/src/main/java/module-info.java b/grpc/core/src/main/java/module-info.java index c40228680ff..338dcacf701 100644 --- a/grpc/core/src/main/java/module-info.java +++ b/grpc/core/src/main/java/module-info.java @@ -19,12 +19,12 @@ */ module io.helidon.grpc.core { - requires java.logging; - requires io.helidon.common; requires io.helidon.http; requires io.helidon.common.context; + requires java.logging; + requires transitive io.grpc; requires transitive io.grpc.stub; requires transitive com.google.protobuf; diff --git a/microprofile/grpc/core/src/main/java/module-info.java b/microprofile/grpc/core/src/main/java/module-info.java index 62e103a1b4e..dc20351b315 100644 --- a/microprofile/grpc/core/src/main/java/module-info.java +++ b/microprofile/grpc/core/src/main/java/module-info.java @@ -18,17 +18,18 @@ * gRPC microprofile core module */ module io.helidon.microprofile.grpc.core { - exports io.helidon.microprofile.grpc.core; requires io.helidon.common; - requires transitive io.helidon.grpc.core; - requires transitive io.helidon.microprofile.config; + requires io.helidon.microprofile.config; + requires transitive io.helidon.grpc.core; requires transitive jakarta.cdi; requires java.logging; requires jakarta.inject; + exports io.helidon.microprofile.grpc.core; + uses io.helidon.microprofile.grpc.core.MethodHandlerSupplier; uses io.helidon.grpc.core.MarshallerSupplier; diff --git a/microprofile/grpc/server/src/main/java/module-info.java b/microprofile/grpc/server/src/main/java/module-info.java index 27af88d469d..ebde583438c 100644 --- a/microprofile/grpc/server/src/main/java/module-info.java +++ b/microprofile/grpc/server/src/main/java/module-info.java @@ -29,12 +29,6 @@ ) @Aot(false) module io.helidon.microprofile.grpc.server { - exports io.helidon.microprofile.grpc.server; - exports io.helidon.microprofile.grpc.server.spi; - - requires transitive io.helidon.grpc.core; - requires transitive io.helidon.webserver.grpc; - requires transitive io.helidon.microprofile.grpc.core; requires io.helidon.common; requires io.helidon.common.configurable; @@ -44,7 +38,9 @@ requires io.helidon.config.objectmapping; requires io.helidon.config; requires io.helidon.config.metadata; + requires io.helidon.microprofile.grpc.core; requires io.helidon.microprofile.server; + requires io.helidon.webserver.grpc; requires io.grpc; requires io.grpc.inprocess; @@ -55,6 +51,9 @@ requires microprofile.health.api; + exports io.helidon.microprofile.grpc.server; + exports io.helidon.microprofile.grpc.server.spi; + uses io.helidon.microprofile.grpc.server.spi.GrpcMpExtension; provides jakarta.enterprise.inject.spi.Extension with GrpcMpCdiExtension; diff --git a/webserver/grpc/src/main/java/module-info.java b/webserver/grpc/src/main/java/module-info.java index 043114886d4..1ed9cd47c06 100644 --- a/webserver/grpc/src/main/java/module-info.java +++ b/webserver/grpc/src/main/java/module-info.java @@ -27,21 +27,17 @@ in = HelidonFlavor.SE, path = {"WebServer", "GRPC"} ) -@SuppressWarnings({ "requires-automatic", "requires-transitive-automatic" }) +@SuppressWarnings({ "requires-automatic"}) module io.helidon.webserver.grpc { - requires io.grpc.protobuf.lite; requires io.helidon.builder.api; requires io.helidon.webserver.http2; requires io.helidon.tracing; - requires io.helidon.grpc.core; + requires io.helidon.common.config; - requires static io.helidon.common.features.api; + requires transitive io.helidon.grpc.core; - requires transitive com.google.protobuf; - requires transitive io.grpc; - requires transitive io.grpc.stub; - requires transitive io.helidon.common.config; + requires static io.helidon.common.features.api; exports io.helidon.webserver.grpc; diff --git a/webserver/tests/grpc/src/main/java/io/helidon/webserver/tests/grpc/BindableStringService.java b/webserver/tests/grpc/src/main/java/io/helidon/webserver/tests/grpc/BindableStringService.java index f7710b036eb..cfaed9bee1c 100644 --- a/webserver/tests/grpc/src/main/java/io/helidon/webserver/tests/grpc/BindableStringService.java +++ b/webserver/tests/grpc/src/main/java/io/helidon/webserver/tests/grpc/BindableStringService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Oracle and/or its affiliates. + * Copyright (c) 2023, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,17 +20,15 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import io.grpc.stub.StreamObserver; +import io.helidon.grpc.core.CollectingObserver; import io.helidon.webserver.grpc.strings.StringServiceGrpc; import io.helidon.webserver.grpc.strings.Strings; -import io.helidon.webserver.grpc.CollectingObserver; - -import io.grpc.stub.StreamObserver; import static io.helidon.webserver.grpc.ResponseHelper.complete; import static io.helidon.webserver.grpc.ResponseHelper.stream; -public class BindableStringService - extends StringServiceGrpc.StringServiceImplBase { +public class BindableStringService extends StringServiceGrpc.StringServiceImplBase { @Override public void upper(Strings.StringMessage request, StreamObserver observer) { diff --git a/webserver/tests/grpc/src/main/java/io/helidon/webserver/tests/grpc/StringService.java b/webserver/tests/grpc/src/main/java/io/helidon/webserver/tests/grpc/StringService.java index 1593d295df4..305327061dc 100644 --- a/webserver/tests/grpc/src/main/java/io/helidon/webserver/tests/grpc/StringService.java +++ b/webserver/tests/grpc/src/main/java/io/helidon/webserver/tests/grpc/StringService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Oracle and/or its affiliates. + * Copyright (c) 2022, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,13 +20,12 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import io.helidon.webserver.grpc.strings.Strings; -import io.helidon.webserver.grpc.strings.Strings.StringMessage; -import io.helidon.webserver.grpc.CollectingObserver; -import io.helidon.webserver.grpc.GrpcService; - import com.google.protobuf.Descriptors; import io.grpc.stub.StreamObserver; +import io.helidon.grpc.core.CollectingObserver; +import io.helidon.webserver.grpc.GrpcService; +import io.helidon.webserver.grpc.strings.Strings; +import io.helidon.webserver.grpc.strings.Strings.StringMessage; import static io.helidon.webserver.grpc.ResponseHelper.complete; import static io.helidon.webserver.grpc.ResponseHelper.stream;