Skip to content

Commit

Permalink
Merge pull request #1900 from web3j/update_besu_2313
Browse files Browse the repository at this point in the history
Update to Besu 23.4.0
  • Loading branch information
gtebrean authored May 12, 2023
2 parents 4aae665 + 650cd43 commit 3e09721
Show file tree
Hide file tree
Showing 22 changed files with 135 additions and 50 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
registry.password: ${{ secrets.REGISTRY_PASSWORD }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand All @@ -33,10 +33,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
propagate_failure: true
trigger_workflow: true
wait_workflow: true
- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down
23 changes: 22 additions & 1 deletion abi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
plugins {
id 'java-library'
}

description 'Ethereum Application Binary Interface (ABI) for working with smart contracts'

dependencies {
compile project(':utils')
api project(':utils')
}

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
tasks.named("jacocoRootTestReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") }
tasks.named("jacocoRootTestReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") }
11 changes: 8 additions & 3 deletions besu/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@

plugins {
id 'java-library'
}
description 'Besu JSON-RPC API'

dependencies {
compile project(':eea')
testCompile project(path: ':core', configuration: 'testArtifacts')
api project(':eea')
testImplementation project(path: ':core', configuration: 'testArtifacts')
}

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {


ext {
bouncycastleVersion = '1.70'
bouncycastleVersion = '1.73'
jacksonVersion = '2.14.2'
javaPoetVersion = '1.7.0'
kotlinVersion = '1.3.72'
Expand All @@ -24,9 +24,9 @@ ext {
javaWebSocketVersion = '1.5.3'
picocliVersion = '3.0.0'
// test dependencies
equalsverifierVersion = '3.5.5'
equalsverifierVersion = '3.14.1'
junitVersion = '5.5.2'
web3jUnitVersion = '4.9.7'
web3jUnitVersion = '4.9.8'
junitBenchmarkVersion = '0.7.2'
logbackVersion = '1.2.3'
mockitoJunitVersion = '3.1.0'
Expand Down Expand Up @@ -71,8 +71,8 @@ allprojects {
}

dependencies {
testCompile "org.junit.jupiter:junit-jupiter:$junitVersion"
testCompile "org.mockito:mockito-junit-jupiter:$mockitoJunitVersion"
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoJunitVersion"

configurations.all {
resolutionStrategy {
Expand All @@ -96,3 +96,6 @@ allprojects {
configure(subprojects.findAll { it.name != 'integration-tests' }) {
apply from: "$rootDir/gradle/jacoco/build.gradle"
}

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle") }
tasks.named("spotlessKotlin").configure { dependsOn("spotlessJava", "spotlessGroovyGradle") }
7 changes: 5 additions & 2 deletions codegen/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
description 'web3j project code generators'

dependencies {
compile project(':core'),
implementation project(':core'),
"com.squareup:kotlinpoet:$kotlinPoetVersion",
"com.squareup:javapoet:$javaPoetVersion",
"info.picocli:picocli:$picocliVersion"
testCompile project(':core').sourceSets.test.output,
testImplementation project(':core').sourceSets.test.output,
"ch.qos.logback:logback-core:$logbackVersion",
"ch.qos.logback:logback-classic:$logbackVersion"
implementation("org.junit.platform:junit-platform-launcher:$junitPlatformLauncherVersion")
Expand Down Expand Up @@ -37,3 +37,6 @@ file("src/test/resources/solidity").listFiles().each { File file ->
test.dependsOn generateTask
}
}

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","processTestResources","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
6 changes: 4 additions & 2 deletions contracts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
description 'web3j support for Ethereum Improvement Proposals (EIP\'s)'

dependencies {
compile project(':core')
testCompile project(path: ':core', configuration: 'testArtifacts')
implementation project(':core')
testImplementation project(path: ':core', configuration: 'testArtifacts')
}
tasks.named("spotlessJava").configure { dependsOn("compileJava","javadoc","processResources","spotlessGroovyGradle") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","javadoc","processResources","spotlessJava","spotlessGroovyGradle") }
12 changes: 9 additions & 3 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import java.text.SimpleDateFormat

apply plugin: 'org.ajoberstar.git-publish'
plugins {
id 'java-library'
id 'org.ajoberstar.git-publish'
}


description 'web3j is a lightweight Java library for integration with Ethereum clients'

dependencies {
compile project(':abi'),
api project(':abi'),
project(':crypto'),
project(':tuples'),
"com.github.jnr:jnr-unixsocket:$jnr_unixsocketVersion",
Expand All @@ -16,7 +19,7 @@ dependencies {
"org.java-websocket:Java-WebSocket:$javaWebSocketVersion",
"com.fasterxml.jackson.core:jackson-databind:$jacksonVersion",
"org.slf4j:slf4j-api:$slf4jVersion"
testCompile project(path: ':crypto', configuration: 'testArtifacts'),
testImplementation project(path: ':crypto', configuration: 'testArtifacts'),
"nl.jqno.equalsverifier:equalsverifier:$equalsverifierVersion",
"ch.qos.logback:logback-classic:$logbackVersion"
}
Expand Down Expand Up @@ -78,3 +81,6 @@ classes { dependsOn createProperties }
configurations { testArtifacts.extendsFrom testRuntime }

artifacts { testArtifacts testsJar }

tasks.named("spotlessJava").configure { dependsOn("compileJava", "compileTestJava", "processResources", "processTestResources", "spotlessGroovyGradle","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava", "compileTestJava", "processResources", "processTestResources","spotlessJava","spotlessGroovyGradle","javadoc","test") }
8 changes: 7 additions & 1 deletion crypto/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
plugins {
id 'java-library'
}

description 'web3j Ethereum crypto library'

dependencies {
compile project(':abi'),
api project(':abi'),
project(':rlp'),
project(':utils'),
"org.slf4j:slf4j-api:$slf4jVersion",
Expand All @@ -12,3 +15,6 @@ dependencies {
configurations { testArtifacts.extendsFrom testRuntime }

artifacts { testArtifacts testsJar }

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","processTestResources","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
10 changes: 8 additions & 2 deletions eea/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
plugins {
id 'java-library'
}

description 'EEA JSON-RPC API'

dependencies {
compile project(':core')
testCompile project(path: ':core', configuration: 'testArtifacts')
api project(':core')
testImplementation project(path: ':core', configuration: 'testArtifacts')
}

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
7 changes: 5 additions & 2 deletions geth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
description 'Geth JSON-RPC API'

dependencies {
compile project(':core')
testCompile project(path: ':core', configuration: 'testArtifacts')
implementation project(':core')
testImplementation project(path: ':core', configuration: 'testArtifacts')
}

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
group=org.web3j
version=4.9.8-SNAPSHOT
version=4.10.0-SNAPSHOT
18 changes: 12 additions & 6 deletions gradle/jacoco/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
apply plugin: 'jacoco'

task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
dependsOn = subprojects.test

doFirst {
executionData.fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
getExecutionData().from(executionData.findAll { it.exists() })
}

dependsOn(subprojects.test)

getSourceDirectories().from(subprojects.sourceSets.main.allSource.srcDirs)
getAdditionalSourceDirs().from(subprojects.sourceSets.main.allSource.srcDirs)
getClassDirectories().from(subprojects.sourceSets.main.output)
reports { xml.enabled true }
executionData.from(subprojects.jacocoTestReport.executionData)

doFirst {
getExecutionData().from(executionData.findAll { it.exists() })
reports {
xml.enabled true
}

afterEvaluate {
Expand All @@ -26,6 +32,6 @@ task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
}

jacoco {
toolVersion = "0.8.4"
toolVersion = "0.8.10"
}

4 changes: 2 additions & 2 deletions gradle/java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'java'

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 17
targetCompatibility = 17

compileJava {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
Expand Down
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 @@

distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
5 changes: 4 additions & 1 deletion hosted-providers/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

description 'web3j customisations for working with hosted web3 providers (Infura.io & Nodesmith.io)'

dependencies { compile project(':core') }
dependencies { implementation project(':core') }

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc", "test") }
15 changes: 9 additions & 6 deletions integration-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ repositories {
maven { url "https://hyperledger.jfrog.io/artifactory/besu-maven/" }
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" }
maven { url "https://dl.cloudsmith.io/public/consensys/quorum-mainnet-launcher/maven/" }
}
ext {
besuPluginVersion = '21.10.3'
besuInternalVersion = '21.10.3'
besuCryptoDepVersion = '0.3.0'
besuPluginVersion = '23.4.0'
besuInternalVersion = '23.4.0'
besuInternalCryptoVersion = '23.1.3'
besuCryptoDepVersion = '0.7.1'
}

def withoutAbi = { exclude group: 'org.web3j', module: 'abi' }

dependencies {
testCompile project(':core'),
testImplementation project(':core'),
project(':besu'),
project(':parity'),
project(':geth'),
Expand All @@ -35,7 +35,7 @@ dependencies {
testImplementation "org.hyperledger.besu.internal:api:$besuInternalVersion",withoutAbi
testImplementation "org.hyperledger.besu.internal:config:$besuInternalVersion",withoutAbi
testImplementation "org.hyperledger.besu.internal:core:$besuInternalVersion",withoutAbi
testImplementation "org.hyperledger.besu.internal:crypto:$besuInternalVersion",withoutAbi
testImplementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion",withoutAbi
testImplementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion",withoutAbi
testImplementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion",withoutAbi
testImplementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion",withoutAbi
Expand Down Expand Up @@ -71,3 +71,6 @@ test {
compileTestJava {
dependsOn project(':codegen').getTasksByName("testClasses", false)
}

tasks.named("spotlessJava").configure { dependsOn("compileTestJava","spotlessGroovyGradle","processTestResources") }
tasks.named("spotlessKotlin").configure { dependsOn("compileTestJava","spotlessJava", "spotlessGroovyGradle","processTestResources") }
7 changes: 5 additions & 2 deletions parity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
description 'Parity JSON-RPC API'

dependencies {
compile project(':core')
testCompile project(path: ':core', configuration: 'testArtifacts'),
implementation project(':core')
testImplementation project(path: ':core', configuration: 'testArtifacts'),
"nl.jqno.equalsverifier:equalsverifier:$equalsverifierVersion"
}

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
8 changes: 7 additions & 1 deletion rlp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
plugins {
id 'java-library'
}

description 'Ethereum Recursive Length Prefix (RLP) encoding for serializing objects'

dependencies { compile project(':utils') }
dependencies { api project(':utils') }

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
3 changes: 3 additions & 0 deletions tuples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@

description 'Simple Java tuples library'

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc") }
8 changes: 7 additions & 1 deletion utils/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
plugins {
id 'java-library'
}

description 'Minimal set of web3j utility classes'

dependencies { compile "org.bouncycastle:bcprov-jdk15on:$bouncycastleVersion" }
dependencies { api "org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion" }

tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }

0 comments on commit 3e09721

Please sign in to comment.