-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
115 lines (101 loc) · 3.14 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.1'
id 'io.spring.dependency-management' version '1.1.5'
id "com.github.node-gradle.node" version "7.0.2"
}
group = 'com.drodzewicz'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
node {
// specify the Node.js version
version = '20.12.2'
// specify the npm version (optional)
npmVersion = '10.5.0'
// set to true to download the specified Node.js version
download = false
// identify working directory in project
workDir = file("${project.projectDir}/frontend/nodejs")
// NPM work directory
// npmWorkDir = file("${project.projectDir}/frontend/npm")
}
task appNpmInstall(type: NpmTask){
description = "Read package.json and install all jars"
workingDir = file("${project.projectDir}/frontend")
args =["install"]
}
task appNpmBuild(type: NpmTask){
description = "Builds applciation for your frontend "
args =["run", "build"]
workingDir = file("${project.projectDir}/frontend")
}
task copyUIBuild(type: Copy){
from file("${project.projectDir}/frontend/dist/")
into file("${project.projectDir}/src/main/resources/static")
}
task copyUIPublic(type: Copy){
from file("${project.projectDir}/frontend/public/")
into file("${project.projectDir}/src/main/resources/static")
}
task cleanStatic(type: Delete) {
description = "Cleans the static resources folder before copying new files."
delete file("${project.projectDir}/src/main/resources/static")
}
// sequence of dependancies
appNpmBuild.dependsOn appNpmInstall
copyUIPublic.dependsOn cleanStatic
copyUIBuild.dependsOn cleanStatic
copyUIPublic.dependsOn appNpmBuild
copyUIBuild.dependsOn copyUIPublic
processResources.dependsOn copyUIBuild
compileJava.dependsOn copyUIBuild
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
// spring
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation:3.2.1'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
// utils
implementation 'com.google.guava:guava:33.2.1-jre'
// security
implementation "org.springframework.boot:spring-boot-starter-security"
// testing
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// Mapstruct
compileOnly 'org.mapstruct:mapstruct:1.4.2.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final'
annotationProcessor 'org.projectlombok:lombok-mapstruct-binding:0.2.0'
// Lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// postgress
runtimeOnly 'org.postgresql:postgresql'
// h2
runtimeOnly 'com.h2database:h2'
// session
implementation 'org.springframework.session:spring-session-jdbc'
// liquibase
implementation 'org.liquibase:liquibase-core:4.28.0'
//swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0'
}
processResources {
filesMatching('**/application.properties') {
expand(project.properties)
}
}
tasks.named('test') {
useJUnitPlatform()
}