Skip to content

Commit

Permalink
Upgrade error prone to 2.3.1 (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
robert3005 authored and iamdanfox committed Aug 2, 2018
1 parent 4baeb05 commit e4580a2
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
8 changes: 8 additions & 0 deletions baseline-error-prone/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ dependencies {

processor 'com.google.auto.service:auto-service'
}

tasks.withType(JavaCompile) {
options.compilerArgs += ["-Xbootclasspath/p:${configurations.errorprone.asPath}"]
}

tasks.withType(Test) {
jvmArgs "-Xbootclasspath/p:${configurations.errorprone.asPath}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package com.palantir.baseline.plugins
import net.ltgt.gradle.errorprone.ErrorPronePlugin
import org.gradle.api.Project
import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.api.tasks.testing.Test

class BaselineErrorProne extends AbstractBaselinePlugin {

Expand All @@ -31,12 +32,19 @@ class BaselineErrorProne extends AbstractBaselinePlugin {
errorprone "com.palantir.baseline:baseline-error-prone:${extractVersionString()}"
}

project.tasks.withType(JavaCompile) {
options.compilerArgs += [
"-XepDisableWarningsInGeneratedCode",
"-Xep:EqualsHashCode:ERROR",
"-Xep:EqualsIncompatibleType:ERROR",
]
project.afterEvaluate { p ->
p.tasks.withType(JavaCompile) {
options.compilerArgs += [
"-Xbootclasspath/p:${project.getConfigurations().getByName("errorprone").getAsPath()}",
"-XepDisableWarningsInGeneratedCode",
"-Xep:EqualsHashCode:ERROR",
"-Xep:EqualsIncompatibleType:ERROR",
]
}

p.tasks.withType(Test) {
jvmArgs "-Xbootclasspath/p:${project.getConfigurations().getByName("errorprone").getAsPath()}"
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import spock.lang.Specification
class AbstractPluginTest extends Specification {

@Rule
TemporaryFolder folder = new TemporaryFolder();
TemporaryFolder folder = new TemporaryFolder()

File buildFile
File settingsFile
Expand Down
6 changes: 6 additions & 0 deletions gradle/java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ sourceCompatibility = 1.8
if (System.env.CI) {
test.reports.junitXml.destination = file("/tmp/store_test_results/${project.name}")
}

configurations.errorprone {
resolutionStrategy {
force('com.google.guava:guava:23.5-jre')
}
}
9 changes: 4 additions & 5 deletions versions.props
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
com.google.auto.service:auto-service = 1.0-rc3
com.google.errorprone:error_prone_annotations = 2.3.1
com.google.errorprone:error_prone_core = 2.0.19
com.google.errorprone:error_prone_test_helpers = 2.0.19
com.google.errorprone:error_prone_core = 2.3.1
com.google.errorprone:error_prone_test_helpers = 2.3.1
com.google.guava:guava = 21.0
com.palantir.baseline:* = 0.25.1
com.palantir.configurationresolver:gradle-configuration-resolver-plugin = 0.3.0
com.palantir.safe-logging:* = 1.4.0
org.slf4j:slf4j-api = 1.7.24
gradle.plugin.com.palantir:gradle-circle-style = 1.1.4
net.ltgt.gradle:gradle-errorprone-plugin = 0.0.14
net.ltgt.gradle:gradle-errorprone-plugin = 0.0.16
org.slf4j:slf4j-api = 1.7.25

# test deps
com.google.truth:truth = 0.30
com.netflix.nebula:nebula-test = 6.5.0
junit:junit = 4.12
net.lingala.zip4j:zip4j = 1.3.2
Expand Down

0 comments on commit e4580a2

Please sign in to comment.