-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
79 lines (66 loc) · 2.05 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
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '2.0.1'
}
repositories {
jcenter()
}
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
mainClassName = 'io.vertx.core.Launcher'
def vertxVersion = '3.5.0'
def mainVerticleName = 'io.vertx.webproxy.MainVerticle'
def watchForChange = 'src/**/*'
def doOnChange = './gradlew classes'
dependencies {
compile "io.vertx:vertx-core:$vertxVersion",
"io.vertx:vertx-web:$vertxVersion",
"io.vertx:vertx-web-templ-freemarker:$vertxVersion",
"io.vertx:vertx-service-proxy:$vertxVersion",
"com.github.rjeschke:txtmark:0.13",
"io.vertx:vertx-jdbc-client:$vertxVersion",
"org.hsqldb:hsqldb:2.3.4",
"ch.qos.logback:logback-classic:1.2.3",
"com.beust:jcommander:1.72"
compileOnly "io.vertx:vertx-codegen:$vertxVersion"
testCompile 'junit:junit:4.12',
"io.vertx:vertx-unit:$vertxVersion",
"com.github.tomakehurst:wiremock-standalone:2.6.0"
}
shadowJar {
classifier = 'fat'
manifest {
attributes "Main-Verticle": mainVerticleName
}
mergeServiceFiles {
include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
}
}
run {
args = ['run', mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$mainClassName", "--on-redeploy=$doOnChange"]
}
task wrapper(type: Wrapper) {
gradleVersion = '4.3.1'
}
task annotationProcessing(type: JavaCompile, group: 'build') { // codegen
source = sourceSets.main.java
classpath = configurations.compile + configurations.compileOnly
destinationDir = project.file('src/main/generated')
options.compilerArgs = [
"-proc:only",
"-processor", "io.vertx.codegen.CodeGenProcessor",
"-AoutputDirectory=${project.projectDir}/src/main"
]
}
compileJava {
targetCompatibility = 1.8
sourceCompatibility = 1.8
dependsOn annotationProcessing
}
sourceSets {
main {
java {
srcDirs += 'src/main/generated'
}
}
}