forked from pravega/flink-connectors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
126 lines (114 loc) · 4.94 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
/**
* 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
*
*/
buildscript {
repositories {
jcenter()
}
dependencies {
classpath group: 'com.github.jengelman.gradle.plugins', name:'shadow', version: shadowGradlePlugin
}
}
group = "io.pravega"
version = connectorVersion
apply plugin: 'eclipse'
apply from: 'gradle/idea.gradle'
apply from: 'gradle/java.gradle'
apply from: 'gradle/checkstyle.gradle'
apply from: 'gradle/findbugs.gradle'
apply from: 'gradle/jacoco.gradle'
apply from: 'gradle/maven.gradle'
repositories {
jcenter()
mavenCentral()
maven {
url "https://repository.apache.org/snapshots"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
mavenLocal()
}
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor 60, 'minutes'
cacheChangingModulesFor 60, 'minutes'
}
}
configurations {
testCompile.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
testCompile.exclude group: 'log4j', module: 'log4j'
}
dependencies {
compile group: 'io.pravega', name: 'pravega-client', version: pravegaVersion
compile group: 'io.pravega', name: 'pravega-common', version: pravegaVersion
compile group: 'io.pravega', name: 'pravega-shared', version: pravegaVersion
compile group: 'io.pravega', name: 'pravega-shared-metrics', version: pravegaVersion
compile group: 'io.pravega', name: 'pravega-shared-protocol', version: pravegaVersion
compile group: 'io.pravega', name: 'pravega-shared-controller-api', version: pravegaVersion
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jApiVersion
compileOnly group: 'org.apache.flink', name: 'flink-streaming-java_2.11', version: flinkVersion
testCompile group: 'junit', name: 'junit', version: junitVersion
testCompile group: 'org.apache.flink', name: 'flink-tests_2.11', version: flinkVersion
testCompile group: 'org.apache.flink', name: 'flink-test-utils_2.11', version: flinkVersion
testCompile group: 'org.apache.flink', name: 'flink-streaming-contrib_2.11', version: flinkVersion
testCompile group: 'io.pravega', name: 'pravega-standalone', version: pravegaVersion
// configuring the shaded pom dependencies
shadow group: 'org.slf4j', name: 'slf4j-api', version: slf4jApiVersion
shadow group: 'org.apache.flink', name: 'flink-streaming-java_2.11', version: flinkVersion
}
shadowJar {
dependencies {
// 'include' specific dependencies in the shadow jar
// IMPORTANT: transitive dependencies must be manually listed here!
include dependency("com.google.guava:guava")
include dependency("commons-lang:commons-lang")
include dependency("org.apache.commons:commons-lang3")
include dependency("commons-io:commons-io")
include dependency("io.netty:netty-common")
include dependency("io.netty:netty-buffer")
include dependency("io.netty:netty-resolver")
include dependency("io.netty:netty-transport")
include dependency("io.netty:netty-codec")
include dependency("io.netty:netty-codec-http")
include dependency("io.netty:netty-codec-http2")
include dependency("io.netty:netty-codec-socks")
include dependency("io.netty:netty-handler")
include dependency("io.netty:netty-handler-proxy")
include dependency("io.grpc:grpc-core")
include dependency("io.grpc:grpc-protobuf")
include dependency("io.grpc:grpc-stub")
include dependency("io.grpc:grpc-context")
include dependency("io.grpc:grpc-netty")
include dependency("io.grpc:grpc-protobuf-lite")
include dependency("com.google.protobuf:protobuf-java-util")
include dependency("com.google.protobuf:protobuf-java")
include dependency("com.google.code.gson:gson")
include dependency("com.google.instrumentation:instrumentation-api")
include dependency("io.pravega:pravega-client")
include dependency("io.pravega:pravega-common")
include dependency("io.pravega:pravega-shared")
include dependency("io.pravega:pravega-shared-metrics")
include dependency("io.pravega:pravega-shared-protocol")
include dependency("io.pravega:pravega-shared-controller-api")
}
// Shading the libraries which could cause potential version conflicts with flink.
relocate "com.google", "io.pravega.shaded.com.google"
relocate "org.apache.commons", "io.pravega.shaded.org.apache.commons"
relocate "io.grpc", "io.pravega.shaded.io.grpc"
relocate "io.netty", "io.pravega.shaded.io.netty"
classifier = null
mergeServiceFiles()
}
javadoc {
title = "Pravega Flink Connector"
failOnError = false
exclude "**/impl/**";
}