forked from sczyh30/vertx-blueprint-todo-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
68 lines (56 loc) · 1.55 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
plugins {
id 'java'
}
version '3.5.0'
ext {
vertxVersion = "3.5.0"
}
jar {
// by default fat jar
archiveName = 'vertx-blueprint-todo-backend-fat.jar'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': 'io.vertx.core.Launcher'
attributes 'Main-Verticle': 'io.vertx.blueprint.todolist.verticle.RxTodoVerticle'
}
}
repositories {
jcenter()
}
// compileOnly requires Gradle 2.12+
task annotationProcessing(type: JavaCompile, group: 'build') {
source = sourceSets.main.java
classpath = configurations.compile + configurations.compileOnly
destinationDir = project.file('src/main/generated')
options.compilerArgs = [
"-proc:only",
"-processor", "io.vertx.codegen.CodeGenProcessor",
"-Acodegen.output=${destinationDir.absolutePath}"
]
}
sourceSets {
main {
java {
srcDirs += 'src/main/generated'
}
}
}
compileJava {
targetCompatibility = 1.8
sourceCompatibility = 1.8
dependsOn annotationProcessing
}
dependencies {
compile("io.vertx:vertx-core:${vertxVersion}")
compile("io.vertx:vertx-rx-java2:${vertxVersion}")
compile("io.vertx:vertx-web:${vertxVersion}")
compile("io.vertx:vertx-jdbc-client:${vertxVersion}")
compile("io.vertx:vertx-redis-client:${vertxVersion}")
compileOnly("io.vertx:vertx-codegen:${vertxVersion}")
compile 'mysql:mysql-connector-java:6.0.5'
testCompile("io.vertx:vertx-unit:${vertxVersion}")
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
}