Skip to content

Commit 518f65a

Browse files
Prepare for v2.5.1 release (#323)
- Update version numbers. - Update GitHub Actions versions. - Update base Java 11 Docker image patch level. - Upgrade Gradle and Maven patch levels in Docker image. - Update dependencies. Signed-off-by: Mark S. Lewis <[email protected]>
1 parent 63816aa commit 518f65a

File tree

11 files changed

+38
-39
lines changed

11 files changed

+38
-39
lines changed

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
runs-on: ubuntu-latest
2626
needs: test
2727
steps:
28-
- uses: actions/checkout@v3
29-
- uses: actions/setup-java@v3
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-java@v4
3030
with:
3131
distribution: 'temurin'
3232
java-version: '11'
@@ -59,8 +59,8 @@ jobs:
5959
contents: read
6060
packages: write
6161
steps:
62-
- uses: actions/checkout@v3
63-
- uses: actions/setup-java@v3
62+
- uses: actions/checkout@v4
63+
- uses: actions/setup-java@v4
6464
with:
6565
distribution: 'temurin'
6666
java-version: '11'

.github/workflows/test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
with:
2121
ref: ${{ inputs.checkout-ref }}
22-
- uses: actions/setup-java@v3
22+
- uses: actions/setup-java@v4
2323
with:
2424
distribution: 'temurin'
2525
java-version: '11'
@@ -35,10 +35,10 @@ jobs:
3535
intergationtest:
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939
with:
4040
ref: ${{ inputs.checkout-ref }}
41-
- uses: actions/setup-java@v3
41+
- uses: actions/setup-java@v4
4242
with:
4343
distribution: 'temurin'
4444
java-version: '11'

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Changelog
2+
3+
Notable changes in each release are documented on the project's [GitHub releases](https://github.com/hyperledger/fabric-chaincode-java/releases) page. Change history from previous releases is retained below.
4+
15
## v2.5.0
26
Thu Dec 8 09:02:17 GMT 2022
37

COMPATIBILITY.md

+14-15
Original file line numberDiff line numberDiff line change
@@ -16,54 +16,53 @@ This table shows the summary of the compatibility of the Java libraries, togethe
1616

1717

1818
Testing is performed with
19-
- Java v8: Openjdk version 1.8.0_222
20-
- Java v11: Eclipse Temurin 11.0.16.1_1-jdk (this has changed from Openjdk version 11.04_11)
19+
- Java v8: OpenJDK
20+
- Java v11: Eclipse Temurin (this has changed from OpenJDK)
2121

2222

2323
By default a Fabric Peer v1.4 will create a Java 8 VM, and a Fabric Peer v2.x will create a Java 11 VM. Whilst is the default, the docker image used to host the chaincode and contracts can be altered. Set the environment variable `CORE_CHAINCODE_JAVA_RUNTIME` on the peer to the name of the docker image. For example `CORE_CHAINCODE_JAVA_RUNTIME=example/customJavaRuntime:latest`
2424

25-
The Java Libraries will connect to the peer whilst running; this is referred to as 'Fabric Peer Connectivity' in the table. For example, whilst the Fabric Peer v1.4 will create a Java 8 environment, if a Java 11 environment was configured, the Java Libraries at v2.5.0 still function when connecting to the Fabric Peer v1.4.
25+
The Java Libraries will connect to the peer whilst running; this is referred to as 'Fabric Peer Connectivity' in the table. For example, whilst the Fabric Peer v1.4 will create a Java 8 environment, if a Java 11 environment was configured, the Java Libraries at v2.5 still function when connecting to the Fabric Peer v1.4.
2626

2727
## Compatibility
2828

29-
The key elements are
29+
The key elements are:
3030

3131
- the version of the Fabric Contract Java libraries used
3232
- the version of the JVM used to run the code
3333
- When starting a chaincode container to run a Smart Contract the version of the runtime that is used is determined by these factors:
3434

35-
Fabric v1.4.2, and Fabric v2.5.0 will, by default, start up docker image to host the chaincode and contracts. The version of the docker image used is defined by the version of Fabric in use.
35+
Fabric v1.4.2, and Fabric v2.5.x will, by default, start up docker image to host the chaincode and contracts. The version of the docker image used is defined by the version of Fabric in use.
3636

3737
With Fabric v2.1.0 and later, the chaincode container can be configured to be started by different chaincode builders, and not the Peer. In this case, the environment used is not in the control of Fabric.
3838

3939
The Java libraries are produced are `group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim'`
4040

4141
### Supported JVMs
4242

43-
v1.4.x and v2.5.0 Java Libraries are supported running in Java 11 with the x86_64 architecture. Later Java 11 versions are supported but are not tested.
43+
v1.4.x and v2.5.x Java Libraries are supported running in Java 11 with the x86_64 architecture. Later Java 11 versions are supported but are not tested.
4444

45-
v1.4.x Java Libraries are supported running in Java 8 with the  x86_64 architecture. Later Java 8 versions are supported but are not tested.
45+
v1.4.x Java Libraries are supported running in Java 8 with the x86_64 architecture. Later Java 8 versions are supported but are not tested.
4646

47-
Architecture Support: all docker images, JVMs, tools are tested under x86_64 ONLY
47+
Architecture Support: all docker images, JVMs, tools are tested under x86_64 ONLY
4848

4949

50+
### Default Peer Runtime selection
5051

51-
### Default Peer Runtime selection
52+
When using Fabric v2.5, the default docker image that is used to run the Java chaincode is *eclipse-temurin:11.0.21_9-jdk*
5253

53-
When using Fabric 2.5.0, the default docker image that is used to run the Java chaincode is *eclipse-temurin:11.0.16.1_1-jdk*
54-
55-
With the default docker image used by Fabric 2.5.0, if the packaged Java code contains a build script or a wrapper for either Maven or Gradle, it will be built using Gradle 7.0 wrapper , or Maven 3.8.1 wrapper.
54+
With the default docker image used by Fabric v2.5, if the packaged Java code contains a build script or a wrapper for either Maven or Gradle, it will be built using Gradle 7.0 wrapper, or Maven 3.8.1 wrapper.
5655

5756
- If both Gradle and Maven files are present Gradle is used.
5857
- Gradle build files can be groovy, or kotlin.
5958
- If the Gradle or Maven wrappers are present, this will used in preference to the installed wrappers.
6059

61-
Remeber that when using the wrappers, code will be downloaded from the internet. Keep this in mind for any installation with limited or no internet access.
60+
Remember that when using the wrappers, code will be downloaded from the internet. Keep this in mind for any installation with limited or no internet access.
6261

6362
Alternatively it is recommended to package prebuilt jar files, including the contract and all dependencies, in which case no build or Internet access is required when installing Java chaincode.
6463

6564
Please check the [Dockerfile](./fabric-chaincode-docker/Dockerfile) that is used for the environment to see exactly how these versions are installed.
6665

6766
### Supported Runtime communication with the Peer
68-
 
69-
Subject to a suitable runtime environment, the 1.4 and 2.5 Java Libraries can used to communicate with Fabric Peers at 2.5 and previous LTS versions. The level of functionality that is implied by the Fabric version in use and channel capabilities. 
67+
68+
Subject to a suitable runtime environment, the 1.4 and 2.5 Java Libraries can used to communicate with Fabric Peers at 2.5 and previous LTS versions. The level of functionality that is implied by the Fabric version in use and channel capabilities.

RELEASING.md

-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ The following tasks are required before releasing:
1818
- Update version numbers in `build.gradle` files to the required version
1919
- Update test, sample, and docs files to match the new version
2020
- Update the [`COMPATIBILITY.md`](./COMPATIBILITY.md)
21-
- Create a new release notes file
22-
- Update the [`CHANGELOG.md`](./CHANGELOG.md) file
23-
24-
The `changelog.sh` script in `scripts` will prepopulate the changelog but you must check and edit the file manually afterwards as required
2521

2622
See the [[FABCJ-289] release: 2.2.0 LTS](https://github.com/hyperledger/fabric-chaincode-java/pull/124) pull request for an example, although be careful to search for all versions in the codebase as they're easy to miss and things change!
2723

examples/fabric-contract-example-gradle-kotlin/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ java {
1919

2020

2121
dependencies {
22-
implementation("org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.0")
22+
implementation("org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.1")
2323
implementation("org.json:json:20231013")
2424
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
2525

examples/fabric-contract-example-gradle/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repositories {
2020
}
2121

2222
dependencies {
23-
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.5.0'
23+
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.5.1'
2424
compile 'org.json:json:20231013'
2525
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
2626
testImplementation 'org.assertj:assertj-core:3.11.1'

examples/fabric-contract-example-maven/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1313

1414
<!-- fabric-chaincode-java -->
15-
<fabric-chaincode-java.version>2.5.0</fabric-chaincode-java.version>
15+
<fabric-chaincode-java.version>2.5.1</fabric-chaincode-java.version>
1616

1717
<!-- Logging -->
1818
<logback.version>1.3.14</logback.version>

fabric-chaincode-docker/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:11.0.18_10-jdk as builder
1+
FROM eclipse-temurin: 11.0.21_9-jdk as builder
22
ENV DEBIAN_FRONTEND=noninteractive
33

44
# Build tools
@@ -10,10 +10,10 @@ RUN curl -s "https://get.sdkman.io" | bash
1010

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

13-
RUN source /root/.sdkman/bin/sdkman-init.sh; sdk install gradle 7.0
14-
RUN source /root/.sdkman/bin/sdkman-init.sh; sdk install maven 3.8.1
13+
RUN source /root/.sdkman/bin/sdkman-init.sh; sdk install gradle 7.6.3
14+
RUN source /root/.sdkman/bin/sdkman-init.sh; sdk install maven 3.9.5
1515

16-
FROM eclipse-temurin:11.0.18_10-jdk as dependencies
16+
FROM eclipse-temurin: 11.0.21_9-jdk as dependencies
1717

1818
COPY --from=builder /root/.sdkman/candidates/gradle/current /usr/bin/gradle
1919
COPY --from=builder /root/.sdkman/candidates/maven/current /usr/bin/maven
@@ -53,7 +53,7 @@ RUN mvn -N io.takari:maven:wrapper
5353

5454
# Creating final javaenv image which will include all required
5555
# dependencies to build and compile java chaincode
56-
FROM eclipse-temurin:11.0.18_10-jdk
56+
FROM eclipse-temurin: 11.0.21_9-jdk
5757

5858
RUN apt-get update \
5959
&& apt-get -y install zip unzip \

fabric-chaincode-docker/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ task copyAllDeps(type: Copy) {
6666
task buildImage(type: DockerBuildImage) {
6767
dependsOn copyAllDeps
6868
inputDir = project.file('Dockerfile').parentFile
69-
tags = ['hyperledger/fabric-javaenv', 'hyperledger/fabric-javaenv:amd64-2.5.0', 'hyperledger/fabric-javaenv:amd64-latest']
69+
tags = ['hyperledger/fabric-javaenv', 'hyperledger/fabric-javaenv:amd64-2.5.1', 'hyperledger/fabric-javaenv:amd64-latest']
7070
}
7171

fabric-chaincode-shim/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ plugins {
2121
}
2222

2323
checkstyle {
24-
toolVersion '10.12.2'
24+
toolVersion '10.12.5'
2525
configFile file("../ci/checkstyle/checkstyle.xml")
2626
configProperties = [root_dir: file("..") ]
2727
}
@@ -53,15 +53,15 @@ dependencies {
5353
implementation 'org.hyperledger.fabric:fabric-protos:0.2.1'
5454
implementation 'org.bouncycastle:bcpkix-jdk18on:1.77'
5555
implementation 'org.bouncycastle:bcprov-jdk18on:1.77'
56-
implementation 'io.github.classgraph:classgraph:4.8.162'
56+
implementation 'io.github.classgraph:classgraph:4.8.165'
5757
implementation 'com.github.everit-org.json-schema:org.everit.json.schema:1.14.2'
5858
implementation 'org.json:json:20231013'
5959
implementation 'com.google.protobuf:protobuf-java-util:3.24.4'
6060

6161
// Required if using Java 11+ as no longer bundled in the core libraries
6262
testImplementation 'javax.xml.bind:jaxb-api:2.3.1'
6363

64-
implementation platform('io.grpc:grpc-bom:1.59.0')
64+
implementation platform('io.grpc:grpc-bom:1.60.0')
6565
implementation 'io.grpc:grpc-netty-shaded'
6666
implementation 'io.grpc:grpc-protobuf'
6767
implementation 'io.grpc:grpc-stub'

0 commit comments

Comments
 (0)