Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions examples/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,6 @@ artifact includes all Apache Beam Java SDK examples."""

apply from: "$projectDir/common.gradle"

/** Define the list of runners which execute a precommit test.
* Some runners are run from separate projects, see the preCommit task below
* for details.
*/
def preCommitRunners = ["directRunner", "flinkRunner", "sparkRunner"]
// The following runners have configuration created but not added to preCommit
def nonPreCommitRunners = ["dataflowRunner", "prismRunner"]
for (String runner : preCommitRunners) {
configurations.create(runner + "PreCommit")
}
for (String runner: nonPreCommitRunners) {
configurations.create(runner + "PreCommit")
}
configurations.sparkRunnerPreCommit {
// Ban certain dependencies to prevent a StackOverflow within Spark
// because JUL -> SLF4J -> JUL, and similarly JDK14 -> SLF4J -> JDK14
exclude group: "org.slf4j", module: "jul-to-slf4j"
exclude group: "org.slf4j", module: "slf4j-jdk14"
}

dependencies {
implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
implementation library.java.vendored_guava_32_1_2_jre
Expand Down Expand Up @@ -124,14 +104,6 @@ dependencies {
for (String runner : preCommitRunners) {
delegate.add(runner + "PreCommit", project(path: ":examples:java", configuration: "testRuntimeMigration"))
}
directRunnerPreCommit project(path: ":runners:direct-java", configuration: "shadow")
flinkRunnerPreCommit project(":runners:flink:${project.ext.latestFlinkVersion}")
sparkRunnerPreCommit project(":runners:spark:3")
sparkRunnerPreCommit project(":sdks:java:io:hadoop-file-system")
dataflowRunnerPreCommit project(":runners:google-cloud-dataflow-java")
dataflowRunnerPreCommit project(":runners:google-cloud-dataflow-java:worker") // v2 worker
dataflowRunnerPreCommit project(":sdks:java:harness") // v2 worker
prismRunnerPreCommit project(":runners:prism:java")

// Add dependency if requested on command line for runner
if (project.hasProperty("runnerDependency")) {
Expand Down
31 changes: 31 additions & 0 deletions examples/java/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,37 @@
* limitations under the License.
*/

/** Define the list of runners which execute a precommit test.
* Some runners are run from separate projects, see the preCommit task below
* for details.
*/
project.ext.preCommitRunners = ["directRunner", "flinkRunner", "sparkRunner"]
// The following runners have configuration created but not added to preCommit
project.ext.nonPreCommitRunners = ["dataflowRunner", "prismRunner"]
for (String runner : ext.preCommitRunners) {
configurations.create(runner + "PreCommit")
}
for (String runner: ext.nonPreCommitRunners) {
configurations.create(runner + "PreCommit")
}
configurations.sparkRunnerPreCommit {
// Ban certain dependencies to prevent a StackOverflow within Spark
// because JUL -> SLF4J -> JUL, and similarly JDK14 -> SLF4J -> JDK14
exclude group: "org.slf4j", module: "jul-to-slf4j"
exclude group: "org.slf4j", module: "slf4j-jdk14"
}

dependencies {
directRunnerPreCommit project(path: ":runners:direct-java", configuration: "shadow")
flinkRunnerPreCommit project(":runners:flink:${project.ext.latestFlinkVersion}")
sparkRunnerPreCommit project(":runners:spark:3")
sparkRunnerPreCommit project(":sdks:java:io:hadoop-file-system")
dataflowRunnerPreCommit project(":runners:google-cloud-dataflow-java")
dataflowRunnerPreCommit project(":runners:google-cloud-dataflow-java:worker") // v1 worker
dataflowRunnerPreCommit project(":sdks:java:harness") // v2 worker
prismRunnerPreCommit project(":runners:prism:java")
}

/*
* A convenient task to run individual example directly on Beam repo.
*
Expand Down
28 changes: 0 additions & 28 deletions examples/java/iceberg/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,6 @@ ext.summary = """Apache Beam Java SDK examples using IcebergIO."""

apply from: "$project.rootDir/examples/java/common.gradle"

/** Define the list of runners which execute a precommit test.
* Some runners are run from separate projects, see the preCommit task below
* for details.
*/
def preCommitRunners = ["directRunner", "flinkRunner", "sparkRunner"]
// The following runners have configuration created but not added to preCommit
def nonPreCommitRunners = ["dataflowRunner", "prismRunner"]
for (String runner : preCommitRunners) {
configurations.create(runner + "PreCommit")
}
for (String runner: nonPreCommitRunners) {
configurations.create(runner + "PreCommit")
}
configurations.sparkRunnerPreCommit {
// Ban certain dependencies to prevent a StackOverflow within Spark
// because JUL -> SLF4J -> JUL, and similarly JDK14 -> SLF4J -> JDK14
exclude group: "org.slf4j", module: "jul-to-slf4j"
exclude group: "org.slf4j", module: "slf4j-jdk14"
}

dependencies {
implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
runtimeOnly project(":sdks:java:io:iceberg")
Expand All @@ -75,14 +55,6 @@ dependencies {
for (String runner : preCommitRunners) {
delegate.add(runner + "PreCommit", project(path: ":examples:java", configuration: "testRuntimeMigration"))
}
directRunnerPreCommit project(path: ":runners:direct-java", configuration: "shadow")
flinkRunnerPreCommit project(":runners:flink:${project.ext.latestFlinkVersion}")
sparkRunnerPreCommit project(":runners:spark:3")
sparkRunnerPreCommit project(":sdks:java:io:hadoop-file-system")
dataflowRunnerPreCommit project(":runners:google-cloud-dataflow-java")
dataflowRunnerPreCommit project(":runners:google-cloud-dataflow-java:worker") // v2 worker
dataflowRunnerPreCommit project(":sdks:java:harness") // v2 worker
prismRunnerPreCommit project(":runners:prism:java")

// Add dependency if requested on command line for runner
if (project.hasProperty("runnerDependency")) {
Expand Down
26 changes: 1 addition & 25 deletions examples/java/sql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,7 @@ 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."""

