|
1 | 1 | import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED |
2 | 2 | import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED |
3 | 3 | import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED |
| 4 | +import java.util.Properties |
4 | 5 |
|
5 | 6 | plugins { |
6 | 7 | val kotlinVersion = "2.1.20" |
@@ -29,11 +30,11 @@ dependencies { |
29 | 30 | implementation("org.springframework.ai:spring-ai-mcp-client-spring-boot-starter") |
30 | 31 |
|
31 | 32 | // ollama |
32 | | - implementation("org.springframework.ai:spring-ai-ollama-spring-boot-starter") |
| 33 | + // implementation("org.springframework.ai:spring-ai-ollama-spring-boot-starter") |
33 | 34 |
|
34 | 35 | // bedrock |
35 | | - // implementation("org.springframework.ai:spring-ai-bedrock-converse-spring-boot-starter") |
36 | | - // implementation("org.springframework.ai:spring-ai-bedrock-ai-spring-boot-starter") |
| 36 | + implementation("org.springframework.ai:spring-ai-bedrock-converse-spring-boot-starter") |
| 37 | + implementation("org.springframework.ai:spring-ai-bedrock-ai-spring-boot-starter") |
37 | 38 |
|
38 | 39 | implementation("org.springframework.ai:spring-ai-pgvector-store-spring-boot-starter") |
39 | 40 | runtimeOnly("org.postgresql:postgresql") |
@@ -73,4 +74,22 @@ tasks.withType<Test> { |
73 | 74 | testLogging { |
74 | 75 | events(PASSED, SKIPPED, FAILED) |
75 | 76 | } |
| 77 | + setSystemProperties { systemProperty(it.first, it.second) } |
| 78 | +} |
| 79 | + |
| 80 | +tasks.withType<JavaExec> { |
| 81 | + setSystemProperties { systemProperty(it.first, it.second) } |
| 82 | +} |
| 83 | + |
| 84 | +private fun setSystemProperties(setSystemProperty: (Pair<String, Any>) -> Unit) { |
| 85 | + val systemPropertiesFile = project.rootProject.file("system.properties") |
| 86 | + if (systemPropertiesFile.exists()) { |
| 87 | + systemPropertiesFile.inputStream().use { inputStream -> |
| 88 | + Properties().apply { |
| 89 | + load(inputStream) |
| 90 | + }.forEach { |
| 91 | + setSystemProperty(it.key.toString() to it.value) |
| 92 | + } |
| 93 | + } |
| 94 | + } |
76 | 95 | } |
0 commit comments