Skip to content

Commit c6f0129

Browse files
authored
ES-2059: Configure Corda version from gradle props, plus upgrade gradle and deps (#79)
1 parent e7ef168 commit c6f0129

7 files changed

+38
-33
lines changed

build.gradle

+9-8
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,24 @@ allprojects {
1616

1717
// Configure Corda runtime gradle plugin
1818
cordaRuntimeGradlePlugin {
19+
runtimeVersion = cordaRuntimeVersion
1920
notaryVersion = cordaNotaryPluginsVersion
2021
notaryCpiName = "NotaryServer"
2122
corDappCpiName = "MyCorDapp"
22-
cpiUploadTimeout = "30000"
23-
vnodeRegistrationTimeout = "60000"
24-
cordaProcessorTimeout = "300000"
25-
workflowsModuleName = "workflows"
23+
cpiUploadTimeout = cpiUploadDefault
24+
vnodeRegistrationTimeout = vnodeRegistrationTimeoutDefault
25+
cordaProcessorTimeout = processorTimeout
26+
workflowsModuleName = workflowsModule
2627
cordaClusterURL = "https://localhost:8888"
2728
cordaRestUser = "admin"
2829
cordaRestPasswd ="admin"
2930
composeFilePath = "config/combined-worker-compose.yaml"
3031
networkConfigFile = "config/static-network-config.json"
3132
r3RootCertFile = "config/r3-ca-key.pem"
32-
skipTestsDuringBuildCpis = "false"
33-
cordaRuntimePluginWorkspaceDir = "workspace"
34-
cordaBinDir = "${System.getProperty("user.home")}/.corda/corda5"
35-
cordaCliBinDir = "${System.getProperty("user.home")}/.corda/cli"
33+
skipTestsDuringBuildCpis = skipContractTestsDuringBuildCpis
34+
cordaRuntimePluginWorkspaceDir = workspaceDirectory
35+
cordaBinDir = "${System.getProperty("user.home")}/$cordaBinariesDirectory"
36+
cordaCliBinDir = "${System.getProperty("user.home")}/$cordaCliBinariesDirectory"
3637

3738
// Only need to supply these if you want to use an unpublished version
3839
artifactoryUsername = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME')

config/combined-worker-compose.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
3333

3434
kafka-create-topics:
35-
image: corda-os-docker.software.r3.com/corda-os-plugins:5.2.0.0-RC02
35+
image: corda-os-docker.software.r3.com/corda-os-plugins:${CORDA_RUNTIME_VERSION}
3636
depends_on:
3737
- kafka
3838
command: [
@@ -43,7 +43,7 @@ services:
4343
]
4444

4545
corda:
46-
image: corda-os-docker.software.r3.com/corda-os-combined-worker-kafka:5.2.0.0-RC02
46+
image: corda-os-docker.software.r3.com/corda-os-combined-worker-kafka:${CORDA_RUNTIME_VERSION}
4747
depends_on:
4848
- postgresql
4949
- kafka

gradle.properties

+16-13
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ kotlin.code.style=official
22

33
# Specify the version of the Corda-API to use.
44
# This needs to match the version supported by the Corda Cluster the CorDapp will run on.
5-
cordaApiVersion=5.2.0.49-RC02
5+
cordaApiVersion=5.3.0.8-beta-1711609687915
6+
7+
# Specify the version of the Corda runtime to use.
8+
cordaRuntimeVersion=5.3.0.0-beta-1711617024604
69

710
# Specify the version of the notary plugins to use.
811
# Currently packaged as part of corda-runtime-os, so should be set to a corda-runtime-os version.
9-
cordaNotaryPluginsVersion=5.2.0.0-RC02
12+
cordaNotaryPluginsVersion=5.3.0.0-beta-1711617024604
1013

1114
# Specify the version of the cordapp-cpb and cordapp-cpk plugins
1215
cordaPluginsVersion=7.0.4
1316

14-
# Specify the version of the Corda runtime Gradle plugin to use
15-
cordaGradlePluginVersion=5.2.0.0-RC02
16-
1717
# Specify the name of the workflows module
1818
# This will be the name of the generated cpk and cpb files
1919
workflowsModule=workflows
@@ -22,6 +22,9 @@ workflowsModule=workflows
2222
# This will be the name of the generated cpk and cpb files
2323
contractsModule=contracts
2424

25+
# Specify the name of the generated folder where files can be created by the Corda Runtime Gradle Plugin
26+
workspaceDirectory=workspace
27+
2528
# Specify the location of where Corda 5 binaries can be downloaded
2629
# Relative path from user.home
2730
cordaBinariesDirectory = .corda/corda5
@@ -39,19 +42,19 @@ platformVersion = 999
3942

4043
# Version of Kotlin to use.
4144
# We recommend using a version close to that used by Corda-API.
42-
kotlinVersion = 1.7.21
45+
kotlinVersion = 1.8.21
4346

4447
# Do not use default dependencies.
4548
kotlin.stdlib.default.dependency=false
4649

4750
# Test Tooling Dependency Versions
48-
junitVersion = 5.10.0
49-
mockitoKotlinVersion=4.0.0
50-
mockitoVersion=4.6.1
51+
junitVersion = 5.10.2
52+
mockitoKotlinVersion=5.2.1
53+
mockitoVersion=5.10.0
5154
hamcrestVersion=2.2
52-
assertjVersion = 3.24.1
55+
assertjVersion = 3.25.3
5356
contractTestingVersion=1.0.0-beta-+
54-
jacksonVersion=2.15.2
57+
jacksonVersion=2.17.0
5558
slf4jVersion=1.7.36
5659

5760
# Specify the maximum amount of time allowed for the CPI upload
@@ -65,12 +68,12 @@ processorTimeout=-1
6568

6669
# Specify the maximum amount of time allowed to check all vNodes are registered
6770
# Value is in milliseconds
68-
vnodeRegistrationTimeoutDefault=30000
71+
vnodeRegistrationTimeoutDefault=60000
6972

7073
# Specify if you want to run the contracts and workflows tests as part of the corda-runtime-plugin-cordapp > buildCpis task
7174
# False by default, will execute the tests every time you stand the template up - gives extra protection
7275
# Set to true to skip the tests, making the launching process quicker. You will be responsible for running workflow tests yourself
73-
skipTestsDuringBuildCpis=false
76+
skipContractTestsDuringBuildCpis=false
7477

7578
# R3 internal repository
7679
# Use this version when pointing to artefacts in artifactory that have not been published to S3

gradle/wrapper/gradle-wrapper.jar

346 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

+9-8
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -201,11 +202,11 @@ fi
201202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203204

204-
# Collect all arguments for the java command;
205-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
206-
# shell script including quotes and variable substitutions, so put them in
207-
# double quotes to make sure that they get re-expanded; and
208-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
209210

210211
set -- \
211212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pluginManagement {
2525
id 'org.jetbrains.kotlin.jvm' version kotlinVersion
2626
id 'org.jetbrains.kotlin.plugin.jpa' version kotlinVersion
2727
id 'org.jetbrains.kotlin.plugin.allopen' version kotlinVersion
28-
id 'net.corda.gradle.plugin' version cordaGradlePluginVersion
28+
id 'net.corda.gradle.plugin' version cordaRuntimeVersion
2929
}
3030
}
3131

0 commit comments

Comments
 (0)