Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES-2059: Control Corda runtime version from gradle props #101

Merged
merged 4 commits into from
Mar 28, 2024
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
22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,24 @@ allprojects {

// Configure Corda runtime gradle plugin
cordaRuntimeGradlePlugin {
runtimeVersion = cordaRuntimeVersion
notaryVersion = cordaNotaryPluginsVersion
notaryCpiName = "NotaryServer"
corDappCpiName = "MyCorDapp"
cpiUploadTimeout = "30000"
vnodeRegistrationTimeout = "60000"
cordaProcessorTimeout = "300000"
workflowsModuleName = "workflows"
cpiUploadTimeout = cpiUploadDefault
vnodeRegistrationTimeout = vnodeRegistrationTimeoutDefault
cordaProcessorTimeout = processorTimeout
workflowsModuleName = workflowsModule
cordaClusterURL = "https://localhost:8888"
cordaRestUser = "admin"
cordaRestPasswd ="admin"
composeFilePath = "config/combined-worker-compose.yaml"
networkConfigFile = "config/static-network-config.json"
r3RootCertFile = "config/r3-ca-key.pem"
skipTestsDuringBuildCpis = "false"
cordaRuntimePluginWorkspaceDir = "workspace"
cordaBinDir = "${System.getProperty("user.home")}/.corda/corda5"
cordaCliBinDir = "${System.getProperty("user.home")}/.corda/cli"
skipTestsDuringBuildCpis = skipContractTestsDuringBuildCpis
cordaRuntimePluginWorkspaceDir = workspaceDirectory
cordaBinDir = "${System.getProperty("user.home")}/$cordaBinariesDirectory"
cordaCliBinDir = "${System.getProperty("user.home")}/$cordaCliBinariesDirectory"

// Only need to supply these if you want to use an unpublished version
artifactoryUsername = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME')
Expand All @@ -48,9 +49,9 @@ allprojects {
allWarningsAsErrors = false

// Specify the version of Kotlin that we are that we will be developing.
languageVersion = '1.7'
languageVersion = '1.8'
// Specify the Kotlin libraries that code is compatible with
apiVersion = '1.7'
apiVersion = '1.8'
// Note that we Need to use a version of Kotlin that will be compatible with the Corda API.
// Currently that is developed in Kotlin 1.7 so picking the same version ensures compatibility with that.

Expand Down Expand Up @@ -94,7 +95,6 @@ allprojects {
tasks.withType(Test).configureEach {
useJUnitPlatform()
}

}

publishing {
Expand Down
4 changes: 2 additions & 2 deletions config/combined-worker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"

kafka-create-topics:
image: corda-os-docker.software.r3.com/corda-os-plugins:5.2.0.0-RC02
image: corda-os-docker.software.r3.com/corda-os-plugins:${CORDA_RUNTIME_VERSION}
depends_on:
- kafka
command: [
Expand All @@ -43,7 +43,7 @@ services:
]

corda:
image: corda-os-docker.software.r3.com/corda-os-combined-worker-kafka:5.2.0.0-RC02
image: corda-os-docker.software.r3.com/corda-os-combined-worker-kafka:${CORDA_RUNTIME_VERSION}
depends_on:
- postgresql
- kafka
Expand Down
29 changes: 16 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ kotlin.code.style=official

# Specify the version of the Corda-API to use.
# This needs to match the version supported by the Corda Cluster the CorDapp will run on.
cordaApiVersion=5.2.0.49-RC02
cordaApiVersion=5.3.0.8-beta-1711609687915

# Specify the version of the Corda runtime to use.
cordaRuntimeVersion=5.3.0.0-beta-1711617024604

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

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

# Specify the version of the Corda runtime Gradle plugin to use
cordaGradlePluginVersion=5.2.0.0-RC02

# Specify the name of the workflows module
# This will be the name of the generated cpk and cpb files
workflowsModule=workflows
Expand All @@ -22,6 +22,9 @@ workflowsModule=workflows
# This will be the name of the generated cpk and cpb files
contractsModule=contracts

# Specify the name of the generated folder where files can be created by the Corda Runtime Gradle Plugin
workspaceDirectory=workspace

# Specify the location of where Corda 5 binaries can be downloaded
# Relative path from user.home
cordaBinariesDirectory = .corda/corda5
Expand All @@ -39,19 +42,19 @@ platformVersion = 999

# Version of Kotlin to use.
# We recommend using a version close to that used by Corda-API.
kotlinVersion = 1.7.21
kotlinVersion = 1.8.21

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

# Test Tooling Dependency Versions
junitVersion = 5.10.0
mockitoKotlinVersion=4.0.0
mockitoVersion=4.6.1
junitVersion = 5.10.2
mockitoKotlinVersion=5.2.1
mockitoVersion=5.10.0
hamcrestVersion=2.2
assertjVersion = 3.24.1
assertjVersion = 3.25.3
contractTestingVersion=1.0.0-beta-+
jacksonVersion=2.15.2
jacksonVersion=2.17.0
slf4jVersion=1.7.36

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

# Specify the maximum amount of time allowed to check all vNodes are registered
# Value is in milliseconds
vnodeRegistrationTimeoutDefault=30000
vnodeRegistrationTimeoutDefault=60000

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

# R3 internal repository
# Use this version when pointing to artefacts in artifactory that have not been published to S3
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
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.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

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

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pluginManagement {
id 'org.jetbrains.kotlin.jvm' version kotlinVersion
id 'org.jetbrains.kotlin.plugin.jpa' version kotlinVersion
id 'org.jetbrains.kotlin.plugin.allopen' version kotlinVersion
id 'net.corda.gradle.plugin' version cordaGradlePluginVersion
id 'net.corda.gradle.plugin' version cordaRuntimeVersion
}
}

Expand Down