-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
140 lines (117 loc) · 3.65 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
buildscript {
ext.kotlin_version = '1.2.50'
ext.typesafe_config_version = '1.3.1'
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url 'https://dl.bintray.com/kotlin/kotlin-eap/'
}
maven {
url "https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases"
}
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-noarg:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'org.springframework.boot' version '1.5.10.RELEASE'
id 'com.palantir.docker' version '0.19.2'
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url 'https://dl.bintray.com/kotlin/kotlin-eap/'
}
maven {
url "http://ci-artifactory.corda.r3cev.com/artifactory/corda-releases"
}
maven {
url "http://ci-artifactory.corda.r3cev.com/artifactory/corda-dependencies"
}
maven { url 'https://jitpack.io' }
}
group = "com.roastario"
version = "1.0-SNAPSHOT"
apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'kotlin-noarg'
apply plugin: 'com.palantir.docker'
ext {
spring_version = '1.5.10.RELEASE'
corda_release_version = '4.5.1'
corda_group = 'net.corda'
bouncycastle_version = '1.57'
}
configurations {
notaryRuntime
notaryRuntime.transitive = false
}
dependencies {
// Spring boot dependencies
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: spring_version
compile group: corda_group, name: 'corda-node-api', version: corda_release_version
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.34.0'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: "com.typesafe", name: "config", version: typesafe_config_version
compile group: 'io.github.classgraph', name: 'classgraph', version: '4.4.12'
compile "org.bouncycastle:bcprov-jdk15on:${bouncycastle_version}"
compile "org.bouncycastle:bcpkix-jdk15on:${bouncycastle_version}"
testCompile "org.jetbrains.kotlin:kotlin-test"
testCompile "org.jetbrains.kotlin:kotlin-test-junit"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
notaryRuntime group: corda_group, name: 'corda', version: "4.8.1"
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
apiVersion = "1.2"
languageVersion = "1.2"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
}
task copyCordaJar() {
def cordaJarName = file(project.configurations.notaryRuntime.first()).name
copy {
from project.configurations.notaryRuntime.first()
into "${buildDir}/docker"
}
file("${buildDir}/docker/${cordaJarName}").renameTo("${buildDir}/docker/corda.jar")
}
task copyNetworkMapJar() {
def networkMapJarName = file(jar.archivePath).name
copy {
from jar.archivePath
into "${buildDir}/docker"
}
file("${buildDir}/docker/${networkMapJarName}").renameTo("${buildDir}/docker/app.jar")
}
task copyNotaryConfigs() {
copy{
from(new FileNameFinder().getFileNames(project.projectDir.absolutePath, "**/notaryconfigs/*.conf"))
into "${buildDir}/docker"
}
}
task copyShell(){
copy{
from(new FileNameFinder().getFileNames(project.projectDir.absolutePath, "**/shell/start.sh"))
into "${buildDir}/docker"
}
}
tasks.dockerPrepare.dependsOn(build, jar, copyCordaJar, copyNetworkMapJar)