alexeyinkin commented on code in PR #24731:
URL: https://github.com/apache/beam/pull/24731#discussion_r1053349188


##########
playground/frontend/build.gradle:
##########
@@ -17,18 +17,11 @@
  */
 
 
-apply plugin: 'org.apache.beam.module'
-apply plugin: 'base'
+apply(plugin: "org.apache.beam.module")
+apply(plugin: "base")

Review Comment:
   Preparing the future migration to the KTS format.



##########
playground/frontend/build.gradle:
##########
@@ -188,75 +182,54 @@ ext.deleteFilesByRegExp = { re ->
   }
 }
 
+tasks.register("integrationTest") {
+  dependsOn("integrationTest_standalone_change_example")
+}
+
+tasks.register("integrationTest_standalone_change_example") {
+  runIntegrationTest("standalone_change_example", "/")
+}
+
+void runIntegrationTest(String path, String url) {
+  exec {
+    executable("flutter")
+    args(
+      "drive",
+      "--driver=test_driver/integration_test.dart",
+      "--target=integration_test/${path}_test.dart",
+      "--web-launch-url='$url'",
+      "--device-id=chrome",
+    )
+  }
+}
+
 task copyDockerfileDependencies(type: Copy) {
    group = "build"
    description = "Copy files that required to build docker container"
    copy {
-      from '.'
-      into 'build/'
-      exclude 'build'
-      exclude 'Dockerfile'
+      from(".")
+      into("build/")
+      exclude("build")
+      exclude("Dockerfile")
    }
    copy {
-      from '../playground'
-      into 'build/playground'
+      from("../playground")
+      into("build/playground")
    }
 }
 
 docker {
   group = "build"
   description = "Build container for playground frontend application"
-  name containerImageName(
-          name: project.docker_image_default_repo_prefix + 
"playground-frontend",
-          root: project.rootProject.hasProperty(["docker-repository-root"]) ?
-                  project.rootProject["docker-repository-root"] :
-                  project.docker_image_default_repo_root)
-  files "./build/"
-  tags containerImageTags()
-  buildArgs(['FLUTTER_VERSION': 
project.rootProject.hasProperty(["flutter-version"]) ?
-                                project.rootProject["flutter-version"] :
-                                "3.3.2" ])

Review Comment:
   - No longer allowing to override Flutter version during build. This was 
unreliable because there are other sources of truth for this as described in 
#23243



##########
playground/frontend/build.gradle:
##########
@@ -188,75 +182,54 @@ ext.deleteFilesByRegExp = { re ->
   }
 }
 
+tasks.register("integrationTest") {
+  dependsOn("integrationTest_standalone_change_example")
+}
+
+tasks.register("integrationTest_standalone_change_example") {
+  runIntegrationTest("standalone_change_example", "/")
+}
+
+void runIntegrationTest(String path, String url) {
+  exec {
+    executable("flutter")
+    args(
+      "drive",
+      "--driver=test_driver/integration_test.dart",
+      "--target=integration_test/${path}_test.dart",
+      "--web-launch-url='$url'",
+      "--device-id=chrome",
+    )
+  }
+}
+
 task copyDockerfileDependencies(type: Copy) {
    group = "build"
    description = "Copy files that required to build docker container"
    copy {
-      from '.'
-      into 'build/'
-      exclude 'build'
-      exclude 'Dockerfile'
+      from(".")
+      into("build/")
+      exclude("build")
+      exclude("Dockerfile")
    }
    copy {
-      from '../playground'
-      into 'build/playground'
+      from("../playground")
+      into("build/playground")
    }
 }
 
 docker {
   group = "build"
   description = "Build container for playground frontend application"
-  name containerImageName(
-          name: project.docker_image_default_repo_prefix + 
"playground-frontend",
-          root: project.rootProject.hasProperty(["docker-repository-root"]) ?
-                  project.rootProject["docker-repository-root"] :
-                  project.docker_image_default_repo_root)
-  files "./build/"
-  tags containerImageTags()
-  buildArgs(['FLUTTER_VERSION': 
project.rootProject.hasProperty(["flutter-version"]) ?
-                                project.rootProject["flutter-version"] :
-                                "3.3.2" ])
+  name = containerImageName(
+    name: project.docker_image_default_repo_prefix + "playground-frontend",
+    root: project.rootProject.hasProperty(["docker-repository-root"])
+            ? project.rootProject["docker-repository-root"]
+            : project.docker_image_default_repo_root
+  )
+  files("./build/")
+  tags(containerImageTags())
 }
 
 // Ensure that we build the required resources and copy and file dependencies 
from related projects
-dockerPrepare.dependsOn copyDockerfileDependencies
-
-task("createConfig") {

Review Comment:
   This is no longer used for `config.g.dart` generation.



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

Reply via email to