Detection
migetpacks detects a Kotlin application when any of the following conditions are met:settings.gradle.ktsexists.ktfiles exist insrc/directorybuild.gradle.ktscontains thekotlinpluginbuild.gradle(Groovy DSL) contains a Kotlin plugin reference
Kotlin detection takes priority over Java/Gradle detection. If your project has
build.gradle.kts with Kotlin plugins, it will be identified as Kotlin rather than Java.Version Detection
Kotlin Version
Kotlin version is resolved in the following priority order:Java Version
The JDK version used for compilation and runtime is read from:Build Process
migetpacks generates a multi-stage Dockerfile using Eclipse Temurin JDK with Gradle:Gradle Wrapper
Ifgradlew is present in the project root, migetpacks uses the Gradle Wrapper for correct version compatibility. Otherwise, it falls back to the system Gradle.
Run Command
The default run command for Kotlin applications:RUN_COMMAND or a Procfile:
JVM Configuration
The following environment variables are set for production:Caching
Layer Caching
Dependencies are cached by copying Gradle build files before the full source:BUILD_CACHE_DIR
WhenBUILD_CACHE_DIR is set, Gradle caches persist at:
DHI Support
Docker Hardened Images are supported for Kotlin builds.
DHI Notes
- Java version is read from
system.properties(java.runtime.version), defaulting to 21. - Eclipse Temurin DHI JDK images include the JDK but Gradle must be available (via wrapper or system install).
- Runtime images are distroless (no shell).
- The
nonrootuser is used instead of themigetuser.