diff --git a/.github/workflows/deploy_relay-server.yml b/.github/workflows/deploy_relay-server.yml index e54750565..b9b69f63b 100644 --- a/.github/workflows/deploy_relay-server.yml +++ b/.github/workflows/deploy_relay-server.yml @@ -15,9 +15,32 @@ on: workflow_dispatch: jobs: + publish-protos-rs: + if: github.repository_owner == 'hyperledger-labs' + runs-on: ubuntu-latest + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4.1.1 + + - name: Install RUST Toolchain minimal stable with clippy and rustfmt + uses: actions-rs/toolchain@v1.0.6 + with: + profile: minimal + toolchain: stable + components: rustfmt, clippy + + - name: Publish + run: cargo publish --token ${CRATES_TOKEN} + env: + CRATES_TOKEN: ${{ secrets.CARGO_CRATES_IO_TOKEN }} + working-directory: common/protos-rs/pkg + relay-image: if: github.repository_owner == 'hyperledger-labs' + needs: publish-protos-rs runs-on: ubuntu-latest + steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4.1.1 @@ -41,4 +64,4 @@ jobs: - name: Push latest tag if: ${{ env.RELAY_PUSH == 'true' }} run: (cat out | grep "exists") || make push-server-latest - working-directory: core/relay \ No newline at end of file + working-directory: core/relay diff --git a/.github/workflows/test_asset-exchange-fabric.yml b/.github/workflows/test_asset-exchange-fabric.yml index 79f0fb307..ba5e80fe2 100644 --- a/.github/workflows/test_asset-exchange-fabric.yml +++ b/.github/workflows/test_asset-exchange-fabric.yml @@ -123,7 +123,7 @@ jobs: curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 # PROTOS - name: Build JS Protos diff --git a/.github/workflows/test_asset-transfer.yml b/.github/workflows/test_asset-transfer.yml index 70d14e43b..cf83cb986 100644 --- a/.github/workflows/test_asset-transfer.yml +++ b/.github/workflows/test_asset-transfer.yml @@ -454,7 +454,7 @@ jobs: curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 # PROTOS - name: Build GO Protos diff --git a/.github/workflows/test_data-sharing.yml b/.github/workflows/test_data-sharing.yml index eb67df0b3..ddf8db657 100644 --- a/.github/workflows/test_data-sharing.yml +++ b/.github/workflows/test_data-sharing.yml @@ -368,7 +368,7 @@ jobs: curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 # PROTOS - name: Build GO Protos @@ -747,7 +747,7 @@ jobs: curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 # PROTOS - name: Build GO Protos diff --git a/common/protos-java-kt/build.gradle b/common/protos-java-kt/build.gradle index 9e9837d75..e26bbecd2 100644 --- a/common/protos-java-kt/build.gradle +++ b/common/protos-java-kt/build.gradle @@ -3,7 +3,7 @@ buildscript { ext.protobuf_version = "3.11.1" ext.grpc_version = "1.29.0" // CURRENT_GRPC_VERSION ext.grpc_kotlin_version = "0.1.4" // CURRENT_GRPC_KOTLIN_VERSION - ext.kotlin_version = "1.3.72" + ext.kotlin_version = "1.4.32" dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" diff --git a/common/protos-java-kt/gradle/wrapper/gradle-wrapper.jar b/common/protos-java-kt/gradle/wrapper/gradle-wrapper.jar index 99340b4ad..5c2d1cf01 100644 Binary files a/common/protos-java-kt/gradle/wrapper/gradle-wrapper.jar and b/common/protos-java-kt/gradle/wrapper/gradle-wrapper.jar differ diff --git a/common/protos-java-kt/gradle/wrapper/gradle-wrapper.properties b/common/protos-java-kt/gradle/wrapper/gradle-wrapper.properties index fad65ec89..2ec77e51a 100644 --- a/common/protos-java-kt/gradle/wrapper/gradle-wrapper.properties +++ b/common/protos-java-kt/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Mon Jul 06 09:59:13 AEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/common/protos-java-kt/gradlew b/common/protos-java-kt/gradlew index cccdd3d51..83f2acfdc 100755 --- a/common/protos-java-kt/gradlew +++ b/common/protos-java-kt/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -109,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` diff --git a/common/protos-java-kt/gradlew.bat b/common/protos-java-kt/gradlew.bat index f9553162f..9618d8d96 100755 --- a/common/protos-java-kt/gradlew.bat +++ b/common/protos-java-kt/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/core/drivers/corda-driver/build.gradle b/core/drivers/corda-driver/build.gradle index 9425f0081..3502d6a93 100644 --- a/core/drivers/corda-driver/build.gradle +++ b/core/drivers/corda-driver/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = "1.3.61" + ext.kotlin_version = "1.4.32" ext.coroutines_version = "1.3.3" ext.protobuf_version = "3.11.1" ext.bcprov_version = "1.53" @@ -7,8 +7,8 @@ buildscript { ext.grpc_kotlin_version = "0.1.3" // CURRENT_GRPC_KOTLIN_VERSION ext.corda_release_group = "net.corda" ext.corda_core_release_group = "net.corda" - ext.corda_version = "4.8" - ext.corda_core_version = "4.8" + ext.corda_version = "4.8.11" + ext.corda_core_version = "4.8.11" ext.arrow_version = "0.10.4" ext.weaver_version = "1.6.1" diff --git a/core/drivers/corda-driver/gradle/wrapper/gradle-wrapper.jar b/core/drivers/corda-driver/gradle/wrapper/gradle-wrapper.jar index f3d88b1c2..5c2d1cf01 100644 Binary files a/core/drivers/corda-driver/gradle/wrapper/gradle-wrapper.jar and b/core/drivers/corda-driver/gradle/wrapper/gradle-wrapper.jar differ diff --git a/core/drivers/corda-driver/gradle/wrapper/gradle-wrapper.properties b/core/drivers/corda-driver/gradle/wrapper/gradle-wrapper.properties index 78cc5b1fe..2ec77e51a 100644 --- a/core/drivers/corda-driver/gradle/wrapper/gradle-wrapper.properties +++ b/core/drivers/corda-driver/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Jul 08 14:33:54 AEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/core/drivers/corda-driver/gradlew b/core/drivers/corda-driver/gradlew index 2fe81a7d9..83f2acfdc 100755 --- a/core/drivers/corda-driver/gradlew +++ b/core/drivers/corda-driver/gradlew @@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then else eval `echo args$i`="\"$arg\"" fi - i=`expr $i + 1` + i=$((i+1)) done case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,9 +175,14 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=`save "$@"` +APP_ARGS=$(save "$@") # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + exec "$JAVACMD" "$@" diff --git a/core/network/corda-interop-app/build.gradle b/core/network/corda-interop-app/build.gradle index e5db853e2..c2eb6e0e0 100644 --- a/core/network/corda-interop-app/build.gradle +++ b/core/network/corda-interop-app/build.gradle @@ -48,7 +48,7 @@ buildscript { plugins { id 'java' id 'org.jetbrains.dokka' version '0.10.1' - id "com.jfrog.artifactory" version "4.16.1" + id "com.jfrog.artifactory" version "5.2.3" id "maven-publish" } diff --git a/core/network/corda-interop-app/constants.properties b/core/network/corda-interop-app/constants.properties index 68a90517b..1e20607aa 100644 --- a/core/network/corda-interop-app/constants.properties +++ b/core/network/corda-interop-app/constants.properties @@ -1,11 +1,11 @@ cordaReleaseGroup=net.corda cordaCoreReleaseGroup=net.corda -cordaVersion=4.8 -cordaCoreVersion=4.8 -gradlePluginsVersion=5.0.12 -kotlinVersion=1.3.72 +cordaVersion=4.8.11 +cordaCoreVersion=4.8.11 +gradlePluginsVersion=5.0.17 +kotlinVersion=1.4.32 junitVersion=4.12 -log4jVersion=2.16.0 +log4jVersion=2.17.1 platformVersion=10 slf4jVersion=1.7.25 nettyVersion=4.1.22.Final diff --git a/core/network/corda-interop-app/gradle/wrapper/gradle-wrapper.jar b/core/network/corda-interop-app/gradle/wrapper/gradle-wrapper.jar index 99340b4ad..249e5832f 100644 Binary files a/core/network/corda-interop-app/gradle/wrapper/gradle-wrapper.jar and b/core/network/corda-interop-app/gradle/wrapper/gradle-wrapper.jar differ diff --git a/core/network/corda-interop-app/gradle/wrapper/gradle-wrapper.properties b/core/network/corda-interop-app/gradle/wrapper/gradle-wrapper.properties index fad65ec89..2ec77e51a 100644 --- a/core/network/corda-interop-app/gradle/wrapper/gradle-wrapper.properties +++ b/core/network/corda-interop-app/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Mon Jul 06 09:59:13 AEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/core/network/corda-interop-app/gradlew b/core/network/corda-interop-app/gradlew index cccdd3d51..a69d9cb6c 100755 --- a/core/network/corda-interop-app/gradlew +++ b/core/network/corda-interop-app/gradlew @@ -1,78 +1,129 @@ -#!/usr/bin/env sh +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -81,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -89,84 +140,101 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" +# 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. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" fi +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + exec "$JAVACMD" "$@" diff --git a/core/network/corda-interop-app/gradlew.bat b/core/network/corda-interop-app/gradlew.bat index f9553162f..f127cfd49 100644 --- a/core/network/corda-interop-app/gradlew.bat +++ b/core/network/corda-interop-app/gradlew.bat @@ -1,4 +1,20 @@ -@if "%DEBUG%" == "" @echo off +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -9,19 +25,22 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,38 +64,26 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/core/network/fabric-interop-cc/Dockerfile b/core/network/fabric-interop-cc/Dockerfile index ce10e7aec..755b3bab8 100644 --- a/core/network/fabric-interop-cc/Dockerfile +++ b/core/network/fabric-interop-cc/Dockerfile @@ -9,7 +9,7 @@ RUN cd /fabric-interop-cc/contracts/interop && CC=musl-gcc go build -o interop # Production ready image # Pass the binary to the prod image -FROM alpine:3.11 as prod +FROM alpine:3.11 AS prod RUN apk add libc6-compat libstdc++ zlib>1.2.11-r4 zlib-dev>1.2.11-r4 COPY --from=build /fabric-interop-cc/contracts/interop/interop /app/interop diff --git a/core/network/fabric-interop-cc/makefile b/core/network/fabric-interop-cc/makefile index f448cb080..aaf2595a6 100644 --- a/core/network/fabric-interop-cc/makefile +++ b/core/network/fabric-interop-cc/makefile @@ -15,8 +15,9 @@ list-names: echo ${DOCKER_IMAGE_NAME}:$(DOCKER_TAG) image: - (cd contracts/interop && make run-vendor) + (cd contracts/interop && make run-vendor && go mod tidy) docker build --build-arg GIT_URL=$(GIT_URL) -t ${DOCKER_IMAGE_NAME}:$(DOCKER_TAG) . + (cd contracts/interop && make undo-vendor) check-if-tag-exists: !(DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_NAME):$(DOCKER_TAG) > /dev/null) diff --git a/docs/docs/external/getting-started/test-network/setup-local-docker.md b/docs/docs/external/getting-started/test-network/setup-local-docker.md index b7dd8b3e8..54cd3a4dc 100644 --- a/docs/docs/external/getting-started/test-network/setup-local-docker.md +++ b/docs/docs/external/getting-started/test-network/setup-local-docker.md @@ -27,7 +27,7 @@ Before starting, make sure you have the following software installed on your hos - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) - Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) -- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher) +- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported) - Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/) @@ -35,8 +35,8 @@ Before starting, make sure you have the following software installed on your hos * Default method: Run the following with `sudo` if necessary. This will install both the protobuf compiler and the Go code generator plugins. ``` apt-get install protobuf-compiler - go install google.golang.org/protobuf/cmd/protoc-gen-go - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 ``` * If the above method installs an older version of `protoc` (check using `protoc --version`), say below 3.12.x, you should download pre-compiled binaries instead. (With an older version, you may see errors while attempting to launch and setup the Fabric networks). ``` @@ -45,13 +45,14 @@ Before starting, make sure you have the following software installed on your hos sudo apt-get install unzip unzip protoc-3.15.6-linux-x86_64.zip -d export PATH="$PATH:/bin" - go install google.golang.org/protobuf/cmd/protoc-gen-go - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 ``` | Notes | |:------| - | The latest version at present is `3.15.6`, but you should check the above link to find the most current version before running the above steps. | + | The last version we tested with was `3.15.6`, but you should check the above link to find the most current version before running the above steps. | + | The latest version of `protoc-gen-go-grpc` that works with the Fabric test networks we will run below is `v1.4.0`, which is why that version is hardcoded here. | ### Credentials Make sure you have an SSH or GPG key registered in https://github.com to allow seamless cloning of repositories (at present, various setup scripts clone repositories using the `https://` prefix but this may change to `git@` in the future). @@ -162,7 +163,7 @@ For more information, refer to the associated [README](https://github.com/hyperl **Troubleshooting Tips**: - If you see any errors during the launches, re-check the prerequisites (software installations and credentials). Ensure your network connection is working. As a safe bet, you can retry after cleanup: kill and remove all Docker containers and associated volumes. -- If `protoc` or `protoc-gen-go` throws an error, reinstall `protoc` and `protoc-gen-go` using suggestions made in the Prerequisites section above. +- If `protoc` or `protoc-gen-go` throws an error, reinstall `protoc`, `protoc-gen-go`, and `protoc-gen-go-grpc` using suggestions made in the Prerequisites section above. ### Fabric Relay diff --git a/docs/docs/external/getting-started/test-network/setup-local.md b/docs/docs/external/getting-started/test-network/setup-local.md index 146d25ef0..7dd6a1484 100644 --- a/docs/docs/external/getting-started/test-network/setup-local.md +++ b/docs/docs/external/getting-started/test-network/setup-local.md @@ -28,7 +28,7 @@ Before starting, make sure you have the following software installed on your hos - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) - Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) -- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher) +- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported) - Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/) @@ -37,8 +37,8 @@ Before starting, make sure you have the following software installed on your hos * Default method: Run the following with `sudo` if necessary. This will install both the protobuf compiler and the Go code generator plugins. ``` apt-get install protobuf-compiler - go install google.golang.org/protobuf/cmd/protoc-gen-go - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 ``` * If the above method installs an older version of `protoc` (check using `protoc --version`), say below 3.12.x, you should download pre-compiled binaries instead. (With an older version, you may see errors while attempting to launch and setup the Fabric networks). ``` @@ -47,13 +47,14 @@ Before starting, make sure you have the following software installed on your hos sudo apt-get install unzip unzip protoc-3.15.6-linux-x86_64.zip -d export PATH="$PATH:/bin" - go install google.golang.org/protobuf/cmd/protoc-gen-go - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 ``` | Notes | |:------| - | The latest version at present is `3.15.6`, but you should check the above link to find the most current version before running the above steps. | + | The last version we tested with was `3.15.6`, but you should check the above link to find the most current version before running the above steps. | + | The latest version of `protoc-gen-go-grpc` that works with the Fabric test networks we will run below is `v1.4.0`, which is why that version is hardcoded here. | ### Credentials Make sure you have an SSH or GPG key registered in https://github.com to allow seamless cloning of repositories (at present, various setup scripts clone repositories using the `https://` prefix but this may change to `git@` in the future). @@ -164,7 +165,7 @@ For more information, refer to the associated [README](https://github.com/hyperl **Troubleshooting Tips**: - If you see any errors during the launches, re-check the prerequisites (software installations and credentials). Ensure your network connection is working. As a safe bet, you can retry after cleanup: kill and remove all Docker containers and associated volumes. -- If `protoc` or `protoc-gen-go` throws an error, reinstall `protoc` and `protoc-gen-go` using suggestions made in the Prerequisites section above. +- If `protoc` or `protoc-gen-go` throws an error, reinstall `protoc`, `protoc-gen-go`, and `protoc-gen-go-grpc` using suggestions made in the Prerequisites section above. ### Fabric Client (fabric-cli) diff --git a/docs/docs/external/getting-started/test-network/setup-packages-docker.md b/docs/docs/external/getting-started/test-network/setup-packages-docker.md index 5d8f67648..4b9a39e94 100644 --- a/docs/docs/external/getting-started/test-network/setup-packages-docker.md +++ b/docs/docs/external/getting-started/test-network/setup-packages-docker.md @@ -27,7 +27,7 @@ Before starting, make sure you have the following software installed on your hos - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) - Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) -- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher) +- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 11 to Version 16 Supported) - Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/) diff --git a/docs/docs/external/getting-started/test-network/setup-packages.md b/docs/docs/external/getting-started/test-network/setup-packages.md index b405de1b3..5effa4645 100644 --- a/docs/docs/external/getting-started/test-network/setup-packages.md +++ b/docs/docs/external/getting-started/test-network/setup-packages.md @@ -27,7 +27,7 @@ Before starting, make sure you have the following software installed on your hos - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) - Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) -- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher) +- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported) - Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/) diff --git a/samples/corda/corda-simple-application/build.gradle b/samples/corda/corda-simple-application/build.gradle index ea6255f84..790df829b 100644 --- a/samples/corda/corda-simple-application/build.gradle +++ b/samples/corda/corda-simple-application/build.gradle @@ -14,6 +14,7 @@ buildscript { slf4j_version = constants.getProperty("slf4jVersion") corda_platform_version = constants.getProperty("platformVersion").toInteger() weaver_version = constants.getProperty("weaverVersion") + clikt_version = constants.getProperty("cliktVersion") } repositories { @@ -33,7 +34,7 @@ buildscript { } plugins { - id "com.jfrog.artifactory" version "4.16.1" + id "com.jfrog.artifactory" version "5.2.3" id "maven-publish" id 'org.jetbrains.dokka' version '0.10.1' } diff --git a/samples/corda/corda-simple-application/clients/build.gradle b/samples/corda/corda-simple-application/clients/build.gradle index a589124de..6f6e46219 100644 --- a/samples/corda/corda-simple-application/clients/build.gradle +++ b/samples/corda/corda-simple-application/clients/build.gradle @@ -39,7 +39,7 @@ repositories { jcenter() mavenCentral() mavenLocal() - maven { url 'https://software.r3.com/artifactory/corda-lib' } + maven { url 'https://download.corda.net/maven/corda-lib' } flatDir { dirs '../../fungible-house-token/source/contracts/build/libs' dirs '../../fungible-house-token/source/workflows/build/libs' @@ -79,7 +79,7 @@ dependencies { // CorDapp dependencies. compile project(":contracts-kotlin") compile project(":workflows-kotlin") - compile "com.github.ajalt:clikt:$clikt_version" + implementation "com.github.ajalt.clikt:clikt:$clikt_version" implementation(group: 'com.fungiblehousetoken', name: 'contracts', version: "1.0") implementation(group: 'com.fungiblehousetoken', name: 'workflows', version: "1.0") diff --git a/samples/corda/corda-simple-application/constants.properties b/samples/corda/corda-simple-application/constants.properties index d8ebc4ee3..521632dc7 100644 --- a/samples/corda/corda-simple-application/constants.properties +++ b/samples/corda/corda-simple-application/constants.properties @@ -1,12 +1,13 @@ cordaReleaseGroup=net.corda cordaCoreReleaseGroup=net.corda -cordaVersion=4.8 -cordaCoreVersion=4.8 -gradlePluginsVersion=5.0.12 -kotlinVersion=1.3.72 +cordaVersion=4.8.11 +cordaCoreVersion=4.8.11 +gradlePluginsVersion=5.0.17 +kotlinVersion=1.4.32 junitVersion=4.12 -log4jVersion =2.16.0 +log4jVersion=2.17.1 platformVersion=10 slf4jVersion=1.7.25 nettyVersion=4.1.22.Final weaverVersion=1.6.1 +cliktVersion=2.7.1 diff --git a/samples/corda/corda-simple-application/gradle/wrapper/gradle-wrapper.jar b/samples/corda/corda-simple-application/gradle/wrapper/gradle-wrapper.jar index 7a3265ee9..249e5832f 100644 Binary files a/samples/corda/corda-simple-application/gradle/wrapper/gradle-wrapper.jar and b/samples/corda/corda-simple-application/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/corda/corda-simple-application/gradle/wrapper/gradle-wrapper.properties b/samples/corda/corda-simple-application/gradle/wrapper/gradle-wrapper.properties index 4c4631750..2ec77e51a 100644 --- a/samples/corda/corda-simple-application/gradle/wrapper/gradle-wrapper.properties +++ b/samples/corda/corda-simple-application/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip diff --git a/samples/corda/corda-simple-application/gradlew b/samples/corda/corda-simple-application/gradlew index cccdd3d51..a69d9cb6c 100755 --- a/samples/corda/corda-simple-application/gradlew +++ b/samples/corda/corda-simple-application/gradlew @@ -1,78 +1,129 @@ -#!/usr/bin/env sh +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -81,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -89,84 +140,101 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" +# 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. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" fi +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + exec "$JAVACMD" "$@" diff --git a/samples/corda/corda-simple-application/gradlew.bat b/samples/corda/corda-simple-application/gradlew.bat index f9553162f..f127cfd49 100644 --- a/samples/corda/corda-simple-application/gradlew.bat +++ b/samples/corda/corda-simple-application/gradlew.bat @@ -1,4 +1,20 @@ -@if "%DEBUG%" == "" @echo off +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -9,19 +25,22 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,38 +64,26 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/corda/fungible-house-token/build.gradle b/samples/corda/fungible-house-token/build.gradle index ad6e3bae1..7683fe59a 100644 --- a/samples/corda/fungible-house-token/build.gradle +++ b/samples/corda/fungible-house-token/build.gradle @@ -24,8 +24,10 @@ buildscript { repositories { mavenLocal() mavenCentral() - jcenter() + maven { url 'https://repo1.maven.org/maven2' } maven { url 'https://download.corda.net/maven/corda-releases' } + maven { url 'https://download.corda.net/maven/corda-dependencies' } + maven { url 'https://download.corda.net/maven/corda-lib' } } dependencies { @@ -43,10 +45,11 @@ allprojects { repositories { mavenLocal() + maven { url 'https://repo1.maven.org/maven2' } mavenCentral() maven { url 'https://jitpack.io' } //SDK lib - maven { url 'https://download.corda.net/maven/corda-dependencies' } + maven { url 'https://download.corda.net/maven/corda' } maven { url 'https://download.corda.net/maven/corda-releases' } maven { url 'https://download.corda.net/maven/corda-lib' } //Gradle Plugins diff --git a/samples/corda/fungible-house-token/constants.properties b/samples/corda/fungible-house-token/constants.properties index 9477a934d..25668db22 100644 --- a/samples/corda/fungible-house-token/constants.properties +++ b/samples/corda/fungible-house-token/constants.properties @@ -1,12 +1,12 @@ cordaReleaseGroup=net.corda cordaCoreReleaseGroup=net.corda -cordaVersion=4.8 -cordaCoreVersion=4.8 -gradlePluginsVersion=5.0.12 -kotlinVersion=1.2.71 +cordaVersion=4.8.11 +cordaCoreVersion=4.8.11 +gradlePluginsVersion=5.0.17 +kotlinVersion=1.4.32 junitVersion=4.12 quasarVersion=0.7.10 -log4jVersion =2.16.0 +log4jVersion=2.17.1 platformVersion=10 slf4jVersion=1.7.25 nettyVersion=4.1.22.Final diff --git a/samples/corda/fungible-house-token/makefile b/samples/corda/fungible-house-token/makefile index 5a4f8d5ec..98e50c1d6 100644 --- a/samples/corda/fungible-house-token/makefile +++ b/samples/corda/fungible-house-token/makefile @@ -9,7 +9,7 @@ build: source cp extension-flows/*.kt source/workflows/src/main/kotlin/net/corda/samples/tokenizedhouse/flows/ cp extension-states/*.kt source/contracts/src/main/kotlin/net/corda/samples/tokenizedhouse/states/ cp build.gradle source/build.gradle - cd source && ./gradlew clean jar + cd source && ./gradlew wrapper --gradle-version 7.5 --distribution-type all && ./gradlew clean jar .PHONY: clean clean: diff --git a/sdks/corda/build.gradle b/sdks/corda/build.gradle index ea1b98477..fad704526 100644 --- a/sdks/corda/build.gradle +++ b/sdks/corda/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = "1.3.61" + ext.kotlin_version = "1.4.32" ext.coroutines_version = "1.3.3" ext.protobuf_version = "3.11.1" ext.bcprov_version = "1.53" @@ -7,11 +7,11 @@ buildscript { ext.grpc_kotlin_version = "0.1.3" // CURRENT_GRPC_KOTLIN_VERSION ext.corda_release_group = "net.corda" ext.corda_core_release_group = "net.corda" - ext.corda_version = "4.8" - ext.corda_core_version = "4.8" + ext.corda_version = "4.8.11" + ext.corda_core_version = "4.8.11" ext.arrow_version = "0.10.4" - ext.corda_gradle_plugins_version = "5.0.12" - ext.log4j_version = "2.16.0" + ext.corda_gradle_plugins_version = "5.0.17" + ext.log4j_version = "2.17.1" ext.slf4j_version = "1.7.25" ext.weaver_version = "1.6.1" diff --git a/sdks/corda/gradle/wrapper/gradle-wrapper.jar b/sdks/corda/gradle/wrapper/gradle-wrapper.jar index f3d88b1c2..5c2d1cf01 100644 Binary files a/sdks/corda/gradle/wrapper/gradle-wrapper.jar and b/sdks/corda/gradle/wrapper/gradle-wrapper.jar differ diff --git a/sdks/corda/gradle/wrapper/gradle-wrapper.properties b/sdks/corda/gradle/wrapper/gradle-wrapper.properties index 78cc5b1fe..2ec77e51a 100644 --- a/sdks/corda/gradle/wrapper/gradle-wrapper.properties +++ b/sdks/corda/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Jul 08 14:33:54 AEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/sdks/corda/gradlew b/sdks/corda/gradlew index 2fe81a7d9..83f2acfdc 100755 --- a/sdks/corda/gradlew +++ b/sdks/corda/gradlew @@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then else eval `echo args$i`="\"$arg\"" fi - i=`expr $i + 1` + i=$((i+1)) done case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,9 +175,14 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=`save "$@"` +APP_ARGS=$(save "$@") # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + exec "$JAVACMD" "$@" diff --git a/tests/network-setups/corda/dev/Corda_Network/constants.properties b/tests/network-setups/corda/dev/Corda_Network/constants.properties index e0cbc6acc..cc7009c9a 100644 --- a/tests/network-setups/corda/dev/Corda_Network/constants.properties +++ b/tests/network-setups/corda/dev/Corda_Network/constants.properties @@ -2,8 +2,8 @@ cordaReleaseGroup=net.corda cordaCoreReleaseGroup=net.corda cordaVersion=4.8 cordaCoreVersion=4.8 -gradlePluginsVersion=5.0.12 -kotlinVersion=1.3.72 +gradlePluginsVersion=5.0.17 +kotlinVersion=1.4.32 junitVersion=4.12 log4jVersion =2.11.2 platformVersion=10 diff --git a/tests/network-setups/corda/dev/Corda_Network2/constants.properties b/tests/network-setups/corda/dev/Corda_Network2/constants.properties index aa3b4e514..0a986fc3e 100644 --- a/tests/network-setups/corda/dev/Corda_Network2/constants.properties +++ b/tests/network-setups/corda/dev/Corda_Network2/constants.properties @@ -2,8 +2,8 @@ cordaReleaseGroup=net.corda cordaCoreReleaseGroup=net.corda cordaVersion=4.8 cordaCoreVersion=4.8 -gradlePluginsVersion=5.0.12 -kotlinVersion=1.3.72 +gradlePluginsVersion=5.0.17 +kotlinVersion=1.4.32 junitVersion=4.12 log4jVersion =2.11.2 platformVersion=10 diff --git a/tests/network-setups/corda/gradle/wrapper/gradle-wrapper.jar b/tests/network-setups/corda/gradle/wrapper/gradle-wrapper.jar index 7a3265ee9..5c2d1cf01 100644 Binary files a/tests/network-setups/corda/gradle/wrapper/gradle-wrapper.jar and b/tests/network-setups/corda/gradle/wrapper/gradle-wrapper.jar differ diff --git a/tests/network-setups/corda/gradle/wrapper/gradle-wrapper.properties b/tests/network-setups/corda/gradle/wrapper/gradle-wrapper.properties index 4c4631750..2ec77e51a 100644 --- a/tests/network-setups/corda/gradle/wrapper/gradle-wrapper.properties +++ b/tests/network-setups/corda/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip diff --git a/tests/network-setups/corda/gradlew b/tests/network-setups/corda/gradlew index cccdd3d51..83f2acfdc 100755 --- a/tests/network-setups/corda/gradlew +++ b/tests/network-setups/corda/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -109,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` diff --git a/tests/network-setups/corda/gradlew.bat b/tests/network-setups/corda/gradlew.bat index f9553162f..9618d8d96 100644 --- a/tests/network-setups/corda/gradlew.bat +++ b/tests/network-setups/corda/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome