From bf75f8fa550ac7c235fe473312b96b47805701fe Mon Sep 17 00:00:00 2001 From: Chris Barratt Date: Fri, 14 Oct 2022 13:20:24 +0100 Subject: [PATCH] Bulid changes to allow testing of simulator SNAPSHOT build --- build.gradle | 47 ++++++++++++++++++- gradle.properties | 9 +++- settings.gradle | 29 ++++++++++++ .../r3/developers/csdetemplate/Message.java | 4 +- .../csdetemplate/MyFirstFlowStartArgs.java | 3 +- 5 files changed, 84 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index bd29e7b..d5715b5 100644 --- a/build.gradle +++ b/build.gradle @@ -87,8 +87,51 @@ tasks.withType(JavaCompile) { repositories { + mavenLocal() // All dependencies are held in Maven Central mavenCentral() + + // R3 Internal repositories + // Repository the provides kotlin-stdlib-jdk8-osgi created by R3. + // Final location to be decided. + maven { + url = "$artifactoryContextUrl/corda-dependencies" + } + // Repository provides Corda 5 binaries that implement Corda-API. + // These will be made publicly available. + // Final location to be decided. + // Repository subject to change + maven { + url = "$artifactoryContextUrl/corda-os-maven" + credentials { + username = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME') + password = findProperty('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD') + } + } + // Provides the combined-worker Jars + // These will be made publicly available. + // Final location to be decided. + maven { + url = "$artifactoryContextUrl/corda-ent-maven-unstable-local" + credentials { + username = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME') + password = findProperty('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD') + } + } + maven { + url = "$artifactoryContextUrl/corda-ent-maven" + credentials { + username = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME') + password = findProperty('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD') + } + } + maven { + url = "$artifactoryContextUrl/engineering-tools-maven-unstable" + credentials { + username = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME') + password = findProperty('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD') + } + } } // Declare dependencies for the modules we will use. @@ -124,8 +167,8 @@ dependencies { cordaProvided 'org.slf4j:slf4j-api' // Dependencies Required By Test Tooling - testImplementation "net.corda:corda-simulator-api:$combinedWorkerVersion" - testRuntimeOnly "net.corda:corda-simulator-runtime:$combinedWorkerVersion" + testImplementation "net.corda:corda-simulator-api:$simulatorVersion" + testRuntimeOnly "net.corda:corda-simulator-runtime:$simulatorVersion" // 3rd party libraries // Required diff --git a/gradle.properties b/gradle.properties index c6aac50..1581641 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,8 @@ 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.0.0.190-DevPreview-2 +# cordaApiVersion=5.0.0.190-DevPreview-2 +cordaApiVersion=5.0.0.414-beta+ # Specify the version of the cordapp-cpb and cordapp-cpk plugins cordaPluginsVersion=7.0.0-DevPreview-2 @@ -25,7 +26,8 @@ hamcrestVersion=2.2 # Settings For Development Utilities testUtilsVersion=5.0.0.0-DevPreview-2 -combinedWorkerVersion=5.0.0.0-DevPreview-2 +#combinedWorkerVersion=5.0.0.0-DevPreview-2 +combinedWorkerVersion=5.0.0.0-beta+ cordaClusterURL=https://localhost:8888 cordaRpcUser=admin @@ -33,3 +35,6 @@ cordaRpcPasswd=admin devEnvWorkspace=workspace dbContainerName=CSDEpostgresql +# R3 internal repository +artifactoryContextUrl=https://software.r3.com/artifactory +simulatorVersion=5.0.0.0-SNAPSHOT \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 3a9ccef..8fb0cb1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,12 +1,41 @@ pluginManagement { // Declare the repositories where plugins are stored. repositories { + mavenLocal() gradlePluginPortal() mavenCentral { content { includeGroupByRegex 'net\\.corda(\\..*)?' } } + // R3 internal repositories + maven { + url "${artifactoryContextUrl}/corda-dev" + content { + includeGroupByRegex 'net\\.corda\\.plugins(\\..*)?' + } + } + maven { + url = "$artifactoryContextUrl/corda-os-maven-unstable" + credentials { + username = settings.ext.find('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME') + password = settings.ext.find('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD') + } + } + maven { + url = "$artifactoryContextUrl/corda-os-maven-unstable-local" + credentials { + username = settings.ext.find('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME') + password = settings.ext.find('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD') + } + } + maven { + url = "$artifactoryContextUrl/corda-dev" + credentials { + username = settings.ext.find('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME') + password = settings.ext.find('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD') + } + } } // The plugin dependencies with versions of the plugins congruent with the specified CorDapp plugin version, diff --git a/src/main/java/com/r3/developers/csdetemplate/Message.java b/src/main/java/com/r3/developers/csdetemplate/Message.java index a7109ef..36e718c 100644 --- a/src/main/java/com/r3/developers/csdetemplate/Message.java +++ b/src/main/java/com/r3/developers/csdetemplate/Message.java @@ -3,8 +3,8 @@ package com.r3.developers.csdetemplate; import net.corda.v5.base.annotations.CordaSerializable; import net.corda.v5.base.types.MemberX500Name; -// // A class which will contain a message, It must be marked with @CordaSerializable for Corda -//// to be able to send from one virtual node to another. +// A class which will contain a message, It must be marked with @CordaSerializable for Corda +// to be able to send from one virtual node to another. @CordaSerializable public class Message { // public Message() {} diff --git a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlowStartArgs.java b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlowStartArgs.java index 1867875..99f7f22 100644 --- a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlowStartArgs.java +++ b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlowStartArgs.java @@ -2,8 +2,7 @@ package com.r3.developers.csdetemplate; import net.corda.v5.base.types.MemberX500Name; -// // A class to hold the arguments required to start the flow -//class MyFirstFlowStartArgs(val otherMember: MemberX500Name) +// A class to hold the arguments required to start the flow public class MyFirstFlowStartArgs { public MemberX500Name otherMember;