forked from pravega/flink-connectors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
177 lines (161 loc) · 7.89 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/**
* Copyright Pravega Authors.
*
* 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
*
* 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.
*/
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.jengelman.gradle.plugins:shadow:${shadowGradlePlugin}"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:${bintrayPluginVersion}"
classpath group: 'org.hidetake', name: 'gradle-ssh-plugin', version: gradleSshPluginVersion
classpath "ru.vyarus:gradle-mkdocs-plugin:${gradleMkdocsPluginVersion}"
classpath "org.ajoberstar.grgit:grgit-gradle:${gradleGitPluginVersion}"
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:${spotbugsPluginVersion}"
}
}
plugins {
id "com.github.spotbugs"
}
apply plugin: 'eclipse'
apply plugin: 'org.ajoberstar.grgit'
apply from: 'gradle/java.gradle'
apply from: 'gradle/checkstyle.gradle'
apply from: 'gradle/spotbugs.gradle'
apply from: 'gradle/jacoco.gradle'
apply from: 'gradle/maven.gradle'
apply from: 'gradle/mkdocs.gradle'
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
group = "io.pravega"
version = getProjectVersion()
repositories {
mavenCentral()
maven {
url "https://maven.pkg.github.com/pravega/pravega"
credentials {
username = "pravega-public"
password = "\u0067\u0068\u0070\u005F\u0048\u0034\u0046\u0079\u0047\u005A\u0031\u006B\u0056\u0030\u0051\u0070\u006B\u0079\u0058\u006D\u0035\u0063\u0034\u0055\u0033\u006E\u0032\u0065\u0078\u0039\u0032\u0046\u006E\u0071\u0033\u0053\u0046\u0076\u005A\u0049"
}
}
if (findProperty("repositoryUrl")) {
maven {
url findProperty("repositoryUrl")
allowInsecureProtocol = true
}
}
else {
maven {
url "https://repository.apache.org/snapshots"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
}
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor 60, 'minutes'
cacheChangingModulesFor 60, 'minutes'
}
}
configurations {
testImplementation.extendsFrom(compileOnly)
testImplementation {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'log4j', module: 'log4j'
resolutionStrategy {
force group: 'io.netty', name: 'netty-common', version: nettyVersion
force group: 'io.netty', name: 'netty-transport', version: nettyVersion
force group: 'io.netty', name: 'netty-handler', version: nettyVersion
force group: 'io.netty', name: 'netty-codec', version: nettyVersion
force group: 'io.netty', name: 'netty-codec-http', version: nettyVersion
force group: 'io.netty', name: 'netty-codec-http2', version: nettyVersion
force group: 'io.netty', name: 'netty-codec-socks', version: nettyVersion
force group: 'io.netty', name: 'netty-handler-proxy', version: nettyVersion
force group: 'io.netty', name: 'netty-transport-native-epoll', version: nettyVersion
force group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: nettyVersion
}
}
}
dependencies {
compileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: spotbugsAnnotationsVersion
api (group: 'io.pravega', name: 'pravega-client', version: pravegaVersion) {
exclude group: 'org.slf4j', module: 'slf4j-api'
}
// provided by application if needed
compileOnly group: 'io.pravega', name: 'schemaregistry-serializers', classifier: 'all', version: schemaRegistryVersion
compileOnly group: 'org.slf4j', name: 'slf4j-api', version: slf4jApiVersion // provided by flink-runtime
compileOnly group: 'org.apache.flink', name: 'flink-streaming-java', version: flinkVersion // provided by application
compileOnly group: 'org.apache.flink', name: 'flink-table-planner-loader', version: flinkVersion // provided by application
compileOnly group: 'org.apache.flink', name: 'flink-table-api-java-bridge', version: flinkVersion // provided by application
compileOnly group: 'org.apache.flink', name: 'flink-table-runtime', version: flinkVersion // provided by application
compileOnly group: 'org.apache.flink', name: 'flink-connector-base', version: flinkVersion
compileOnly group: 'org.apache.flink', name: 'flink-json', version: flinkVersion
compileOnly group: 'org.apache.flink', name: 'flink-avro', version: flinkVersion
testImplementation (group: 'io.pravega', name: 'pravega-standalone', version: pravegaVersion) {
exclude group: 'org.slf4j', module: 'slf4j-api'
exclude group: 'ch.qos.logback', module: 'logback-classic'
exclude group: 'io.netty'
}
testImplementation (group: 'io.pravega', name: 'schemaregistry-server', version: schemaRegistryVersion) {
transitive = false
}
testImplementation group: 'org.mockito', name: 'mockito-inline', version: mockitoVersion
testImplementation group: 'org.apache.flink', name: 'flink-connector-test-utils', version: flinkVersion
testImplementation group: 'org.apache.flink', name: 'flink-core', classifier: 'tests', version: flinkVersion
testImplementation group: 'org.apache.flink', name: 'flink-tests', classifier: 'tests', version: flinkVersion
testImplementation (group: 'org.apache.flink', name: 'flink-test-utils', version: flinkVersion) {
exclude group: 'org.apache.zookeeper', module: 'zookeeper'
}
testImplementation group: 'org.apache.flink', name: 'flink-runtime', classifier: 'tests', version: flinkVersion
testImplementation group: 'org.apache.flink', name: 'flink-table-common', classifier: 'tests', version: flinkVersion
testImplementation group: 'org.apache.flink', name: 'flink-streaming-java', classifier: 'tests', version: flinkVersion
testImplementation group: 'org.apache.flink', name: 'flink-table-planner_' + flinkScalaVersion, classifier: 'tests', version: flinkVersion
testImplementation group: 'org.apache.flink', name: 'flink-json', version: flinkVersion
testImplementation group: 'org.apache.flink', name: 'flink-avro', version: flinkVersion
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: hamcrestVersion
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: testcontainersVersion
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: junit5Version
testImplementation group: 'org.assertj', name: 'assertj-core', version: assertjVersion
}
javadoc {
title = "Pravega Flink Connector"
failOnError = false
exclude "**/impl/**"
}
def getProjectVersion() {
String ver = connectorVersion
if (ver.contains("-SNAPSHOT")) {
String versionLabel = ver.substring(0, ver.indexOf("-SNAPSHOT"))
def count = grgit.log(includes:['HEAD']).size()
def commitId = "${grgit.head().abbreviatedId}"
ver = versionLabel + "-" + count + "." + commitId + "-SNAPSHOT"
}
return ver
}
// allow system properties to be passed to the test program
// for e.g., to use standalone Pravega for running the system test "./gradlew clean build -Dpravega.uri=tcp://localhost:9090"
test {
systemProperties = System.properties
useJUnitPlatform()
}