-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
110 lines (91 loc) · 2.5 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
}
}
plugins {
id 'java'
id 'application'
id 'idea'
id 'com.github.johnrengelman.shadow' version '5.0.0'
id "com.google.protobuf" version "0.8.12"
}
group = 'fr.pierrezemb'
version = '1.0.0-SNAPSHOT'
repositories {
mavenCentral()
}
ext {
vertxVersion = '4.0.3'
junitJupiterEngineVersion = '5.4.0'
}
application {
mainClassName = 'io.vertx.core.Launcher'
}
sourceCompatibility = '11'
def mainVerticleName = 'fr.pierrezemb.fdb.layer.etcd.MainVerticle'
def watchForChange = 'src/**/*'
def doOnChange = './gradlew classes'
dependencies {
implementation "io.vertx:vertx-junit5:$vertxVersion"
implementation "io.vertx:vertx-grpc:$vertxVersion"
implementation 'org.foundationdb:fdb-record-layer-core-pb3:2.8.91.0'
implementation group: 'io.grpc', name: 'grpc-alts', version: "1.35.0"
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
testImplementation "io.vertx:vertx-junit5:$vertxVersion"
testImplementation "org.testcontainers:testcontainers:1.15.3"
testImplementation "io.etcd:jetcd-core:0.5.0"
// https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.30'
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterEngineVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitJupiterEngineVersion"
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterEngineVersion")
}
shadowJar {
classifier = 'fat'
manifest {
attributes 'Main-Verticle': mainVerticleName
}
mergeServiceFiles {
include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
}
}
test {
useJUnitPlatform()
testLogging {
events 'PASSED', 'FAILED', 'SKIPPED'
}
dependsOn cleanTest
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
}
run {
args = ['run', mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$mainClassName", "--on-redeploy=$doOnChange"]
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.2.0'
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:1.35.0"
}
vertx {
artifact = "io.vertx:vertx-grpc-protoc-plugin:${vertxVersion}"
}
}
generateProtoTasks {
all()*.plugins {
grpc
vertx
}
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:unchecked'
}