Skip to content

Commit

Permalink
Gradle 7.1.1 and Dependency Version Upgrades (hyperledger#2596)
Browse files Browse the repository at this point in the history
Upgrade Gradle to 7.1.1.
Add Gradle configs to allow Java 16 compilation.
Upgrade most dependencies to current versions.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
  • Loading branch information
shemnon authored Aug 3, 2021
1 parent e19df06 commit 3eccc26
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 63 deletions.
36 changes: 26 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import java.text.SimpleDateFormat

plugins {
id 'com.diffplug.spotless' version '5.14.2'
id 'com.github.ben-manes.versions' version '0.36.0'
id 'com.github.hierynomus.license' version '0.15.0'
id 'com.jfrog.artifactory' version '4.20.0'
id 'com.github.ben-manes.versions' version '0.39.0'
id 'com.github.hierynomus.license' version '0.16.1'
id 'com.jfrog.artifactory' version '4.24.14'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'me.champeau.gradle.jmh' version '0.5.0' apply false
id 'me.champeau.gradle.jmh' version '0.5.3' apply false
id 'net.ltgt.errorprone' version '2.0.2'
id 'maven-publish'
}
Expand Down Expand Up @@ -96,14 +96,13 @@ allprojects {

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
from javadoc.outputDirectory
}

sourceCompatibility = 11
targetCompatibility = 11

repositories {
jcenter()
mavenCentral()
maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" }
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
Expand Down Expand Up @@ -233,7 +232,24 @@ allprojects {
'--add-opens',
'java.base/java.util.concurrent=ALL-UNNAMED',
'--add-opens',
'java.base/java.util.concurrent.atomic=ALL-UNNAMED'
'java.base/java.util.concurrent.atomic=ALL-UNNAMED',
// errorpone tests need access to the javac compiler
'--add-exports',
'jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-exports',
'jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-exports',
'jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED',
'--add-exports',
'jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED',
'--add-exports',
'jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED',
'--add-exports',
'jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-exports',
'jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-exports',
'jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'
]
Set toImport = [
'test.ethereum.include',
Expand Down Expand Up @@ -510,7 +526,7 @@ startScripts {
}

task evmToolStartScripts(type: CreateStartScripts) {
mainClassName = 'org.hyperledger.besu.evmtool.EvmTool'
mainClass = 'org.hyperledger.besu.evmtool.EvmTool'
classpath = startScripts.classpath
outputDir = startScripts.outputDir
applicationName = 'evm'
Expand Down Expand Up @@ -759,8 +775,8 @@ task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
classDirectories.from files(subprojects.sourceSets.main.output)
executionData.from fileTree(dir: '.', includes: ['**/jacoco/*.exec'])
reports {
xml.enabled true
csv.enabled true
xml.required = true
csv.required = true
html.destination file("build/reports/jacocoHtml")
}
onlyIf = { true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.auth.AuthProvider;
import io.vertx.ext.auth.JWTOptions;
import io.vertx.ext.auth.User;
import io.vertx.ext.auth.jwt.JWTAuth;
import io.vertx.ext.auth.jwt.JWTAuthOptions;
import io.vertx.ext.jwt.JWTOptions;
import io.vertx.ext.web.RoutingContext;

/** Provides authentication handlers for use in the http and websocket services */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
import io.vertx.core.http.impl.headers.VertxHttpHeaders;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.auth.JWTOptions;
import io.vertx.ext.auth.User;
import io.vertx.ext.auth.jwt.JWTAuth;
import io.vertx.ext.jwt.JWTOptions;
import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.VertxUnitRunner;
Expand Down
10 changes: 10 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
version=21.7.2-SNAPSHOT

# Workaround for Java 16 and spotless bug 834 https://github.com/diffplug/spotless/issues/834
org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
7 changes: 7 additions & 0 deletions gradle/check-licenses.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ downloadLicenses {
'com.google.code.findbugs:jFormatString:3.0.0',
'com.google.errorprone:javac:.*',
'org.checkerframework:dataflow-shaded:.*',
'org.checkerframework:dataflow-errorprone:.*',
]

ext.apache = license('Apache License, Version 2.0', 'http://opensource.org/licenses/Apache-2.0')
Expand Down Expand Up @@ -96,6 +97,8 @@ downloadLicenses {
'BSD 3-Clause "New" or "Revised" License (BSD-3-Clause)',
'BSD 3-Clause',
'BSD Licence 3',
'BSD License 3',
'BSD-3-Clause',
'Eclipse Distribution License - v 1.0',
'Eclipse Distribution License (New BSD License)',
'EDL 1.0',
Expand Down Expand Up @@ -154,6 +157,10 @@ downloadLicenses {
// javax.persistence is dual licensed under EPL 1.0 and EDL 1.0.
// Explicitly declare that we are using the EPL 1.0 license
(group('javax.persistence')) : epl1,

// io.netty:netty-tcnative-boringssl-static license markings are not machine readable.
// Explicitly state Apache 2 License for license scanning.
'io.netty:netty-tcnative-boringssl-static:2.0.40.Final' : apache,
]
}

Expand Down
103 changes: 53 additions & 50 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,49 +15,51 @@

dependencyManagement {
dependencies {
dependency 'com.fasterxml.jackson.core:jackson-databind:2.12.1'
dependency 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.1'
dependency 'com.fasterxml.jackson.core:jackson-databind:2.12.4'
dependency 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.4'

dependency 'com.github.tomakehurst:wiremock-jre8-standalone:2.27.2'
dependency 'com.github.tomakehurst:wiremock-jre8:2.27.2'
dependency 'com.github.tomakehurst:wiremock-jre8-standalone:2.29.1'
dependency 'com.github.tomakehurst:wiremock-jre8:2.29.1'

dependency 'com.google.auto.service:auto-service:1.0-rc7'
dependency 'com.google.auto.service:auto-service:1.0'

dependency 'com.google.dagger:dagger-compiler:2.30.1'
dependency 'com.google.dagger:dagger:2.30.1'

dependencySet(group: 'com.google.errorprone', version: '2.7.1') {
dependencySet(group: 'com.google.errorprone', version: '2.8.0') {
entry 'error_prone_annotation'
entry 'error_prone_check_api'
entry 'error_prone_core'
entry 'error_prone_test_helpers'
}

dependency 'com.google.guava:guava:30.1-jre'
dependency 'com.google.guava:guava:30.1.1-jre'

dependency 'com.graphql-java:graphql-java:16.1'
dependency 'com.graphql-java:graphql-java:16.2'

dependency 'com.splunk.logging:splunk-library-javalogging:1.8.0'
dependency 'com.splunk.logging:splunk-library-javalogging:1.9.0'

dependency 'com.squareup.okhttp3:okhttp:4.9.0'
dependency 'com.squareup.okhttp3:okhttp:4.9.1'

dependency 'commons-codec:commons-codec:1.13'

dependency 'commons-io:commons-io:2.8.0'
dependency 'commons-io:commons-io:2.11.0'

dependency 'dnsjava:dnsjava:3.3.1'
dependency 'dnsjava:dnsjava:3.4.0'

dependency 'info.picocli:picocli:4.6.1'

dependency 'io.grpc:grpc-core:1.34.1'
dependency 'io.grpc:grpc-netty:1.34.1'
dependency 'io.grpc:grpc-stub:1.34.1'
dependency 'io.grpc:grpc-core:1.39.0'
dependency 'io.grpc:grpc-netty:1.39.0'
dependency 'io.grpc:grpc-stub:1.39.0'

dependency 'io.jaegertracing:jaeger-client:1.6.0'

dependency 'io.kubernetes:client-java:5.0.0'

dependency 'io.netty:netty-all:4.1.56.Final'
dependency 'io.netty:netty-tcnative-boringssl-static:2.0.35.Final'
dependency group: 'io.netty', name: 'netty-transport-native-epoll', version:'4.1.56.Final', classifier: 'linux-x86_64'
dependency 'io.netty:netty-all:4.1.66.Final'
dependency 'io.netty:netty-tcnative-boringssl-static:2.0.40.Final'
dependency group: 'io.netty', name: 'netty-transport-native-epoll', version:'4.1.66.Final', classifier: 'linux-x86_64'

dependency 'io.opentelemetry:opentelemetry-api:1.2.0'
dependency 'io.opentelemetry:opentelemetry-exporter-otlp-metrics:1.2.0-alpha'
Expand All @@ -71,36 +73,37 @@ dependencyManagement {
dependency 'io.opentracing.contrib:opentracing-okhttp3:3.0.0'
dependency 'io.opentracing:opentracing-api:0.33.0'
dependency 'io.opentracing:opentracing-util:0.33.0'
dependency 'io.jaegertracing:jaeger-client:1.6.0'

dependency 'io.pkts:pkts-core:3.0.7'
dependency 'io.pkts:pkts-core:3.0.10'

dependency 'io.prometheus:simpleclient:0.9.0'
dependency 'io.prometheus:simpleclient_common:0.9.0'
dependency 'io.prometheus:simpleclient_hotspot:0.9.0'
dependency 'io.prometheus:simpleclient_pushgateway:0.9.0'

dependency 'io.reactivex.rxjava2:rxjava:2.2.20'
dependency 'io.reactivex.rxjava2:rxjava:2.2.21'

dependency 'io.vertx:vertx-auth-jwt:3.9.1'
dependency 'io.vertx:vertx-codegen:3.9.1'
dependency 'io.vertx:vertx-core:3.9.1'
dependency 'io.vertx:vertx-unit:3.9.1'
dependency 'io.vertx:vertx-web:3.9.1'
dependency 'io.vertx:vertx-auth-jwt:3.9.8'
dependency 'io.vertx:vertx-codegen:3.9.8'
dependency 'io.vertx:vertx-core:3.9.8'
dependency 'io.vertx:vertx-unit:3.9.8'
dependency 'io.vertx:vertx-web:3.9.8'

dependency 'junit:junit:4.13.1'
dependency 'junit:junit:4.13.2'

dependency 'net.consensys:orion:21.1.1'

dependency 'net.java.dev.jna:jna:5.6.0'
dependency 'net.consensys.services:quorum-mainnet-launcher:1.0.1'

dependency 'net.java.dev.jna:jna:5.8.0'

dependency 'org.apache.commons:commons-compress:1.20'
dependency 'org.apache.commons:commons-compress:1.21'
dependency 'org.apache.commons:commons-text:1.9'

dependency 'org.apache.logging.log4j:log4j-api:2.14.0'
dependency 'org.apache.logging.log4j:log4j-core:2.14.0'
dependency 'org.apache.logging.log4j:log4j-jul:2.14.0'
dependency 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.0'
dependency 'org.apache.logging.log4j:log4j-api:2.14.1'
dependency 'org.apache.logging.log4j:log4j-core:2.14.1'
dependency 'org.apache.logging.log4j:log4j-jul:2.14.1'
dependency 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1'

dependency 'org.apache.tuweni:tuweni-bytes:2.0.0'
dependency 'org.apache.tuweni:tuweni-config:2.0.0'
Expand All @@ -114,30 +117,29 @@ dependencyManagement {
dependency 'org.apache.tuweni:tuweni-toml:2.0.0'
dependency 'org.apache.tuweni:tuweni-units:2.0.0'

dependency 'org.assertj:assertj-core:3.18.1'
dependency 'org.assertj:assertj-core:3.20.2'

dependency 'org.awaitility:awaitility:4.0.3'
dependency 'org.awaitility:awaitility:4.1.0'

dependency 'org.bouncycastle:bcpkix-jdk15on:1.68'
dependency 'org.bouncycastle:bcprov-jdk15on:1.68'
dependency 'org.bouncycastle:bcpkix-jdk15on:1.69'
dependency 'org.bouncycastle:bcprov-jdk15on:1.69'

dependency 'org.fusesource.jansi:jansi:2.1.1'
dependency 'net.consensys.services:quorum-mainnet-launcher:1.0.1'
dependency 'org.fusesource.jansi:jansi:2.3.4'

dependency 'org.hyperledger.besu:bls12-381:0.3.0'
dependency 'org.hyperledger.besu:secp256k1:0.3.0'

dependency 'org.immutables:value-annotations:2.8.8'
dependency 'org.immutables:value:2.8.8'

dependency 'org.java-websocket:Java-WebSocket:1.5.1'
dependency 'org.java-websocket:Java-WebSocket:1.5.2'

dependency 'org.jetbrains.kotlin:kotlin-stdlib:1.4.21-2'

dependency 'org.jupnp:org.jupnp.support:2.5.2'
dependency 'org.jupnp:org.jupnp:2.5.2'
dependency 'org.jupnp:org.jupnp.support:2.6.0'
dependency 'org.jupnp:org.jupnp:2.6.0'

dependency 'org.mockito:mockito-core:3.7.0'
dependency 'org.mockito:mockito-core:3.11.2'

dependency 'org.openjdk.jmh:jmh-core:1.23'
dependency 'org.openjdk.jmh:jmh-generator-annprocess:1.23'
Expand All @@ -146,8 +148,10 @@ dependencyManagement {

dependency 'org.slf4j:slf4j-log4j12:1.7.26'

dependency 'org.springframework.security:spring-security-crypto:5.4.2'

dependency 'org.springframework.security:spring-security-crypto:5.5.1'

dependency 'org.testcontainers:testcontainers:1.16.0'

dependency 'org.web3j:abi:4.5.15'
dependency 'org.web3j:besu:4.5.15'
dependency('org.web3j:core:4.5.15') {
Expand All @@ -156,18 +160,17 @@ dependencyManagement {
dependency 'org.web3j:crypto:4.5.15'
dependency 'org.web3j:quorum:4.5.15'

dependency 'org.xerial.snappy:snappy-java:1.1.8.2'
dependency 'org.xerial.snappy:snappy-java:1.1.8.4'

dependency 'org.yaml:snakeyaml:1.26'

dependency 'tech.pegasys.discovery:discovery:0.4.5'
dependency 'tech.pegasys.discovery:discovery:0.4.8'

dependency 'tech.pegasys.ethsigner.internal:ethsigner-core:21.3.0'
dependencySet(group: 'tech.pegasys.signers.internal', version: '1.0.16') {
dependency 'tech.pegasys.ethsigner.internal:ethsigner-core:21.3.2'
dependencySet(group: 'tech.pegasys.signers.internal', version: '1.0.17') {
entry 'signing-secp256k1-api'
entry 'signing-secp256k1-impl'
}

dependency 'org.testcontainers:testcontainers:1.15.2'
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ public Executor getRegistryListenerExecutor() {
return executorService;
}

@Override
public Executor getRemoteListenerExecutor() {
return executorService;
}

@Override
public void shutdown() {
executorService.shutdown();
Expand Down

0 comments on commit 3eccc26

Please sign in to comment.