-
Notifications
You must be signed in to change notification settings - Fork 511
Expand file tree
/
Copy pathbuild.gradle
More file actions
94 lines (87 loc) · 2.58 KB
/
build.gradle
File metadata and controls
94 lines (87 loc) · 2.58 KB
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
apply from: rootProject.file('gradle/changelog.gradle')
ext.artifactId = project.artifactIdGradle
version = spotlessChangelog.versionNext
apply plugin: 'java-library'
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'java-gradle-plugin'
apply from: rootProject.file('gradle/java-setup.gradle')
apply from: rootProject.file('gradle/spotless-freshmark.gradle')
dependencies {
if (version.endsWith('-SNAPSHOT') || (rootProject.spotlessChangelog.versionNext == rootProject.spotlessChangelog.versionLast)) {
api projects.lib
api projects.libExtra
} else {
api "com.diffplug.spotless:spotless-lib:${rootProject.spotlessChangelog.versionLast}"
api "com.diffplug.spotless:spotless-lib-extra:${rootProject.spotlessChangelog.versionLast}"
}
implementation libs.durian.core
implementation libs.durian.io
implementation libs.durian.collect
implementation libs.jgit
testImplementation projects.testlib
testImplementation libs.junit.jupiter
testImplementation libs.assertj.core
testImplementation libs.durian.testlib
testImplementation libs.owasp.encoder
testImplementation libs.solstice
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
}
apply from: rootProject.file('gradle/special-tests.gradle')
tasks.withType(Test).configureEach {
testLogging.showStandardStreams = true
}
tasks.validatePlugins {
// TODO: https://github.com/gradle/gradle/issues/22600
enableStricterValidation = true
}
//////////////////////////
// GRADLE PLUGIN PORTAL //
//////////////////////////
gradlePlugin {
website = "https://github.com/diffplug/spotless"
vcsUrl = "https://github.com/diffplug/spotless"
plugins {
spotlessPlugin {
id = 'com.diffplug.spotless'
implementationClass = 'com.diffplug.gradle.spotless.SpotlessPlugin'
displayName = 'Spotless formatting plugin'
description = project.description
tags.set([
'format',
'style',
'license',
'header',
'google-java-format',
'eclipse',
'ktlint',
'ktfmt',
'diktat',
'tsfmt',
'prettier',
'scalafmt',
'scalafix',
'black',
'clang-format'
])
compatibility {
features {
configurationCache = true
}
}
}
spotlessPluginLegacy {
id = 'com.diffplug.gradle.spotless'
implementationClass = 'com.diffplug.gradle.spotless.SpotlessPluginRedirect'
displayName = 'Spotless formatting plugin (legacy)'
description = project.description
tags.set([
'format'
])
}
}
}
tasks.named("publishPlugins") {
enabled = !version.endsWith('-SNAPSHOT')
}
// have to apply java-publish after setting up the pluginBundle
apply from: rootProject.file('gradle/java-publish.gradle')