Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

plugins {
id "com.github.ben-manes.versions" version "0.53.0"
id "com.diffplug.spotless" version "8.0.0"
id "com.gradleup.nmcp.aggregation" version "1.2.0"
id "com.gradleup.nmcp" version "1.2.0" apply false
id "com.diffplug.spotless" version "8.1.0"
id "com.gradleup.nmcp.aggregation" version "1.4.3"
id "com.gradleup.nmcp" version "1.4.3" apply false
}

version = '2.5.8'
Expand Down Expand Up @@ -66,14 +66,14 @@ subprojects {
}

dependencies {
implementation 'commons-cli:commons-cli:1.10.0'
implementation 'commons-cli:commons-cli:1.11.0'
implementation 'commons-logging:commons-logging:1.3.5'

testImplementation platform('org.junit:junit-bom:6.0.0')
testImplementation platform('org.junit:junit-bom:6.0.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.assertj:assertj-core:3.27.6'
testImplementation 'org.mockito:mockito-core:5.20.0'
testImplementation 'org.mockito:mockito-core:5.21.0'
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.1.8'

testImplementation 'org.hamcrest:hamcrest-library:3.0'
Expand Down
8 changes: 4 additions & 4 deletions examples/fabric-contract-example-as-service/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.gradleup.shadow' version '9.2.2'
id 'com.gradleup.shadow' version '9.3.1'
id 'java'
}

Expand All @@ -14,11 +14,11 @@ repositories {

dependencies {
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.7'
implementation 'org.json:json:20250517'
testImplementation platform('org.junit:junit-bom:6.0.1')
implementation 'org.json:json:20251224'
testImplementation platform('org.junit:junit-bom:6.0.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.assertj:assertj-core:3.27.6'
testImplementation 'org.mockito:mockito-core:5.20.0'
testImplementation 'org.mockito:mockito-core:5.21.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar


plugins {
id("com.gradleup.shadow") version "9.2.2"
id("com.gradleup.shadow") version "9.3.1"
id("org.jetbrains.kotlin.jvm") version "2.2.21"
}

Expand Down
8 changes: 4 additions & 4 deletions examples/fabric-contract-example-gradle/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.gradleup.shadow' version '9.2.2'
id 'com.gradleup.shadow' version '9.3.1'
id 'java'
}

Expand All @@ -14,11 +14,11 @@ repositories {

dependencies {
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.7'
implementation 'org.json:json:20250517'
testImplementation platform('org.junit:junit-bom:6.0.1')
implementation 'org.json:json:20251224'
testImplementation platform('org.junit:junit-bom:6.0.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.assertj:assertj-core:3.27.6'
testImplementation 'org.mockito:mockito-core:5.20.0'
testImplementation 'org.mockito:mockito-core:5.21.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

Expand Down
13 changes: 5 additions & 8 deletions examples/fabric-contract-example-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,11 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.21.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
Expand Down
8 changes: 4 additions & 4 deletions examples/ledger-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.gradleup.shadow' version '9.2.2'
id 'com.gradleup.shadow' version '9.3.1'
id 'java'
}

Expand All @@ -14,11 +14,11 @@ repositories {

dependencies {
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.7'
implementation 'org.json:json:20250517'
testImplementation platform('org.junit:junit-bom:6.0.0')
implementation 'org.json:json:20251224'
testImplementation platform('org.junit:junit-bom:6.0.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.assertj:assertj-core:3.27.6'
testImplementation 'org.mockito:mockito-core:5.20.0'
testImplementation 'org.mockito:mockito-core:5.21.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

Expand Down
8 changes: 4 additions & 4 deletions fabric-chaincode-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ RUN curl -s "https://get.sdkman.io" | bash

SHELL ["/bin/bash", "-c"]

RUN source /root/.sdkman/bin/sdkman-init.sh \
&& sdk install gradle 9.1.0 \
&& sdk install maven 3.9.11
RUN . /root/.sdkman/bin/sdkman-init.sh \
&& sdk install gradle 9.3.0 \
&& sdk install maven 3.9.12

FROM ${JAVA_IMAGE} AS dependencies

Expand Down Expand Up @@ -48,7 +48,7 @@ RUN gradle \
WORKDIR /root/chaincode-java
# Run the Gradle and Maven commands to generate the wrapper variants
# of each tool
#Gradle doesn't run without settings.gradle file, so create one
# Gradle doesn't run without settings.gradle file, so create one
RUN touch settings.gradle \
&& gradle wrapper \
&& ./gradlew wrapper \
Expand Down
2 changes: 1 addition & 1 deletion fabric-chaincode-docker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

plugins {
id 'com.bmuschko.docker-remote-api' version '9.4.0'
id 'com.bmuschko.docker-remote-api' version '10.0.0'
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion fabric-chaincode-integration-test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
implementation project(':fabric-chaincode-docker')
implementation project(':fabric-chaincode-shim')
implementation 'org.json:json:20250517'
implementation 'org.json:json:20251224'
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.gradleup.shadow' version '9.2.2'
id 'com.gradleup.shadow' version '9.3.1'
id 'java'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.gradleup.shadow' version '9.2.2'
id 'com.gradleup.shadow' version '9.3.1'
id 'java'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.gradleup.shadow' version '9.2.2'
id 'com.gradleup.shadow' version '9.3.1'
id 'java'
}

Expand Down
18 changes: 9 additions & 9 deletions fabric-chaincode-shim/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

pmd {
toolVersion = '7.14.0'
toolVersion = '7.20.0'
ruleSetFiles = files('../pmd-ruleset.xml')
ruleSets = [] // explicitly set to empty to avoid using the default configuration
ignoreFailures = false
Expand All @@ -35,16 +35,16 @@ dependencies {
because('CVE-2025-48924')
}
}
implementation platform('com.google.protobuf:protobuf-bom:4.33.0')
implementation platform('io.grpc:grpc-bom:1.77.0')
implementation platform('io.opentelemetry:opentelemetry-bom:1.56.0')
implementation platform('com.google.protobuf:protobuf-bom:4.33.4')
implementation platform('io.grpc:grpc-bom:1.78.0')
implementation platform('io.opentelemetry:opentelemetry-bom:1.58.0')

implementation 'org.hyperledger.fabric:fabric-protos:0.3.7'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.82'
implementation 'org.bouncycastle:bcprov-jdk18on:1.82'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.83'
implementation 'org.bouncycastle:bcprov-jdk18on:1.83'
implementation 'io.github.classgraph:classgraph:4.8.184'
implementation 'com.github.erosb:everit-json-schema:1.14.6'
implementation 'org.json:json:20250517'
implementation 'org.json:json:20251224'
implementation 'com.google.protobuf:protobuf-java-util'

implementation 'io.grpc:grpc-netty-shaded'
Expand All @@ -53,14 +53,14 @@ dependencies {
testImplementation 'io.grpc:grpc-inprocess'

implementation 'io.opentelemetry:opentelemetry-api'
implementation 'io.opentelemetry.proto:opentelemetry-proto:1.8.0-alpha'
implementation 'io.opentelemetry.proto:opentelemetry-proto:1.9.0-alpha'
implementation 'io.opentelemetry:opentelemetry-sdk'
implementation 'io.opentelemetry:opentelemetry-sdk-extension-autoconfigure'
implementation 'io.opentelemetry:opentelemetry-sdk-trace'
implementation 'io.opentelemetry:opentelemetry-exporter-otlp'
implementation 'io.opentelemetry:opentelemetry-extension-trace-propagators'
implementation 'io.opentelemetry.semconv:opentelemetry-semconv:1.37.0'
implementation 'io.opentelemetry.instrumentation:opentelemetry-grpc-1.6:2.21.0-alpha'
implementation 'io.opentelemetry.instrumentation:opentelemetry-grpc-1.6:2.24.0-alpha'
}

sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void startRouting() {
}
}

@SuppressWarnings("PMD.AvoidCatchingThrowable")
@SuppressWarnings("PMD.AvoidCatchingGenericException")
private Response processRequest(final ChaincodeStub stub) {
LOGGER.info(() -> "Got invoke routing request");
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@

/** Used as the default serialisation for transmission from SDK to Contract. */
@Serializer()
@SuppressWarnings({"PMD.GodClass", "PMD.AvoidLiteralsInIfCondition", "PMD.AvoidDuplicateLiterals"})
@SuppressWarnings({
"PMD.GodClass",
"PMD.AvoidLiteralsInIfCondition",
"PMD.AvoidDuplicateLiterals",
"PMD.AvoidDeeplyNestedIfStmts"
})
public class JSONTransactionSerializer implements SerializerInterface {
private static final Logger LOGGER = Logger.getLogger(JSONTransactionSerializer.class.getName());
private final TypeRegistry typeRegistry = TypeRegistry.getRegistry();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public final class LedgerImpl implements Ledger {
*
* @param ctx Context transactional context to use
*/
@SuppressWarnings("PMD.UnusedFormalParameter")
public LedgerImpl(final Context ctx) {
// Empty stub
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ChaincodeServerProperties() {
* @param permitKeepAliveWithoutCalls whether clients are allowed to send keep-alive HTTP/2 PINGs even if there are
* no outstanding RPCs on the connection.
*/
@SuppressWarnings({"PMD.UnusedFormalParameter", "PMD.NullAssignment"})
@SuppressWarnings({"PMD.NullAssignment"})
public ChaincodeServerProperties(
final int portChaincodeServer,
final int maxInboundMetadataSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public byte[] policy() {
@Override
public void addOrgs(final RoleType role, final String... organizations) {
MSPRoleType mspRole;
if (RoleType.RoleTypeMember.equals(role)) {
if (RoleType.RoleTypeMember == role) {
mspRole = MSPRoleType.MEMBER;
} else {
mspRole = MSPRoleType.PEER;
Expand All @@ -78,7 +78,7 @@ public List<String> listOrgs() {

private void setMSPIDsFromSP(final SignaturePolicyEnvelope spe) {
spe.getIdentitiesList().stream()
.filter(identity -> Classification.ROLE.equals(identity.getPrincipalClassification()))
.filter(identity -> Classification.ROLE == identity.getPrincipalClassification())
.forEach(this::addOrg);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public ChaincodeMessage call() {

// Call chaincode's invoke
// Note in Fabric v2, there won't be any INIT
if (this.type.equals(Type.INIT)) {
if (this.type == Type.INIT) {
result = chaincode.init(stub);
} else {
result = chaincode.invoke(stub);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ public Span createSpan(final ChaincodeStub stub) {

@Override
public ClientInterceptor createInterceptor() {
return grpcTracer.newClientInterceptor();
return grpcTracer.createClientInterceptor();
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down