[ https://issues.apache.org/jira/browse/BEAM-3249?focusedWorklogId=93004&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-93004 ]
ASF GitHub Bot logged work on BEAM-3249: ---------------------------------------- Author: ASF GitHub Bot Created on: 20/Apr/18 01:10 Start Date: 20/Apr/18 01:10 Worklog Time Spent: 10m Work Description: aaltay closed pull request #5117: [BEAM-3249] Clean-up and use shaded test jars, removing evaluationDependsOn URL: https://github.com/apache/beam/pull/5117 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/examples/java/build.gradle b/examples/java/build.gradle index 76889cafa59..4abe28b5209 100644 --- a/examples/java/build.gradle +++ b/examples/java/build.gradle @@ -26,15 +26,6 @@ ext.summary = """Apache Beam SDK provides a simple, Java-based interface for processing virtually any size data. This artifact includes all Apache Beam Java SDK examples.""" -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-io-google-cloud-platform") - /** Define the list of runners which execute a precommit test. */ // https://issues.apache.org/jira/browse/BEAM-3583 def preCommitRunners = ["dataflowRunner", "dataflowStreamingRunner", "directRunner", "flinkRunner", "sparkRunner"] @@ -68,7 +59,7 @@ dependencies { shadow library.java.slf4j_api shadow project(path: ":beam-runners-direct-java", configuration: "shadow") shadow library.java.slf4j_jdk14 - shadowTest project(":beam-sdks-java-io-google-cloud-platform").sourceSets.test.output + shadowTest project(path: ":beam-sdks-java-io-google-cloud-platform", configuration: "shadowTest") shadowTest library.java.hamcrest_core shadowTest library.java.junit shadowTest library.java.mockito_core diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/game/GameStats.java b/examples/java/src/main/java/org/apache/beam/examples/complete/game/GameStats.java index d81aa30892a..f93a24266a1 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/game/GameStats.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/game/GameStats.java @@ -153,7 +153,7 @@ public void processElement(ProcessContext c, BoundedWindow window) { /** * Options supported by {@link GameStats}. */ - interface Options extends LeaderBoard.Options { + public interface Options extends LeaderBoard.Options { @Description("Numeric value of fixed window duration for user analysis, in minutes") @Default.Integer(60) Integer getFixedWindowDuration(); diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/game/HourlyTeamScore.java b/examples/java/src/main/java/org/apache/beam/examples/complete/game/HourlyTeamScore.java index 86c5196c6cb..0f2912894d3 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/game/HourlyTeamScore.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/game/HourlyTeamScore.java @@ -82,7 +82,7 @@ /** * Options supported by {@link HourlyTeamScore}. */ - interface Options extends UserScore.Options { + public interface Options extends UserScore.Options { @Description("Numeric value of fixed window duration, in minutes") @Default.Integer(60) diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/game/LeaderBoard.java b/examples/java/src/main/java/org/apache/beam/examples/complete/game/LeaderBoard.java index 732840b1a1e..31dc48944e4 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/game/LeaderBoard.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/game/LeaderBoard.java @@ -96,7 +96,7 @@ /** * Options supported by {@link LeaderBoard}. */ - interface Options extends HourlyTeamScore.Options, ExampleOptions, StreamingOptions { + public interface Options extends HourlyTeamScore.Options, ExampleOptions, StreamingOptions { @Description("BigQuery Dataset to write tables to. Must already exist.") @Validation.Required diff --git a/runners/apex/build.gradle b/runners/apex/build.gradle index 713abb56cee..d7a57bad30b 100644 --- a/runners/apex/build.gradle +++ b/runners/apex/build.gradle @@ -27,11 +27,7 @@ description = "Apache Beam :: Runners :: Apex" * We need to rely on manually specifying these evaluationDependsOn to ensure that * the following projects are evaluated before we evaluate this project. This is because * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. */ -evaluationDependsOn(":beam-model-fn-execution") -evaluationDependsOn(":beam-runners-core-java") evaluationDependsOn(":beam-sdks-java-core") configurations { @@ -51,7 +47,7 @@ dependencies { shadow library.java.apex_engine shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest") // ApexStateInternalsTest extends abstract StateInternalsTest - shadowTest project(":beam-runners-core-java").sourceSets.test.output + shadowTest project(path: ":beam-runners-core-java", configuration: "shadowTest") shadowTest library.java.hamcrest_core shadowTest library.java.junit shadowTest library.java.mockito_core diff --git a/runners/direct-java/build.gradle b/runners/direct-java/build.gradle index fd99721378a..29e2b66ef0e 100644 --- a/runners/direct-java/build.gradle +++ b/runners/direct-java/build.gradle @@ -41,7 +41,6 @@ description = "Apache Beam :: Runners :: Direct Java" * the following projects are evaluated before we evaluate this project. This is because * we are attempting to reference the "sourceSets.test.output" directly. */ -evaluationDependsOn(":beam-model-fn-execution") evaluationDependsOn(":beam-runners-core-construction-java") evaluationDependsOn(":beam-runners-core-java") evaluationDependsOn(":beam-sdks-java-core") diff --git a/runners/flink/build.gradle b/runners/flink/build.gradle index e7010ef5dcc..1297b29b5fb 100644 --- a/runners/flink/build.gradle +++ b/runners/flink/build.gradle @@ -27,11 +27,7 @@ description = "Apache Beam :: Runners :: Flink" * We need to rely on manually specifying these evaluationDependsOn to ensure that * the following projects are evaluated before we evaluate this project. This is because * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. */ -evaluationDependsOn(":beam-model-fn-execution") -evaluationDependsOn(":beam-runners-core-java") evaluationDependsOn(":beam-sdks-java-core") test { @@ -66,7 +62,7 @@ dependencies { shadow "org.apache.flink:flink-streaming-java_2.11:$flink_version" shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest") // FlinkStateInternalsTest extends abstract StateInternalsTest - shadowTest project(":beam-runners-core-java").sourceSets.test.output + shadowTest project(path: ":beam-runners-core-java", configuration: "shadowTest") shadowTest library.java.commons_lang3 shadowTest library.java.hamcrest_core shadowTest library.java.junit diff --git a/runners/gearpump/build.gradle b/runners/gearpump/build.gradle index 626e9bf846e..c85d5cf7340 100644 --- a/runners/gearpump/build.gradle +++ b/runners/gearpump/build.gradle @@ -23,6 +23,11 @@ applyJavaNature() description = "Apache Beam :: Runners :: Gearpump" +/* + * We need to rely on manually specifying these evaluationDependsOn to ensure that + * the following projects are evaluated before we evaluate this project. This is because + * we are attempting to reference the "sourceSets.test.output" directly. + */ evaluationDependsOn(":beam-sdks-java-core") def gearpump_version = "0.8.4" diff --git a/runners/google-cloud-dataflow-java/build.gradle b/runners/google-cloud-dataflow-java/build.gradle index e2eb4460db0..5c5d4a98f6c 100644 --- a/runners/google-cloud-dataflow-java/build.gradle +++ b/runners/google-cloud-dataflow-java/build.gradle @@ -27,12 +27,8 @@ description = "Apache Beam :: Runners :: Google Cloud Dataflow" * We need to rely on manually specifying these evaluationDependsOn to ensure that * the following projects are evaluated before we evaluate this project. This is because * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. */ evaluationDependsOn(":beam-sdks-java-io-google-cloud-platform") -evaluationDependsOn(":beam-sdks-java-extensions-google-cloud-platform-core") -evaluationDependsOn(":beam-model-fn-execution") evaluationDependsOn(":beam-sdks-java-core") evaluationDependsOn(":beam-examples-java") @@ -81,9 +77,9 @@ dependencies { shadow library.java.slf4j_api shadowTest library.java.hamcrest_core shadowTest library.java.junit - shadowTest project(":beam-sdks-java-io-google-cloud-platform").sourceSets.test.output + shadowTest project(path: ":beam-sdks-java-io-google-cloud-platform", configuration: "shadowTest") shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest") - shadowTest project(":beam-sdks-java-extensions-google-cloud-platform-core").sourceSets.test.output + shadowTest project(path: ":beam-sdks-java-extensions-google-cloud-platform-core", configuration: "shadowTest") shadowTest library.java.guava_testlib shadowTest library.java.slf4j_jdk14 shadowTest library.java.mockito_core diff --git a/runners/java-fn-execution/build.gradle b/runners/java-fn-execution/build.gradle index 9f07ce5e77d..462752f684a 100644 --- a/runners/java-fn-execution/build.gradle +++ b/runners/java-fn-execution/build.gradle @@ -20,15 +20,6 @@ applyJavaNature() description = "Apache Beam :: Runners :: Java Fn Execution" -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-fn-execution") - dependencies { compile library.java.guava shadow project(path: ":beam-model-pipeline", configuration: "shadow") diff --git a/runners/spark/build.gradle b/runners/spark/build.gradle index 1d90c2f2388..4a036623c9b 100644 --- a/runners/spark/build.gradle +++ b/runners/spark/build.gradle @@ -27,11 +27,7 @@ description = "Apache Beam :: Runners :: Spark" * We need to rely on manually specifying these evaluationDependsOn to ensure that * the following projects are evaluated before we evaluate this project. This is because * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. */ -evaluationDependsOn(":beam-model-fn-execution") -evaluationDependsOn(":beam-runners-core-java") evaluationDependsOn(":beam-sdks-java-core") configurations { @@ -83,7 +79,7 @@ dependencies { shadowTest project(path: ":beam-sdks-java-io-kafka", configuration: "shadow") shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest") // SparkStateInternalsTest extends abstract StateInternalsTest - shadowTest project(":beam-runners-core-java").sourceSets.test.output + shadowTest project(path: ":beam-runners-core-java", configuration: "shadowTest") shadowTest library.java.avro shadowTest library.java.kafka_clients shadowTest library.java.junit diff --git a/sdks/java/core/build.gradle b/sdks/java/core/build.gradle index 267d9b23626..690fa2079ad 100644 --- a/sdks/java/core/build.gradle +++ b/sdks/java/core/build.gradle @@ -35,15 +35,6 @@ ext.summary = """Beam SDK Java All provides a simple, Java-based interface for processing virtually any size data. This artifact includes entire Apache Beam Java SDK.""" -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-model-fn-execution") - processResources { filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [ 'pom.version': version, diff --git a/sdks/java/harness/build.gradle b/sdks/java/harness/build.gradle index fc4911bfdc2..254f89a9221 100644 --- a/sdks/java/harness/build.gradle +++ b/sdks/java/harness/build.gradle @@ -31,15 +31,6 @@ applyJavaNature(shadowClosure: DEFAULT_SHADOW_CLOSURE << description = "Apache Beam :: SDKs :: Java :: Harness" ext.summary = "This contains the SDK Fn Harness for Beam Java" -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-fn-execution") - dependencies { compile project(path: ":beam-model-pipeline", configuration: "shadow") compile project(path: ":beam-model-fn-execution", configuration: "shadow") diff --git a/sdks/java/io/cassandra/build.gradle b/sdks/java/io/cassandra/build.gradle index 43564634eec..43bc8b3f803 100644 --- a/sdks/java/io/cassandra/build.gradle +++ b/sdks/java/io/cassandra/build.gradle @@ -24,15 +24,6 @@ enableJavaPerformanceTesting() description = "Apache Beam :: SDKs :: Java :: IO :: Cassandra" ext.summary = "IO to read and write with Apache Cassandra database" -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-io-common") - def cassandra_version = "3.2.0" dependencies { @@ -43,7 +34,7 @@ dependencies { shadow "com.datastax.cassandra:cassandra-driver-core:$cassandra_version" shadow "com.datastax.cassandra:cassandra-driver-mapping:$cassandra_version" testCompile project(path: ":beam-runners-direct-java", configuration: "shadow") - testCompile project(":beam-sdks-java-io-common").sourceSets.test.output + testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest") testCompile library.java.junit testCompile library.java.hamcrest_core testCompile library.java.slf4j_jdk14 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 de799869d4d..1af9edc294c 100644 --- a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-2/build.gradle +++ b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-2/build.gradle @@ -24,25 +24,15 @@ enableJavaPerformanceTesting() description = "Apache Beam :: SDKs :: Java :: IO :: Elasticsearch-Tests :: 2.x" ext.summary = "Tests of ElasticsearchIO on Elasticsearch 2.x" -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-io-elasticsearch-tests-common") -evaluationDependsOn(":beam-sdks-java-io-common") - def jna_version = "4.1.0" def log4j_version = "2.6.2" def elastic_search_version = "2.4.1" dependencies { - testCompile project(":beam-sdks-java-io-elasticsearch-tests-common").sourceSets.test.output + testCompile project(path: ":beam-sdks-java-io-elasticsearch-tests-common", configuration: "shadowTest") testCompile project(path: ":beam-sdks-java-core", configuration: "shadow") testCompile project(path: ":beam-sdks-java-io-elasticsearch", configuration: "shadow") - testCompile project(":beam-sdks-java-io-common").sourceSets.test.output + testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest") testCompile project(path: ":beam-runners-direct-java", configuration: "shadow") testCompile library.java.slf4j_api testCompile "net.java.dev.jna:jna:$jna_version" 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 db4f2651296..1ebc8096396 100644 --- a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-5/build.gradle +++ b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-5/build.gradle @@ -24,16 +24,6 @@ enableJavaPerformanceTesting() description = "Apache Beam :: SDKs :: Java :: IO :: Elasticsearch-Tests :: 5.x" ext.summary = "Tests of ElasticsearchIO on Elasticsearch 5.x" -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-io-elasticsearch-tests-common") -evaluationDependsOn(":beam-sdks-java-io-common") - test { // needed for ESIntegTestCase systemProperty "tests.security.manager", "false" @@ -53,7 +43,7 @@ configurations.all { } dependencies { - testCompile project(":beam-sdks-java-io-elasticsearch-tests-common").sourceSets.test.output + testCompile project(path: ":beam-sdks-java-io-elasticsearch-tests-common", configuration: "shadowTest") testCompile "org.elasticsearch.test:framework:$elastic_search_version" testCompile "org.elasticsearch.plugin:transport-netty4-client:$elastic_search_version" testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.5.0" @@ -61,7 +51,7 @@ dependencies { testCompile project(path: ":beam-sdks-java-core", configuration: "shadow") testCompile project(path: ":beam-sdks-java-io-elasticsearch", configuration: "shadow") - testCompile project(":beam-sdks-java-io-common").sourceSets.test.output + testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest") testCompile project(path: ":beam-runners-direct-java", configuration: "shadow") testCompile "org.apache.logging.log4j:log4j-core:$log4j_version" testCompile "org.apache.logging.log4j:log4j-api:$log4j_version" 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 444a5a5f112..8b7edf1fcb3 100644 --- a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/build.gradle +++ b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/build.gradle @@ -22,15 +22,6 @@ applyJavaNature() description = "Apache Beam :: SDKs :: Java :: IO :: Elasticsearch-Tests :: Common" ext.summary = "Common test classes for ElasticsearchIO" -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-io-common") - def jna_version = "4.1.0" def log4j_version = "2.6.2" @@ -43,7 +34,7 @@ dependencies { testCompile project(path: ":beam-sdks-java-core", configuration: "shadow") testCompile project(path: ":beam-sdks-java-io-elasticsearch", configuration: "shadow") - testCompile project(":beam-sdks-java-io-common").sourceSets.test.output + testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest") testCompile project(path: ":beam-runners-direct-java", configuration: "shadow") testCompile library.java.slf4j_api testCompile "net.java.dev.jna:jna:$jna_version" diff --git a/sdks/java/io/file-based-io-tests/build.gradle b/sdks/java/io/file-based-io-tests/build.gradle index 21a60505b6e..f84efa5ec20 100644 --- a/sdks/java/io/file-based-io-tests/build.gradle +++ b/sdks/java/io/file-based-io-tests/build.gradle @@ -24,19 +24,10 @@ enableJavaPerformanceTesting() description = "Apache Beam :: SDKs :: Java :: File-based-io-tests" ext.summary = "Integration tests for reading/writing using file-based sources/sinks." -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-io-common") - dependencies { shadowTest project(":beam-sdks-java-core") shadowTest project(":beam-sdks-java-io-common") - shadowTest project(":beam-sdks-java-io-common").sourceSets.test.output + shadowTest project(path: ":beam-sdks-java-io-common", configuration: "shadowTest") shadowTest project(":beam-sdks-java-io-xml") shadowTest library.java.guava shadowTest library.java.junit diff --git a/sdks/java/io/google-cloud-platform/build.gradle b/sdks/java/io/google-cloud-platform/build.gradle index da1325d9263..66f44f75215 100644 --- a/sdks/java/io/google-cloud-platform/build.gradle +++ b/sdks/java/io/google-cloud-platform/build.gradle @@ -32,15 +32,6 @@ applyJavaNature( description = "Apache Beam :: SDKs :: Java :: IO :: Google Cloud Platform" ext.summary = "IO library to read and write Google Cloud Platform systems from Beam." -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-extensions-google-cloud-platform-core") - dependencies { shadow project(path: ":beam-sdks-java-core", configuration: "shadow") shadow project(path: ":beam-sdks-java-extensions-google-cloud-platform-core", configuration: "shadow") @@ -80,7 +71,7 @@ dependencies { shadow library.java.grpc_all shadow library.java.netty_tcnative_boringssl_static shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest") - shadowTest project(":beam-sdks-java-extensions-google-cloud-platform-core").sourceSets.test.output + shadowTest project(path: ":beam-sdks-java-extensions-google-cloud-platform-core", configuration: "shadowTest") shadowTest project(path: ":beam-runners-direct-java", configuration: "shadow") shadowTest library.java.hamcrest_core shadowTest library.java.mockito_core diff --git a/sdks/java/io/hadoop-input-format/build.gradle b/sdks/java/io/hadoop-input-format/build.gradle index 68f689404a1..e9243f5badb 100644 --- a/sdks/java/io/hadoop-input-format/build.gradle +++ b/sdks/java/io/hadoop-input-format/build.gradle @@ -24,15 +24,6 @@ enableJavaPerformanceTesting() description = "Apache Beam :: SDKs :: Java :: IO :: Hadoop Input Format" ext.summary = "IO to read data from sources that implement Hadoop Input Format." -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-io-common") - def log4j_version = "2.6.2" def elastic_search_version = "5.0.0" // Migrate to using a version of the driver compatible with Guava 20 @@ -58,7 +49,7 @@ dependencies { testCompile project(path: ":beam-runners-direct-java", configuration: "shadow") testCompile project(path: ":beam-sdks-java-core", configuration: "shadowTest") testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadow") - testCompile project(":beam-sdks-java-io-common").sourceSets.test.output + testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest") testCompile "org.elasticsearch.plugin:transport-netty4-client:$elastic_search_version" testCompile "org.elasticsearch.client:transport:$elastic_search_version" testCompile "io.netty:netty-transport-native-epoll:4.1.0.CR3" diff --git a/sdks/java/io/jdbc/build.gradle b/sdks/java/io/jdbc/build.gradle index a21405a839e..88406a495fc 100644 --- a/sdks/java/io/jdbc/build.gradle +++ b/sdks/java/io/jdbc/build.gradle @@ -24,15 +24,6 @@ enableJavaPerformanceTesting() description = "Apache Beam :: SDKs :: Java :: IO :: JDBC" ext.summary = "IO to read and write on JDBC datasource." -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-io-common") - dependencies { compile library.java.guava shadow project(path: ":beam-sdks-java-core", configuration: "shadow") @@ -41,7 +32,7 @@ dependencies { testCompile project(path: ":beam-sdks-java-core", configuration: "shadowTest") testCompile project(path: ":beam-runners-direct-java", configuration: "shadow") testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadow") - testCompile project(":beam-sdks-java-io-common").sourceSets.test.output + testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest") testCompile library.java.junit testCompile library.java.hamcrest_core testCompile library.java.slf4j_api diff --git a/sdks/java/io/mongodb/build.gradle b/sdks/java/io/mongodb/build.gradle index 8a552215fbe..dc5b275045d 100644 --- a/sdks/java/io/mongodb/build.gradle +++ b/sdks/java/io/mongodb/build.gradle @@ -24,15 +24,6 @@ enableJavaPerformanceTesting() description = "Apache Beam :: SDKs :: Java :: IO :: MongoDB" ext.summary = "IO to read and write on MongoDB." -/* - * We need to rely on manually specifying these evaluationDependsOn to ensure that - * the following projects are evaluated before we evaluate this project. This is because - * we are attempting to reference the "sourceSets.test.output" directly. - * TODO: Swap to generating test artifacts which we can then rely on instead of - * the test outputs directly. - */ -evaluationDependsOn(":beam-sdks-java-io-common") - dependencies { compile library.java.guava shadow project(path: ":beam-sdks-java-core", configuration: "shadow") @@ -45,7 +36,7 @@ dependencies { testCompile library.java.slf4j_jdk14 testCompile library.java.hamcrest_core testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadow") - testCompile project(":beam-sdks-java-io-common").sourceSets.test.output + testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest") testCompile "de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.50.1" testCompile "de.flapdoodle.embed:de.flapdoodle.embed.process:1.50.1" } diff --git a/sdks/java/maven-archetypes/examples/build.gradle b/sdks/java/maven-archetypes/examples/build.gradle index 2a64e174a7c..79139c4725d 100644 --- a/sdks/java/maven-archetypes/examples/build.gradle +++ b/sdks/java/maven-archetypes/examples/build.gradle @@ -46,7 +46,11 @@ processResources { ] } -// The :beam-examples-java main/test sourceSets are used in generation. +/* + * We need to rely on manually specifying these evaluationDependsOn to ensure that + * the following projects are evaluated before we evaluate this project. This is because + * we are attempting to reference the "sourceSets.{main|test}.allSource" directly. + */ evaluationDependsOn(':beam-examples-java') task generateSources(type: Exec) { ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 93004) Time Spent: 14h 20m (was: 14h 10m) > Use Gradle to build/release project > ----------------------------------- > > Key: BEAM-3249 > URL: https://issues.apache.org/jira/browse/BEAM-3249 > Project: Beam > Issue Type: Improvement > Components: build-system, testing > Reporter: Luke Cwik > Assignee: Luke Cwik > Priority: Major > Time Spent: 14h 20m > Remaining Estimate: 0h > > I have collected data by running several builds against master using Gradle > and Maven without using Gradle's support for incremental builds. > Gradle (mins) > min: 25.04 > max: 160.14 > median: 45.78 > average: 52.19 > stdev: 30.80 > Maven (mins) > min: 56.86 > max: 216.55 > median: 87.93 > average: 109.10 > stdev: 48.01 > I excluded a few timeouts (240 mins) that happened during the Maven build > from its numbers but we can see conclusively that Gradle is about twice as > fast for the build when compared to Maven when run using Jenkins. > Original dev@ thread: > https://lists.apache.org/thread.html/225dddcfc78f39bbb296a0d2bbef1caf37e17677c7e5573f0b6fe253@%3Cdev.beam.apache.org%3E > The data is available here > https://docs.google.com/spreadsheets/d/1MHVjF-xoI49_NJqEQakUgnNIQ7Qbjzu8Y1q_h3dbF1M/edit?usp=sharing -- This message was sent by Atlassian JIRA (v7.6.3#76005)