Skip to content

Commit

Permalink
Use ErrorProne as default Java compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
floscher committed Sep 16, 2017
1 parent fea67fc commit 7c3a72e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id "org.kordamp.markdown.convert" version "1.1.0"
id 'org.openstreetmap.josm.gradle.plugin' version '0.1.7'
id "com.github.ben-manes.versions" version "0.15.0"
id "net.ltgt.errorprone" version "0.0.11"
}

apply plugin: 'eclipse'
Expand All @@ -25,6 +26,7 @@ repositories {
}

dependencies {
errorprone 'com.google.errorprone:error_prone_core:'+property('tool.errorprone.version')
testImplementation ('org.openstreetmap.josm:josm-unittest'){changing=true}
testImplementation 'junit:junit:4.12'
}
Expand Down Expand Up @@ -75,6 +77,7 @@ eclipseProject.dependsOn cleanEclipseProject
tasks.eclipse.dependsOn = ['eclipseClasspath', 'eclipseProject']

tasks.withType(JavaCompile) {
options.compilerArgs << '-Xep:DefaultCharset:ERROR' << '-Xep:ClassCanBeStatic:ERROR'
// Character encoding of Java files
options.encoding = 'UTF-8'
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ plugin.requires=apache-commons;apache-http
tool.pmd.version=5.8.1
tool.findbugs.version=3.0.1
tool.jacoco.version=0.7.9
tool.errorprone.version=2.1.1

# Character encoding of Gradle files
systemProp.file.encoding=utf-8

0 comments on commit 7c3a72e

Please sign in to comment.