-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle
156 lines (137 loc) · 6.45 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
buildscript {
repositories {
mavenCentral() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
gradlePluginPortal() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
}
dependencies {
classpath 'com.palantir.jakartapackagealignment:jakarta-package-alignment:0.6.0'
classpath 'com.palantir.gradle.jdks:gradle-jdks:0.59.0'
classpath 'com.palantir.gradle.jdkslatest:gradle-jdks-latest:0.16.0'
classpath 'com.palantir.gradle.plugintesting:gradle-plugin-testing:0.5.0'
classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.19.0'
classpath 'com.palantir.gradle.failure-reports:gradle-failure-reports:1.13.0'
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.50.0'
classpath 'com.palantir.suppressible-error-prone:gradle-suppressible-error-prone:2.1.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.31.0'
classpath 'com.palantir.baseline:gradle-baseline-java:6.5.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:3.1.0'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.7.0'
}
}
plugins {
id 'com.gradle.plugin-publish' version '1.3.0'
}
apply plugin: 'com.palantir.external-publish'
apply plugin: 'java-gradle-plugin'
apply plugin: 'groovy'
apply plugin: 'com.palantir.baseline'
apply plugin: 'com.palantir.consistent-versions'
apply plugin: 'com.palantir.git-version'
apply plugin: 'com.palantir.gradle-plugin-testing'
apply plugin: 'com.palantir.jdks'
apply plugin: 'org.inferred.processors'
apply plugin: 'com.palantir.external-publish-jar'
apply plugin: 'com.palantir.failure-reports'
apply plugin: 'com.palantir.baseline-java-versions'
apply plugin: 'com.palantir.jdks.latest'
version System.env.CIRCLE_TAG ?: gitVersion()
allprojects {
apply plugin: 'com.palantir.java-format'
apply plugin: 'com.palantir.jakarta-package-alignment'
repositories {
mavenCentral() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
}
group 'com.palantir.gradle.consistentversions'
version rootProject.version
}
dependencies {
implementation project(':gradle-consistent-versions-idea')
implementation 'com.google.guava:guava'
implementation 'com.netflix.nebula:nebula-dependency-recommender'
implementation 'com.palantir.gradle.failure-reports:gradle-failure-reports-exceptions'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-guava'
implementation 'one.util:streamex'
testImplementation platform('org.junit:junit-bom')
testImplementation 'com.netflix.nebula:nebula-test'
testImplementation 'org.mockito:mockito-core'
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly "org.junit.vintage:junit-vintage-engine"
annotationProcessor "org.immutables:value"
compileOnly "org.immutables:value::annotations"
}
tasks.withType(Test) {
useJUnitPlatform()
systemProperties = [
'junit.platform.output.capture.stdout' : 'true',
'junit.platform.output.capture.stderr' : 'true',
'junit.jupiter.execution.parallel.enabled' : 'true',
'junit.jupiter.execution.parallel.config.strategy' : 'dynamic',
'junit.jupiter.execution.parallel.config.dynamic.factor': '1',
// Ignore Gradle deprecations in tests. Note that we have to tackle those for the Gradle 8 update
'ignoreDeprecations' : 'true'
]
}
tasks.withType(JavaCompile) {
// necessary until https://github.com/palantir/gradle-baseline/issues/389
options.compilerArgs += ['-Werror']
options.errorprone.disable 'Slf4jLogsafeArgs', 'PreferSafeLoggableExceptions'
}
gradlePlugin {
website = 'https://github.com/palantir/gradle-consistent-versions'
vcsUrl = 'https://github.com/palantir/gradle-consistent-versions'
plugins {
consistentVersions {
id = 'com.palantir.consistent-versions'
implementationClass = 'com.palantir.gradle.versions.ConsistentVersionsPlugin'
displayName = 'Compact, constraint-friendly lockfiles for your dependencies'
description = displayName
tags.set(['versions'])
}
versionsLock {
id = 'com.palantir.versions-lock'
implementationClass = 'com.palantir.gradle.versions.VersionsLockPlugin'
displayName = 'Compact, constraint-friendly lockfiles for your dependencies'
description = displayName
tags.set(['versions'])
}
versionsProps {
id = 'com.palantir.versions-props'
implementationClass = 'com.palantir.gradle.versions.VersionsPropsPlugin'
displayName = 'Inject version constraints into every configuration in your projects'
description = displayName
tags.set(['versions'])
}
versionsPropsIdeaPlugin {
id = 'com.palantir.version-props-idea'
implementationClass = 'com.palantir.gradle.versions.VersionsPropsIdeaPlugin'
displayName = 'Plugin to collect repositories for use by the IDEA plugin.'
description = displayName
tags.set(['versions'])
}
requireConsistentVersionsIdeaPlugin {
id = 'com.palantir.consistent-versions-require-idea-plugin'
implementationClass = 'com.palantir.gradle.versions.RequireConsistentVersionsIdeaPlugin'
displayName = 'Plugin to ensure that the intellij plugin is added to the externalDependencies.xml.'
description = displayName
tags.set(['versions'])
}
}
}
afterEvaluate {
tasks.publishVersionsLockPluginMarkerMavenPublicationToSonatypeRepository.enabled = false
tasks.publishVersionsPropsPluginMarkerMavenPublicationToSonatypeRepository.enabled = false
}
tasks.publish.dependsOn tasks.publishPlugins
publishPlugins.onlyIf { !System.env.CI || versionDetails().isCleanTag }
project.ext.'gradle.publish.key' = System.env["GRADLE_KEY"]
project.ext.'gradle.publish.secret' = System.env["GRADLE_SECRET"]
javaVersions {
libraryTarget = 11
}
jdks {
daemonTarget = 17
}