-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathbuild.gradle.kts
161 lines (127 loc) · 5.13 KB
/
build.gradle.kts
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
import java.util.*
plugins {
java
id("org.jetbrains.intellij") version "1.17.2"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "com.devoxx.genie"
version = "0.4.17"
repositories {
mavenCentral()
}
tasks.register("updateProperties") {
doLast {
val projectVersion = version
val propertiesFile = file("src/main/resources/application.properties")
if (propertiesFile.exists()) {
val properties = Properties()
// Read existing properties while removing comments
val filteredLines = propertiesFile.readLines()
.filterNot { it.trim().startsWith("#") } // Remove comments
properties.load(filteredLines.joinToString("\n").byteInputStream())
// Keep only the version property
properties.clear()
properties.setProperty("version", projectVersion.toString())
// Manually write the properties file without the timestamp
propertiesFile.printWriter().use { writer ->
properties.forEach { key, value ->
writer.println("$key=$value")
}
}
} else {
println("application.properties file not found!")
}
}
}
tasks.named("buildPlugin") {
dependsOn("updateProperties")
}
dependencies {
val lg4j_version = "1.0.0-beta1"
// Add the dependencies for the core module
implementation(project(":core"))
implementation("dev.langchain4j:langchain4j:$lg4j_version")
implementation("dev.langchain4j:langchain4j-ollama:$lg4j_version")
implementation("dev.langchain4j:langchain4j-local-ai:$lg4j_version")
implementation("dev.langchain4j:langchain4j-open-ai:1.0.0-alpha2-SNAPSHOT")
implementation("dev.langchain4j:langchain4j-anthropic:$lg4j_version")
implementation("dev.langchain4j:langchain4j-bedrock:$lg4j_version")
implementation("dev.langchain4j:langchain4j-mistral-ai:$lg4j_version")
implementation("dev.langchain4j:langchain4j-google-ai-gemini:$lg4j_version")
implementation("dev.langchain4j:langchain4j-web-search-engine-google-custom:$lg4j_version")
implementation("dev.langchain4j:langchain4j-web-search-engine-tavily:$lg4j_version")
implementation("dev.langchain4j:langchain4j-azure-open-ai:$lg4j_version")
implementation("dev.langchain4j:langchain4j-chroma:$lg4j_version")
implementation("com.squareup.retrofit2:converter-gson:2.11.0")
implementation("org.xerial:sqlite-jdbc:3.48.0.0")
implementation("com.github.docker-java:docker-java:3.4.0")
implementation("com.github.docker-java:docker-java-transport-httpclient5:3.4.0")
implementation("com.knuddels:jtokkit:1.0.0")
implementation("org.commonmark:commonmark:0.22.0")
// TDG : Add Log4j dependencies
implementation("org.apache.logging.log4j:log4j-api:2.22.1")
implementation("org.apache.logging.log4j:log4j-core:2.22.1")
// TDG : Add other TDG dependencies
implementation("org.junit.jupiter:junit-jupiter-api:5.11.3")
implementation("org.junit.jupiter:junit-jupiter-engine:5.11.3")
implementation("org.junit.platform:junit-platform-launcher:1.11.3")
compileOnly("org.projectlombok:lombok:1.18.34")
annotationProcessor("org.projectlombok:lombok:1.18.34")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.0-M2")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.10.3")
testImplementation("org.mockito:mockito-core:5.11.0")
testImplementation("org.mockito:mockito-inline:5.2.0")
testImplementation("org.mockito:mockito-junit-jupiter:5.15.2")
testImplementation("org.assertj:assertj-core:3.26.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.0-M2")
}
// Configure Gradle IntelliJ Plugin
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
version.set("2023.3.4")
type.set("IC")
}
tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
}
patchPluginXml {
sinceBuild.set("233")
untilBuild.set("251.*")
}
shadowJar {
mergeServiceFiles()
manifest {
attributes(
"Implementation-Title" to "DevoxxGenie",
"Implementation-Version" to version,
)
}
}
test {
systemProperty("java.io.tmpdir", "/tmp/test")
// Add these to help with platform tests
systemProperty("idea.home.path", file("build/idea-sandbox"))
useJUnitPlatform()
testLogging { events("passed", "skipped", "failed") }
maxHeapSize = "1g"
forkEvery = 1
reports {
junitXml.required.set(true)
html.required.set(true)
}
}
signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
publishPlugin {
token.set(System.getenv("PUBLISH_TOKEN"))
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}