diff --git a/Package.swift b/Package.swift index 27316039d..201ba8e56 100644 --- a/Package.swift +++ b/Package.swift @@ -134,6 +134,9 @@ extension Target.Dependency { static let grpcCore: Self = .target(name: "GRPCCore") static let grpcInProcessTransport: Self = .target(name: "GRPCInProcessTransport") + static let grpcHTTP2Core: Self = .target(name: "GRPCHTTP2Core") + static let grpcHTTP2TransportNIOPosix: Self = .target(name: "GRPCHTTP2TransportNIOPosix") + static let grpcHTTP2TransportNIOTransportServices: Self = .target(name: "GRPCHTTP2TransportNIOTransportServices") } // MARK: - Targets @@ -177,6 +180,29 @@ extension Target { .grpcCore ] ) + + static let grpcHTTP2Core: Target = .target( + name: "GRPCHTTP2Core", + dependencies: [ + .grpcCore, + .nioCore, + .nioHTTP2 + ] + ) + + static let grpcHTTP2TransportNIOPosix: Target = .target( + name: "GRPCHTTP2TransportNIOPosix", + dependencies: [ + .grpcHTTP2Core + ] + ) + + static let grpcHTTP2TransportNIOTransportServices: Target = .target( + name: "GRPCHTTP2TransportNIOTransportServices", + dependencies: [ + .grpcHTTP2Core + ] + ) static let cgrpcZlib: Target = .target( name: cgrpcZlibTargetName, @@ -251,6 +277,27 @@ extension Target { .grpcInProcessTransport, ] ) + + static let grpcHTTP2CoreTests: Target = .testTarget( + name: "GRPCHTTP2CoreTests", + dependencies: [ + .grpcHTTP2Core + ] + ) + + static let grpcHTTP2TransportNIOPosixTests: Target = .testTarget( + name: "GRPCHTTP2TransportNIOPosixTests", + dependencies: [ + .grpcHTTP2TransportNIOPosix + ] + ) + + static let grpcHTTP2TransportNIOTransportServicesTests: Target = .testTarget( + name: "GRPCHTTP2TransportNIOTransportServicesTests", + dependencies: [ + .grpcHTTP2TransportNIOTransportServices + ] + ) static let grpcCodeGenTests: Target = .testTarget( name: "GRPCCodeGenTests", @@ -591,11 +638,17 @@ let package = Package( .grpcCore, .grpcInProcessTransport, .grpcCodeGen, + .grpcHTTP2Core, + .grpcHTTP2TransportNIOPosix, + .grpcHTTP2TransportNIOTransportServices, // v2 tests .grpcCoreTests, .grpcInProcessTransportTests, - .grpcCodeGenTests + .grpcCodeGenTests, + .grpcHTTP2CoreTests, + .grpcHTTP2TransportNIOPosixTests, + .grpcHTTP2TransportNIOTransportServicesTests ] ) diff --git a/Sources/GRPCHTTP2Core/README.md b/Sources/GRPCHTTP2Core/README.md new file mode 100644 index 000000000..a0f051cc7 --- /dev/null +++ b/Sources/GRPCHTTP2Core/README.md @@ -0,0 +1 @@ +# gRPC HTTP2 Core diff --git a/Sources/GRPCHTTP2TransportNIOPosix/README.md b/Sources/GRPCHTTP2TransportNIOPosix/README.md new file mode 100644 index 000000000..635ca3410 --- /dev/null +++ b/Sources/GRPCHTTP2TransportNIOPosix/README.md @@ -0,0 +1 @@ +# gRPC HTTP2 Transport NIO POSIX diff --git a/Sources/GRPCHTTP2TransportNIOTransportServices/README.md b/Sources/GRPCHTTP2TransportNIOTransportServices/README.md new file mode 100644 index 000000000..46303d13a --- /dev/null +++ b/Sources/GRPCHTTP2TransportNIOTransportServices/README.md @@ -0,0 +1 @@ +# gRPC HTTP2 Transport NIO Transport Services diff --git a/Tests/GRPCHTTP2CoreTests/GRPCHTTP2CoreTests.swift b/Tests/GRPCHTTP2CoreTests/GRPCHTTP2CoreTests.swift new file mode 100644 index 000000000..3630df68b --- /dev/null +++ b/Tests/GRPCHTTP2CoreTests/GRPCHTTP2CoreTests.swift @@ -0,0 +1,17 @@ +/* + * Copyright 2024, gRPC Authors All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Add tests to this package. diff --git a/Tests/GRPCHTTP2TransportNIOPosixTests/GRPCHTTP2TransportNIOPosixTests.swift b/Tests/GRPCHTTP2TransportNIOPosixTests/GRPCHTTP2TransportNIOPosixTests.swift new file mode 100644 index 000000000..3630df68b --- /dev/null +++ b/Tests/GRPCHTTP2TransportNIOPosixTests/GRPCHTTP2TransportNIOPosixTests.swift @@ -0,0 +1,17 @@ +/* + * Copyright 2024, gRPC Authors All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Add tests to this package. diff --git a/Tests/GRPCHTTP2TransportNIOTransportServicesTests/GRPCHTTP2TransportNIOTransportServicesTests.swift b/Tests/GRPCHTTP2TransportNIOTransportServicesTests/GRPCHTTP2TransportNIOTransportServicesTests.swift new file mode 100644 index 000000000..3630df68b --- /dev/null +++ b/Tests/GRPCHTTP2TransportNIOTransportServicesTests/GRPCHTTP2TransportNIOTransportServicesTests.swift @@ -0,0 +1,17 @@ +/* + * Copyright 2024, gRPC Authors All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Add tests to this package.