suztomo commented on a change in pull request #14028:
URL: https://github.com/apache/beam/pull/14028#discussion_r586850471



##########
File path: build.gradle.kts
##########
@@ -321,6 +321,31 @@ task("pushAllDockerImages") {
   }
 }
 
+task("installVendoredGrpc") {
+  dependsOn(":vendor:grpc-1_36_0:shadowJar")
+
+  doLast {
+    project.exec {
+      commandLine = listOf(
+        "/home/jenkins/tools/maven/apache-maven-3.5.4/bin/mvn", "--batch-mode",
+        "install:install-file", "-Dpackaging=jar",
+        "-DgroupId=org.apache.beam", "-DartifactId=beam-vendor-grpc-1_36_0",
+        "-Dversion=0.1", 
"-Dfile=vendor/grpc-1_36_0/build/libs/beam-vendor-grpc-1_36_0-0.1.jar"
+      )
+    }
+  }
+}
+
+// Because :model:job-management:runtimeClasspath requires the vendored gRPC 
at configuration phase
+// (before execution phase), we cannot rely on task dependencies.
+if (!project.hasProperty("installVendoredGrpcFlag")) {
+  project.exec {
+    commandLine = listOf(
+            "./gradlew", ":installVendoredGrpc", "-PinstallVendoredGrpcFlag", 
"--info", "--stacktrace"
+    )
+  }
+}

Review comment:
       It worked! (I'll remove this piece of code before merging this to master)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to