-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
165 lines (136 loc) · 5.32 KB
/
build.gradle.kts
File metadata and controls
165 lines (136 loc) · 5.32 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
java
id("org.springframework.boot") version "3.5.6"
id("io.spring.dependency-management") version "1.1.7"
jacoco
}
group = "com.bitbi"
version = "0.0.1-SNAPSHOT"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
extra["awsSdkVersion"] = "2.28.11"
dependencies {
// Spring Boot Starters (versions managed by Spring Boot BOM)
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-actuator")
// Database
runtimeOnly("org.postgresql:postgresql")
implementation("org.flywaydb:flyway-core")
runtimeOnly("org.flywaydb:flyway-database-postgresql")
// AWS S3
implementation(platform("software.amazon.awssdk:bom:${property("awsSdkVersion")}"))
implementation("software.amazon.awssdk:s3")
implementation("software.amazon.awssdk:s3-transfer-manager")
// OAuth2 Resource Server (for Auth0 integration)
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
// Auth0 Integration
implementation("com.auth0:auth0:2.26.0")
implementation("com.auth0:java-jwt:4.4.0")
// Spring Retry (for Auth0 API resilience)
implementation("org.springframework.retry:spring-retry")
// JWT
implementation("io.jsonwebtoken:jjwt-api:0.12.6")
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.6")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.6")
// OpenAPI/Swagger
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.3")
// Metrics (managed by Spring Boot)
runtimeOnly("io.micrometer:micrometer-registry-prometheus")
// Logging
implementation("net.logstash.logback:logstash-logback-encoder:8.0")
// Upload History Feature Dependencies
// Excel generation
implementation("org.apache.poi:poi-ooxml:5.3.0")
// CSV parsing
implementation("org.apache.commons:commons-csv:1.12.0")
// Compression (ZIP + Gzip)
implementation("org.apache.commons:commons-compress:1.28.0")
// Encoding detection
implementation("com.ibm.icu:icu4j:76.1")
// Redis caching
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.boot:spring-boot-starter-cache")
// File Comparison Feature Dependencies
// Diff library for file comparison
implementation("io.github.java-diff-utils:java-diff-utils:4.12")
// Hypersistence Utils for JSONB support
implementation("io.hypersistence:hypersistence-utils-hibernate-63:3.9.0")
// Plugin System Dependencies
// JSON Schema validation for plugin data
implementation("com.networknt:json-schema-validator:1.5.4")
// Rate limiting for Plugin API
implementation("com.bucket4j:bucket4j-core:8.10.1")
// Caffeine cache for rate limiter (prevents memory leak)
implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
// Lombok
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
// Test Dependencies
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
// Testcontainers 2.0.3 for Docker Desktop 29.x compatibility
testImplementation("org.testcontainers:testcontainers:2.0.3")
testImplementation("org.testcontainers:testcontainers-junit-jupiter:2.0.3")
testImplementation("org.testcontainers:testcontainers-postgresql:2.0.3")
testImplementation("org.testcontainers:testcontainers-localstack:2.0.3")
testImplementation("org.awaitility:awaitility:4.2.2")
// Docker 29.x compatibility handled by Testcontainers 2.0.2+
}
tasks.withType<Test> {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}
// Per-task gate (pre-commit hook): `./gradlew test -PexcludeIntegration` runs unit + contract
// tests only, skipping the Testcontainers integration suite (fast, no Docker required).
// Default `./gradlew test` (CI) still runs everything.
tasks.named<Test>("test") {
if (project.hasProperty("excludeIntegration")) {
exclude("**/integration/**")
}
}
// Before-PR gate: only the Testcontainers integration suite.
tasks.register<Test>("integrationTest") {
description = "Runs Testcontainers integration tests (src/test/java/**/integration/**)."
group = "verification"
testClassesDirs = sourceSets["test"].output.classesDirs
classpath = sourceSets["test"].runtimeClasspath
include("**/integration/**")
shouldRunAfter(tasks.test)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required = true
html.required = true
}
}
jacoco {
toolVersion = "0.8.12"
}
tasks.jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = "0.80".toBigDecimal()
}
}
}
}
tasks.named<BootJar>("bootJar") {
archiveFileName = "${project.name}.jar"
}