-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
123 lines (99 loc) · 3.07 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.2'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
//OpenAPI
id 'com.epages.restdocs-api-spec' version '0.19.1'
}
group = 'capstone'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
}
ext {
set('springAiVersion', "0.8.1")
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
//Validation
implementation 'org.springframework.boot:spring-boot-starter-validation'
//H2 DB
runtimeOnly 'com.h2database:h2'
//Elastic Search
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
//OpenAPI
testImplementation 'com.epages:restdocs-api-spec-mockmvc:0.19.1'
//MongoDB
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
//S3
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
//Thymeleaf
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
//pdfbox
implementation 'org.apache.pdfbox:pdfbox:2.0.24'
//Elasticsearch TestContainer
testImplementation 'org.testcontainers:elasticsearch:1.19.3'
testImplementation 'org.testcontainers:testcontainers:1.19.3'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation("org.testcontainers:junit-jupiter:1.12.0")
//Spring openai
implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter'
}
dependencyManagement {
imports {
mavenBom "org.springframework.ai:spring-ai-bom:${springAiVersion}"
}
}
tasks.named('test') {
useJUnitPlatform() {
includeTags 'basic_test'
includeTags 'openapi_test'
includeTags 'db_test'
}
}
task basicTest(type: Test) {
useJUnitPlatform {
includeTags 'basic_test'
}
}
task dbTest(type: Test) {
useJUnitPlatform {
includeTags 'db_test'
}
}
task openApiTest(type: Test) {
useJUnitPlatform {
includeTags 'openapi_test'
}
}
task copyOasToStatic(type: Copy) {
dependsOn 'openapi3'
doFirst {
delete 'src/main/resources/static/api/v1/openapi3.yaml'
}
from 'build/api-spec/openapi3.yaml'
into 'src/main/resources/static/api/v1'
}
openapi3 {
servers = [{ url = 'https://exam-lab.store/' }, { url = 'http://localhost:8080/' }]
title = 'Exam Lab API'
description = 'API for Exam Lab'
version = '0.1.0'
format = 'yaml'
}