-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
62 lines (50 loc) · 1.39 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
group 'me.yoryor.app'
version '1.0-SNAPSHOT'
apply plugin: 'java'
ext {
vertxStack = "3.3.3"
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile "io.vertx:vertx-core:${vertxStack}"
compile "io.vertx:vertx-web:${vertxStack}"
compile "io.vertx:vertx-redis-client:${vertxStack}"
compile "io.vertx:vertx-jdbc-client:${vertxStack}"
compileOnly "io.vertx:vertx-codegen:${vertxStack}"
testCompile "io.vertx:vertx-unit:${vertxStack}"
testCompile group: 'junit', name: 'junit', version: '4.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",
"-AoutputDirectory=${destinationDir.absolutePath}"
]
}
jar {
archiveName = 'vtodo-fat.jar'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': 'io.vertx.core.Launcher'
attributes 'Main-Verticle': 'me.yoryor.app.vtodo.verticles.TodoVerticle'
}
}
sourceSets {
main {
java {
srcDirs += 'src/main/generated'
}
}
}
compileJava {
targetCompatibility = 1.8
sourceCompatibility = 1.8
dependsOn annotationProcessing
}