Kotlin plugin for vfox.
It installs the Kotlin compiler from JetBrains' releases
onto your PATH, together with Kotlin/Native (kotlinc-native) when JetBrains
publishes a prebuilt native compiler for your platform. Releases from 1.9.0-RC on
are verified against the .sha256 files JetBrains publishes beside the archives.
After installing vfox, install the plugin, a compiler, and select it:
vfox add kotlin
vfox install kotlin@2.0.0
vfox use --global kotlin@2.0.0
kotlinc -versionUse kotlin@latest for the newest release on the
Kotlin release page,
and vfox search kotlin to list every release. For kotlinc and kotlin to be
on your PATH, vfox has to be hooked into your shell — see its
quick start.
A version is a Kotlin release number, such as 2.0.0 or 1.9.24, with no
distribution suffix:
vfox install kotlin@2.1.0 # a specific release
vfox install kotlin@latest # the newest release
vfox use kotlin@2.1.0 # the current shell session
vfox use --global kotlin@2.1.0 # every new shellSee versions.md for details, including the checksum behaviour of releases before 1.9.0-RC.
Kotlin/Native ships as a separate release asset. When JetBrains publishes a
prebuilt compiler for a release, the plugin downloads it for Linux x86_64,
macOS x86_64/arm64 or Windows x86_64 and puts its bin directory on PATH
next to the JVM compiler:
kotlinc-native -version
kotlinc-native hello.kt -o helloThe native archive is verified against its own .sha256 when JetBrains
publishes one. On hosts without a prebuilt native compiler (Linux arm64, for
example) the JVM compiler still installs. Bundling the native compiler needs
vfox 1.0.0 or later and, like kotlinc, a Java runtime on PATH.
kotlinc and kotlin are JVM launchers, so a Java runtime (17 or newer) must
already be on your PATH. The plugin does not install Java; use the
vfox-java plugin if you need one.
If a Kotlin compiler is already on the machine — from SDKMAN, asdf, mise,
Homebrew, an IDE bundle, the system package manager or KOTLIN_HOME — adopt it
instead of downloading another copy:
vfox link --detect kotlinThis needs vfox 1.1.0 or later. vfox lists what the plugin found and links what
you pick; vfox link --detect -y kotlin links everything without asking.
See link.md.
Using the plugin
- Versions: version syntax, installing, searching and selecting a compiler
- Already installed compilers: adopt compilers on the machine with
vfox link --detect kotlin - Install from source: try an unreleased change from this checkout
- Troubleshooting: Java, shell hooks, checksums and downloads
Working on the plugin
- Development: layout, hook contracts, tests and releasing
- E2E: local checks and the Linux/Windows container suites
- Changes: what changed in each release
Maintainers publish from Actions → Plugin → Run workflow on the default branch. The release steps, version-tag pushes and failure recovery are described in development.md.
Apache-2.0. See LICENSE.