Code Samples#
This page describes code samples that might be useful, either when learning Kotlin or figuring out a technique for your application.
If you use any code samples from here or elsewhere, make sure that you abide by our code policies and acknowledge your sources!
Kotlin Code#
- Atomic Kotlin Exercises: Exercises to accompany the Atomic Kotlin book.
- Kotlin Programming Language. GitHub repo for the Kotlin project.
- Kotlin-Algorithms-and-Design-Patterns. Algorithms and design patterns.
Kotlin Multiplatform Code#
- kmm-basic-sample. Cross-platform mobile application.
- my-bird-app. Cross-platform mobile with Compose.
- John O’Reilly’s KMP samples. Many samples, some of which are included in the official Kotlin KMP repo.
- Ktor codeSnippets. Networking with Ktor.
- Exposed Samples. Databases with Exposed.
Compose Code#
- Compose Multiplatform Repo. Desktop applications for macOS, Windows, Linux.
- Compose Charts Desktop. Simple plots.
- Compose Color Picker. Graphical colour chooser.
- Jetpack Compose for Android Developers. Google code path.
- Jetpack Compose Repo. Mobile applications for Android.
- State in Jetpack Compose. Advanced code lab.
Cloud Computing#
- Google Cloud Platform Kotlin Samples. Official samples.
- How to Publish a Ktor Docker Image to Container Registry Using the Ktor Plugin. Publish from your IDE.
- Serverless Kotlin on Google Cloud Run. Getting a Ktor service running in the cloud.
Final Word#