-
Notifications
You must be signed in to change notification settings - Fork 59
/
build.gradle
164 lines (148 loc) · 6.03 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
buildscript {
ext.pegasusVersion = '29.6.9'
ext.junitJupiterVersion = '5.8.2'
apply from: './repositories.gradle'
buildscript.repositories.addAll(project.repositories)
dependencies {
classpath 'com.commercehub.gradle.plugin:gradle-avro-plugin:0.99.99'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.6.1'
classpath 'com.github.node-gradle:gradle-node-plugin:2.2.4'
classpath 'com.linkedin.pegasus:gradle-plugins:' + pegasusVersion
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.1.2.RELEASE'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.24.5"
classpath "org.shipkit:shipkit-auto-version:1.1.1"
classpath "org.shipkit:shipkit-changelog:1.1.1"
}
}
project.ext.spec = [
'product' : [
'pegasus' : [
'd2' : 'com.linkedin.pegasus:d2:' + pegasusVersion,
'data' : 'com.linkedin.pegasus:data:' + pegasusVersion,
'dataAvro1_6' : 'com.linkedin.pegasus:data-avro-1_6:' + pegasusVersion,
'generator': 'com.linkedin.pegasus:generator:' + pegasusVersion,
'gradlePlugins': 'com.linkedin.pegasus:gradle-plugins:' + pegasusVersion,
'restliCommon' : 'com.linkedin.pegasus:restli-common:' + pegasusVersion,
'restliClient' : 'com.linkedin.pegasus:restli-client:' + pegasusVersion,
'restliServer' : 'com.linkedin.pegasus:restli-server:' + pegasusVersion,
'restliSpringBridge': 'com.linkedin.pegasus:restli-spring-bridge:' + pegasusVersion,
]
]
]
project.ext.externalDependency = [
'assertJ': 'org.assertj:assertj-core:3.11.1',
'commonsIo': 'commons-io:commons-io:2.16.1',
'commonsLang': 'commons-lang:commons-lang:2.6',
'caffeine': 'com.github.ben-manes.caffeine:caffeine:2.9.2',
'ebean': 'io.ebean:ebean:11.33.3',
'ebeanAgent': 'io.ebean:ebean-agent:11.27.1',
'elasticSearchRest': 'org.elasticsearch.client:elasticsearch-rest-high-level-client:5.6.8',
'elasticSearchTransport': 'org.elasticsearch.client:transport:5.6.8',
'elasticSearchRest7': 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.17.24',
'elasticSearchTransport7': 'org.elasticsearch.client:transport:7.17.24',
'flywayCore': 'org.flywaydb:flyway-core:7.15.0',
'guava': 'com.google.guava:guava:32.0.0-jre',
'h2': 'com.h2database:h2:1.4.196',
'jacksonCore': 'com.fasterxml.jackson.core:jackson-core:2.17.2',
'jacksonDataBind': 'com.fasterxml.jackson.core:jackson-databind:2.17.2',
'javatuples': 'org.javatuples:javatuples:1.2',
'jsonSimple': 'com.googlecode.json-simple:json-simple:1.1.1',
'junitJupiterApi': "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion",
'junitJupiterParams': "org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion",
'junitJupiterEngine': "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion",
'junitVintageEngine': "org.junit.vintage:junit-vintage-engine:$junitJupiterVersion",
'log4j': 'org.apache.logging.log4j:log4j-slf4j-impl:2.18.0',
'lombok': 'org.projectlombok:lombok:1.18.30',
'lombokAnnotationProcessor': 'org.projectlombok:lombok:1.18.30',
'maria4j': 'ch.vorburger.mariaDB4j:mariaDB4j:2.5.3',
'mockito': 'org.mockito:mockito-core:4.11.0',
'mockitoInline': 'org.mockito:mockito-inline:3.11.2',
'mysql': 'mysql:mysql-connector-java:8.0.29',
'neo4jHarness': 'org.neo4j.test:neo4j-harness:3.4.11',
'neo4jJavaDriver': 'org.neo4j.driver:neo4j-java-driver:4.0.0',
'parseqTest': 'com.linkedin.parseq:parseq-test-api:5.1.20',
'postgresql': 'org.postgresql:postgresql:42.2.14',
'reflections': 'org.reflections:reflections:0.9.11',
'rythmEngine': 'org.rythmengine:rythm-engine:1.4.2',
'spock': 'org.spockframework:spock-core:1.3-groovy-2.4',
'testContainers': 'org.testcontainers:testcontainers:1.15.1',
'testContainersJunit': 'org.testcontainers:junit-jupiter:1.15.1',
'testng': 'org.testng:testng:6.9.9'
]
apply plugin: 'com.diffplug.spotless'
apply from: "./gradle/release.gradle"
// TODO expand this to all projects and then delete this allow list. This list is letting us fix errors over time rather
// than in one big change.
def wErrorProjects = [
project(':core-models'),
// project(':dao-api'),
// project(':dao-api-impl'),
// project(':restli-resources'),
project(':testing'),
project(':validators')
]
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
gradle.projectsEvaluated {
if (wErrorProjects.contains(project)) {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all" << "-Werror" <<
"-Xlint:-deprecation" << // TODO
"-Xlint:-processing" << // TODO we have annotations like @Nonnull that need a processor
"-Xlint:-serial" // I don't think we care about having custom Exception subclasses be serializable...
}
}
}
}
subprojects { sp ->
apply plugin: 'maven'
apply plugin: 'jacoco'
plugins.withType(JavaPlugin) {
dependencies {
testCompile externalDependency.testng
}
tasks.withType(Test) {
useTestNG()
}
test {
finalizedBy jacocoTestReport
}
checkstyle {
configDirectory = file("${project.rootDir}/gradle/checkstyle")
sourceSets = [ getProject().sourceSets.main, getProject().sourceSets.test ]
toolVersion = "8.35"
maxWarnings = 0
ignoreFailures = false
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
csv.enabled false
}
}
}
afterEvaluate {
if (project.plugins.hasPlugin('java')) {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
afterEvaluate {
if (project.plugins.hasPlugin('pegasus')) {
dependencies {
dataTemplateCompile spec.product.pegasus.data
restClientCompile spec.product.pegasus.restliClient
}
}
}
}
spotless {
format 'md', {
target '**/*.md'
targetExclude '.github/**' // GitHub renders these documents differently...
prettier().config([printWidth: 120, proseWrap: 'always'])
}
}