Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Gradle
  • Manual delivery of dependencies
  1. Developing in Kotlin
  2. Managing dependencies

Building and managing Kotlin function dependencies

Written by
Yandex Cloud
Updated at August 22, 2024
  • Gradle
  • Manual delivery of dependencies

Cloud Functions supports two ways to manage Kotlin function dependencies: automatic installation from the source code using Gradle and adding dependencies manually to a project archive. However, you cannot configure dependencies using both methods at the same time.

Installing dependencies has resource and execution time limits. For more information, see Quotas and limits in Cloud Functions. You can view the dependency installation log using the link that appears in the list of operations.

GradleGradle

Gradle is a system for managing dependencies in Kotlin. Cloud Functions uses Gradle 8.7 to build code.

To deliver dependencies, configure them in the build.gradle or build.gradle.kts file. No other actions, including project compilation, are required.

If you want to use the SDK for your functions in Kotlin, configure the Gradle dependencies for the SDK.

Examples of files for delivering dependencies

build.gradle.kts:

plugins {
    kotlin("jvm") version "2.0.0"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation("io.insert-koin:koin-core:3.5.6")
}

src/main/kotlin/somepackage/Handler.kt (entry point: somepackage.Handler):

package somepackage

import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import org.koin.core.context.startKoin
import org.koin.dsl.module

class Repository {
    val greeting = "Hello, world!"
}

val koinModule = module {
    single { Repository() }
}

fun handle(request: String): String {
    startKoin {
        modules(koinModule)
    }
    val component = object : KoinComponent {
        val repository: Repository by inject()
    }
    return component.repository.greeting
}

Manual delivery of dependenciesManual delivery of dependencies

To configure dependencies manually, place the JAR archives of the required libraries in the project archive root. Example:

build.zip
+--org
+----package
+------Handler.kt
+--dependency.jar

Was the article helpful?

Previous
YcFunction interface
Next
Request handler
Yandex project
© 2025 Yandex.Cloud LLC