-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
122 lines (102 loc) · 3.63 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.4'
id 'io.spring.dependency-management' version '1.1.7'
id "com.github.ben-manes.versions" version "0.52.0"
}
group = 'com.digitalsanctuary.springuser.demo'
version = '1.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
// Define the configurations used in the project
configurations {
developmentOnly
runtimeOnly {
extendsFrom developmentOnly
}
testImplementation {
extendsFrom runtimeOnly
}
compileOnly {
extendsFrom annotationProcessor
}
dev
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
// DigitalSanctuary Spring User Framework
implementation 'com.digitalsanctuary:ds-spring-user-framework:3.2.1'
// Spring Boot starters
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
// Thymeleaf extras
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6:3.1.3.RELEASE'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:3.4.0'
// OpenAPI (Swagger)
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.6'
// Runtime dependencies
runtimeOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:3.5.2'
runtimeOnly 'org.postgresql:postgresql'
// Utility libraries
implementation 'org.passay:passay:1.6.6'
implementation 'com.google.guava:guava:33.4.5-jre'
implementation 'jakarta.validation:jakarta.validation-api:3.1.1'
implementation 'org.hibernate.validator:hibernate-validator:8.0.2.Final'
// Compile-only dependencies
compileOnly 'org.projectlombok:lombok'
// Annotation processors
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
// Testing dependencies
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'com.h2database:h2:2.3.232'
testImplementation group: 'com.codeborne', name: 'selenide', version: '7.7.3'
testImplementation group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.9.3'
}
test {
useJUnitPlatform {
excludeTags 'ui'
}
testLogging {
events "PASSED", "FAILED", "SKIPPED"
// showStandardStreams = true // Display log output
}
}
tasks.register('uiTest', Test) {
useJUnitPlatform {
includeTags 'ui'
}
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
shouldRunAfter test
}
bootJar {
launchScript {
properties 'confFolder': '/opt/app/conf/'
}
}
bootRun {
// Use Spring Boot DevTool only when we run Gradle bootRun task
classpath = sourceSets.main.runtimeClasspath + configurations.developmentOnly
sourceResources sourceSets.main
if (project.hasProperty('profiles')) {
environment SPRING_PROFILES_ACTIVE: profiles
} else {
def profiles = 'local'
environment SPRING_PROFILES_ACTIVE: profiles
}
}