-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
132 lines (109 loc) · 3.58 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
// Gradle Variables
buildscript {
ext {
vertxVersion = '3.5.4'
kotlinVersion = '1.2.71'
nettyVersion = '4.1.28.Final'
}
}
// Gradle Plugins
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building an application
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.2.71'
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
// Project Dependencies
dependencies {
// This dependency is found on compile classpath of this component and consumers.
compile 'com.google.guava:guava:23.0'
// Logging
compile group: 'org.slf4j', name: 'log4j-over-slf4j', version: '1.7.22'
compile group: 'org.slf4j', name: 'jul-to-slf4j', version: '1.7.25'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.1'
compile "org.codehaus.janino:janino:3.0.8"
// Metrics via Vertx & Prometheus
compile "io.micrometer:micrometer-registry-prometheus:1.0.0"
compile "io.micrometer:micrometer-registry-jmx:1.0.0"
compile "io.vertx:vertx-config:$vertxVersion"
compile "io.vertx:vertx-web:$vertxVersion"
compile "io.vertx:vertx-micrometer-metrics:$vertxVersion"
compile(group: "io.vertx", name: "vertx-core", version: vertxVersion, changing: true)
compile(group: "io.vertx", name: "vertx-stomp", version: vertxVersion, changing: true)
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
compile(group: "io.vertx", name: "vertx-lang-kotlin", version: vertxVersion, changing: true)
compile(group: "io.vertx", name: "vertx-lang-kotlin-coroutines", version: vertxVersion, changing: true) {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jre8'
exclude group: 'org.jetbrains.kotlin', module: 'kotlinx-coroutines-core'
}
compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '0.30.0'
// Use JUnit test framework
testCompile 'org.junit.jupiter:junit-jupiter-engine:5.2.0'
testCompile 'org.assertj:assertj-core:3.10.0'
testCompile "org.mockito:mockito-core:2.+"
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
kotlin {
experimental {
coroutines 'enable'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin/'
test.java.srcDirs += 'src/test/kotlin/'
}
/*
shadowJar {
classifier = 'fat'
manifest {
attributes "Main-Verticle": mainVerticleName
attributes "Main-Class": mainClassName
}
mergeServiceFiles {
include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
}
}
*/
// Define the main class for the application
mainClassName = 'com.lfmunoz.AppKt'
shadowJar {
classifier = 'fat'
manifest {
attributes "Main-Class": mainClassName
}
}
test {
testLogging {
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
defaultTasks 'run'
def clientVerticle = 'com.lfmunoz.client.Main'
def serverVerticle = 'com.lfmunoz.server.Main'
run {
//jvmArgs = ["-Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.SLF4JLogDelegateFactory"]
args = [
'run', serverVerticle,
"-conf src/main/resources/server-config.json",
"--launcher-class=$mainClassName"
]
}