Kotlin on Google Cloud

A community-supported project

Quickstart Community Tutorials

Build rich backends in your favorite language

  • Create and deploy autoscaling Kotlin backends for your mobile apps
  • Write Kotlin using your favorite Java frameworks and libraries
  • Use fully-managed MySQL/PostgreSQL or Firebase for your application database
  • Run Kotlin in a containerized application at scale on Google Kubernetes Engine
  • Use IntelliJ with Cloud Code to add Google Cloud API libraries and deploy to Cloud Run.
Kotlin IDE

Write Kotlin using your favorite Java and Kotlin frameworks

Learn how to build an application on Spring Boot, Spark, and Ktor. Integrate your applications with MySQL using Cloud SQL.

View Tutorials
Access all of Google Cloud with Kotlin

Build your applications in Kotlin using Google Cloud APIs and services.

1
Set up a Google Cloud project
2
Add dependencies to your project
Add the Cloud Storage client library to your gradle.build under dependencies:
compile group: 'com.google.cloud', name: 'google-cloud-storage', version: '1.36.0'
3
Write your code
// import com.google.cloud.storage.StorageOptions
val storage = StorageOptions.getDefaultInstance().service
val bucket = storage.get(bucketName) ?: error("Bucket $bucketName does not exist.")

println("Listing all blobs in bucket $bucketName:")
bucket.list().iterateAll().forEach { blob ->
    println("${blob.name} (content-type: ${blob.contentType}, size: ${blob.size})")
}
Quickly find and debug issues

Google Cloud Observability provides powerful monitoring, logging, and diagnostics. It equips you with insight into the health, performance, and availability of cloud-powered applications, enabling you to find and fix issues faster.

Cloud Monitoring
Google Cloud Observability
Unified monitoring, logging, and diagnostics for applications on Google Cloud and AWS.
Stackdriver Error Reporting
Error Reporting
A walk through of getting an error alert and investigating the error in the Cloud console.
Stackdriver Monitor, diagnose, and fix
Monitor, diagnose, and fix
In this video, Aja Hammerly uses Cloud Monitoring, Cloud Logging, Error Reporting, and Cloud Trace to find and fix some subtle errors in an example app.
Learn more
Kotlin on Google Cloud communities

Got something to say? Join our community to ask questions, or just chat with the experts at Google who help build Kotlin for Google Cloud.