Skip to content

Commit

Permalink
Update build.gradle files to correspond with pom.xml changes within m…
Browse files Browse the repository at this point in the history
…aster branch up to f10399d
  • Loading branch information
lukecwik committed Nov 17, 2017
1 parent 788d958 commit aff736f
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 6 deletions.
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ ext.library = [
datastore_v1_proto_client: "com.google.cloud.datastore:datastore-v1-proto-client:1.4.0",
datastore_v1_protos: "com.google.cloud.datastore:datastore-v1-protos:1.3.0",
error_prone_annotations: "com.google.errorprone:error_prone_annotations:2.0.15",
findbugs_annotations: "com.github.stephenc.findbugs:findbugs-annotations:1.3.9-1",
findbugs_jsr305: "com.google.code.findbugs:jsr305:3.0.1",
gax_grpc: "com.google.api:gax-grpc:0.20.0",
google_api_client: "com.google.api-client:google-api-client:$google_clients_version",
Expand All @@ -83,7 +84,7 @@ ext.library = [
google_api_services_bigquery: "com.google.apis:google-api-services-bigquery:v2-rev355-$google_clients_version",
google_api_services_clouddebugger: "com.google.apis:google-api-services-clouddebugger:v2-rev8-$google_clients_version",
google_api_services_cloudresourcemanager: "com.google.apis:google-api-services-cloudresourcemanager:v1-rev6-$google_clients_version",
google_api_services_dataflow: "com.google.apis:google-api-services-dataflow:v1b3-rev214-$google_clients_version",
google_api_services_dataflow: "com.google.apis:google-api-services-dataflow:v1b3-rev218-$google_clients_version",
google_api_services_pubsub: "com.google.apis:google-api-services-pubsub:v1-rev10-$google_clients_version",
google_api_services_storage: "com.google.apis:google-api-services-storage:v1-rev71-$google_clients_version",
google_auth_library_credentials: "com.google.auth:google-auth-library-credentials:$google_auth_version",
Expand Down Expand Up @@ -254,6 +255,9 @@ rat {
// Proto/grpc generated wrappers
"**/apache_beam/portability/api/*_pb2*.py",
"**/go/pkg/beam/model/**/*.pb.go",

// VCF test files
"**/apache_beam/testing/data/vcf/*",
]
}
check.dependsOn rat
1 change: 1 addition & 0 deletions runners/core-construction-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ test {

dependencies {
compile library.java.guava
compileOnly librarj.java.findbugs_annotations
shadow project(path: ":beam-model-parent:beam-model-pipeline", configuration: "shadow")
shadow project(path: ":beam-model-parent:beam-model-job-management", configuration: "shadow")
shadow project(path: ":beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-core", configuration: "shadow")
Expand Down
1 change: 1 addition & 0 deletions runners/core-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ test {

dependencies {
compile library.java.guava
compileOnly library.java.findbugs_annotations
shadow project(path: ":beam-model-parent:beam-model-pipeline", configuration: "shadow")
shadow project(path: ":beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-core", configuration: "shadow")
shadow project(path: ":beam-model-parent:beam-model-fn-execution", configuration: "shadow")
Expand Down
1 change: 1 addition & 0 deletions runners/direct-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ shadowJar {
relocate "org.apache.beam.runners.core", "org.apache.beam." + project.name.replace("-", ".") + ".repackaged.runners.core"
relocate "org.apache.beam.model", "org.apache.beam." + project.name.replace("-", ".") + ".repackaged.model"
relocate "com.google.protobuf", "org.apache.beam." + project.name.replace("-", ".") + ".repackaged.com.google.protobuf"
relocate "javax.annotation", "org.apache.beam." + project.name.replace("-", ".") + ".repackaged.javax.annotation"
}

task packageTests(type: Jar) {
Expand Down
2 changes: 1 addition & 1 deletion runners/google-cloud-dataflow-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ processResources {
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [
'dataflow.legacy_environment_major_version' : '6',
'dataflow.fnapi_environment_major_version' : '1',
'dataflow.container_version' : 'beam-master-20170926'
'dataflow.container_version' : 'beam-master-20171113'
]
}

Expand Down
12 changes: 11 additions & 1 deletion runners/java-fn-execution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

apply from: project(":").file("build_rules.gradle")
applyJavaNature(javaVersion: 1.8)
applyJavaNature()

description = "Apache Beam :: Runners :: Java Fn Execution"

Expand All @@ -30,6 +30,14 @@ description = "Apache Beam :: Runners :: Java Fn Execution"
*/
evaluationDependsOn(":beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-fn-execution")

configurations.all {
// Fn Execution contains shared utilities for Runners and Harnesses which use
// the Portability framework. Runner-side interactions must not require a
// dependency on any particular SDK, so this library must not introduce such an
// edge.
exclude group: "org.apache.beam", module: "beam-sdks-java-core"
}

dependencies {
compile library.java.guava
shadow project(path: ":beam-model-parent:beam-model-pipeline", configuration: "shadow")
Expand All @@ -38,10 +46,12 @@ dependencies {
shadow library.java.grpc_core
shadow library.java.grpc_stub
shadow library.java.grpc_netty
shadow library.java.slf4j_api
testCompile project(":beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-fn-execution").sourceSets.test.output
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.mockito_core
}

task packageTests(type: Jar) {
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {
compile library.java.byte_buddy
compile library.java.commons_compress
compile library.java.commons_lang3
compileOnly "com.github.stephenc.findbugs:findbugs-annotations:1.3.9-1"
compileOnly library.java.findbugs_annotations
shadow library.java.jackson_core
shadow library.java.jackson_annotations
shadow library.java.jackson_databind
Expand Down
5 changes: 5 additions & 0 deletions sdks/java/extensions/sql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ dependencies {
compile "org.apache.calcite:calcite-core:$calcite_version"
compile "org.apache.calcite:calcite-linq4j:$calcite_version"
compile "org.apache.calcite.avatica:avatica-core:$avatica_version"
compile "com.alibaba:fastjson:1.2.12"
compileOnly library.java.findbugs_jsr305
shadow project(path: ":beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-core", configuration: "shadow")
shadow project(path: ":beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-extensions-parent:beam-sdks-java-extensions-join-library", configuration: "shadow")
shadow library.java.slf4j_api
Expand All @@ -44,8 +46,11 @@ dependencies {
testCompile library.java.slf4j_jdk14
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.mockito_core
}

// TODO: Add support for generating fmpp

shadowJar {
dependencies {
include(dependency("org.apache.calcite:.*"))
Expand Down
12 changes: 10 additions & 2 deletions sdks/java/fn-execution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
*/

apply from: project(":").file("build_rules.gradle")
applyJavaNature(javaVersion: 1.8)
applyJavaNature()

description = "Apache Beam :: SDKs :: Java :: Harness Core"
description = "Apache Beam :: SDKs :: Java :: Fn Execution"

configurations.all {
// Fn Execution contains shared utilities for Runners and Harnesses which use
// the Portability framework. Runner-side interactions must not require a
// dependency on any particular SDK, so this library must not introduce such an
// edge.
exclude group: "org.apache.beam", module: "beam-sdks-java-core"
}

dependencies {
compile library.java.guava
Expand Down
48 changes: 48 additions & 0 deletions sdks/java/io/file-based-io-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* 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.
*/

apply from: project(":").file("build_rules.gradle")
applyJavaNature()

description = "Apache Beam :: SDKs :: Java :: File-based-io-tests"

/*
* 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-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-common")

dependencies {
shadowTest project(":beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-core")
shadowTest project(":beam-runners-parent:beam-runners-direct-java").sourceSets.test.output
shadowTest project(":beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-common")
shadowTest project(":beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-common").sourceSets.test.output
shadowTest library.java.guava
shadowTest library.java.junit
shadowTest library.java.hamcrest_core
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = "tests"
}

artifacts.archives packageTests
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ include ':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-s
include ':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-redis'
include ':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-solr'
include ':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-tika'
include ':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-file-based-io-tests'
include ':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-xml'
include ':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent'
include ':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-maven-archetypes-parent:beam-sdks-java-maven-archetypes-starter'
Expand Down Expand Up @@ -125,6 +126,7 @@ project(':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-s
project(':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-redis').projectDir = "$rootDir/sdks/java/io/redis" as File
project(':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-solr').projectDir = "$rootDir/sdks/java/io/solr" as File
project(':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-tika').projectDir = "$rootDir/sdks/java/io/tika" as File
project(':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-file-based-io-tests').projectDir = "$rootDir/sdks/java/io/file-based-io-tests" as File
project(':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent:beam-sdks-java-io-xml').projectDir = "$rootDir/sdks/java/io/xml" as File
project(':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-io-parent').projectDir = "$rootDir/sdks/java/io" as File
project(':beam-sdks-parent:beam-sdks-java-parent:beam-sdks-java-maven-archetypes-parent:beam-sdks-java-maven-archetypes-starter').projectDir = "$rootDir/sdks/java/maven-archetypes/starter" as File
Expand Down

0 comments on commit aff736f

Please sign in to comment.