Skip to content

Commit 760e50b

Browse files
authored
Merge pull request #2057 from hyperledger/upgradeGradle8.7
Upgrade gradle to 8.7 and remove Consensys Repo dependency
2 parents 5173684 + 4cef2b2 commit 760e50b

File tree

39 files changed

+576
-320
lines changed

39 files changed

+576
-320
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
# [4.11.4]() (Upcoming)
6+
# [4.12.0]() (Upcoming)
77

88
### Bug Fixes
99

@@ -15,7 +15,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
1515

1616
### BREAKING CHANGES
1717

18-
*
18+
* Upgrade gradle to 8.7 and remove Consensys Repo dependency [#2057](https://github.com/hyperledger/web3j/pull/2057)
1919

2020
# [4.11.3](https://github.com/hyperledger/web3j/releases/tag/v4.11.3) (2024-05-01)
2121

abi/build.gradle

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ dependencies {
88
api project(':utils')
99
}
1010

11-
tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
12-
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
11+
tasks.named("spotlessJava").configure {
12+
dependsOn("spotlessGroovyGradle", "compileJava", "compileTestJava", "javadoc", "test", "jacocoTestReport")
13+
}
14+
15+
tasks.named("spotlessKotlin").configure {
16+
dependsOn("compileJava", "spotlessJava", "spotlessGroovyGradle", "compileTestJava", "processTestResources", "javadoc", "test", "jacocoTestReport")
17+
}

abi/src/main/java/org/web3j/abi/FunctionEncoder.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,11 @@ public static Function makeFunction(
7070
List<String> solidityInputTypes,
7171
List<Object> arguments,
7272
List<String> solidityOutputTypes)
73-
throws ClassNotFoundException, NoSuchMethodException, InstantiationException,
74-
IllegalAccessException, InvocationTargetException {
73+
throws ClassNotFoundException,
74+
NoSuchMethodException,
75+
InstantiationException,
76+
IllegalAccessException,
77+
InvocationTargetException {
7578
List<Type> encodedInput = new ArrayList<>();
7679
Iterator argit = arguments.iterator();
7780
for (String st : solidityInputTypes) {
@@ -88,7 +91,9 @@ public static Function makeFunction(
8891

8992
protected abstract String encodeParameters(List<Type> parameters);
9093

91-
/** @param methodId Callback selector / Abi method Id (Hex format) */
94+
/**
95+
* @param methodId Callback selector / Abi method Id (Hex format)
96+
*/
9297
protected abstract String encodeWithSelector(
9398
final String methodId, final List<Type> parameters);
9499

abi/src/main/java/org/web3j/abi/TypeDecoder.java

+20-8
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,20 @@ public class TypeDecoder {
7171
static final int MAX_BYTE_LENGTH_FOR_HEX_STRING = Type.MAX_BYTE_LENGTH << 1;
7272

7373
public static Type instantiateType(String solidityType, Object value)
74-
throws InvocationTargetException, NoSuchMethodException, InstantiationException,
75-
IllegalAccessException, ClassNotFoundException {
74+
throws InvocationTargetException,
75+
NoSuchMethodException,
76+
InstantiationException,
77+
IllegalAccessException,
78+
ClassNotFoundException {
7679
return instantiateType(makeTypeReference(solidityType), value);
7780
}
7881

7982
public static Type instantiateType(TypeReference ref, Object value)
80-
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException,
81-
InstantiationException, ClassNotFoundException {
83+
throws NoSuchMethodException,
84+
IllegalAccessException,
85+
InvocationTargetException,
86+
InstantiationException,
87+
ClassNotFoundException {
8288
Class rc = ref.getClassType();
8389
if (Array.class.isAssignableFrom(rc)) {
8490
return instantiateArrayType(ref, value);
@@ -183,8 +189,11 @@ static <T extends NumericType> int getTypeLength(Class<T> type) {
183189
}
184190

185191
static Type instantiateArrayType(TypeReference ref, Object value)
186-
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException,
187-
InstantiationException, ClassNotFoundException {
192+
throws NoSuchMethodException,
193+
IllegalAccessException,
194+
InvocationTargetException,
195+
InstantiationException,
196+
ClassNotFoundException {
188197
List values;
189198
if (value instanceof List) {
190199
values = (List) value;
@@ -218,8 +227,11 @@ static Type instantiateArrayType(TypeReference ref, Object value)
218227
}
219228

220229
static Type instantiateAtomicType(Class<?> referenceClass, Object value)
221-
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException,
222-
InstantiationException, ClassNotFoundException {
230+
throws NoSuchMethodException,
231+
IllegalAccessException,
232+
InvocationTargetException,
233+
InstantiationException,
234+
ClassNotFoundException {
223235
Object constructorArg = null;
224236
if (NumericType.class.isAssignableFrom(referenceClass)) {
225237
constructorArg = asBigInteger(value);

abi/src/test/java/org/web3j/abi/DefaultFunctionEncoderTest.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -800,8 +800,11 @@ public void testABIv2DynamicArrayEncode() {
800800

801801
@Test
802802
public void testMakeFunction()
803-
throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException,
804-
InstantiationException, IllegalAccessException {
803+
throws ClassNotFoundException,
804+
NoSuchMethodException,
805+
InvocationTargetException,
806+
InstantiationException,
807+
IllegalAccessException {
805808

806809
Function expectedFunction =
807810
new Function(

besu/build.gradle

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ dependencies {
88
testImplementation project(path: ':core', configuration: 'testArtifacts')
99
}
1010

11-
tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") }
12-
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
11+
tasks.named("spotlessJava").configure {
12+
dependsOn("spotlessGroovyGradle", "compileJava", "compileTestJava", "javadoc", "test", "jacocoTestReport")
13+
}
14+
15+
tasks.named("spotlessKotlin").configure {
16+
dependsOn("compileJava", "spotlessJava", "spotlessGroovyGradle", "compileTestJava", "processTestResources", "javadoc", "test", "jacocoTestReport")
17+
}

build.gradle

+19-23
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
plugins {
22
id 'java'
33
id 'idea'
4-
id 'org.sonarqube' version '3.4.0.2513'
4+
id 'org.sonarqube' version '5.0.0.4638'
55
id 'jacoco'
6-
id 'com.diffplug.gradle.spotless' version '4.5.1'
7-
id 'io.codearte.nexus-staging' version '0.22.0'
6+
id 'com.diffplug.spotless' version '6.25.0'
7+
id 'io.codearte.nexus-staging' version '0.30.0'
88
id 'de.marcphilipp.nexus-publish' version '0.4.0'
9-
id 'de.undercouch.download' version '4.1.1'
9+
id 'de.undercouch.download' version '4.1.2'
1010
id 'org.ajoberstar.git-publish' version '3.0.1'
1111
}
1212

1313

1414

1515
ext {
16-
bouncycastleVersion = '1.73'
17-
jacksonVersion = '2.14.2'
18-
javaPoetVersion = '1.7.0'
19-
kotlinVersion = '1.3.72'
20-
kotlinPoetVersion = '1.5.0'
21-
jnr_unixsocketVersion = '0.38.17'
22-
okhttpVersion = '4.9.0'
23-
rxjavaVersion = '2.2.2'
24-
slf4jVersion = '2.0.11'
25-
javaWebSocketVersion = '1.5.3'
26-
picocliVersion = '3.0.0'
27-
ensAdraffyVersion = '0.1.2'
28-
kzg4844Version = '0.8.0'
16+
bouncycastleVersion = '1.78.1'
17+
jacksonVersion = '2.17.1'
18+
javaPoetVersion = '1.13.0'
19+
kotlinVersion = '1.9.24'
20+
kotlinPoetVersion = '1.16.0'
21+
jnr_unixsocketVersion = '0.38.22'
22+
okhttpVersion = '4.12.0'
23+
rxjavaVersion = '2.2.21'
24+
slf4jVersion = '2.0.13'
25+
javaWebSocketVersion = '1.5.6'
26+
picocliVersion = '4.7.6'
27+
ensAdraffyVersion = '0.2.0'
28+
kzg4844Version = '1.0.0'
2929
tuweniVersion = '2.4.2'
3030
// test dependencies
31-
equalsverifierVersion = '3.14.1'
31+
equalsverifierVersion = '3.16.1'
3232
junitVersion = '5.5.2'
3333
web3jUnitVersion = '4.11.3'
3434
junitBenchmarkVersion = '0.7.2'
35-
logbackVersion = '1.4.14'
35+
logbackVersion = '1.5.6'
3636
mockitoJunitVersion = '3.1.0'
3737
junitPlatformLauncherVersion = '1.5.2'
3838
}
@@ -74,10 +74,6 @@ allprojects {
7474
useJUnitPlatform()
7575
}
7676

77-
repositories {
78-
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
79-
}
80-
8177
dependencies {
8278
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
8379
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoJunitVersion"

codegen/build.gradle

+7-2
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,10 @@ file("src/test/resources/solidity").listFiles().each { File file ->
3838
}
3939
}
4040

41-
tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","processTestResources","javadoc","test") }
42-
tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") }
41+
tasks.named("spotlessJava").configure {
42+
dependsOn("spotlessGroovyGradle", "compileJava", "compileTestJava", "javadoc", "test", "jacocoTestReport")
43+
}
44+
45+
tasks.named("spotlessKotlin").configure {
46+
dependsOn("compileJava", "spotlessJava", "spotlessGroovyGradle", "compileTestJava", "processTestResources", "javadoc", "test", "jacocoTestReport")
47+
}

0 commit comments

Comments
 (0)