Skip to content

Commit

Permalink
Upgrade Gradle version
Browse files Browse the repository at this point in the history
Signed-off-by: Mark S. Lewis <[email protected]>
  • Loading branch information
bestbeforetoday committed Feb 25, 2024
1 parent 78e4b4b commit 4409b50
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 57 deletions.
28 changes: 15 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,25 @@ subprojects {
group = 'org.hyperledger.fabric-chaincode-java'
version = rootProject.version


sourceCompatibility = 1.8
targetCompatibility = 1.8
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}

dependencies {
implementation group: 'commons-cli', name: 'commons-cli', version: '1.6.0'
implementation group: 'commons-logging', name: 'commons-logging', version: '1.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.3.1'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.3.1'
implementation 'commons-cli:commons-cli:1.6.0'
implementation 'commons-logging:commons-logging:1.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'

testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.23.0'
testImplementation group: 'com.github.stefanbirkner', name: 'system-rules', version: 'system-rules-1.17.0'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'org.mockito:mockito-core:2.23.0'
testImplementation 'com.github.stefanbirkner:system-rules:system-rules-1.17.0'

testCompileOnly group: 'junit', name: 'junit', version: '4.12'
testRuntimeOnly group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.3.1'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.9.1'
testCompileOnly 'junit:junit:4.12'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.3.1'
testImplementation 'org.assertj:assertj-core:3.9.1'
}

test {
Expand Down
11 changes: 5 additions & 6 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.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow:8.1.1'
id 'java'
}

Expand All @@ -8,7 +8,6 @@ version '0.0.1'
sourceCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
maven {
url "https://www.jitpack.io"
Expand All @@ -20,17 +19,17 @@ repositories {
}

dependencies {
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.3.+'
compile group: 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.1'
compile 'org.json:json:20231013'
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
testImplementation 'org.assertj:assertj-core:3.11.1'
testImplementation 'org.mockito:mockito-core:2.+'
}

shadowJar {
baseName = 'chaincode'
version = null
classifier = null
archiveBaseName = 'chaincode'
archiveVersion = ''
archiveClassifier = ''
mergeServiceFiles()

manifest {
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.github.johnrengelman.shadow") version "7.1.2"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.jetbrains.kotlin.jvm") version "1.3.41"
}

Expand All @@ -28,7 +28,6 @@ dependencies {
}

repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
Expand Down
11 changes: 5 additions & 6 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.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow:8.1.1'
id 'java'
}

Expand All @@ -8,7 +8,6 @@ version '0.0.1'
sourceCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
maven {
url "https://www.jitpack.io"
Expand All @@ -20,17 +19,17 @@ repositories {
}

dependencies {
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.5.1'
compile group: 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.1'
compile 'org.json:json:20231013'
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
testImplementation 'org.assertj:assertj-core:3.11.1'
testImplementation 'org.mockito:mockito-core:2.+'
}

shadowJar {
baseName = 'chaincode'
version = null
classifier = null
archiveBaseName = 'chaincode'
archiveVersion = ''
archiveClassifier = ''
mergeServiceFiles()

manifest {
Expand Down
11 changes: 5 additions & 6 deletions examples/ledger-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow:8.1.1'
id 'java'
}

Expand All @@ -8,7 +8,6 @@ version '0.0.1'
sourceCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
maven {
url "https://www.jitpack.io"
Expand All @@ -20,17 +19,17 @@ repositories {
}

dependencies {
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.5'
compile group: 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.1'
compile 'org.json:json:20231013'
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
testImplementation 'org.assertj:assertj-core:3.11.1'
testImplementation 'org.mockito:mockito-core:2.+'
}

shadowJar {
baseName = 'chaincode'
version = null
classifier = null
archiveBaseName = 'chaincode'
archiveVersion = ''
archiveClassifier = ''
mergeServiceFiles()

manifest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
plugins {
id 'com.github.johnrengelman.shadow' version '5.2.0'
id 'com.github.johnrengelman.shadow:8.1.1'
id 'java'
}

group 'org.hyperledger.fabric-chaincode-java'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}

repositories {
mavenLocal()
mavenCentral()
maven { url = "https://www.jitpack.io" }
maven {
Expand All @@ -23,9 +26,9 @@ dependencies {
}

shadowJar {
baseName = 'chaincode'
version = null
classifier = null
archiveBaseName = 'chaincode'
archiveVersion = ''
archiveClassifier = ''
mergeServiceFiles()

manifest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<properties>

<!-- Generic properties -->
<java.version>1.8</java.version>
<java.version>8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand Down Expand Up @@ -49,8 +49,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow:8.1.1'
id 'java'
}

group 'org.hyperledger.fabric-chaincode-java'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}

repositories {
mavenLocal()
mavenCentral()
maven { url = "https://www.jitpack.io" }
maven {
Expand All @@ -23,9 +26,9 @@ dependencies {
}

shadowJar {
baseName = 'chaincode'
version = null
classifier = null
archiveBaseName = 'chaincode'
archiveVersion = ''
archiveClassifier = ''
mergeServiceFiles()

manifest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow:8.1.1'
id 'java'
}

group 'org.hyperledger.fabric-chaincode-java'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}

repositories {
mavenLocal()
mavenCentral()
maven { url = "https://www.jitpack.io" }
maven {
Expand All @@ -25,9 +28,9 @@ dependencies {
}

shadowJar {
baseName = 'chaincode'
version = null
classifier = null
archiveBaseName = 'chaincode'
archiveVersion = ''
archiveClassifier = ''
mergeServiceFiles()

manifest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<properties>

<!-- Generic properties -->
<java.version>1.8</java.version>
<java.version>8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand Down Expand Up @@ -49,8 +49,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 4409b50

Please sign in to comment.