forked from diffplug/spotless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
79 lines (68 loc) · 2.15 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
apply from: rootProject.file('gradle/changelog.gradle')
ext.artifactId = project.artifactIdGradle
version = spotlessChangelog.versionNext
apply from: rootProject.file('gradle/java-setup.gradle')
apply from: rootProject.file('gradle/spotless-freshmark.gradle')
apply plugin: 'java-library'
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'java-gradle-plugin'
dependencies {
if (version.endsWith('-SNAPSHOT')) {
api project(':lib')
api project(':lib-extra')
} 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}"
testImplementation project(':testlib')
testImplementation "junit:junit:${VER_JUNIT}"
testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}"
testImplementation "com.diffplug.durian:durian-testlib:${VER_DURIAN}"
}
tasks.eclipse.dependsOn(pluginUnderTestMetadata)
test { testLogging.showStandardStreams = true }
test {
useJUnit {
excludeCategories 'com.diffplug.spotless.category.NpmTest'
}
}
task npmTest(type: Test) {
useJUnit {
includeCategories 'com.diffplug.spotless.category.NpmTest'
}
}
//////////////////////////
// GRADLE PLUGIN PORTAL //
//////////////////////////
if (version.endsWith('-SNAPSHOT')) {
publishPlugins.enabled = false
} else {
pluginBundle {
// These settings are set for the whole plugin bundle
website = "https://github.com/diffplug/spotless"
vcsUrl = "https://github.com/diffplug/spotless"
description = project.description
plugins {
spotlessPlugin {
id = 'com.diffplug.gradle.spotless'
displayName = 'Spotless formatting plugin'
tags = [
'format',
'style',
'license',
'header'
]
}
}
mavenCoordinates {
groupId = project.group
artifactId = project.artifactIdGradle
version = project.version
}
}
}
// have to apply java-publish after setting up the pluginBundle
apply from: rootProject.file('gradle/java-publish.gradle')