Kotlin script and writing command line utilities
summary
Demos show using cotlin script with kotlinc / kotlin wrappers and community keycript, loading JVM APIs to read gradle.properties, bump a version string (1.3 → 1.4 by incrementing minor and zeroing patch) and write the file back — it runs and updates the file. Also uses the click CLI library and Kotlin HTML DSL via main.kts dependencies. Notes: JVM startup adds seconds, compiler plugins (serialization) don’t work out of the box, and script exit codes can be surprising (example: exit code 3).
AI-written summary · about
chapters (11)
- 0:00Introduction and context
- 1:51What is Kotlin script
- 4:01Command line interfaces overview
- 6:09Kotlin script for CLI tools
- 7:14Demo: Running Kotlin script
- 10:09Demo: Version bump script
- 18:46Demo: Using JDK properties
- 21:17Demo: HTML generation with dependencies
- 24:11Demo: CLI tool with Kotlin CLI library
- 28:59Experience and takeaways
- 33:20Q&A session
related talks
52mkscript - Scripting Enhancements for Kotlin
49mKotlin for Java Programmers
29mCompile, Deploy and Manage Your CI in Kotlin
35mTaming the Kotlin Compiler
26mKotlinize your CI, from Gradle tuning to Kotlin Script
33mCAN KOTLIN SAVE ME FROM MY GROOVY BUILDSCRIPTS?
52mKotlin for Java Programmers
38mWhat's New & Cool in Kotlin Tools
