@ -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 )
@ -283,7 +287,7 @@ task checkMavenCoordinateCollisions {
}
}
tasks . register ( 'checkPluginAPIChanges' , DefaultTask ) { }
tasks . register ( 'checkPluginAPIChanges' , DefaultTask ) { }
checkPluginAPIChanges . dependsOn ( ':plugin-api:checkAPIChanges' )
check . dependsOn ( 'checkPluginAPIChanges' , 'checkMavenCoordinateCollisions' )
@ -317,11 +321,11 @@ subprojects {
def sourceSetIsPopulated = { sourceSetName - >
def result = project . sourceSets . names . contains ( sourceSetName ) & & ! project . sourceSets . getAt ( sourceSetName ) . allSource . empty
logger . info ( "Project = " + project . name + " Has Source Set (" + sourceSetName + ") = " + result + "(" + project . sourceSets . names + ")" )
logger . info ( "Project = " + project . name + " Has Source Set (" + sourceSetName + ") = " + result + "(" + project . sourceSets . names + ")" )
return result
}
if ( sourceSetIsPopulated ( "main" ) | | sourceSetIsPopulated ( "testSupport" ) ) {
if ( sourceSetIsPopulated ( "main" ) | | sourceSetIsPopulated ( "testSupport" ) ) {
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
@ -330,13 +334,13 @@ subprojects {
mavenJava ( MavenPublication ) {
groupId "org.hyperledger.besu.internal"
version "${project.version}"
if ( sourceSetIsPopulated ( "main" ) ) {
if ( sourceSetIsPopulated ( "main" ) ) {
from components . java
artifact sourcesJar
artifact javadocJar
}
if ( sourceSetIsPopulated ( "testSupport" ) ) {
if ( sourceSetIsPopulated ( "testSupport" ) ) {
artifact testSupportJar
}
versionMapping {
@ -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' }
@ -558,7 +563,7 @@ task dockerUpload(type: Exec) {
additionalTags . add ( 'develop' )
}
if ( ! version = = ~ /.*-SNAPSHOT/ ) {
if ( ! version = = ~ /.*-SNAPSHOT/ ) {
additionalTags . add ( 'latest' )
additionalTags . add ( version . split ( /\./ ) [ 0 . . 1 ] . join ( '.' ) )
}