forked from palantir/tracing-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (102 loc) · 4.11 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
/*
* (c) Copyright 2018 Palantir Technologies Inc. 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
*
* 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 {
jcenter()
maven { url "http://palantir.bintray.com/releases" }
}
dependencies {
classpath 'gradle.plugin.com.palantir:gradle-circle-style:1.1.2'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.3'
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:4.9.5'
classpath 'com.netflix.nebula:nebula-dependency-recommender:6.0.0'
classpath 'com.netflix.nebula:nebula-publishing-plugin:5.1.5'
classpath 'com.palantir.baseline:gradle-baseline-java:0.24.0'
classpath 'com.palantir.configurationresolver:gradle-configuration-resolver-plugin:0.3.0'
}
}
plugins {
id 'com.palantir.git-version' version '0.11.0'
id 'org.inferred.processors' version '1.2.15'
}
apply plugin: 'com.palantir.baseline-config' // provides baselineUpdateConfig task
apply plugin: 'com.palantir.baseline-idea'
apply plugin: 'com.palantir.circle.style'
repositories {
maven { url "http://palantir.bintray.com/releases" }
}
dependencies {
baseline "com.palantir.baseline:gradle-baseline-java-config:0.24.0@zip"
}
allprojects {
version gitVersion()
group 'com.palantir.tracing'
apply plugin: 'com.palantir.configuration-resolver'
apply plugin: 'nebula.dependency-recommender'
dependencyRecommendations {
strategy OverrideTransitives
propertiesFile file: project.rootProject.file('versions.props')
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'com.palantir.baseline-checkstyle'
apply plugin: 'com.palantir.baseline-eclipse'
apply plugin: 'com.palantir.baseline-idea'
apply plugin: 'com.palantir.baseline-error-prone'
repositories {
jcenter()
maven { url "http://palantir.bintray.com/releases" }
}
sourceCompatibility = 1.8
apply plugin: 'nebula.dependency-lock'
dependencyLock {
includeTransitives = true
lockFile = 'versions.lock'
configurationNames = ['runtime', 'compileClasspath']
}
task verifyDependencyLocksAreCurrent {
doLast {
def expectedDependencies = tasks.saveLock.getOutputLock()
def actualDependencies = tasks.saveLock.getGeneratedLock()
def digester = java.security.MessageDigest.getInstance('SHA')
logger.info("Verifying integrity of dependency locks: {} vs {}", expectedDependencies, actualDependencies)
if (digester.digest(expectedDependencies.bytes) != digester.digest(actualDependencies.bytes)) {
throw new GradleException("The dependencies of project " + project.name + " do not match the expected "
+ "dependencies recorded in " + expectedDependencies + ". "
+ "Run `./gradlew generateLock saveLock` and commit the updated version.lock files")
}
}
}
verifyDependencyLocksAreCurrent.dependsOn(generateLock)
build.dependsOn(verifyDependencyLocksAreCurrent)
tasks.withType(Javadoc) {
// suppress Javadoc doclint warnings in Java 8+
if (!System.getProperty("java.version").startsWith("1.7")) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
tasks.check.dependsOn(javadoc)
configurations.errorprone {
resolutionStrategy {
force 'com.google.guava:guava:21.0'
}
}
tasks.withType(JavaCompile) {
options.compilerArgs += ['-XepDisableWarningsInGeneratedCode']
}
}