Skip to content

Commit

Permalink
More Java 13 pre-reqs (#767)
Browse files Browse the repository at this point in the history
The `TypeParameterUnusedInFormals` errorprone check is disabled when compiling on Java 13, to workaround an error-prone bug.
  • Loading branch information
iamdanfox authored and bulldozer-bot[bot] committed Aug 23, 2019
1 parent 7c5d03a commit f791ff9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/@unreleased/pr-767.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: fix
fix:
description: The `TypeParameterUnusedInFormals` errorprone check is disabled when
compiling on Java 13, to workaround an error-prone bug.
links:
- https://github.com/palantir/gradle-baseline/pull/767
1 change: 1 addition & 0 deletions gradle-baseline-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
compile 'net.ltgt.gradle:gradle-errorprone-plugin'
compile 'org.apache.maven.shared:maven-dependency-analyzer'
compile 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11'
implementation 'org.eclipse.jgit:org.eclipse.jgit'

testCompile gradleTestKit()
testCompile 'com.github.stefanbirkner:system-rules'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ public void apply(Project project) {
errorProneOptions.check("Finally", CheckSeverity.OFF);
}

if (jdkVersion.compareTo(JavaVersion.toVersion("13.0.0")) >= 0) {
// Errorprone isn't officially compatible with Java13 either
// https://github.com/google/error-prone/issues/1106
errorProneOptions.check("TypeParameterUnusedInFormals", CheckSeverity.OFF);
}

if (javaCompile.equals(compileRefaster)) {
// Don't apply refaster to itself...
return;
Expand Down
3 changes: 2 additions & 1 deletion versions.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
com.diffplug.spotless:spotless-plugin-gradle = 3.14.0
com.diffplug.spotless:spotless-plugin-gradle = 3.24.2
com.google.auto.service:auto-service = 1.0-rc4
com.google.errorprone:error_prone_annotations = 2.3.3
com.google.errorprone:error_prone_core = 2.3.3
Expand All @@ -12,6 +12,7 @@ org.apache.maven.shared:maven-dependency-analyzer = 1.11.1
org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11 = 1.0.1
org.inferred:freebuilder = 1.14.6
org.slf4j:slf4j-api = 1.7.25
org.eclipse.jgit:org.eclipse.jgit = 5.3.2.201906051522-r

# test deps
com.netflix.nebula:nebula-test = 7.2.5
Expand Down

0 comments on commit f791ff9

Please sign in to comment.