-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (107 loc) · 3.77 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 'java'
id 'org.springframework.boot' version '3.2.2'
id 'io.spring.dependency-management' version '1.1.4'
id "org.springdoc.openapi-gradle-plugin" version "1.7.0"
id "com.github.node-gradle.node" version "7.0.2"
id "com.diffplug.spotless" version "6.25.0"
id 'idea' // comment out if you don't use IntelliJ IDEA
//id 'eclipse' // uncomment if you use Eclipse
}
group = 'fi.asteriski'
version = '1.0'
java {
sourceCompatibility = '21'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
maven {
url "https://jcenter.bintray.com/"
}
}
node {
download = true
nodeProjectDir = file("${project.projectDir}/typesPlugin")
}
openApi {
apiDocsUrl.set("http://localhost:8080/v1/api-docs")
customBootRun {
args = ["--spring.profiles.active=special"]
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-quartz'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'commons-io:commons-io:2.15.1'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.16.1'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.1'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'
// Unfortunately not maintained. See https://github.com/michaelklishin/quartz-mongodb
implementation "com.novemberain:quartz-mongodb:2.2.0-rc2"
implementation 'org.keycloak:keycloak-spring-boot-starter:23.0.4'
compileOnly 'org.projectlombok:lombok:1.18.30'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test:6.2.1'
}
tasks.named('test') {
useJUnitPlatform()
maxHeapSize = '4G'
}
bootJar {
archiveFileName = 'eventsignup.jar'
}
tasks.register('generateTsTypes', NpxTask) {
dependsOn('generateOpenApiDocs')
command = "openapi-typescript"
args = ["${project.projectDir}/build/openapi.json", "--output", "${project.projectDir}/typesPlugin/src/generated/events-types.ts"]
}
tasks.register('generateTypesVersionNumber', NpmTask) {
def tag = System.getenv("GIT_TAG")
if (tag && tag =~ '^[0-9]+\\.[0-9]+\\.[0-9]+$') {
args = ["version", tag.substring(1)]
} else {
args = ["version", new Date().format('yyyyMMdd') + "." + new Date().format('HHmm') + ".0"]
}
}
tasks.register('publishTypesPlugin', NpmTask) {
args = ["publish"]
}
tasks.named("forkedSpringBootRun") {
mustRunAfter("nodeSetup")
}
tasks.register("bootRunDev") {
group = "application"
description = "Runs the Spring Boot application with the dev profile"
doFirst {
tasks.bootRun.configure {
systemProperty("spring.profiles.active", "dev")
systemProperty("MONGO_HOST", "localhost")
}
}
finalizedBy("bootRun")
}
spotless {
format 'misc', {
target '*.gradle', '.gitattributes', '.gitignore', '*.properties'
trimTrailingWhitespace()
endWithNewline()
}
java {
importOrder()
removeUnusedImports()
palantirJavaFormat('2.47.0').formatJavadoc(true)
}
}