Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit a027f04

Browse files
committed
Apply spotless. Fix esplugin application.
1 parent 7dc29b1 commit a027f04

25 files changed

+3835
-3795
lines changed

build.gradle

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11

2-
// This plugin's version (typically must match that of ES).
3-
version = '7.9.2'
4-
group = 'org.carrot2'
5-
62
buildscript {
73
ext {
84
version_es = '7.9.2'
@@ -22,9 +18,16 @@ buildscript {
2218
plugins {
2319
id 'java-library'
2420
id 'idea'
25-
id 'elasticsearch.esplugin'
21+
id 'com.diffplug.gradle.spotless' version "4.5.1" apply false
2622
}
2723

24+
apply plugin: 'elasticsearch.esplugin'
25+
apply from: file('gradle/validation/spotless.gradle')
26+
27+
// This plugin's version (typically must match that of ES).
28+
version = '7.9.2'
29+
group = 'org.carrot2'
30+
2831
repositories {
2932
mavenLocal()
3033
mavenCentral()

gradle/validation/spotless.gradle

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
allprojects { prj ->
3+
plugins.withType(JavaPlugin) {
4+
prj.apply plugin: 'com.diffplug.gradle.spotless'
5+
6+
spotless {
7+
java {
8+
licenseHeaderFile rootProject.file("gradle/validation/spotless/source-header.txt")
9+
lineEndings 'UNIX'
10+
endWithNewline()
11+
googleJavaFormat('1.8')
12+
}
13+
14+
check.dependsOn(spotlessCheck)
15+
}
16+
17+
task tidy() {
18+
description "Applies formatters and cleanups to sources."
19+
group "verification"
20+
21+
dependsOn spotlessApply
22+
}
23+
}
24+
}

gradle/validation/spotless/source-header.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)