piotr-szuberski commented on a change in pull request #12145:
URL: https://github.com/apache/beam/pull/12145#discussion_r453059995



##########
File path: 
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
##########
@@ -1982,17 +1982,25 @@ class BeamModulePlugin implements Plugin<Project> {
         return argList.join(' ')
       }
 
-      project.ext.toxTask = { name, tox_env ->
+      project.ext.toxTask = { name, tox_env, needsExpansionServiceJar = false 
->
+        project.evaluationDependsOn(":sdks:java:io:expansion-service")
         project.tasks.create(name) {
           dependsOn 'setupVirtualenv'
           dependsOn ':sdks:python:sdist'
+          if (needsExpansionServiceJar) {
+            dependsOn ':sdks:java:io:expansion-service:shadowJar'
+          }
 
           doLast {
             // Python source directory is also tox execution workspace, We want
             // to isolate them per tox suite to avoid conflict when running
             // multiple tox suites in parallel.
             project.copy { from project.pythonSdkDeps; into copiedSrcRoot }
-
+            if (needsExpansionServiceJar) {
+              def expansionServiceJar =  
project.project(':sdks:java:io:expansion-service').shadowJar.archivePath
+              def expansionServiceDestinationDir = 
"${copiedSrcRoot}/sdks/java/io/expansion-service/build/libs"

Review comment:
       Yeah, these are python tox suites that include pythonLint, 
pythonFormatter, pythonDocs that do not require expansion service to be built 
for their executions. Only test suites require them.




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