|
| 1 | +/* |
| 2 | + * Copyright 2021 Google LLC |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +plugins { |
| 18 | + id 'java' |
| 19 | +} |
| 20 | + |
| 21 | +repositories { |
| 22 | + mavenLocal() |
| 23 | + maven { |
| 24 | + url = uri('https://repository.apache.org/content/repositories/snapshots/') |
| 25 | + } |
| 26 | + |
| 27 | + maven { |
| 28 | + url = uri('https://packages.confluent.io/maven/') |
| 29 | + } |
| 30 | + |
| 31 | + maven { |
| 32 | + url = uri('https://repo.maven.apache.org/maven2/') |
| 33 | + } |
| 34 | +} |
| 35 | + |
| 36 | +def beamVersion = '2.34.0' |
| 37 | +def slf4jVersion = '1.7.32' |
| 38 | +dependencies { |
| 39 | + implementation 'com.github.spotbugs:spotbugs-annotations:4.5.0' |
| 40 | + implementation "org.slf4j:slf4j-api:${slf4jVersion}" |
| 41 | + implementation "org.slf4j:slf4j-jdk14:${slf4jVersion}" |
| 42 | + implementation "org.apache.beam:beam-sdks-java-core:${beamVersion}" |
| 43 | + implementation "org.apache.beam:beam-sdks-java-io-google-cloud-platform:${beamVersion}" |
| 44 | + implementation "org.apache.beam:beam-examples-java:${beamVersion}" |
| 45 | + runtimeOnly "org.apache.beam:beam-runners-direct-java:${beamVersion}" |
| 46 | + runtimeOnly "org.apache.beam:beam-runners-google-cloud-dataflow-java:${beamVersion}" |
| 47 | + testImplementation 'com.google.api-client:google-api-client:1.32.2' |
| 48 | + testImplementation 'com.google.apis:google-api-services-dataflow:v1b3-rev20210825-1.32.1' |
| 49 | + testImplementation 'com.google.cloud:google-cloud-core:2.3.2' |
| 50 | + testImplementation 'com.google.cloud:google-cloud-storage:2.1.9' |
| 51 | + testImplementation 'com.google.truth:truth:1.1.3' |
| 52 | + testImplementation 'org.hamcrest:hamcrest-all:1.3' |
| 53 | +} |
| 54 | + |
| 55 | +group = 'com.example' |
| 56 | +version = '1.0.0-SNAPSHOT' |
| 57 | +description = 'pubsublite-streaming' |
| 58 | + |
| 59 | +task execute (type:JavaExec) { |
| 60 | + mainClass = 'examples.PubsubliteToGcs' |
| 61 | + description('Run the Beam pipeline with gradle execute -Dexec.args=...') |
| 62 | + classpath = sourceSets.main.runtimeClasspath |
| 63 | + systemProperties System.getProperties() |
| 64 | + args System.getProperty("exec.args", "").split() |
| 65 | +} |
0 commit comments