Kora облачно ориентированный серверный фреймворк написанный на Java для написания Java / Kotlin приложений с упором на производительность, эффективность, прозрачность сделанный разработчиками Т-Банк / Тинькофф

Kora is a cloud-oriented server-side Java framework for writing Java / Kotlin applications with a focus on performance, efficiency and transparency made by T-Bank / Tinkoff developers

GraalVM Native

Kora creates its helper classes at compile time, does not use the Reflection API at runtime, does not use dynamic proxies, does not generate bytecode at compile time or runtime, so there are no problems building native image from Kora perspective.

Example of building a native image using plugin for gradle:

Plugin build.gradle:

plugins {
    id "org.graalvm.buildtools.native" version "0.10.4"
}

Plugin setup build.gradle:

graalvmNative {
    binaries {
        main {
            imageName = "application"
            mainClass = "ru.tinkoff.kora.example.Application"
            debug = true
            verbose = true
            buildArgs.add("--report-unsupported-elements-at-runtime")
            javaLauncher = javaToolchains.launcherFor {
                languageVersion = JavaLanguageVersion.of(17)
                vendor = JvmVendorSpec.matching("GraalVM Community")
            }
        }
    }
    metadataRepository {
        enabled = true
    }
}

Plugin build.gradle.kts:

plugins {
    id("org.graalvm.buildtools.native") version("0.10.4")
}

Plugin setup build.gradle.kts:

graalvmNative {
    binaries {
        named("main") {
            imageName.set("application")
            mainClass.set("ru.tinkoff.kora.example.Application")
            debug.set(true)
            verbose.set(true)
            buildArgs.add("--report-unsupported-elements-at-runtime")
            javaLauncher = javaToolchains.launcherFor {
                languageVersion = JavaLanguageVersion.of(17)
                vendor = JvmVendorSpec.matching("GraalVM Community")
            }
        }
    }
    metadataRepository {
        enabled.set(true)
    }
}

Some libraries require additional configuration, some configurations are made in Kora.

Tested modules that should work without additional configuration:

See examples of working native services at repository with examples.