-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
108 lines (92 loc) · 3.93 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import static org.gradle.api.JavaVersion.VERSION_17
plugins {
id 'org.jetbrains.kotlin.jvm'
id 'net.corda.cordapp.cordapp-configuration'
id 'org.jetbrains.kotlin.plugin.jpa'
id 'java'
id 'maven-publish'
id 'net.corda.gradle.plugin'
}
allprojects {
group 'com.r3.developers.cordapptemplate'
version '1.0-SNAPSHOT'
def javaVersion = VERSION_17
// Configure Corda runtime gradle plugin
cordaRuntimeGradlePlugin {
notaryVersion = cordaNotaryPluginsVersion
notaryCpiName = "NotaryServer"
corDappCpiName = "MyCorDapp"
cpiUploadTimeout = "30000"
vnodeRegistrationTimeout = "60000"
cordaProcessorTimeout = "300000"
workflowsModuleName = "workflows"
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"
// Only need to supply these if you want to use an unpublished version
artifactoryUsername = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME')
artifactoryPassword = findProperty('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD')
}
// Declare the set of Kotlin compiler options we need to build a CorDapp.
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
allWarningsAsErrors = false
// Specify the version of Kotlin that we are that we will be developing.
languageVersion = '1.7'
// Specify the Kotlin libraries that code is compatible with
apiVersion = '1.7'
// 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.
// Specify the version of Java to target.
jvmTarget = javaVersion
// Needed for reflection to work correctly.
javaParameters = true
// -Xjvm-default determines how Kotlin supports default methods.
// JetBrains currently recommends developers use -Xjvm-default=all
// https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-default/
freeCompilerArgs += [
"-Xjvm-default=all"
]
}
}
repositories {
// All dependencies are held in Maven Central
mavenLocal()
mavenCentral()
// R3 Internal repositories for dev
// 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"
authentication {
basic(BasicAuthentication)
}
credentials {
username = findProperty('cordaArtifactoryUsername') ?: System.getenv('CORDA_ARTIFACTORY_USERNAME')
password = findProperty('cordaArtifactoryPassword') ?: System.getenv('CORDA_ARTIFACTORY_PASSWORD')
}
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
}
publishing {
publications {
maven(MavenPublication) {
artifactId "corda-dev-template-kotlin-sample"
groupId project.group
artifact jar
}
}
}