-
Notifications
You must be signed in to change notification settings - Fork 461
/
Copy pathbuild.gradle
85 lines (78 loc) · 2.67 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
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 "com.diffplug.durian:durian-core:${VER_DURIAN}"
implementation "com.diffplug.durian:durian-io:${VER_DURIAN}"
implementation "com.diffplug.durian:durian-collect:${VER_DURIAN}"
implementation "org.eclipse.jgit:org.eclipse.jgit:${VER_JGIT}"
testImplementation projects.testlib
testImplementation "org.junit.jupiter:junit-jupiter:${VER_JUNIT}"
testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}"
testImplementation "com.diffplug.durian:durian-testlib:${VER_DURIAN}"
testImplementation 'org.owasp.encoder:encoder:1.3.1'
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
}
apply from: rootProject.file('gradle/special-tests.gradle')
tasks.withType(Test).configureEach {
testLogging.showStandardStreams = 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'
])
}
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')
notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/21283")
}
// have to apply java-publish after setting up the pluginBundle
apply from: rootProject.file('gradle/java-publish.gradle')