Skip to content

Commit

Permalink
Gradle: take version catalog into use
Browse files Browse the repository at this point in the history
  • Loading branch information
mvysny committed Jan 30, 2024
1 parent 3802a9c commit f3864e7
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 19 deletions.
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Check the newest Vaadin version at https://github.com/vaadin/platform/tags
vaadin24_version=24.3.3
vaadin24_version_spring=24.3.3
vaadin24next_version=24.4.0.alpha2
vaadin24next_version_spring=24.4.0.alpha2
8 changes: 8 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ slf4j = "2.0.9"
kaributools = "0.19"
karibudsl = "2.1.2"
junit5 = "5.9.3"
# Check the newest Vaadin version at https://github.com/vaadin/platform/tags
vaadin24 = "24.3.3"
vaadin24_spring = "24.3.3"
vaadin24next = "24.4.0.alpha2"
vaadin24next_spring = "24.4.0.alpha2"

[libraries]
dynatest = { module = "com.github.mvysny.dynatest:dynatest", version.ref = "dynatest" }
Expand All @@ -16,3 +21,6 @@ karibudsl = { module = "com.github.mvysny.karibudsl:karibu-dsl", version.ref = "
karibudsl23 = { module = "com.github.mvysny.karibudsl:karibu-dsl-v23", version.ref = "karibudsl" }
junit-jupiterapi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit5" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit5" }
vaadin24 = { module = "com.vaadin:vaadin", version.ref = "vaadin24" }
vaadincore24 = { module = "com.vaadin:vaadin-core", version.ref = "vaadin24" }
vaadinspring24 = { module = "com.vaadin:vaadin-spring", version.ref = "vaadin24_spring" }
4 changes: 2 additions & 2 deletions karibu-testing-v10-groovy/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ dependencies {
// 1. don't compile-depend on vaadin-core anymore: the app itself should manage Vaadin dependencies, for example
// using the gradle-flow-plugin or direct dependency on vaadin-core. The reason is that the app may wish to use the
// npm mode and exclude all webjars.
compileOnly("com.vaadin:vaadin-core:${properties["vaadin24_version"]}")
testImplementation("com.vaadin:vaadin-core:${properties["vaadin24_version"]}")
compileOnly(libs.vaadincore24)
testImplementation(libs.vaadincore24)

api(project(":karibu-testing-v10"))

Expand Down
4 changes: 2 additions & 2 deletions karibu-testing-v10-pro-groovy/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies {
// using the gradle-flow-plugin or direct dependency on vaadin-core. The reason is that the app may wish to use the
// npm mode and exclude all webjars.
// depend on vaadin instead of vaadin-core, to bring in Confirm Dialog and Grid Pro.
compileOnly("com.vaadin:vaadin:${properties["vaadin24_version"]}")
testImplementation("com.vaadin:vaadin:${properties["vaadin24_version"]}")
compileOnly(libs.vaadin24)
testImplementation(libs.vaadin24)

testImplementation(libs.junit.jupiter)
testImplementation(libs.slf4j.simple)
Expand Down
2 changes: 1 addition & 1 deletion karibu-testing-v10-spring/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
api(project(":karibu-testing-v10"))
compileOnly("com.vaadin:vaadin-spring:${properties["vaadin24_version_spring"]}")
compileOnly(libs.vaadinspring24)
}

@Suppress("UNCHECKED_CAST")
Expand Down
4 changes: 2 additions & 2 deletions karibu-testing-v10/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ dependencies {
// npm mode and exclude all webjars.
// - depend on "vaadin" instead of just "vaadin-core", to bring in Grid Pro.
// - depend on the lowest Vaadin (Vaadin 14 LTS)
compileOnly("com.vaadin:vaadin:${properties["vaadin24_version"]}")
testImplementation("com.vaadin:vaadin:${properties["vaadin24_version"]}")
compileOnly(libs.vaadin24)
testImplementation(libs.vaadin24)

api(project(":mock-servlet-environment5"))
api(libs.kaributools)
Expand Down
4 changes: 2 additions & 2 deletions karibu-testing-v10/kt10-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ dependencies {
implementation("org.hibernate.validator:hibernate-validator:8.0.0.Final")
implementation("jakarta.el:jakarta.el-api:5.0.1")

api("com.vaadin:vaadin:${properties["vaadin24_version"]}")
api(libs.vaadin24)

api("org.springframework.boot:spring-boot-starter-test:3.0.4") {
exclude(group = "ch.qos.logback")
}
api("org.springframework.boot:spring-boot-starter-web:3.0.4") {
exclude(group = "ch.qos.logback")
}
api("com.vaadin:vaadin-spring:${properties["vaadin24_version_spring"]}")
api(libs.vaadinspring24)
api(project(":karibu-testing-v10-spring"))

// don't test EnhancedDialog: it's deprecated and doesn't work with Vaadin 24: https://vaadin.com/directory/component/enhanced-dialog
Expand Down
4 changes: 2 additions & 2 deletions karibu-testing-v23/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ dependencies {
// npm mode and exclude all webjars.
// - depend on "vaadin" instead of just "vaadin-core", to bring in Grid Pro.
// - depend on the latest Vaadin (Vaadin 23 LTS)
compileOnly("com.vaadin:vaadin:${properties["vaadin24_version"]}")
testImplementation("com.vaadin:vaadin:${properties["vaadin24_version"]}")
compileOnly(libs.vaadin24)
testImplementation(libs.vaadin24)
api(project(":karibu-testing-v10"))
api(libs.kaributools23)

Expand Down
4 changes: 2 additions & 2 deletions karibu-testing-v23/kt23-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies {
}

api(project(":karibu-testing-v23"))
api("com.vaadin:vaadin-spring:${properties["vaadin24_version_spring"]}")
compileOnly("com.vaadin:vaadin:${properties["vaadin24_version"]}")
api(libs.vaadinspring24)
compileOnly(libs.vaadin24)
}
4 changes: 2 additions & 2 deletions karibu-testing-v24/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
compileOnly("com.vaadin:vaadin:${properties["vaadin24_version"]}")
testImplementation("com.vaadin:vaadin:${properties["vaadin24_version"]}")
compileOnly(libs.vaadin24)
testImplementation(libs.vaadin24)
api(project(":karibu-testing-v23"))

testImplementation(libs.dynatest)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
testImplementation("com.vaadin:vaadin:${properties["vaadin24_version"]}")
testImplementation(libs.vaadin24)
testImplementation(project(":karibu-testing-v23:kt23-tests")) {
exclude(group = "com.github.appreciated")
}
Expand Down
2 changes: 1 addition & 1 deletion karibu-testing-v24/kt10-testrun-vaadin24/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
testImplementation("com.vaadin:vaadin:${properties["vaadin24_version"]}")
testImplementation(libs.vaadin24)
testImplementation(project(":karibu-testing-v23:kt23-tests"))
}

0 comments on commit f3864e7

Please sign in to comment.