Skip to content

Commit 11ab860

Browse files
authored
Fix Gradle build for Java chaincode (#583)
1 parent 5270bb8 commit 11ab860

File tree

5 files changed

+284
-203
lines changed

5 files changed

+284
-203
lines changed

samples/chaincodes/chaincode-java-simple/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ plugins {
66
id 'java'
77
}
88

9-
version '0.0.1'
9+
version = '0.0.1'
1010

11-
sourceCompatibility = 1.8
11+
sourceCompatibility = JavaVersion.VERSION_1_8
12+
targetCompatibility = JavaVersion.VERSION_1_8
1213

1314
repositories {
1415
mavenLocal()
@@ -22,17 +23,17 @@ repositories {
2223
}
2324

2425
dependencies {
25-
implementation group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.3.0'
26+
implementation group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.5.0'
2627
implementation group: 'org.json', name: 'json', version: '20180813'
2728
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
2829
testImplementation 'org.assertj:assertj-core:3.11.1'
2930
testImplementation 'org.mockito:mockito-core:2.+'
3031
}
3132

3233
shadowJar {
33-
baseName = 'chaincode'
34-
version = null
35-
classifier = null
34+
archiveBaseName.set('chaincode')
35+
archiveVersion.set('')
36+
archiveClassifier.set('')
3637

3738
manifest {
3839
attributes 'Main-Class': 'org.hyperledger.fabric.contract.ContractRouter'
@@ -46,7 +47,6 @@ test {
4647
}
4748
}
4849

49-
5050
tasks.withType(JavaCompile) {
51-
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-parameters"
51+
options.compilerArgs += ["-Xlint:unchecked", "-Xlint:deprecation", "-parameters"]
5252
}
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
4+
networkTimeout=30000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)