forked from pravega/pravega-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
131 lines (114 loc) · 4.92 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
* Copyright (c) 2017 Dell Inc., or its subsidiaries. All Rights Reserved.
*
* Licensed 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
*
*/
plugins {
id 'com.github.johnrengelman.shadow' version '2.0.3'
}
apply plugin: "java"
apply plugin: "scala"
apply plugin: "distribution"
apply plugin: 'idea'
apply plugin: 'eclipse'
sourceCompatibility = "1.8"
archivesBaseName = 'pravega-flink-examples'
dependencies {
compile "de.javakaffee:kryo-serializers:${kryoSerializerVersion}"
compile "io.pravega:pravega-keycloak-client:${pravegaKeycloakVersion}"
compile "org.scala-lang.modules:scala-java8-compat_${flinkScalaVersion}:${scalaJava8CompatVersion}"
compile "io.pravega:pravega-connectors-flink-${flinkMajorMinorVersion}_${flinkScalaVersion}:${flinkConnectorVersion}"
compile "org.apache.flink:flink-streaming-java_${flinkScalaVersion}:${flinkVersion}"
compile "org.apache.flink:flink-streaming-scala_${flinkScalaVersion}:${flinkVersion}"
compile "org.slf4j:slf4j-log4j12:${slf4jLog4JVersion}"
}
shadowJar {
dependencies {
include dependency("org.scala-lang.modules:scala-java8-compat_${flinkScalaVersion}")
include dependency("io.pravega:pravega-connectors-flink-${flinkMajorMinorVersion}_${flinkScalaVersion}")
include dependency("io.pravega:pravega-keycloak-client:${pravegaKeycloakVersion}")
}
}
task scriptWordCountWriter(type: CreateStartScripts) {
outputDir = file('build/scripts')
mainClassName = 'io.pravega.example.flink.wordcount.WordCountWriter'
applicationName = 'wordCountWriter'
classpath = files(jar.archivePath) + sourceSets.main.runtimeClasspath
}
task scriptWordCountReader(type: CreateStartScripts) {
outputDir = file('build/scripts')
mainClassName = 'io.pravega.example.flink.wordcount.WordCountReader'
applicationName = 'wordCountReader'
classpath = files(jar.archivePath) + sourceSets.main.runtimeClasspath
}
task scriptExactlyOnceWriter(type: CreateStartScripts) {
outputDir = file('build/scripts')
mainClassName = 'io.pravega.example.flink.primer.process.ExactlyOnceWriter'
applicationName = 'exactlyOnceWriter'
classpath = files(jar.archivePath) + sourceSets.main.runtimeClasspath
}
task scriptExactlyOnceChecker(type: CreateStartScripts) {
outputDir = file('build/scripts')
mainClassName = 'io.pravega.example.flink.primer.process.ExactlyOnceChecker'
applicationName = 'exactlyOnceChecker'
classpath = files(jar.archivePath) + sourceSets.main.runtimeClasspath
}
task scriptStreamCutsDataProducer(type: CreateStartScripts) {
outputDir = file('build/scripts')
mainClassName = 'io.pravega.example.flink.streamcuts.process.DataProducer'
applicationName = 'dataProducer'
classpath = files(jar.archivePath) + sourceSets.main.runtimeClasspath
}
task scriptStreamCutsStreamBookmarker(type: CreateStartScripts) {
outputDir = file('build/scripts')
mainClassName = 'io.pravega.example.flink.streamcuts.process.StreamBookmarker'
applicationName = 'streamBookmarker'
classpath = files(jar.archivePath) + sourceSets.main.runtimeClasspath
}
task scriptStreamCutsSliceProcessor(type: CreateStartScripts) {
outputDir = file('build/scripts')
mainClassName = 'io.pravega.example.flink.streamcuts.process.SliceProcessor'
applicationName = 'sliceProcessor'
classpath = files(jar.archivePath) + sourceSets.main.runtimeClasspath
}
task scriptPravegaWatermarkIngestion(type: CreateStartScripts) {
outputDir = file('build/scripts')
mainClassName = 'io.pravega.example.flink.watermark.PravegaWatermarkIngestion'
applicationName = 'pravegaWatermarkIngestion'
classpath = files(jar.archivePath) + sourceSets.main.runtimeClasspath
}
task scriptEventTimeAverage(type: CreateStartScripts) {
outputDir = file('build/scripts')
mainClassName = 'io.pravega.example.flink.watermark.EventTimeAverage'
applicationName = 'eventTimeAverage'
classpath = files(jar.archivePath) + sourceSets.main.runtimeClasspath
}
distributions {
main {
baseName = archivesBaseName
contents {
into('lib') {
from shadowJar
from(project.configurations.shadow)
from(jar)
from(project.configurations.runtime)
}
into('bin') {
from project.scriptWordCountWriter
from project.scriptWordCountReader
from project.scriptExactlyOnceWriter
from project.scriptExactlyOnceChecker
from project.scriptStreamCutsDataProducer
from project.scriptStreamCutsStreamBookmarker
from project.scriptStreamCutsSliceProcessor
from project.scriptPravegaWatermarkIngestion
from project.scriptEventTimeAverage
}
}
}
}