https://github.com/mvysny/vok-helloworld-app修改内容

build.gradle.kts:

import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "2.1.0"
    alias(libs.plugins.vaadin)
    application
    id("org.graalvm.buildtools.native") version "0.10.4"
}

defaultTasks("clean", "build")

repositories {
    mavenCentral()
}

dependencies {
    // Vaadin
    implementation(libs.vok.db)
    implementation(libs.vaadin.core) {
        if (vaadin.effective.productionMode.get()) {
            exclude(module = "vaadin-dev")
        }
    }
    implementation(libs.vaadin.boot)

    implementation(libs.hikaricp)

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

    // db
    implementation(libs.flyway)
    implementation(libs.h2)

    // REST
    implementation(libs.vok.rest)

    // Kotlin
    implementation(kotlin("stdlib-jdk8"))
}

java {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType<KotlinCompile> {
    compilerOptions.jvmTarget = JvmTarget.JVM_17
}

tasks.withType<Jar> {
    manifest {
        attributes["Main-Class"] = "com.example.vok.MainKt"
    }
}

tasks.withType<Test> {
    useJUnitPlatform()
    testLogging {
        // to see the exception stacktraces of failed tests in CI
        exceptionFormat = TestExceptionFormat.FULL
    }
}

graalvmNative {
    binaries.all {
        resources.autodetect()
    }
}

application {
    mainClass.set("com.example.vok.MainKt")
}

gradle/libs.versions.toml:

[versions]
vaadin = "24.6.0"
# https://repo1.maven.org/maven2/org/slf4j/slf4j-api/
slf4j = "2.0.16"
vok = "0.18"

[libraries]
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" }
jetbrains-annotations = "org.jetbrains:annotations:26.0.1"
vaadin-boot = "com.github.mvysny.vaadin-boot:vaadin-boot:13.3"
vaadin-core = { module = "com.vaadin:vaadin-core", version.ref = "vaadin" }
junit = "org.junit.jupiter:junit-jupiter-engine:5.11.4"
kaributesting = "com.github.mvysny.kaributesting:karibu-testing-v24:2.2.0"
vok-db = { module = "eu.vaadinonkotlin:vok-framework-vokdb", version.ref = "vok" }
vok-rest = {module = "eu.vaadinonkotlin:vok-rest", version.ref = "vok" }
flyway = "org.flywaydb:flyway-core:11.1.0"
h2 = "com.h2database:h2:2.3.232"
hikaricp = "com.zaxxer:HikariCP:6.2.1"

[plugins]
vaadin = { id = "com.vaadin", version.ref = "vaadin" }
posted @   卓能文  阅读(6)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
点击右上角即可分享
微信分享提示