/** Define the list of runners which execute a precommit test.
* Some runners are run from separate projects, see the preCommit task below
* for details.
*/
def preCommitRunners = ["directRunner", "flinkRunner", "sparkRunner"]
for (String runner : preCommitRunners) {
configurations.create(runner + "PreCommit")
}
configurations.sparkRunnerPreCommit {
// Ban certain dependencies to prevent a StackOverflow within Spark
// because JUL -> SLF4J -> JUL, and similarly JDK14 -> SLF4J -> JDK14
exclude group: "org.slf4j", module: "jul-to-slf4j"
exclude group: "org.slf4j", module: "slf4j-jdk14"
}
apply from: "$project.rootDir/examples/java/common.gradle"

dependencies {
implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
Expand All @@ -70,10 +57,6 @@ dependencies {
for (String runner : preCommitRunners) {
delegate.add(runner + "PreCommit", project(path: ":examples:java", configuration: "testRuntimeMigration"))
}
directRunnerPreCommit project(path: ":runners:direct-java", configuration: "shadow")
flinkRunnerPreCommit project(":runners:flink:${project.ext.latestFlinkVersion}")
sparkRunnerPreCommit project(":runners:spark:3")
sparkRunnerPreCommit project(":sdks:java:io:hadoop-file-system")

// Add dependency if requested on command line for runner
if (project.hasProperty("runnerDependency")) {
Expand Down Expand Up @@ -113,10 +96,3 @@ task preCommit() {
dependsOn runner + "PreCommit"
}
}

tasks.create(name:"execute", type:JavaExec) {
main = project.hasProperty("mainClass") ? project.getProperty("mainClass") : "NONE"
classpath = sourceSets.main.runtimeClasspath
systemProperties System.getProperties()
args project.hasProperty("exec.args") ? project.getProperty("exec.args").split() : []
}
Loading