Abacn commented on code in PR #29954: URL: https://github.com/apache/beam/pull/29954#discussion_r1451041908
########## buildSrc/src/main/groovy/org/apache/beam/gradle/GrpcVendoring_1_60_1.groovy: ########## @@ -0,0 +1,223 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +package org.apache.beam.gradle + +/** + * Utilities for working with our vendored version of gRPC. + * + * To update: + * 1. Determine the set of io.grpc libraries we want to include, most likely a superset of + * of the previous vendored gRPC version. + * 2. Use mvn dependency:tree and https://search.maven.org/search?q=g:io.grpc + * to determine dependency tree. You may need to search for optional dependencies + * and determine if they are needed (e.g. conscrypt). + * 3. Validate built artifacts by running linkage tool + * (https://github.com/apache/beam/tree/master/vendor#how-to-validate-the-vendored-dependencies) + * and unit and integration tests in a PR (e.g. https://github.com/apache/beam/pull/16460, + * https://github.com/apache/beam/pull/16459) + */ +class GrpcVendoring_1_60_1 { + static def grpc_version = "1.60.1" + + // See https://github.com/grpc/grpc-java/blob/v1.60.1/gradle/libs.versions.toml + // or https://search.maven.org/search?q=io.grpc%201.60.1 + static def guava_version = "32.0.1-jre" + static def protobuf_version = "3.24.0" + static def gson_version = "2.10.1" + static def google_auth_version = "1.4.0" + static def opencensus_version = "0.31.1" + static def conscrypt_version = "2.5.2" + static def proto_google_common_protos_version = "2.22.0" + Review Comment: Comparing to 1.54.0, removed direct dependency of io.netty, as it is now included in grpc-netty-shaded. ########## buildSrc/src/main/groovy/org/apache/beam/gradle/GrpcVendoring_1_60_1.groovy: ########## @@ -0,0 +1,223 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +package org.apache.beam.gradle + +/** + * Utilities for working with our vendored version of gRPC. + * + * To update: + * 1. Determine the set of io.grpc libraries we want to include, most likely a superset of + * of the previous vendored gRPC version. + * 2. Use mvn dependency:tree and https://search.maven.org/search?q=g:io.grpc + * to determine dependency tree. You may need to search for optional dependencies + * and determine if they are needed (e.g. conscrypt). + * 3. Validate built artifacts by running linkage tool + * (https://github.com/apache/beam/tree/master/vendor#how-to-validate-the-vendored-dependencies) + * and unit and integration tests in a PR (e.g. https://github.com/apache/beam/pull/16460, + * https://github.com/apache/beam/pull/16459) + */ +class GrpcVendoring_1_60_1 { + static def grpc_version = "1.60.1" + + // See https://github.com/grpc/grpc-java/blob/v1.60.1/gradle/libs.versions.toml + // or https://search.maven.org/search?q=io.grpc%201.60.1 + static def guava_version = "32.0.1-jre" + static def protobuf_version = "3.24.0" + static def gson_version = "2.10.1" + static def google_auth_version = "1.4.0" + static def opencensus_version = "0.31.1" + static def conscrypt_version = "2.5.2" + static def proto_google_common_protos_version = "2.22.0" + + /** Returns the list of implementation time dependencies. */ + static List<String> dependencies() { + return [ + "com.google.guava:guava:$guava_version", + "com.google.protobuf:protobuf-java:$protobuf_version", + "com.google.protobuf:protobuf-java-util:$protobuf_version", + "com.google.code.gson:gson:$gson_version", + "io.grpc:grpc-auth:$grpc_version", + "io.grpc:grpc-core:$grpc_version", + "io.grpc:grpc-context:$grpc_version", + "io.grpc:grpc-netty-shaded:$grpc_version", + "io.grpc:grpc-protobuf:$grpc_version", + "io.grpc:grpc-stub:$grpc_version", + "io.grpc:grpc-alts:$grpc_version", + "io.grpc:grpc-testing:$grpc_version", + "com.google.auth:google-auth-library-credentials:$google_auth_version", + "com.google.api.grpc:proto-google-common-protos:$proto_google_common_protos_version", + "io.opencensus:opencensus-api:$opencensus_version", + "io.opencensus:opencensus-contrib-grpc-metrics:$opencensus_version", + ] Review Comment: Per https://github.com/apache/beam/blob/308c38e243ce55d08ef44b9abba1671b58e1a17b/buildSrc/src/main/groovy/org/apache/beam/gradle/GrpcVendoring_1_54_0.groovy#L64 confirm native libraries of all platforms are now present. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
