-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
40 lines (38 loc) · 1.52 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
plugins {
id "com.diffplug.gradle.spotless" version "3.27.0"
}
////////////
// FORMAT //
////////////
String FOLLOW_LINK = '''
[![Watch](https://img.shields.io/github/watchers/diffplug/blog.svg?style=social&label=Watch)](https://github.com/nedtwigg/blog/subscription)
[![Star](https://img.shields.io/github/stars/diffplug/blog.svg?style=social&label=Star)](https://github.com/nedtwigg/blog/stargazers)
[![Follow @NedTwigg](https://img.shields.io/twitter/follow/NedTwigg.svg?style=social&label=Follow)](https://twitter.com/NedTwigg)
[![Medium ned.twigg](https://img.shields.io/badge/Follow-41-blue.svg?style=social&logo=medium)](https://dev.to/nedtwigg)
[![dev.to nedtwigg](https://img.shields.io/badge/Follow-0-blue.svg?style=social&logo=dev.to)](https://dev.to/nedtwigg)
'''
// apply formatting in the root project so that we get formatting for our README, project files, etc
spotless {
java {
target '**/*.java'
licenseHeaderFile 'spotless.license.javaheader' // License header file
importOrderFile 'spotless.importorder' // An import ordering file, exported from Eclipse
eclipse().configFile 'spotless.eclipseformat.xml' // XML file dumped out by the Eclipse formatter
custom 'Lambda fix', { it.replace('} )', '})').replace('} ,', '},') }
}
format 'misc', {
target '**/.gitignore', '**/*.gradle', '**/*.md', '**/*.sh'
indentWithTabs()
trimTrailingWhitespace()
endWithNewline()
}
freshmark {
properties {
it.put('follow', FOLLOW_LINK)
}
}
}
check.dependsOn('spotlessCheck')
tasks.register('test') {
dependsOn check
}