Skip to content

Commit 5a44e43

Browse files
committed
Add ErrorProne checks and lint.
1 parent 4e2df07 commit 5a44e43

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

build.gradle

+24
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@
1717
* - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
1818
*/
1919

20+
plugins {
21+
id("net.ltgt.errorprone") version "0.8.1" apply false
22+
}
23+
2024
apply(plugin: "java");
2125
apply(plugin: "maven");
2226
apply(plugin: "signing");
2327
apply(plugin: "osgi");
2428
apply(plugin: "idea");
2529
apply(plugin: "eclipse");
30+
apply(plugin: "net.ltgt.errorprone");
2631

2732
group = "com.github.java-json-tools";
2833
version = "2.2.12-SNAPSHOT";
@@ -36,6 +41,14 @@ repositories {
3641
mavenCentral();
3742
}
3843

44+
/*
45+
* Add errorprone checking.
46+
*/
47+
dependencies {
48+
errorprone("com.google.errorprone:error_prone_core:2.3.3")
49+
errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
50+
}
51+
3952
/*
4053
* List of dependencies
4154
*/
@@ -87,6 +100,17 @@ task sourcesJar(type: Jar, dependsOn: classes) {
87100
from sourceSets.main.allSource;
88101
}
89102

103+
/*
104+
* Lint all the things!
105+
*/
106+
allprojects {
107+
gradle.projectsEvaluated {
108+
tasks.withType(JavaCompile) {
109+
options.compilerArgs << "-Xlint:all"
110+
}
111+
}
112+
}
113+
90114
/*
91115
* Javadoc: we need to tell where the overview.html is, it will not pick it up
92116
* automatically...

0 commit comments

Comments
 (0)