-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
169 lines (143 loc) · 5.07 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.11'
}
}
plugins {
id 'java'
id 'groovy'
id 'idea'
id 'maven'
id 'application'
id 'com.google.protobuf' version '0.8.11'
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'com.google.cloud.tools.jib' version '2.0.0'
id 'org.springframework.boot' version '2.1.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
}
group = 'io.emeraldpay.moonbeam'
version = '0.3.0'
targetCompatibility = '1.8'
sourceCompatibility = '1.8'
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://dl.bintray.com/emerald/noise-java" }
}
configurations {
compile.exclude group: "commons-logging"
compile.exclude group: "ch.qos.logback"
compile.exclude group: "org.slf4j", module: "slf4j-jdk14"
compile.exclude group: "org.slf4j", module: "log4j-over-slf4j"
}
dependencies {
compile 'io.emeraldpay.noise:noise:1.0'
compile 'com.google.protobuf:protobuf-java:3.11.4'
compile 'io.libp2p:jvm-libp2p-minimal:0.3.1-RELEASE'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-jdbc:$springVersion"
compile "org.springframework.boot:spring-boot:$springBootVersion"
compile("org.springframework.boot:spring-boot-starter:$springBootVersion") {
exclude module: 'spring-boot-starter-logging'
}
compile "io.projectreactor:reactor-core:$reactorVersion"
compile "io.projectreactor.netty:reactor-netty:$reactorNettyVersion"
compile "io.projectreactor.addons:reactor-extra:$reactorVersion"
compile 'commons-io:commons-io:2.6'
compile 'org.apache.commons:commons-lang3:3.9'
compile 'org.apache.commons:commons-collections4:4.3'
compile 'javax.annotation:javax.annotation-api:1.3.2'
compile 'org.bouncycastle:bcprov-jdk15on:1.61'
compile "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jacksonVersion"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion"
compile 'org.apache.commons:commons-dbcp2:2.7.0'
compile 'mysql:mysql-connector-java:8.0.19'
compile 'com.amazonaws:aws-java-sdk:1.11.756'
compile 'com.google.cloud:google-cloud-storage:1.106.0'
compile "io.prometheus:simpleclient:$prometheusVersion"
compile "io.prometheus:simpleclient_hotspot:$prometheusVersion"
compile "io.prometheus:simpleclient_httpserver:$prometheusVersion"
compile "org.slf4j:slf4j-api:$slf4jVersion"
compile "org.apache.logging.log4j:log4j-slf4j-impl:2.11.1"
compile "org.slf4j:jul-to-slf4j:$slf4jVersion"
compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
testCompile "org.codehaus.groovy:groovy:$groovyVersion"
testCompile 'cglib:cglib-nodep:3.2.12'
testCompile "org.spockframework:spock-core:$spockVersion"
testCompile "io.projectreactor:reactor-test:$reactorVersion"
testCompile 'org.objenesis:objenesis:3.0.1'
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
processResources {
// setup project version into default properties
from('src/main/resources') {
include "application.properties"
expand projectVersion: project.version
}
// copy all other properties, without trying to expand
from('src/main/resources') {
exclude "application.properties"
}
}
application {
mainClassName = 'io.emeraldpay.moonbeam.StarterKt'
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
}
generateProtoTasks {
}
}
afterEvaluate {
generateProto.dependsOn(clean)
}
jar {
enabled=true
}
jib {
from {
// can also be openjdk:13-alpine, but bouncycastle may be not fully compatible with Java 13 yet; there is no 11-alpine
image = 'openjdk:11-jdk-slim'
}
to {
image = 'emeraldpay/moonbeam'
tags = [project.version].with (true) {
if (!project.hasProperty('latest') || project.property('latest') != 'true') {
add "t"+ java.time.format.DateTimeFormatter.ofPattern("yyyyMMddHHmm")
.withZone(java.time.ZoneId.of('UTC'))
.format(java.time.Instant.now())
}
add project.version.toString().replaceAll('(\\d+\\.\\d+).+', '$1')
}
auth {
username = 'splix'
password = System.getenv('DOCKER_KEY')
}
}
container {
volumes = ["/results"]
args = ["--export.file.targetdir=/results"]
ports = ["30100", "1234"]
}
}