Skip to content

Commit

Permalink
gradle: move deps to libs.versions.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
mvysny committed Feb 13, 2024
1 parent 6d2fd13 commit f67c532
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 24 deletions.
28 changes: 13 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import com.vaadin.gradle.getBooleanProperty
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

val vaadinVersion: String by extra
val karibuDslVersion: String by extra

plugins {
kotlin("jvm") version "1.9.22"
id("application")
id("com.vaadin")
application
alias(libs.plugins.vaadin)
}

defaultTasks("clean", "build")
Expand All @@ -26,27 +24,27 @@ tasks.withType<Test> {

dependencies {
// Karibu-DSL dependency
implementation("com.github.mvysny.karibudsl:karibu-dsl-v23:$karibuDslVersion")
implementation(libs.karibu.dsl)

// Vaadin
implementation("com.vaadin:vaadin-core:$vaadinVersion") {
afterEvaluate {
if (vaadin.productionMode.get()) {
exclude(module = "vaadin-dev")
}
implementation(libs.vaadin.core) {
// https://github.com/vaadin/flow/issues/18572
if (vaadin.productionMode.map { v -> getBooleanProperty("vaadin.productionMode") ?: v }.get()) {
exclude(module = "vaadin-dev")
}
}
implementation("com.github.mvysny.vaadin-boot:vaadin-boot:12.2")
implementation(libs.vaadin.boot)

// logging
// currently we are logging through the SLF4J API to SLF4J-Simple. See src/main/resources/simplelogger.properties file for the logger configuration
implementation("org.slf4j:slf4j-simple:2.0.9")
implementation(libs.slf4j.simple)

implementation(kotlin("stdlib-jdk8"))

// test support
testImplementation("com.github.mvysny.kaributesting:karibu-testing-v24:2.1.2")
testImplementation("com.github.mvysny.dynatest:dynatest:0.24")
testImplementation(libs.karibu.testing)
testImplementation(libs.dynatest)
testRuntimeOnly(libs.junit.platform.launcher)
}

tasks.withType<KotlinCompile> {
Expand Down
2 changes: 0 additions & 2 deletions gradle.properties

This file was deleted.

17 changes: 17 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[versions]
vaadin = "24.3.4"
# https://repo1.maven.org/maven2/org/slf4j/slf4j-api/
slf4j = "2.0.11"

[libraries]
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" }
vaadin-boot = "com.github.mvysny.vaadin-boot:vaadin-boot:12.2"
vaadin-core = { module = "com.vaadin:vaadin-core", version.ref = "vaadin" }
karibu-testing = "com.github.mvysny.kaributesting:karibu-testing-v24:2.1.2"
karibu-dsl = "com.github.mvysny.karibudsl:karibu-dsl-v23:2.1.2"
junit-platform-launcher = "org.junit.platform:junit-platform-launcher:1.9.3"
dynatest = "com.github.mvysny.dynatest:dynatest:0.24"

[plugins]
vaadin = { id = "com.vaadin", version.ref = "vaadin" }
7 changes: 0 additions & 7 deletions settings.gradle.kts

This file was deleted.

0 comments on commit f67c532

Please sign in to comment.