forked from Netflix/mantis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
166 lines (150 loc) · 6.55 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
/*
* Copyright 2019 Netflix, Inc.
*
* 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 {
gradlePluginPortal()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.netflix.nebula:gradle-netflixoss-project-plugin:10.6.0'
classpath 'com.netflix.nebula:nebula-dependency-recommender:11.+'
classpath 'io.mantisrx:mantis-gradle-plugin:1.2.+'
classpath "io.freefair.gradle:lombok-plugin:5.3.3.3"
classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
classpath("gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0")
classpath 'gradle.plugin.org.inferred:gradle-processors:3.3.0'
classpath 'com.palantir.baseline:gradle-baseline-java:4.0.0'
}
}
ext.versions = [
flink : "1.14.2",
hadoop : "2.7.7",
jsr305 : "3.0.1",
junit4 : "4.11",
junit5 : "5.4.+",
mockito : "2.0.+",
mockito3 : "3.+",
spectator: "1.3.+",
slf4j : "1.7.0",
vavr : "0.9.2",
]
ext.libraries = [
asyncHttpClient: "org.asynchttpclient:async-http-client:2.12.3",
commonsIo : "commons-io:commons-io:2.11.0",
commonsLang3 : 'org.apache.commons:commons-lang3:3.5',
flinkCore : "org.apache.flink:flink-core:${versions.flink}",
flinkRpcApi : [
"org.apache.flink:flink-rpc-core:${versions.flink}",
],
flinkRpcImpl : [
"org.apache.flink:flink-rpc-akka:${versions.flink}",
],
junit4 : [
"junit:junit:${versions.junit4}",
"junit:junit-dep:${versions.junit4}",
],
hadoopCommon : "org.apache.hadoop:hadoop-common:${versions.hadoop}",
hadoopS3 : "org.apache.hadoop:hadoop-aws:${versions.hadoop}",
jsr305 : "com.google.code.findbugs:jsr305:${versions.jsr305}", // For Nonnull annotation
junitJupiter : [
"org.junit.jupiter:junit-jupiter-api:${versions.junit5}",
"org.junit.jupiter:junit-jupiter-engine:${versions.junit5}",
"org.junit.jupiter:junit-jupiter-params:${versions.junit5}",
],
mantisShaded : "io.mantisrx:mantis-shaded:2.0.8",
mockitoAll : "org.mockito:mockito-all:${versions.mockito}",
mockitoCore : "org.mockito:mockito-core:${versions.mockito}",
mockitoCore3 : "org.mockito:mockito-core:${versions.mockito3}",
mockneat : "net.andreinc:mockneat:0.4.8",
rxJava : "io.reactivex:rxjava:1.3.8",
rxNettyShaded : "com.netflix:mantis-rxnetty:0.4.19.1",
slf4jApi : "org.slf4j:slf4j-api:${versions.slf4j}",
slf4jLog4j12 : "org.slf4j:slf4j-log4j12:${versions.slf4j}",
spectatorApi : "com.netflix.spectator:spectator-api:${versions.spectator}",
spotifyFutures : "com.spotify:completable-futures:0.3.1",
vavr : "io.vavr:vavr:${versions.vavr}",
vavrJackson : "io.vavr:vavr-jackson:${versions.vavr}",
vavrTest : "io.vavr:vavr-test:${versions.vavr}",
zip4j : "net.lingala.zip4j:zip4j:2.9.0"
]
allprojects {
apply plugin: 'nebula.netflixoss'
}
def printAllReleasedArtifacts = project.tasks.create('printAllReleasedArtifacts')
project.snapshot.configure { finalizedBy printAllReleasedArtifacts }
subprojects {
apply plugin: 'java-library'
// Apply lombok plugin and disabled the default config file generation.
apply plugin: "io.freefair.lombok"
generateLombokConfig.enabled = false
lombok {
version = "1.18.20"
}
group = 'io.mantisrx'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
if (project.hasProperty('useMavenLocal')) {
repositories {
mavenLocal()
}
}
configurations.compileClasspath {
if (!"mantis-shaded".equals(project.name)) {
exclude group: 'com.fasterxml.jackson.core'
exclude group: 'com.fasterxml.jackson.datatype'
exclude group: 'com.fasterxml.jackson.module'
exclude group: 'com.fasterxml.jackson.dataformat'
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'io.netty', module: 'netty'
exclude group: 'io.vavr', module: 'vavr-jackson'
exclude group: 'jline', module: 'jline'
exclude group: 'org.apache.curator'
exclude group: 'org.apache.zookeeper'
exclude group: 'org.apache.jute'
}
exclude group: 'ch.qos.logback', module: 'logback-classic'
}
repositories {
mavenCentral()
maven {
url "https://netflixoss.jfrog.io/artifactory/maven-oss-candidates"
}
}
tasks.withType(Javadoc).all {
enabled = false
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
project.plugins.withType(MavenPublishPlugin) {
def printReleasedArtifact = project.tasks.create('printReleasedArtifact')
printReleasedArtifact.doLast {
def file1 = file("${buildDir}/tmp/publishNebulaPublicationToNetflixOSSRepository/maven-metadata.xml")
def file2 = file("${buildDir}/tmp/publishNebulaPublicationToNetflixOSSRepository/snapshot-maven-metadata.xml")
def xmlText = file1.exists() ? file1.text : (file2.exists() ? file2.text : "file not found")
def xml = new XmlParser(false, false).parseText(xmlText)
def snapshotVersion = xml.versioning.snapshotVersions.snapshotVersion[0].'value'.text()
logger.lifecycle("${project.group}:${project.name}:${snapshotVersion}")
file("${project.rootProject.buildDir}/versions.txt").append("${project.group}:${project.name}:${snapshotVersion}" + '\n')
}
printReleasedArtifact.dependsOn(project.rootProject.snapshot)
printAllReleasedArtifacts.dependsOn("${project.path}:printReleasedArtifact")
}
}
apply from: file('baseline.gradle')