-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (105 loc) · 3.38 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
plugins {
id 'org.springframework.boot' version '2.7.3'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'java'
id 'application'
id 'jacoco'
id 'checkstyle'
id 'org.liquibase.gradle' version '2.1.0'
id 'org.siouan.frontend-jdk11' version '6.0.0'
id 'org.springdoc.openapi-gradle-plugin' version '1.3.3'
id 'com.github.johnrengelman.processes' version '0.5.0'
}
group = 'hexlet.code'
version = '1.0-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springdoc:springdoc-openapi-ui:1.5.12'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'com.rollbar:rollbar-spring-boot-webmvc:1.8.1'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'org.postgresql:postgresql'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'com.github.database-rider:rider-junit5:1.32.0'
liquibaseRuntime 'org.liquibase:liquibase-core:4.15.0'
liquibaseRuntime 'info.picocli:picocli:4.6.1'
liquibaseRuntime group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
liquibaseRuntime 'org.liquibase.ext:liquibase-hibernate5:4.15.0'
liquibaseRuntime 'org.springframework.boot:spring-boot-starter-data-jpa'
liquibaseRuntime 'com.h2database:h2'
liquibaseRuntime sourceSets.main.output
implementation 'com.querydsl:querydsl-core:5.0.0'
implementation 'com.querydsl:querydsl-jpa:5.0.0'
annotationProcessor(
'com.querydsl:querydsl-apt:5.0.0:jpa',
'javax.annotation:javax.annotation-api:1.3.2',
'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final'
)
}
tasks.named('test') {
useJUnitPlatform()
}
application {
mainClass = 'hexlet.code.AppApplication'
}
compileJava {
options.release = 17
}
jacocoTestReport {
reports {
xml.required = true
}
}
task stage(dependsOn: ['clean', 'installDist'])
installDist.mustRunAfter clean
diffChangeLog {
dependsOn compileJava
}
liquibase {
activities {
main {
changeLogFile 'src/main/resources/db/changelog/changelog-master.xml'
url 'jdbc:h2:./task-manager-db'
username 'sa'
password ''
referenceUrl 'hibernate:spring:hexlet.code.model' +
'?dialect=org.hibernate.dialect.H2Dialect' +
'&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy'
}
}
}
// Сборка фронтенда.
// Выполняется только если ничего не изменилось.
// *****************************************************************************
frontend {
nodeVersion = '16.13.1'
installScript = 'install'
assembleScript = 'run build'
packageJsonDirectory = file("${projectDir}/frontend")
}
def configFrontendTasks = {
inputs.files(fileTree("$projectDir/frontend").exclude('build', 'node_modules'))
outputs.dir("$buildDir/resources/main/static")
}
assembleFrontend {
configure configFrontendTasks
doLast {
copy {
from "$projectDir/frontend/build"
into "$buildDir/resources/main/static"
}
}
}
installFrontend {
configure configFrontendTasks
}
processResources.dependsOn assembleFrontend