Skip to content

Commit

Permalink
apply spring default plugins and boms (#1)
Browse files Browse the repository at this point in the history
* apply spring default plugins and boms

* uncomment code

* removed spring dependency plugin
  • Loading branch information
bgalek authored Jan 7, 2025
1 parent f09389a commit 92ed648
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
20 changes: 6 additions & 14 deletions backend/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
plugins {
java
alias(libs.plugins.spring.boot)
alias(libs.plugins.integration.test)
alias(libs.plugins.test.logger)
}

group = "io.github.kszapsza"
version = "0.0.1-SNAPSHOT"

repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/milestone") }
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

dependencies {
implementation(libs.micrometer.registry.prometheus)
implementation(platform(libs.spring.ai.bom))
implementation(platform(libs.spring.bom))
runtimeOnly(libs.micrometer.registry.prometheus)
implementation(libs.postgresql)
implementation(libs.spring.ai.openai.spring.boot.starter)
implementation(libs.spring.ai.pgvector.store.spring.boot.starter)
Expand All @@ -35,6 +27,6 @@ dependencies {
integrationImplementation(libs.bundles.testcontainers)
}

tasks.withType<Test> {
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
}
14 changes: 6 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ application {
mainClass.set("io.github.kszapsza.springairag.SpringAiRagApplication")
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
allprojects {
apply(plugin = "java")
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
}

repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/milestone") }
}

dependencies {
implementation(project(":backend"))
implementation(project(":frontend"))
Expand Down
25 changes: 13 additions & 12 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[versions]
integration-test = "2.2.2"
junit-platform-launcher = "1.10.0"
micrometer = "1.14.2"
spring-ai = "1.0.0-M4"
spring-boot = "3.4.1"
test-logger = "4.0.0"
testcontainers = "1.20.4"

[libraries]
junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher", version.ref = "junit-platform-launcher" }
micrometer-registry-prometheus = { group = "io.micrometer", name = "micrometer-registry-prometheus", version.ref = "micrometer" }
junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher" }
micrometer-registry-prometheus = { group = "io.micrometer", name = "micrometer-registry-prometheus" }
postgresql = { group = "org.postgresql", name = "postgresql" }
spring-ai-openai-spring-boot-starter = { group = "org.springframework.ai", name = "spring-ai-openai-spring-boot-starter", version.ref = "spring-ai" }
spring-ai-pgvector-store-spring-boot-starter = { group = "org.springframework.ai", name = "spring-ai-pgvector-store-spring-boot-starter", version.ref = "spring-ai" }
spring-boot-starter-actuator = { group = "org.springframework.boot", name = "spring-boot-starter-actuator", version.ref = "spring-boot" }
spring-boot-starter-data-jpa = { group = "org.springframework.boot", name = "spring-boot-starter-data-jpa", version.ref = "spring-boot" }
spring-boot-starter-test = { group = "org.springframework.boot", name = "spring-boot-starter-test", version.ref = "spring-boot" }
spring-boot-starter-validation = { group = "org.springframework.boot", name = "spring-boot-starter-validation", version.ref = "spring-boot" }
spring-boot-starter-web = { group = "org.springframework.boot", name = "spring-boot-starter-web", version.ref = "spring-boot" }
spring-ai-bom = { group = "org.springframework.ai", name = "spring-ai-bom", version.ref = "spring-ai" }
spring-bom = { group = "org.springframework.boot", name = "spring-boot-dependencies", version.ref = "spring-boot" }
spring-ai-openai-spring-boot-starter = { group = "org.springframework.ai", name = "spring-ai-openai-spring-boot-starter" }
spring-ai-pgvector-store-spring-boot-starter = { group = "org.springframework.ai", name = "spring-ai-pgvector-store-spring-boot-starter" }
spring-boot-starter-actuator = { group = "org.springframework.boot", name = "spring-boot-starter-actuator" }
spring-boot-starter-data-jpa = { group = "org.springframework.boot", name = "spring-boot-starter-data-jpa" }
spring-boot-starter-test = { group = "org.springframework.boot", name = "spring-boot-starter-test" }
spring-boot-starter-validation = { group = "org.springframework.boot", name = "spring-boot-starter-validation" }
spring-boot-starter-web = { group = "org.springframework.boot", name = "spring-boot-starter-web" }
testcontainers = { group = "org.testcontainers", name = "testcontainers", version.ref = "testcontainers" }
testcontainers-junit-jupiter = { group = "org.testcontainers", name = "junit-jupiter", version.ref = "testcontainers" }
testcontainers-postgresql = { group = "org.testcontainers", name = "postgresql", version.ref = "testcontainers" }
Expand All @@ -30,5 +30,6 @@ testcontainers = [
]

[plugins]
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }
integration-test = { id = "com.coditory.integration-test", version.ref = "integration-test" }
test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" }
test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" }
11 changes: 10 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
rootProject.name = "spring-ai-rag"
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

dependencyResolutionManagement {
repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/milestone") }
}
}

include("backend")
include("frontend")

0 comments on commit 92ed648

Please sign in to comment.