-
Notifications
You must be signed in to change notification settings - Fork 73
/
build.gradle
114 lines (99 loc) · 4.61 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
// Copyright 2019 LinkedIn Corporation. All rights reserved.
// Licensed under the BSD-2 Clause license.
// See LICENSE in the project root for license information.
buildscript {
repositories {
gradlePluginPortal()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:7.1.2'
classpath 'com.github.alisiikh:gradle-scalastyle-plugin:3.4.1'
classpath "io.github.gradle-nexus:publish-plugin:1.0.0"
classpath "org.shipkit:shipkit-auto-version:1.1.1"
classpath "org.shipkit:shipkit-changelog:1.1.10"
}
}
plugins {
id "checkstyle"
id "com.github.hierynomus.license" version "0.16.1"
}
apply from: "gradle/shipkit.gradle"
allprojects {
group = 'com.linkedin.transport'
apply plugin: 'idea'
}
if (project.hasProperty('overrideBuildEnvironment')) {
//The property is automatically passed to the Gradle build when the project is built at LinkedIn
//The property contains the file path to a script plugin that 'adapts' this OS project to LinkedIn
//In order to adapt the project, we need to apply this script plugin:
apply from: project.overrideBuildEnvironment
} else {
//If the property is not set the project is built outside of LinkedIn
//Applying default build logic for an OS build:
apply from: "defaultEnvironment.gradle"
}
subprojects {
apply plugin: "com.github.hierynomus.license"
license {
header = file("${rootDir}/gradle/license/LICENSE_HEADER")
ext.year = Calendar.getInstance().get(Calendar.YEAR)
skipExistingHeaders true
ignoreFailures false
strictCheck true
}
configurations {
all {
// Transport as a library should only expose slf4j-api to its consumers and should not keep any SLF4J bindings
// in its dependency graph
// Quote from http://www.slf4j.org/faq.html#maven2
// "Thus, as far as your users are concerned you are exporting slf4j-api as a transitive dependency of your
// library, but not any SLF4J-binding or any underlying logging system."
// Our dependencies (e.g. hadoop-common) do bring in slf4j-log4j12 in their dependency graph so we exclude them
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
resolutionStrategy.dependencySubstitution {
substitute module('com.nimbusds:nimbus-jose-jwt:9.14') using module('com.nimbusds:nimbus-jose-jwt:9.31')
substitute module('org.slf4j:slf4j-api') using module ('org.slf4j:slf4j-api:1.7.25')
// Downgrade to airlift 221 because airlift 222+ consumes slf4j-api ver. 2+
substitute module('io.airlift:bootstrap:222') using module('io.airlift:bootstrap:221')
substitute module('io.airlift:concurrent:222') using module('io.airlift:concurrent:221')
substitute module('io.airlift:configuration:222') using module('io.airlift:configuration:221')
substitute module('io.airlift:discovery:222') using module('io.airlift:discovery:221')
substitute module('io.airlift:event:222') using module('io.airlift:event:221')
substitute module('io.airlift:http-client:222') using module('io.airlift:http-client:221')
substitute module('io.airlift:http-server:222') using module('io.airlift:http-server:221')
substitute module('io.airlift:jaxrs:222') using module('io.airlift:jaxrs:221')
substitute module('io.airlift:jmx:222') using module('io.airlift:jmx:221')
substitute module('io.airlift:jmx-http:222') using module('io.airlift:jmx-http:221')
substitute module('io.airlift:json:222') using module('io.airlift:json:221')
substitute module('io.airlift:log:222') using module('io.airlift:log:221')
substitute module('io.airlift:log-manager:222') using module('io.airlift:log-manager:221')
substitute module('io.airlift:node:222') using module('io.airlift:node:221')
substitute module('io.airlift:security:222') using module('io.airlift:security:221')
substitute module('io.airlift:stats:222') using module('io.airlift:stats:221')
substitute module('io.airlift:trace-token:222') using module('io.airlift:trace-token:221')
}
}
}
plugins.withType(JavaPlugin) {
project.apply(plugin: 'checkstyle')
dependencies {
testImplementation 'org.testng:testng:6.11'
testImplementation 'org.slf4j:slf4j-simple:1.7.25'
}
test {
useTestNG()
}
checkstyle {
configFile = rootProject.file('gradle/checkstyle/checkstyle.xml')
configProperties = [
'configDir': rootProject.file('gradle/checkstyle'),
'baseDir': rootDir
]
toolVersion '8.23'
}
}
}