Skip to content

Commit b40f01d

Browse files
committed
flowhttp revamp
1 parent 57c2b1d commit b40f01d

File tree

9 files changed

+82
-11
lines changed

9 files changed

+82
-11
lines changed

Basic/flow-http-access/build.gradle

Lines changed: 77 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
buildscript {
1+
buildscript {//properties that you need to build the project
22
Properties constants = new Properties()
33
file("$projectDir/../constants.properties").withInputStream { constants.load(it) }
44

55
ext {
66
corda_release_group = constants.getProperty("cordaReleaseGroup")
7-
corda_release_version = constants.getProperty("cordaVersion")
87
corda_core_release_group = constants.getProperty("cordaCoreReleaseGroup")
8+
corda_release_version = constants.getProperty("cordaVersion")
99
corda_core_release_version = constants.getProperty("cordaCoreVersion")
1010
corda_gradle_plugins_version = constants.getProperty("gradlePluginsVersion")
11+
kotlin_version = constants.getProperty("kotlinVersion")
1112
junit_version = constants.getProperty("junitVersion")
1213
quasar_version = constants.getProperty("quasarVersion")
1314
log4j_version = constants.getProperty("log4jVersion")
1415
slf4j_version = constants.getProperty("slf4jVersion")
15-
corda_platform_version = constants.getProperty("platformVersion")
16+
corda_platform_version = constants.getProperty("platformVersion").toInteger()
17+
//special dependencies
1618
okhttp_version = '3.5.0'
1719
}
1820

@@ -30,11 +32,80 @@ buildscript {
3032
}
3133
}
3234

33-
allprojects {
35+
allprojects {//Properties that you need to compile your project (The application)
36+
apply from: "${rootProject.projectDir}/repositories.gradle"
37+
apply plugin: 'java'
38+
39+
repositories {
40+
mavenLocal()
41+
jcenter()
42+
mavenCentral()
43+
maven { url 'https://software.r3.com/artifactory/corda' }
44+
maven { url 'https://jitpack.io' }
45+
}
3446

3547
tasks.withType(JavaCompile) {
36-
options.compilerArgs << "-parameters" // Required for shell commands.
48+
options.compilerArgs << "-parameters" // Required by Corda's serialisation framework.
3749
}
3850

51+
jar {
52+
// This makes the JAR's SHA-256 hash repeatable.
53+
preserveFileTimestamps = false
54+
reproducibleFileOrder = true
55+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
56+
}
57+
}
58+
59+
apply plugin: 'net.corda.plugins.cordapp'
60+
apply plugin: 'net.corda.plugins.cordformation'
61+
apply plugin: 'net.corda.plugins.quasar-utils'
3962

40-
}
63+
sourceSets {
64+
main {
65+
resources {
66+
srcDir rootProject.file("config/dev")
67+
}
68+
}
69+
}
70+
//Module dependencis
71+
dependencies {
72+
// Corda dependencies.
73+
cordaCompile "$corda_core_release_group:corda-core:$corda_core_release_version"
74+
cordaCompile "$corda_release_group:corda-node-api:$corda_release_version"
75+
cordaRuntime "$corda_release_group:corda:$corda_release_version"
76+
77+
// CorDapp dependencies.
78+
cordapp project(":workflows")
79+
80+
cordaCompile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j_version}"
81+
cordaCompile "org.apache.logging.log4j:log4j-web:${log4j_version}"
82+
cordaCompile "org.slf4j:jul-to-slf4j:$slf4j_version"
83+
}
84+
85+
86+
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
87+
/* This property will load the CorDapps to each of the node by default, including the Notary. You can find them
88+
* in the cordapps folder of the node at build/nodes/Notary/cordapps. However, the notary doesn't really understand
89+
* the notion of cordapps. In production, Notary does not need cordapps as well. This is just a short cut to load
90+
* the Corda network bootstrapper.
91+
*/
92+
nodeDefaults {
93+
projectCordapp {
94+
deploy = false
95+
}
96+
cordapp project(':workflows')
97+
runSchemaMigration = true //This configuration is for any CorDapps with custom schema, We will leave this as true to avoid
98+
//problems for developers who are not familiar with Corda. If you are not using custom schemas, you can change
99+
//it to false for quicker project compiling time.
100+
}
101+
node {
102+
name "O=PartyA,L=London,C=GB"
103+
p2pPort 10005
104+
rpcSettings {
105+
address("localhost:10006")
106+
adminAddress("localhost:10046")
107+
}
108+
cordapps = []
109+
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["StartFlow.com.flowhttp.HttpCallFlow"]]]
110+
}
111+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
name=<AppName>
2-
group=<pkg>
3-
version=0.2
1+
name=Flow Http Access
2+
group=com.flowhttp
3+
version=1.0

Basic/flow-http-access/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include 'workflows-java'
1+
include 'workflows'
File renamed without changes.

Basic/flow-http-access/workflows-java/src/main/java/net/corda/samples/flowhttp/Constants.java renamed to Basic/flow-http-access/workflows/src/main/java/net/corda/samples/flowhttp/Constants.java

File renamed without changes.

Basic/flow-http-access/workflows-java/src/main/java/net/corda/samples/flowhttp/HttpCallFlow.java renamed to Basic/flow-http-access/workflows/src/main/java/net/corda/samples/flowhttp/HttpCallFlow.java

File renamed without changes.

Basic/flow-http-access/workflows-java/src/main/resources/log4j2-test.xml renamed to Basic/flow-http-access/workflows/src/main/resources/log4j2-test.xml

File renamed without changes.

Basic/flow-http-access/workflows-java/src/test/java/net/corda/samples/flowhttp/FlowTests.java renamed to Basic/flow-http-access/workflows/src/test/java/net/corda/samples/flowhttp/FlowTests.java

File renamed without changes.

0 commit comments

Comments
 (0)