-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
87 lines (75 loc) · 2.17 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
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
*/
buildscript {
ext {
kotlinVersion = "1.4.21"
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
plugins {
id 'java'
id 'application'
id "com.github.johnrengelman.shadow" version "2.0.4"
id "org.jetbrains.kotlin.jvm" version "1.4.21"
id "org.jetbrains.kotlin.plugin.serialization" version "1.4.21"
}
ext {
kotlinVersion = "1.4.21"
vertxVersion = "4.0.0"
junitJupiterEngineVersion = "5.2.0"
}
repositories {
mavenLocal()
jcenter()
}
group = 'com.github.jmlb23.bookstore'
version = '1.0.0-SNAPSHOT'
sourceCompatibility = '1.8'
mainClassName = 'io.vertx.core.Launcher'
def mainVerticleName = 'com.github.jmlb23.blog.verticles.MainVerticle'
def watchForChange = 'src/**/*'
def doOnChange = './gradlew classes'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "io.vertx:vertx-core:$vertxVersion"
implementation "io.vertx:vertx-lang-kotlin-coroutines:$vertxVersion"
implementation "io.vertx:vertx-auth-jwt:$vertxVersion"
implementation "io.vertx:vertx-web:$vertxVersion"
implementation "io.vertx:vertx-jdbc-client:$vertxVersion"
implementation "mysql:mysql-connector-java:8.0.15"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1"
testImplementation "io.vertx:vertx-junit5:$vertxVersion"
testRuntime("org.junit.jupiter:junit-jupiter-engine:$junitJupiterEngineVersion")
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
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"]
}