Update Gradle to 6.0, support Java 13 (#180)

Upgrade Gradle to 6.0.
* This is needed as Gradle 5.x did not support Java 13
* Jacoco needed a version upgrade to support Java 13
* Upgrade Errorprone to fix some breaks
* Another Errorprone check is broken in 13
* The 'Finally' Errorprone check is only broken in Java 12
* JMH needed a version upgrade and a new build flag
* Switch to bin distribution for smaller builds

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
pull/184/head
Danno Ferrin 5 years ago committed by GitHub
parent 0a27885b2f
commit 59096789ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      build.gradle
  2. 2
      gradle/wrapper/gradle-wrapper.properties

@ -23,8 +23,8 @@ plugins {
id 'com.github.ben-manes.versions' version '0.26.0'
id 'com.github.hierynomus.license' version '0.15.0'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'me.champeau.gradle.jmh' version '0.4.8' apply false
id 'net.ltgt.errorprone' version '0.8.1'
id 'me.champeau.gradle.jmh' version '0.5.0' apply false
id 'net.ltgt.errorprone' version '1.1.1'
}
if (!JavaVersion.current().java11Compatible) {
@ -98,7 +98,7 @@ allprojects {
version = rootProject.version
jacoco {
toolVersion = '0.8.2'
toolVersion = '0.8.5'
if (project.tasks.findByName('referenceTests')) {
applyTo referenceTests
}
@ -197,9 +197,13 @@ allprojects {
check('FieldCanBeFinal', CheckSeverity.OFF)
// This check is broken in Java 12. See https://github.com/google/error-prone/issues/1257
if (JavaVersion.current().java12Compatible) {
if (JavaVersion.current() == JavaVersion.VERSION_12) {
check('Finally', CheckSeverity.OFF)
}
// This check is broken after Java 12. See https://github.com/google/error-prone/issues/1352
if (JavaVersion.current() > JavaVersion.VERSION_12) {
check('TypeParameterUnusedInFormals', CheckSeverity.OFF)
}
check('InsecureCryptoUsage', CheckSeverity.WARN)
check('WildcardImport', CheckSeverity.WARN)
@ -424,6 +428,7 @@ subprojects {
include = _strListCmdArg('include', [''])
humanOutputFile = project.file("${project.buildDir}/reports/jmh/results.txt")
resultFormat = 'JSON'
duplicateClassesStrategy = 'warn'
}
dependencies { jmh 'org.apache.logging.log4j:log4j-api' }

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-bin.zip

Loading…
Cancel
Save