[ 
https://issues.apache.org/jira/browse/BEAM-4584?focusedWorklogId=114553&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-114553
 ]

ASF GitHub Bot logged work on BEAM-4584:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Jun/18 23:00
            Start Date: 21/Jun/18 23:00
    Worklog Time Spent: 10m 
      Work Description: kennknowles closed pull request #5730: [BEAM-4584] 
Remove build_rules.gradle
URL: https://github.com/apache/beam/pull/5730
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/build.gradle b/build.gradle
index 5fc2ee5b731..b24879b1e64 100644
--- a/build.gradle
+++ b/build.gradle
@@ -21,7 +21,7 @@
 // that can be applied to configure a project for certain common
 // tasks.
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 
 // Add performanceTest task to this build.gradle file
 // so that running Performance tests using PerfKitBenchmarker is possible.
diff --git a/build_rules.gradle b/build_rules.gradle
deleted file mode 100644
index e24364d4c1d..00000000000
--- a/build_rules.gradle
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-
-// DEPRECATED: this "script plugin" just applies the "binary plugin" 
BeamModulePlugin (in buildSrc)
-//
-// Please directly apply BeamModulePlugin instead.
-
-println "Applying build_rules.gradle to $project.name"
-
-apply plugin: org.apache.beam.gradle.BeamModulePlugin
diff --git a/examples/java/build.gradle b/examples/java/build.gradle
index c3d6ec0f723..b882b7ef557 100644
--- a/examples/java/build.gradle
+++ b/examples/java/build.gradle
@@ -18,7 +18,7 @@
 
 import groovy.json.JsonOutput
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Examples :: Java"
diff --git a/model/fn-execution/build.gradle b/model/fn-execution/build.gradle
index 15770dc5ffb..ca6c806e438 100644
--- a/model/fn-execution/build.gradle
+++ b/model/fn-execution/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(enableFindbugs: false, enableErrorProne: false)
 applyGrpcNature()
 
diff --git a/model/job-management/build.gradle 
b/model/job-management/build.gradle
index 2b475376a37..66ce25b9cda 100644
--- a/model/job-management/build.gradle
+++ b/model/job-management/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(enableFindbugs: false, enableErrorProne: false)
 applyGrpcNature()
 
diff --git a/model/pipeline/build.gradle b/model/pipeline/build.gradle
index c3ea10490e3..9e1c13aeffd 100644
--- a/model/pipeline/build.gradle
+++ b/model/pipeline/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(enableFindbugs: false, enableErrorProne: false)
 applyGrpcNature()
 
