forked from appwish/wishservice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
93 lines (80 loc) · 2.28 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
plugins {
id 'java'
id 'application'
id "com.google.protobuf" version "0.8.9"
id 'com.github.johnrengelman.shadow' version '5.0.0'
}
group = 'io.appwish'
version = '1.0.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
ext {
vertxVersion = '4.0.0-milestone4'
junitJupiterEngineVersion = '5.4.0'
testContainersVersion = '1.12.3'
}
application {
mainClassName = 'io.vertx.core.Launcher'
}
sourceCompatibility = '11'
def mainVerticleName = 'io.appwish.wishservice.MainVerticle'
def watchForChange = 'src/**/*'
def doOnChange = './gradlew classes'
dependencies {
implementation "io.vertx:vertx-pg-client:$vertxVersion"
implementation "io.vertx:vertx-grpc:$vertxVersion"
implementation "io.vertx:vertx-config:$vertxVersion"
implementation "javax.annotation:javax.annotation-api:1.3.2"
implementation "com.google.protobuf:protobuf-java-util:3.0.0-beta-1"
implementation 'com.github.BAData:protobuf-converter:1.1.5'
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterEngineVersion"
testImplementation "io.vertx:vertx-junit5:$vertxVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitJupiterEngineVersion"
testImplementation "org.testcontainers:testcontainers:$testContainersVersion"
testImplementation "org.testcontainers:junit-jupiter:$testContainersVersion"
testImplementation "org.mockito:mockito-core:2.23.4"
testImplementation "io.zonky.test:embedded-postgres:1.2.6"
}
sourceSets {
main {
java {
srcDir "${buildDir.absolutePath}/generated/source/proto/main/java"
srcDir "${buildDir.absolutePath}/generated/source/proto/main/grpc"
}
}
}
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'
}
}
run {
args = ['run', mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$mainClassName", "--on-redeploy=$doOnChange"]
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.11.0'
}
plugins {
grpc {
artifact = "io.vertx:protoc-gen-grpc-java:1.25.0"
}
}
generateProtoTasks {
all()*.plugins {
grpc
}
}
}