Skip to content

Commit b5056c4

Browse files
committed
Enable recommended compiler warnings
Add the Java compiler option to enable the recommended compiler warnings to the gradle and maven builds.
1 parent dc6e323 commit b5056c4

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ subprojects {
2323
apply plugin: 'maven-publish'
2424
apply plugin: "com.github.sherter.google-java-format"
2525

26+
compileJava {
27+
options.compilerArgs << '-Xlint:all'
28+
}
29+
30+
compileTestJava {
31+
options.compilerArgs << '-Xlint:all'
32+
}
33+
2634
repositories {
2735
mavenLocal()
2836
maven {

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
<configuration>
5959
<source>1.8</source>
6060
<target>1.8</target>
61+
<compilerArgs>
62+
<arg>-Xlint:all</arg>
63+
</compilerArgs>
6164
</configuration>
6265
<version>3.14.1</version>
6366
</plugin>

0 commit comments

Comments
 (0)