-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
95 lines (80 loc) · 2.64 KB
/
build.gradle.kts
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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.0"
kotlin("plugin.serialization") version "1.5.0"
application
id("com.github.johnrengelman.shadow") version "6.1.0"
}
group = "org.smartregister"
version = "3.1.0-SNAPSHOT"
repositories {
mavenCentral()
jcenter()
}
val mainVerticleName = "org.smartregister.dataimport.main.MainVerticle"
val watchForChange = "src/**/*"
val doOnChange = "${projectDir}/gradlew classes"
val launcherClassName = "io.vertx.core.Launcher"
application {
mainClassName = "org.smartregister.dataimport.MainKt" //Replace with launcherClassName when you just want to run vertx MainVerticle
}
val vertxVersion = "4.0.2"
val junitJupiterVersion = "5.7.0"
val kotlinSerializationVersion = "1.2.0"
val log4jVersion = "2.14.1"
val cliktVersion = "3.1.0"
val openCsvVersion = "5.4"
dependencies {
implementation(platform("io.vertx:vertx-stack-depchain:$vertxVersion"))
implementation("io.vertx:vertx-web-client")
implementation("io.vertx:vertx-web")
implementation("io.vertx:vertx-pg-client")
implementation("io.vertx:vertx-mysql-client")
implementation("io.vertx:vertx-auth-oauth2")
implementation("io.vertx:vertx-lang-kotlin")
implementation("io.vertx:vertx-lang-kotlin-coroutines")
implementation("io.vertx:vertx-config")
implementation("io.vertx:vertx-circuit-breaker")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion")
implementation("org.apache.logging.log4j:log4j-core:$log4jVersion")
implementation("com.github.ajalt.clikt:clikt:$cliktVersion")
implementation("com.opencsv:opencsv:$openCsvVersion")
implementation(kotlin("stdlib-jdk8"))
testImplementation("io.vertx:vertx-junit5")
testImplementation("org.junit.jupiter:junit-jupiter:$junitJupiterVersion")
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions.jvmTarget = "11"
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
tasks.withType<ShadowJar> {
archiveClassifier.set("fat")
manifest {
attributes(
mapOf("Main-Verticle" to mainVerticleName)
)
}
mergeServiceFiles()
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events = setOf(PASSED, SKIPPED, FAILED)
}
}
tasks.withType<JavaExec> {
args = listOf(
"run",
mainVerticleName,
"--redeploy=$watchForChange",
"--launcher-class=$launcherClassName",
"--on-redeploy=$doOnChange",
"-Dvertx.logger-delegate-factory-class-name=Log4j2LogDelegateFactory",
"-Denvironment=dev"
)
}