-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
115 lines (95 loc) · 3.67 KB
/
build.gradle
File metadata and controls
115 lines (95 loc) · 3.67 KB
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 '4.0.2'
id 'io.spring.dependency-management' version '1.1.7'
}
group = 'com.mogak'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '25'
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
// Annotation processing
compileOnly 'org.projectlombok:lombok:1.18.44'
annotationProcessor 'org.projectlombok:lombok:1.18.44'
testCompileOnly 'org.projectlombok:lombok:1.18.44'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.44'
// Dependency management
implementation platform("software.amazon.awssdk:bom:2.27.21")
implementation platform("org.springframework.cloud:spring-cloud-dependencies:2025.1.0")
// Web and API
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
implementation 'org.springframework.boot:spring-boot-starter-jackson'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.2'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// Security and auth
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-security-oauth2-client'
implementation 'org.springframework.security:spring-security-oauth2-jose'
implementation 'org.bouncycastle:bcpkix-jdk15on:1.70'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
// Persistence
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// Storage and media
implementation "software.amazon.awssdk:s3"
implementation 'com.github.downgoon:marvin:1.5.5'
implementation('com.github.downgoon:MarvinPlugins:1.5.5') {
exclude group: 'org.bytedeco', module: 'javacv-platform'
}
// Test support used by production code
implementation 'org.springframework:spring-test'
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test'
testImplementation 'org.springframework.boot:spring-boot-starter-jackson-test'
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testImplementation 'org.springframework.boot:spring-boot-starter-security-test'
testImplementation 'org.awaitility:awaitility'
// Runtime drivers
runtimeOnly 'com.h2database:h2'
runtimeOnly 'org.postgresql:postgresql'
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
options.release = 25
}
tasks.register('localDbUp', Exec) {
group = 'application'
description = 'Starts the local PostgreSQL database and waits until it is healthy.'
commandLine 'docker', 'compose', 'up', '-d', '--wait', '--no-build', 'postgres'
}
tasks.register('localDbDown', Exec) {
group = 'application'
description = 'Stops the local PostgreSQL database.'
commandLine 'docker', 'compose', 'down'
}
tasks.register('run', org.springframework.boot.gradle.tasks.run.BootRun) {
group = 'application'
description = 'Starts local PostgreSQL and runs the API with the local profile.'
dependsOn tasks.named('localDbUp')
mainClass = 'com.mogak.spring.Application'
classpath = sourceSets.main.runtimeClasspath
systemProperty 'spring.profiles.active', 'local'
environment 'profile', 'local'
environment 'JWT_SECRET_KEY', System.getenv('JWT_SECRET_KEY') ?: 'bW9nYWstbG9jYWwtZGV2LXNlY3JldC1rZXktMzItYnl0ZXMhISE='
doFirst {
println 'MOGAK local API starting at http://localhost:8080'
println 'Swagger UI: http://localhost:8080/swagger-ui.html'
}
}
tasks.register('local') {
group = 'application'
description = 'Marker task so ./gradlew run local is accepted as the local run command.'
}