Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/actions/test-network-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
default: 20.x
java-version:
description: Version of JDK
default: 11.x
default: 25.x
fabric-version:
description: Version of Hyperledger Fabric
default: 2.5.13
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
env:
GO_VER: "1.23"
NODE_VER: 20.x
JAVA_VER: 11.x
JAVA_VER: 25.x

jobs:
go:
Expand Down
6 changes: 2 additions & 4 deletions asset-transfer-basic/application-gateway-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ dependencies {
implementation 'com.google.code.gson:gson:2.11.0'
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
compileJava {
options.release = 11
}

application {
Expand Down
Binary file not shown.
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-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions asset-transfer-basic/application-gateway-java/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions asset-transfer-basic/application-gateway-java/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions asset-transfer-basic/chaincode-java/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# the first stage
FROM gradle:8.6-jdk11 AS GRADLE_BUILD
# the first stage
FROM gradle:9-jdk25 AS gradle_build

# copy the build.gradle and src code to the container
COPY src/ src/
COPY build.gradle ./
COPY build.gradle ./

# Build and package our code
RUN gradle --no-daemon build shadowJar -x checkstyleMain -x checkstyleTest


# the second stage of our build just needs the compiled files
FROM openjdk:11-jre
FROM eclipse-temurin:25-jre
ARG CC_SERVER_PORT=9999

# Setup tini to work better handle signals
ENV TINI_VERSION v0.19.0
ENV TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

RUN addgroup --system javauser && useradd -g javauser javauser

# copy only the artifacts we need from the first stage and discard the rest
COPY --chown=javauser:javauser --from=GRADLE_BUILD /home/gradle/build/libs/chaincode.jar /chaincode.jar
COPY --chown=javauser:javauser docker/docker-entrypoint.sh /docker-entrypoint.sh
COPY --chown=javauser:javauser --from=gradle_build /home/gradle/build/libs/chaincode.jar /chaincode.jar
COPY --chown=javauser:javauser docker/docker-entrypoint.sh /docker-entrypoint.sh

ENV PORT $CC_SERVER_PORT
ENV PORT=$CC_SERVER_PORT
EXPOSE $CC_SERVER_PORT

USER javauser
Expand Down
21 changes: 10 additions & 11 deletions asset-transfer-basic/chaincode-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

plugins {
id 'com.gradleup.shadow' version '8.3.5'
id 'com.gradleup.shadow' version '9.2.2'
id 'application'
id 'checkstyle'
id 'jacoco'
Expand All @@ -13,13 +13,14 @@ group 'org.hyperledger.fabric.samples'
version '1.0-SNAPSHOT'

dependencies {

implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.+'
implementation 'org.json:json:+'
implementation 'com.owlike:genson:1.6'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation 'org.mockito:mockito-core:5.12.0'
testImplementation platform('org.junit:junit-bom:5.14.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.assertj:assertj-core:3.27.6'
testImplementation 'org.mockito:mockito-core:5.20.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

repositories {
Expand All @@ -29,10 +30,8 @@ repositories {
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
compileJava {
options.release = 11
}

application {
Expand Down Expand Up @@ -75,12 +74,12 @@ test {
}
}

mainClassName = 'org.hyperledger.fabric.contract.ContractRouter'

shadowJar {
archiveBaseName = 'chaincode'
archiveVersion = ''
archiveClassifier = ''

duplicatesStrategy = DuplicatesStrategy.INCLUDE
mergeServiceFiles()

manifest {
Expand Down
Binary file not shown.
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-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
15 changes: 7 additions & 8 deletions asset-transfer-basic/chaincode-java/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions asset-transfer-basic/chaincode-java/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions asset-transfer-events/application-gateway-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ dependencies {
implementation 'com.google.code.gson:gson:2.11.0'
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
compileJava {
options.release = 11
}

application {
Expand Down
Binary file not shown.
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-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
15 changes: 7 additions & 8 deletions asset-transfer-events/application-gateway-java/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions asset-transfer-events/application-gateway-java/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading