-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
60 lines (52 loc) · 2.18 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
plugins {
id("java")
id("war")
id("io.freefair.aspectj.post-compile-weaving") version "8.10.2"
}
group = "ru.qngdjas"
version = "1.0-SNAPSHOT"
extra.apply {
set("jakartaVersion", "6.0.0")
set("jacksonVersion", "2.18.0")
set("mapstructVersion", "1.6.2")
set("aspectJVersion", "1.9.22.1")
set("postgresqlVersion", "42.7.4")
set("liquibaseVersion", "4.29.2")
set("junitVersion", "5.10.0")
}
repositories {
mavenCentral()
}
dependencies {
implementation("jakarta.servlet:jakarta.servlet-api:${rootProject.extra["jakartaVersion"]}")
implementation("com.fasterxml.jackson.core:jackson-databind:${rootProject.extra["jacksonVersion"]}")
implementation("org.mapstruct:mapstruct:${rootProject.extra["mapstructVersion"]}")
annotationProcessor("org.mapstruct:mapstruct-processor:${rootProject.extra["mapstructVersion"]}")
implementation("org.aspectj:aspectjrt:${rootProject.extra["aspectJVersion"]}")
implementation("org.postgresql:postgresql:${rootProject.extra["postgresqlVersion"]}")
implementation("org.liquibase:liquibase-core:${rootProject.extra["liquibaseVersion"]}")
testImplementation(platform("org.junit:junit-bom:${rootProject.extra["junitVersion"]}"))
testImplementation("org.junit.jupiter:junit-jupiter")
testAnnotationProcessor("org.mapstruct:mapstruct-processor:${rootProject.extra["mapstructVersion"]}")
}
tasks.test {
useJUnitPlatform()
}
tasks.register<JavaExec>("runMigrations") {
group = "migration"
description = "Выполнение миграции БД"
mainClass.set("ru.qngdjas.habitstracker.infrastructure.external.postgres.MigrationManager")
classpath = sourceSets["main"].runtimeClasspath
}
tasks.register<JavaExec>("runTestMigrations") {
group = "migration"
description = "Выполнение миграции тестовой БД"
mainClass.set("ru.qngdjas.habitstracker.infrastructure.external.postgres.MigrationManager")
classpath = sourceSets["test"].runtimeClasspath
}
tasks.register<Copy>("deployToTomcat") {
group = "deploy"
dependsOn(tasks.war)
from(tasks.war.get().archiveFile)
into("D:\\Program Files\\Apache Software Foundation\\Tomcat 10.1\\webapps")
}