Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
20 changes: 9 additions & 11 deletions 20 build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

plugins {
id "com.github.ben-manes.versions" version "0.51.0"
id "com.diffplug.spotless" version "6.25.0"
id "com.github.ben-manes.versions" version "0.52.0"
id "com.diffplug.spotless" version "7.0.4"
}

version = '2.5.6'
Expand All @@ -28,15 +28,13 @@ allprojects {

repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://www.jitpack.io" }
}

spotless {
format 'misc', {
target '*.gradle', '.gitattributes', '.gitignore'
trimTrailingWhitespace()
indentWithSpaces()
leadingTabsToSpaces()
endWithNewline()
}
}
Expand All @@ -62,14 +60,14 @@ subprojects {

dependencies {
implementation 'commons-cli:commons-cli:1.9.0'
implementation 'commons-logging:commons-logging:1.3.4'
implementation 'commons-logging:commons-logging:1.3.5'

testImplementation platform('org.junit:junit-bom:5.11.3')
testImplementation platform('org.junit:junit-bom:5.13.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'org.mockito:mockito-core:5.14.2'
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.1.7'
testImplementation 'org.assertj:assertj-core:3.27.3'
testImplementation 'org.mockito:mockito-core:5.18.0'
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.1.8'

testImplementation 'org.hamcrest:hamcrest-library:3.0'
}
Expand All @@ -81,7 +79,7 @@ subprojects {
spotless {
java {
removeUnusedImports()
palantirJavaFormat('2.50.0').formatJavadoc(true)
palantirJavaFormat('2.67.0').formatJavadoc(true)
formatAnnotations()
}
}
Expand Down
8 changes: 4 additions & 4 deletions 8 examples/fabric-contract-example-as-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Example multi-stage dockerfile for Java Chaincode

# the first stage
FROM gradle:jdk11 AS GRADLE_BUILD
FROM gradle:8-jdk21 AS gradle_build

# copy the build.gradle and src code to the container
COPY src/ src/
Expand All @@ -15,11 +15,11 @@ RUN gradle build shadowJar


# the second stage of our build just needs the compiled files
FROM openjdk:11-jre-slim
FROM eclipse-temurin:21-jre
# copy only the artifacts we need from the first stage and discard the rest
COPY --from=GRADLE_BUILD /home/gradle/build/libs/chaincode.jar /chaincode.jar
COPY --from=gradle_build /home/gradle/build/libs/chaincode.jar /chaincode.jar

ENV PORT 9999
ENV PORT=9999
EXPOSE 9999

# set the startup command to execute the jar
Expand Down
37 changes: 15 additions & 22 deletions 37 examples/fabric-contract-example-as-service/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.gradleup.shadow' version '8.3.6'
id 'java'
}

version '0.0.1'

tasks.compileJava {
options.release.set(11)
}
version = '0.0.1'

repositories {
mavenCentral()
maven {
url "https://www.jitpack.io"
url = "https://www.jitpack.io"
}
maven {
url "https://hyperledger.jfrog.io/hyperledger/fabric-maven"
}

}

dependencies {
compile 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.2'
compile 'org.json:json:20240303'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'org.mockito:mockito-core:5.13.0'
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.5'
implementation 'org.json:json:20250517'
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.1'
testImplementation 'org.assertj:assertj-core:3.27.3'
testImplementation 'org.mockito:mockito-core:5.18.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

shadowJar {
Expand All @@ -39,14 +32,14 @@ shadowJar {
}
}

compileJava {
options.release.set(11)
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-parameters"
}

test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
events "PASSED", "SKIPPED", "FAILED"
}
}


tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-parameters"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ plugins {
version = "0.0.1"

dependencies {
implementation("org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.2")
implementation("org.json:json:20240303")
implementation("org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.5")
implementation("org.json:json:20250517")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

testImplementation("org.junit.jupiter:junit-jupiter:5.11.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.13.1")
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0")
}

Expand All @@ -27,9 +27,6 @@ repositories {
maven {
setUrl("https://jitpack.io")
}
maven {
setUrl("https://hyperledger.jfrog.io/hyperledger/fabric-maven")
}
}

tasks {
Expand Down
36 changes: 14 additions & 22 deletions 36 examples/fabric-contract-example-gradle/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.gradleup.shadow' version '8.3.6'
id 'java'
}

version '0.0.1'

tasks.compileJava {
options.release.set(11)
}
version = '0.0.1'

repositories {
mavenCentral()
maven {
url "https://www.jitpack.io"
url = "https://www.jitpack.io"
}
maven {
url "https://hyperledger.jfrog.io/hyperledger/fabric-maven"
}

}

dependencies {
compile 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.2'
compile 'org.json:json:20240303'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'org.mockito:mockito-core:5.13.0'
compile 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.5'
compile 'org.json:json:20250517'
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.1'
testImplementation 'org.assertj:assertj-core:3.27.3'
testImplementation 'org.mockito:mockito-core:5.18.0'
}

shadowJar {
Expand All @@ -39,14 +31,14 @@ shadowJar {
}
}

compileJava {
options.release.set(11)
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-parameters"
}

test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
events "PASSED", "SKIPPED", "FAILED"
}
}


tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-parameters"
}
12 changes: 4 additions & 8 deletions 12 examples/fabric-contract-example-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<slf4j.version>1.7.5</slf4j.version>

<!-- Test -->
<junit.jupiter.version>5.3.0-RC1</junit.jupiter.version>
<junit.platform.version>1.3.0-RC1</junit.platform.version>
<junit.jupiter.version>5.13.1</junit.jupiter.version>
<junit.platform.version>1.13.1</junit.platform.version>

</properties>

Expand All @@ -29,10 +29,6 @@
<id>jitpack.io</id>
<url>https://www.jitpack.io</url>
</repository>
<repository>
<id>artifactory</id>
<url>https://hyperledger.jfrog.io/hyperledger/fabric-maven</url>
</repository>
</repositories>

<dependencies>
Expand All @@ -48,7 +44,7 @@
<dependency>
<groupId>org.hyperledger.fabric</groupId>
<artifactId>fabric-protos</artifactId>
<version>0.3.3</version>
<version>0.3.7</version>
<scope>compile</scope>
</dependency>

Expand Down Expand Up @@ -92,7 +88,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.10.0</version>
<version>5.18.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.json/json -->
Expand Down
32 changes: 12 additions & 20 deletions 32 examples/ledger-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.gradleup.shadow' version '8.3.6'
id 'java'
}

version '0.0.1'

tasks.compileJava {
options.release.set(11)
}

repositories {
mavenCentral()
maven {
url "https://www.jitpack.io"
}
maven {
url "https://hyperledger.jfrog.io/hyperledger/fabric-maven"
}

}

dependencies {
compile 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.2'
compile 'org.json:json:20240303'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'org.mockito:mockito-core:5.13.0'
compile 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.5'
compile 'org.json:json:20250517'
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.1'
testImplementation 'org.assertj:assertj-core:3.27.3'
testImplementation 'org.mockito:mockito-core:5.18.0'
}

shadowJar {
Expand All @@ -39,14 +31,14 @@ shadowJar {
}
}

compileJava {
options.release.set(11)
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-parameters"
}

test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
events "PASSED", "SKIPPED", "FAILED"
}
}


tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-parameters"
}
4 changes: 2 additions & 2 deletions 4 fabric-chaincode-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ RUN curl -s "https://get.sdkman.io" | bash
SHELL ["/bin/bash", "-c"]

RUN source /root/.sdkman/bin/sdkman-init.sh \
&& sdk install gradle 8.11.1 \
&& sdk install maven 3.9.9
&& sdk install gradle 8.14.2 \
&& sdk install maven 3.9.10

FROM ${JAVA_IMAGE} AS dependencies

Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.