Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-4540] Migrate junit/hamcrest to provided scope. #5604

Merged
merged 1 commit into from Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions runners/core-construction-java/build.gradle
Expand Up @@ -49,6 +49,7 @@ dependencies {
shadow library.java.grpc_stub
testCompileOnly library.java.findbugs_annotations
shadowTest library.java.hamcrest_core
shadowTest library.java.hamcrest_library
shadowTest library.java.junit
shadowTest library.java.mockito_core
shadowTest library.java.jackson_annotations
Expand Down
2 changes: 2 additions & 0 deletions runners/core-java/build.gradle
Expand Up @@ -43,7 +43,9 @@ dependencies {
shadow library.java.joda_time
testCompileOnly library.java.findbugs_annotations
shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest")
shadowTest library.java.junit
shadowTest library.java.hamcrest_core
shadowTest library.java.hamcrest_library
shadowTest library.java.mockito_core
shadowTest library.java.junit
shadowTest library.java.slf4j_api
Expand Down
4 changes: 2 additions & 2 deletions runners/direct-java/build.gradle
Expand Up @@ -67,9 +67,9 @@ dependencies {
shadow library.java.joda_time
shadow library.java.findbugs_jsr305
shadow library.java.slf4j_api
shadow library.java.hamcrest_core
shadow library.java.junit
shadow library.java.args4j
provided library.java.hamcrest_core
provided library.java.junit
testRuntime project(path: ":beam-sdks-java-harness")
shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest")
shadowTest project(path: ":beam-runners-core-java", configuration: "shadowTest")
Expand Down
3 changes: 2 additions & 1 deletion runners/gearpump/build.gradle
Expand Up @@ -53,6 +53,7 @@ dependencies {
shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest")
shadowTest library.java.junit
shadowTest library.java.hamcrest_core
shadowTest library.java.hamcrest_library
shadowTest library.java.jackson_databind
shadowTest library.java.jackson_dataformat_yaml
shadowTest library.java.mockito_core
Expand Down Expand Up @@ -90,4 +91,4 @@ task validatesRunner {
dependsOn validatesRunnerStreaming
}

createJavaExamplesArchetypeValidationTask(type: 'Quickstart', runner: 'Gearpump')
createJavaExamplesArchetypeValidationTask(type: 'Quickstart', runner: 'Gearpump')
1 change: 1 addition & 0 deletions runners/local-java/build.gradle
Expand Up @@ -33,5 +33,6 @@ dependencies {
shadow library.java.findbugs_jsr305
shadow library.java.findbugs_annotations
shadowTest library.java.hamcrest_core
shadowTest library.java.hamcrest_library
shadowTest library.java.junit
}
1 change: 1 addition & 0 deletions runners/spark/build.gradle
Expand Up @@ -74,6 +74,7 @@ dependencies {
provided library.java.commons_lang3
provided library.java.commons_io_2x
provided library.java.hamcrest_core
provided library.java.hamcrest_library
provided "org.apache.zookeeper:zookeeper:3.4.11"
provided "org.scala-lang:scala-library:2.11.8"
provided "com.esotericsoftware.kryo:kryo:2.21"
Expand Down
6 changes: 3 additions & 3 deletions sdks/java/core/build.gradle
Expand Up @@ -67,10 +67,10 @@ dependencies {
shadow library.java.avro
shadow library.java.snappy_java
shadow library.java.joda_time
shadow library.java.hamcrest_core
shadow library.java.hamcrest_library
shadow library.java.junit
shadow "org.tukaani:xz:1.5"
provided library.java.junit
provided library.java.hamcrest_core
provided library.java.hamcrest_library
shadowTest library.java.jackson_dataformat_yaml
shadowTest library.java.guava_testlib
shadowTest library.java.slf4j_jdk14
Expand Down
5 changes: 3 additions & 2 deletions sdks/java/extensions/google-cloud-platform-core/build.gradle
Expand Up @@ -48,9 +48,10 @@ dependencies {
shadow library.java.joda_time
shadow library.java.jackson_annotations
shadow library.java.jackson_databind
shadow library.java.hamcrest_core
shadow library.java.junit
provided library.java.hamcrest_core
provided library.java.junit
testCompile project(path: ":beam-sdks-java-core", configuration: "shadowTest")
testCompile library.java.hamcrest_library
testCompile library.java.guava_testlib
testCompile library.java.mockito_core
testCompile library.java.slf4j_jdk14
Expand Down
1 change: 1 addition & 0 deletions sdks/java/extensions/jackson/build.gradle
Expand Up @@ -29,6 +29,7 @@ dependencies {
shadow library.java.jackson_databind
testCompile project(path: ":beam-runners-direct-java", configuration: "shadow")
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompileOnly library.java.findbugs_annotations
}
1 change: 1 addition & 0 deletions sdks/java/extensions/join-library/build.gradle
Expand Up @@ -27,6 +27,7 @@ dependencies {
shadow project(path: ":beam-sdks-java-core", configuration: "shadow")
testCompile project(path: ":beam-runners-direct-java", configuration: "shadow")
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompileOnly library.java.findbugs_annotations
}
1 change: 1 addition & 0 deletions sdks/java/extensions/protobuf/build.gradle
Expand Up @@ -30,6 +30,7 @@ dependencies {
shadow library.java.findbugs_annotations
testCompile project(path: ":beam-sdks-java-core", configuration: "shadowTest")
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.mockito_core
testCompile library.java.junit
testCompile library.java.slf4j_jdk14
Expand Down
1 change: 1 addition & 0 deletions sdks/java/extensions/sketching/build.gradle
Expand Up @@ -37,5 +37,6 @@ dependencies {
shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest")
shadowTest project(path: ":beam-runners-direct-java", configuration: "shadow")
shadowTest library.java.hamcrest_core
shadowTest library.java.hamcrest_library
shadowTest library.java.junit
}
1 change: 1 addition & 0 deletions sdks/java/extensions/sorter/build.gradle
Expand Up @@ -29,6 +29,7 @@ dependencies {
provided library.java.hadoop_common
testCompile project(path: ":beam-runners-direct-java", configuration: "shadow")
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.mockito_core
testCompile library.java.junit
testCompileOnly library.java.findbugs_annotations
Expand Down
1 change: 1 addition & 0 deletions sdks/java/extensions/sql/build.gradle
Expand Up @@ -80,6 +80,7 @@ dependencies {
shadowTest library.java.slf4j_jdk14
shadowTest library.java.junit
shadowTest library.java.hamcrest_core
shadowTest library.java.hamcrest_library
shadowTest library.java.mockito_core
shadowTest library.java.quickcheck_core
}
Expand Down
1 change: 1 addition & 0 deletions sdks/java/extensions/sql/jdbc/build.gradle
Expand Up @@ -30,6 +30,7 @@ dependencies {
compile library.java.slf4j_jdk14
compileOnly library.java.findbugs_annotations
testCompileOnly library.java.findbugs_annotations
testCompile library.java.junit
// Depending on outputs so integrationTest can run with only test dependencies.
// This enables us to test the JDBC jar being loaded on a custom classloader.
integrationTest sourceSets.test.output
Expand Down
1 change: 1 addition & 0 deletions sdks/java/fn-execution/build.gradle
Expand Up @@ -37,6 +37,7 @@ dependencies {
shadow library.java.grpc_stub
shadow library.java.grpc_netty
shadow library.java.netty_transport_native_epoll
provided library.java.junit
Copy link
Member

@iemejia iemejia Jun 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a mistake or what is the sense of having it provided and testCompile too? testCompile seems enough.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testCompile only applies to the test source set.
provided applies to the main source set, there are some test utility classes in the main source set that rely on junit classes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well my point was about actually the next line where the junit dependency is repeated but as testCompile which is unneeded given that it is now covered by provided.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(actually I made a mistake in the comment it was 'provided seems enough'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Now I understand your point.

testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
Expand Down
1 change: 1 addition & 0 deletions sdks/java/harness/build.gradle
Expand Up @@ -61,6 +61,7 @@ dependencies {
compile library.java.slf4j_api
provided library.java.error_prone_annotations
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompile library.java.mockito_core
testCompile library.java.slf4j_jdk14
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/amazon-web-services/build.gradle
Expand Up @@ -41,6 +41,7 @@ dependencies {
testCompileOnly library.java.findbugs_annotations
shadowTest library.java.guava_testlib
shadowTest library.java.hamcrest_core
shadowTest library.java.hamcrest_library
shadowTest library.java.mockito_core
shadowTest library.java.junit
shadowTest library.java.slf4j_jdk14
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/amqp/build.gradle
Expand Up @@ -34,6 +34,7 @@ dependencies {
testCompile library.java.slf4j_jdk14
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.activemq_broker
testCompile library.java.activemq_amqp
testCompile library.java.activemq_junit
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/cassandra/build.gradle
Expand Up @@ -38,6 +38,7 @@ dependencies {
testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest")
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.slf4j_jdk14
testCompile library.java.mockito_core
testCompileOnly library.java.findbugs_annotations
Expand Down
Expand Up @@ -39,6 +39,7 @@ dependencies {
testCompile "org.apache.logging.log4j:log4j-api:$log4j_version"
testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.slf4j_jdk14
testCompile library.java.commons_io_1x
testCompile library.java.junit
Expand Down
Expand Up @@ -58,6 +58,7 @@ dependencies {
testCompile library.java.slf4j_api
testCompile "net.java.dev.jna:jna:$jna_version"
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.slf4j_jdk14
testCompile library.java.commons_io_1x
testCompile library.java.junit
Expand Down
Expand Up @@ -41,6 +41,7 @@ dependencies {
testCompile "org.apache.logging.log4j:log4j-api:$log4j_version"
testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.slf4j_jdk14
testCompile library.java.commons_io_1x
testCompile library.java.junit
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/google-cloud-platform/build.gradle
Expand Up @@ -75,6 +75,7 @@ dependencies {
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.hamcrest_library
shadowTest library.java.mockito_core
shadowTest library.java.junit
shadowTest library.java.slf4j_jdk14
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/hadoop-common/build.gradle
Expand Up @@ -31,6 +31,7 @@ dependencies {
provided library.java.hadoop_mapreduce_client_core
testCompile library.java.commons_lang3
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompileOnly library.java.findbugs_annotations
}
1 change: 1 addition & 0 deletions sdks/java/io/hadoop-file-system/build.gradle
Expand Up @@ -37,6 +37,7 @@ dependencies {
testCompile project(path: ":beam-sdks-java-core", configuration: "shadowTest")
testCompile library.java.guava_testlib
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.mockito_core
testCompile library.java.junit
testCompile library.java.hadoop_minicluster
Expand Down
2 changes: 2 additions & 0 deletions sdks/java/io/hadoop-input-format/build.gradle
Expand Up @@ -74,6 +74,8 @@ dependencies {
testCompile library.java.postgres
testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
shadow library.java.commons_io_2x
testCompileOnly library.java.findbugs_annotations
}
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/hbase/build.gradle
Expand Up @@ -50,6 +50,7 @@ dependencies {
testCompile library.java.commons_lang3
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.hadoop_minicluster
testCompile library.java.hadoop_hdfs
testCompile library.java.hadoop_common
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/hcatalog/build.gradle
Expand Up @@ -66,6 +66,7 @@ dependencies {
testCompile library.java.commons_io_2x
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile "org.apache.hive.hcatalog:hive-hcatalog-core:$hive_version:tests"
testCompile "org.apache.hive:hive-exec:$hive_version"
testCompile "org.apache.hive:hive-common:$hive_version"
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/jdbc/build.gradle
Expand Up @@ -36,6 +36,7 @@ dependencies {
testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest")
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.slf4j_api
testCompile library.java.slf4j_jdk14
testCompile library.java.postgres
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/jms/build.gradle
Expand Up @@ -38,6 +38,7 @@ dependencies {
testCompile library.java.activemq_client
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.slf4j_jdk14
testCompileOnly library.java.findbugs_annotations
}
1 change: 1 addition & 0 deletions sdks/java/io/kafka/build.gradle
Expand Up @@ -36,6 +36,7 @@ dependencies {
testCompile project(path: ":beam-runners-direct-java", configuration: "shadow")
testCompile project(path: ":beam-sdks-java-core", configuration: "shadowTest")
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompile library.java.slf4j_jdk14
testCompileOnly library.java.findbugs_annotations
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/kinesis/build.gradle
Expand Up @@ -50,6 +50,7 @@ dependencies {
testCompile library.java.mockito_core
testCompile library.java.guava_testlib
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.slf4j_jdk14
testCompile "org.assertj:assertj-core:2.5.0"
testCompileOnly library.java.findbugs_annotations
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/mongodb/build.gradle
Expand Up @@ -36,6 +36,7 @@ dependencies {
testCompile library.java.junit
testCompile library.java.slf4j_jdk14
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadow")
testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadowTest")
testCompile "de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.50.1"
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/mqtt/build.gradle
Expand Up @@ -37,6 +37,7 @@ dependencies {
testCompile library.java.activemq_kahadb_store
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.slf4j_jdk14
testCompileOnly library.java.findbugs_annotations
}
1 change: 1 addition & 0 deletions sdks/java/io/parquet/build.gradle
Expand Up @@ -40,6 +40,7 @@ dependencies {
testCompile project(path: ":beam-runners-direct-java", configuration: "shadow")
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.slf4j_jdk14
testCompileOnly library.java.findbugs_annotations
}
1 change: 1 addition & 0 deletions sdks/java/io/redis/build.gradle
Expand Up @@ -32,6 +32,7 @@ dependencies {
testCompile library.java.junit
testCompile library.java.slf4j_jdk14
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile "com.github.kstyrc:embedded-redis:0.6"
testCompileOnly library.java.findbugs_annotations
}
1 change: 1 addition & 0 deletions sdks/java/io/solr/build.gradle
Expand Up @@ -34,6 +34,7 @@ dependencies {
testCompile project(path: ":beam-sdks-java-io-common", configuration: "shadow")
testCompile project(path: ":beam-runners-direct-java", configuration: "shadow")
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompile library.java.slf4j_api
testCompile "org.apache.solr:solr-test-framework:5.5.4"
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/tika/build.gradle
Expand Up @@ -36,6 +36,7 @@ dependencies {
testCompile project(path: ":beam-runners-direct-java", configuration: "shadow")
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile "org.apache.tika:tika-parsers:$tika_version"
testCompileOnly library.java.findbugs_annotations
testCompileOnly "biz.aQute:bndlib:$bndlib_version"
Expand Down
1 change: 1 addition & 0 deletions sdks/java/io/xml/build.gradle
Expand Up @@ -35,5 +35,6 @@ dependencies {
testCompile library.java.junit
testCompile library.java.slf4j_jdk14
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompileOnly library.java.findbugs_annotations
}
5 changes: 3 additions & 2 deletions sdks/java/nexmark/build.gradle
Expand Up @@ -57,13 +57,14 @@ dependencies {
shadow library.java.joda_time
shadow library.java.slf4j_api
shadow library.java.findbugs_jsr305
shadow library.java.junit
shadow library.java.hamcrest_core
shadow library.java.commons_lang3
shadow library.java.kafka_clients
shadow project(path: ":beam-runners-direct-java", configuration: "shadow")
shadow library.java.slf4j_jdk14
provided library.java.junit
provided library.java.hamcrest_core
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompileOnly library.java.findbugs_annotations

gradleRun project(path: project.path, configuration: "shadow")
Expand Down