-
-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathbuild.gradle
63 lines (51 loc) · 1.76 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id "java"
id "application"
id "com.github.johnrengelman.shadow" version "6.1.0"
}
group = "com.github.gradle.node"
version = "1.0.0-SNAPSHOT"
repositories {
mavenCentral()
}
def vertxVersion = "4.0.1"
def junitJupiterVersion = "5.7.0"
def mainVerticleName = "com.github.gradle.node.vertx_react.MainVerticle"
def launcherClassName = "io.vertx.core.Launcher"
def watchForChange = "src/**/*"
def doOnChange = "${projectDir}/gradlew classes"
application {
// Must use the deprecated version while the shadow jar does not read the new version
// See https://github.com/johnrengelman/shadow/issues/609
// This causes a warning at build time
mainClassName = launcherClassName
}
dependencies {
implementation platform("io.vertx:vertx-stack-depchain:$vertxVersion")
implementation "io.vertx:vertx-core"
implementation "io.vertx:vertx-web"
implementation project(":webapp")
testImplementation "io.vertx:vertx-junit5"
testImplementation "org.junit.jupiter:junit-jupiter:$junitJupiterVersion"
testImplementation "io.github.bonigarcia:webdrivermanager:4.3.1"
testImplementation "org.seleniumhq.selenium:selenium-java:3.141.59"
testImplementation "org.assertj:assertj-core:3.19.0"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType(ShadowJar) {
archiveClassifier = "fat"
manifest {
attributes(["Main-Verticle": mainVerticleName])
}
mergeServiceFiles()
}
tasks.withType(Test) {
useJUnitPlatform()
}
tasks.withType(JavaExec) {
args = ["run", mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$launcherClassName", "--on-redeploy=$doOnChange"]
}