diff --git a/runners/apex/build.gradle b/runners/apex/build.gradle
index 40c1506be4f..816eee3df82 100644
--- a/runners/apex/build.gradle
+++ b/runners/apex/build.gradle
@@ -18,7 +18,7 @@
 
 import groovy.json.JsonOutput
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Apex"
diff --git a/runners/core-construction-java/build.gradle 
b/runners/core-construction-java/build.gradle
index 09727d24a20..774de1cc548 100644
--- a/runners/core-construction-java/build.gradle
+++ b/runners/core-construction-java/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Core Construction Java"
diff --git a/runners/core-java/build.gradle b/runners/core-java/build.gradle
index 850c332fc72..9f46cbaab01 100644
--- a/runners/core-java/build.gradle
+++ b/runners/core-java/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Core Java"
diff --git a/runners/direct-java/build.gradle b/runners/direct-java/build.gradle
index c6e7f557bae..add62dce9e7 100644
--- a/runners/direct-java/build.gradle
+++ b/runners/direct-java/build.gradle
@@ -23,7 +23,7 @@ def dependOnProjects = [":beam-model-pipeline", 
":beam-runners-core-construction
                         ":beam-runners-core-java", 
":beam-runners-local-java-core",
                         ":beam-runners-java-fn-execution", 
":beam-sdks-java-fn-execution"]
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true, shadowClosure: DEFAULT_SHADOW_CLOSURE << {
   dependencies {
     include(dependency(library.java.protobuf_java))
diff --git a/runners/extensions-java/metrics/build.gradle 
b/runners/extensions-java/metrics/build.gradle
index 9c33966181d..71d70123e69 100644
--- a/runners/extensions-java/metrics/build.gradle
+++ b/runners/extensions-java/metrics/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Extensions Java :: Metrics"
diff --git a/runners/flink/build.gradle b/runners/flink/build.gradle
index 4eec38962c6..8a6d22b381e 100644
--- a/runners/flink/build.gradle
+++ b/runners/flink/build.gradle
@@ -18,7 +18,7 @@
 
 import groovy.json.JsonOutput
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 
diff --git a/runners/gcp/gcemd/build.gradle b/runners/gcp/gcemd/build.gradle
index 9635a284f96..1b0d3f8e07e 100644
--- a/runners/gcp/gcemd/build.gradle
+++ b/runners/gcp/gcemd/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyGoNature()
 applyDockerNature()
 
diff --git a/runners/gcp/gcsproxy/build.gradle 
b/runners/gcp/gcsproxy/build.gradle
index e022a84d9a3..b0ab7d9e46a 100644
--- a/runners/gcp/gcsproxy/build.gradle
+++ b/runners/gcp/gcsproxy/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyGoNature()
 applyDockerNature()
 
diff --git a/runners/gearpump/build.gradle b/runners/gearpump/build.gradle
index f5ebb20d8dd..cd9bf10b71e 100644
--- a/runners/gearpump/build.gradle
+++ b/runners/gearpump/build.gradle
@@ -18,7 +18,7 @@
 
 import groovy.json.JsonOutput
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Gearpump"
diff --git a/runners/google-cloud-dataflow-java/build.gradle 
b/runners/google-cloud-dataflow-java/build.gradle
index 20714ed9170..85403d91ae9 100644
--- a/runners/google-cloud-dataflow-java/build.gradle
+++ b/runners/google-cloud-dataflow-java/build.gradle
@@ -18,7 +18,7 @@
 
 import groovy.json.JsonOutput
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Google Cloud Dataflow"
diff --git a/runners/java-fn-execution/build.gradle 
b/runners/java-fn-execution/build.gradle
index 89506ecc0ab..8f33fa41be2 100644
--- a/runners/java-fn-execution/build.gradle
+++ b/runners/java-fn-execution/build.gradle
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Java Fn Execution"
diff --git a/runners/local-java/build.gradle b/runners/local-java/build.gradle
index 86d06ba3fc9..426268de426 100644
--- a/runners/local-java/build.gradle
+++ b/runners/local-java/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Local Java Core"
diff --git a/runners/reference/java/build.gradle 
b/runners/reference/java/build.gradle
index 904799a0b42..b58e8a1457c 100644
--- a/runners/reference/java/build.gradle
+++ b/runners/reference/java/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Reference :: Java"
diff --git a/runners/spark/build.gradle b/runners/spark/build.gradle
index f4afff08476..cd6a8a1d58c 100644
--- a/runners/spark/build.gradle
+++ b/runners/spark/build.gradle
@@ -18,7 +18,7 @@
 
 import groovy.json.JsonOutput
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: Runners :: Spark"
diff --git a/sdks/go/build.gradle b/sdks/go/build.gradle
index 7a3a95792d9..43386995d86 100644
--- a/sdks/go/build.gradle
+++ b/sdks/go/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyGoNature()
 
 description = "Apache Beam :: SDKs :: Go"
diff --git a/sdks/go/container/build.gradle b/sdks/go/container/build.gradle
index fe15109bac2..24e7a99dc1e 100644
--- a/sdks/go/container/build.gradle
+++ b/sdks/go/container/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyGoNature()
 applyDockerNature()
 
diff --git a/sdks/go/examples/build.gradle b/sdks/go/examples/build.gradle
index 16ba9b90d69..a101bd6db9c 100644
--- a/sdks/go/examples/build.gradle
+++ b/sdks/go/examples/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyGoNature()
 
 description = "Apache Beam :: SDKs :: Go :: Examples"
diff --git a/sdks/go/test/build.gradle b/sdks/go/test/build.gradle
index 6fcd8151a83..9370ae39aac 100644
--- a/sdks/go/test/build.gradle
+++ b/sdks/go/test/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyGoNature()
 
 description = "Apache Beam :: SDKs :: Go :: Test"
diff --git a/sdks/java/build-tools/build.gradle 
b/sdks/java/build-tools/build.gradle
index 1d8288c6500..8d5d1fbb17b 100644
--- a/sdks/java/build-tools/build.gradle
+++ b/sdks/java/build-tools/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: Build Tools"
diff --git a/sdks/java/container/build.gradle b/sdks/java/container/build.gradle
index b008e7ec736..1a4f611e8c7 100644
--- a/sdks/java/container/build.gradle
+++ b/sdks/java/container/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyGoNature()
 applyDockerNature()
 
diff --git a/sdks/java/core/build.gradle b/sdks/java/core/build.gradle
index 545cd9cfa3e..44cbed6f910 100644
--- a/sdks/java/core/build.gradle
+++ b/sdks/java/core/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: false, shadowClosure: DEFAULT_SHADOW_CLOSURE << 
{
   dependencies {
     include(dependency(library.java.protobuf_java))
diff --git a/sdks/java/extensions/google-cloud-platform-core/build.gradle 
b/sdks/java/extensions/google-cloud-platform-core/build.gradle
index 275fe1c8be2..101c2d23696 100644
--- a/sdks/java/extensions/google-cloud-platform-core/build.gradle
+++ b/sdks/java/extensions/google-cloud-platform-core/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature()
 
 description = "Apache Beam :: SDKs :: Java :: Extensions :: Google Cloud 
Platform Core"
diff --git a/sdks/java/extensions/jackson/build.gradle 
b/sdks/java/extensions/jackson/build.gradle
index 1ebea9fd69c..a2f8486b214 100644
--- a/sdks/java/extensions/jackson/build.gradle
+++ b/sdks/java/extensions/jackson/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: Extensions :: Jackson"
diff --git a/sdks/java/extensions/join-library/build.gradle 
b/sdks/java/extensions/join-library/build.gradle
index 818438d9c14..7b26a7ac4cc 100644
--- a/sdks/java/extensions/join-library/build.gradle
+++ b/sdks/java/extensions/join-library/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: Extensions :: Join library"
diff --git a/sdks/java/extensions/protobuf/build.gradle 
b/sdks/java/extensions/protobuf/build.gradle
index 345db823b26..f098600ede8 100644
--- a/sdks/java/extensions/protobuf/build.gradle
+++ b/sdks/java/extensions/protobuf/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 applyGrpcNature()
 
diff --git a/sdks/java/extensions/sketching/build.gradle 
b/sdks/java/extensions/sketching/build.gradle
index d9efcf6f532..d6fe561d78f 100644
--- a/sdks/java/extensions/sketching/build.gradle
+++ b/sdks/java/extensions/sketching/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: Extensions :: Sketching"
diff --git a/sdks/java/extensions/sorter/build.gradle 
b/sdks/java/extensions/sorter/build.gradle
index f53413e02e3..7f96e30c4f8 100644
--- a/sdks/java/extensions/sorter/build.gradle
+++ b/sdks/java/extensions/sorter/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: Extensions :: Sorter"
diff --git a/sdks/java/extensions/sql/build.gradle 
b/sdks/java/extensions/sql/build.gradle
index b11c96a4276..9df7dae17c0 100644
--- a/sdks/java/extensions/sql/build.gradle
+++ b/sdks/java/extensions/sql/build.gradle
@@ -18,7 +18,7 @@ import groovy.json.JsonOutput
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(
   enableSpotless: true,
   failOnWarning: true,
diff --git a/sdks/java/extensions/sql/jdbc/build.gradle 
b/sdks/java/extensions/sql/jdbc/build.gradle
index 3514c427664..98eeeca9277 100644
--- a/sdks/java/extensions/sql/jdbc/build.gradle
+++ b/sdks/java/extensions/sql/jdbc/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true, enableSpotless: true, testShadowJar: 
true, shadowClosure: {})
 
 configurations {
diff --git a/sdks/java/fn-execution/build.gradle 
b/sdks/java/fn-execution/build.gradle
index 2be3344f59d..9f9f3995d57 100644
--- a/sdks/java/fn-execution/build.gradle
+++ b/sdks/java/fn-execution/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: Fn Execution"
diff --git a/sdks/java/harness/build.gradle b/sdks/java/harness/build.gradle
index 40d54e23b06..5eafe58dfae 100644
--- a/sdks/java/harness/build.gradle
+++ b/sdks/java/harness/build.gradle
@@ -25,7 +25,7 @@ def dependOnProjects = [":beam-model-pipeline", 
":beam-model-fn-execution", ":be
                         
":beam-sdks-java-extensions-google-cloud-platform-core",
                         ":beam-runners-core-java", 
":beam-runners-core-construction-java"]
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true, shadowClosure: DEFAULT_SHADOW_CLOSURE <<
   // Create an uber jar without repackaging for the SDK harness
   // TODO: We have been releasing this in the past, consider not
diff --git a/sdks/java/io/amazon-web-services/build.gradle 
b/sdks/java/io/amazon-web-services/build.gradle
index bd719d9590e..467da252d32 100644
--- a/sdks/java/io/amazon-web-services/build.gradle
+++ b/sdks/java/io/amazon-web-services/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Amazon Web Services"
diff --git a/sdks/java/io/amqp/build.gradle b/sdks/java/io/amqp/build.gradle
index bea651570f2..b2b9ad3b1fd 100644
--- a/sdks/java/io/amqp/build.gradle
+++ b/sdks/java/io/amqp/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: AMQP"
diff --git a/sdks/java/io/cassandra/build.gradle 
b/sdks/java/io/cassandra/build.gradle
index 7b5d00a84cb..4bfc06b007e 100644
--- a/sdks/java/io/cassandra/build.gradle
+++ b/sdks/java/io/cassandra/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 provideIntegrationTestingDependencies()
 enableJavaPerformanceTesting()
diff --git a/sdks/java/io/common/build.gradle b/sdks/java/io/common/build.gradle
index 1ba1e8185ca..599ada0e0c0 100644
--- a/sdks/java/io/common/build.gradle
+++ b/sdks/java/io/common/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Common"
diff --git 
a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-2/build.gradle 
b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-2/build.gradle
index 683c1637201..1f3a406d51c 100644
--- a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-2/build.gradle
+++ b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-2/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 provideIntegrationTestingDependencies()
 enableJavaPerformanceTesting()
diff --git 
a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-5/build.gradle 
b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-5/build.gradle
index 519edc4293c..306f2d1c8cb 100644
--- a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-5/build.gradle
+++ b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-5/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 provideIntegrationTestingDependencies()
 enableJavaPerformanceTesting()
diff --git 
a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/build.gradle 
b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/build.gradle
index 5b0e4d08026..3d50f1de9c3 100644
--- a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/build.gradle
+++ b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Elasticsearch-Tests :: 
Common"
diff --git a/sdks/java/io/elasticsearch/build.gradle 
b/sdks/java/io/elasticsearch/build.gradle
index 7b5ff9f2c91..bf6811c6620 100644
--- a/sdks/java/io/elasticsearch/build.gradle
+++ b/sdks/java/io/elasticsearch/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Elasticsearch"
diff --git a/sdks/java/io/file-based-io-tests/build.gradle 
b/sdks/java/io/file-based-io-tests/build.gradle
index f1c36a102c7..e957c2fda26 100644
--- a/sdks/java/io/file-based-io-tests/build.gradle
+++ b/sdks/java/io/file-based-io-tests/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 provideIntegrationTestingDependencies()
 enableJavaPerformanceTesting()
diff --git a/sdks/java/io/google-cloud-platform/build.gradle 
b/sdks/java/io/google-cloud-platform/build.gradle
index 914d9645155..b70cb36db9f 100644
--- a/sdks/java/io/google-cloud-platform/build.gradle
+++ b/sdks/java/io/google-cloud-platform/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(
   failOnWarning: true,
   enableFindbugs: false,
diff --git a/sdks/java/io/hadoop-common/build.gradle 
b/sdks/java/io/hadoop-common/build.gradle
index 8da5b829a41..341d1192a95 100644
--- a/sdks/java/io/hadoop-common/build.gradle
+++ b/sdks/java/io/hadoop-common/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Hadoop Common"
diff --git a/sdks/java/io/hadoop-file-system/build.gradle 
b/sdks/java/io/hadoop-file-system/build.gradle
index f974c15eada..b821b38e18a 100644
--- a/sdks/java/io/hadoop-file-system/build.gradle
+++ b/sdks/java/io/hadoop-file-system/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Hadoop File System"
diff --git a/sdks/java/io/hadoop-input-format/build.gradle 
b/sdks/java/io/hadoop-input-format/build.gradle
index fbcd4c833a8..95e6c71576d 100644
--- a/sdks/java/io/hadoop-input-format/build.gradle
+++ b/sdks/java/io/hadoop-input-format/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 provideIntegrationTestingDependencies()
 enableJavaPerformanceTesting()
diff --git a/sdks/java/io/hbase/build.gradle b/sdks/java/io/hbase/build.gradle
index 046dd1aad73..765dc139906 100644
--- a/sdks/java/io/hbase/build.gradle
+++ b/sdks/java/io/hbase/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 provideIntegrationTestingDependencies()
 enableJavaPerformanceTesting()
diff --git a/sdks/java/io/hcatalog/build.gradle 
b/sdks/java/io/hcatalog/build.gradle
index 30c019e805b..04208ac6315 100644
--- a/sdks/java/io/hcatalog/build.gradle
+++ b/sdks/java/io/hcatalog/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: HCatalog"
diff --git a/sdks/java/io/jdbc/build.gradle b/sdks/java/io/jdbc/build.gradle
index a4c48ac6e75..444c5b915cd 100644
--- a/sdks/java/io/jdbc/build.gradle
+++ b/sdks/java/io/jdbc/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true, enableFindbugs: false)
 provideIntegrationTestingDependencies()
 enableJavaPerformanceTesting()
diff --git a/sdks/java/io/jms/build.gradle b/sdks/java/io/jms/build.gradle
index 54160d79aae..c82a06c7826 100644
--- a/sdks/java/io/jms/build.gradle
+++ b/sdks/java/io/jms/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: JMS"
diff --git a/sdks/java/io/kafka/build.gradle b/sdks/java/io/kafka/build.gradle
index df8cc0f19a4..07db554afef 100644
--- a/sdks/java/io/kafka/build.gradle
+++ b/sdks/java/io/kafka/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true, enableFindbugs: false)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Kafka"
diff --git a/sdks/java/io/kinesis/build.gradle 
b/sdks/java/io/kinesis/build.gradle
index 84688da53e1..d7444be5c4d 100644
--- a/sdks/java/io/kinesis/build.gradle
+++ b/sdks/java/io/kinesis/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 provideIntegrationTestingDependencies()
 enableJavaPerformanceTesting()
diff --git a/sdks/java/io/mongodb/build.gradle 
b/sdks/java/io/mongodb/build.gradle
index 0ead12c4f29..31fb189169e 100644
--- a/sdks/java/io/mongodb/build.gradle
+++ b/sdks/java/io/mongodb/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 provideIntegrationTestingDependencies()
 enableJavaPerformanceTesting()
diff --git a/sdks/java/io/mqtt/build.gradle b/sdks/java/io/mqtt/build.gradle
index 39ebbc0d50a..88bb5d34837 100644
--- a/sdks/java/io/mqtt/build.gradle
+++ b/sdks/java/io/mqtt/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: MQTT"
diff --git a/sdks/java/io/parquet/build.gradle 
b/sdks/java/io/parquet/build.gradle
index 3af2d934684..cf8585a258b 100644
--- a/sdks/java/io/parquet/build.gradle
+++ b/sdks/java/io/parquet/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Parquet"
diff --git a/sdks/java/io/redis/build.gradle b/sdks/java/io/redis/build.gradle
index 899ba4357e7..2e16df8c089 100644
--- a/sdks/java/io/redis/build.gradle
+++ b/sdks/java/io/redis/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Redis"
diff --git a/sdks/java/io/solr/build.gradle b/sdks/java/io/solr/build.gradle
index 1fcf903df5f..5ee6ab76e0b 100644
--- a/sdks/java/io/solr/build.gradle
+++ b/sdks/java/io/solr/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Solr"
diff --git a/sdks/java/io/tika/build.gradle b/sdks/java/io/tika/build.gradle
index 27dc3d23b95..e664f1003bc 100644
--- a/sdks/java/io/tika/build.gradle
+++ b/sdks/java/io/tika/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: Tika"
diff --git a/sdks/java/io/xml/build.gradle b/sdks/java/io/xml/build.gradle
index 7823800dba5..fb12da53359 100644
--- a/sdks/java/io/xml/build.gradle
+++ b/sdks/java/io/xml/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: IO :: XML"
diff --git a/sdks/java/maven-archetypes/examples/build.gradle 
b/sdks/java/maven-archetypes/examples/build.gradle
index b9844cd207a..bc7eccb9e2e 100644
--- a/sdks/java/maven-archetypes/examples/build.gradle
+++ b/sdks/java/maven-archetypes/examples/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature()
 
 description = "Apache Beam :: SDKs :: Java :: Maven Archetypes :: Examples"
diff --git a/sdks/java/maven-archetypes/starter/build.gradle 
b/sdks/java/maven-archetypes/starter/build.gradle
index 7f908494d79..da533b15649 100644
--- a/sdks/java/maven-archetypes/starter/build.gradle
+++ b/sdks/java/maven-archetypes/starter/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature()
 
 description = "Apache Beam :: SDKs :: Java :: Maven Archetypes :: Starter"
diff --git a/sdks/java/nexmark/build.gradle b/sdks/java/nexmark/build.gradle
index 6dc6d87d179..c19cc72b458 100644
--- a/sdks/java/nexmark/build.gradle
+++ b/sdks/java/nexmark/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyJavaNature(failOnWarning: true)
 
 description = "Apache Beam :: SDKs :: Java :: Nexmark"
diff --git a/sdks/python/container/build.gradle 
b/sdks/python/container/build.gradle
index 0e2f12aacdd..f6f1c30d55a 100644
--- a/sdks/python/container/build.gradle
+++ b/sdks/python/container/build.gradle
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-apply from: project(":").file("build_rules.gradle")
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
 applyGoNature()
 applyDockerNature()
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 114553)
    Time Spent: 5h 20m  (was: 5h 10m)

> Use a "binary plugin" in buildSrc instead of "script plugin" in 
> build_rules.gradle
> ----------------------------------------------------------------------------------
>
>                 Key: BEAM-4584
>                 URL: https://issues.apache.org/jira/browse/BEAM-4584
>             Project: Beam
>          Issue Type: Improvement
>          Components: build-system
>            Reporter: Kenneth Knowles
>            Assignee: Kenneth Knowles
>            Priority: Major
>             Fix For: Not applicable
>
>          Time Spent: 5h 20m
>  Remaining Estimate: 0h
>
> This is a best practice recommended by the Gradle documentation. It is 
> expected to speed things up, and makes dependency management and testing 
> slightly better.
> In terms of code, it is not much different, though some things that were 
> previously implicit in the top-level groovy DSL will need to be made explicit 
> in the plugin definition.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to