1
+ plugins {
2
+ id ' java'
3
+ }
4
+
5
+ apply plugin : ' org.springframework.boot'
6
+ apply plugin : ' io.spring.dependency-management'
7
+
8
+ java {
9
+ toolchain {
10
+ languageVersion = JavaLanguageVersion . of(21 )
11
+ }
12
+ }
13
+
14
+ // Don't publish this module
15
+ bootJar { enabled = false }
16
+ jar { enabled = false }
17
+ tasks. matching { it. name. startsWith(' publish' ) }. configureEach {
18
+ enabled = false
19
+ }
20
+
21
+ repositories {
22
+ mavenLocal()
23
+ mavenCentral()
24
+ }
25
+
26
+ // Tell gradle to add the generated sources directory
27
+ sourceSets {
28
+ test {
29
+ java {
30
+ srcDir file(" ${ buildDir} /generated/sources/annotationProcessor/java/test" )
31
+ }
32
+ }
33
+ }
34
+
35
+ dependencies {
36
+ implementation project(' :redis-om-spring' )
37
+ implementation project(' :redis-om-spring-ai' )
38
+
39
+ // Important for RedisOM annotation processing!
40
+ annotationProcessor project(' :redis-om-spring' )
41
+ testAnnotationProcessor project(' :redis-om-spring' )
42
+
43
+ // Lombok
44
+ compileOnly ' org.projectlombok:lombok'
45
+ annotationProcessor ' org.projectlombok:lombok'
46
+ testCompileOnly ' org.projectlombok:lombok'
47
+ testAnnotationProcessor ' org.projectlombok:lombok'
48
+
49
+ // Spring
50
+ implementation ' org.springframework:spring-context-support'
51
+ implementation ' org.springframework.boot:spring-boot-starter-test'
52
+
53
+ // Spring AI
54
+ implementation " org.springframework.ai:spring-ai-openai:${ springAiVersion} "
55
+ implementation " org.springframework.ai:spring-ai-ollama:${ springAiVersion} "
56
+ implementation " org.springframework.ai:spring-ai-azure-openai:${ springAiVersion} "
57
+ implementation " org.springframework.ai:spring-ai-vertex-ai-embedding:${ springAiVersion} "
58
+ implementation " org.springframework.ai:spring-ai-bedrock:${ springAiVersion} "
59
+ implementation " org.springframework.ai:spring-ai-transformers:${ springAiVersion} "
60
+ implementation " org.springframework.ai:spring-ai-mistral-ai:${ springAiVersion} "
61
+ implementation " org.springframework.ai:spring-ai-minimax:${ springAiVersion} "
62
+ implementation " org.springframework.ai:spring-ai-zhipuai:${ springAiVersion} "
63
+
64
+ // WebSocket
65
+ implementation ' jakarta.websocket:jakarta.websocket-api:2.1.1'
66
+ implementation ' jakarta.websocket:jakarta.websocket-client-api:2.1.1'
67
+
68
+ // DJL
69
+ implementation " ai.djl.spring:djl-spring-boot-starter-autoconfigure:${ djlStarterVersion} "
70
+ implementation " ai.djl.spring:djl-spring-boot-starter-pytorch-auto:${ djlStarterVersion} "
71
+ implementation " ai.djl.huggingface:tokenizers:${ djlVersion} "
72
+
73
+ // Test
74
+ testImplementation ' org.junit.jupiter:junit-jupiter'
75
+ testImplementation ' org.assertj:assertj-core'
76
+ testImplementation ' org.mockito:mockito-core'
77
+ testImplementation " com.redis:testcontainers-redis:${ testcontainersRedisVersion} "
78
+ testImplementation " com.karuslabs:elementary:${ elementaryVersion} "
79
+ testImplementation " org.testcontainers:junit-jupiter"
80
+
81
+ // Other
82
+ implementation ' com.fasterxml.jackson.core:jackson-databind'
83
+ compileOnly " javax.enterprise:cdi-api:${ cdi} "
84
+ }
85
+
86
+ // Use -parameters flag for Spring
87
+ tasks. withType(JavaCompile ). configureEach {
88
+ options. compilerArgs << ' -parameters'
89
+ }
90
+
91
+ // Configure annotation processing
92
+ compileTestJava {
93
+ options. annotationProcessorPath = configurations. testAnnotationProcessor
94
+ options. annotationProcessorGeneratedSourcesDirectory = file(" ${ buildDir} /generated/sources/annotationProcessor/java/test" )
95
+ }
96
+
97
+ test {
98
+ useJUnitPlatform()
99
+ maxHeapSize = " 1g"
100
+
101
+ testLogging {
102
+ events " passed" , " skipped" , " failed"
103
+ exceptionFormat = ' full'
104
+ }
105
+ }
0 commit comments