Skip to content

Add Kotlin language support (compiled_lang) #29

Description

@darkn3rd

Add Kotlin (https://kotlinlang.org/) as a new language in lessons/compiled_lang/, alongside the existing C++/C#/Go/Java/Rust.

Based on the existing structure (using go/ as the closest reference for the Makefile/Rakefile/psakefile.ps1 shape). Unlike Go, Kotlin compiles to JVM bytecode rather than a native binary, so it needs a JVM present at both build and run time (same needs: java dependency Groovy already uses in scriptbox/config/*.yml), and the Makefile's bin/ output is a runnable .jar (via kotlinc -include-runtime) rather than a native executable - worth deciding whether bin/ holds the .jar directly or a thin java -jar wrapper script per lesson, matching whichever convention reads most consistently against the other languages here.

  • New lessons/compiled_lang/kotlin/ directory: Makefile(.win), Rakefile (imports shared testbox.rake), psakefile.ps1, src/ with one .kt file per lesson (a00-o20, ~60 files mirroring Go's set), bin//target/ output dirs
  • Add Kotlin to lessons/compiled_lang/{Brewfile,choco.config,cygwin_pkgs.txt,msys2_pkgs.txt,common.mk}
  • Add a Kotlin entry to the Compiled Languages area in scriptbox/scripts/verify_commands.rb's AREAS
  • Add Kotlin support to scriptbox/config/{ubuntu2204,windows,msys2,cygwin,macos}.yml (needs: java, matching the existing Groovy entries) - package names: sdkman: kotlin (Ubuntu), choco: kotlinc (Windows), brew: kotlin (macOS); MSYS2/Cygwin have no native package and would need a PATH-pointing script to the Windows choco install, matching the existing msys2_groovy_path/cygwin_groovy_path pattern
  • lessons/compiled_lang/README.md update

This is a full new-language port (~60 lesson files), so likely worth breaking into smaller PRs rather than one large one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions