CINXE.COM
Gradle | Kotlin Documentation
<!DOCTYPE html SYSTEM "about:legacy-compat"> <html lang="en-US" data-preset="contrast" data-primary-color="#307FFF"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="built-on" content="2024-11-27T18:36:00.021266532"><meta name="build-number" content="3296"><script> (function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'}); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', 'GTM-5P98'); </script> <script src="static/v3/analytics.js"></script> <title>Gradle | Kotlin Documentation</title><script type="application/json" id="virtual-toc-data">[{"id":"what-s-next","level":0,"title":"What\u0027s next?","anchor":"#what-s-next"}]</script><script type="application/json" id="topic-shortcuts"></script><link href="static/v3/app.css?v=6.11.0-footer" rel="stylesheet"><link rel="icon" type="image/svg" sizes="16x16" href="https://kotlinlang.org/assets/images/favicon.svg?v2"><link rel="icon" type="image/x-icon" sizes="32x32" href="https://kotlinlang.org/assets/images/favicon.ico?v2"><link rel="icon" type="image/png" sizes="96x96" href="https://kotlinlang.org/assets/images/apple-touch-icon.png?v2"><link rel="icon" type="image/png" sizes="300x300" href="https://kotlinlang.org/assets/images/apple-touch-icon-72x72.png?v2"><link rel="icon" type="image/png" sizes="500x500" href="https://kotlinlang.org/assets/images/apple-touch-icon-114x114.png?v2"><meta name="image" content="https://kotlinlang.org/assets/images/open-graph/docs.png"><!-- Open Graph --><meta property="og:title" content="Gradle | Kotlin"><meta property="og:description" content=""><meta property="og:image" content="https://kotlinlang.org/assets/images/open-graph/docs.png"><meta property="og:site_name" content="Kotlin Help"><meta property="og:type" content="website"><meta property="og:locale" content="en_US"><meta property="og:url" content="https://kotlinlang.org/docs/gradle.html"><!-- End Open Graph --><!-- Twitter Card --><meta name="twitter:card" content="summary_large_image"><meta name="twitter:site" content="@kotlin"><meta name="twitter:title" content="Gradle | Kotlin"><meta name="twitter:description" content=""><meta name="twitter:creator" content="@kotlin"><meta name="twitter:image:src" content="https://kotlinlang.org/assets/images/open-graph/docs.png"><!-- End Twitter Card --><!-- Schema.org WebPage --><script type="application/ld+json">{ "@context": "http://schema.org", "@type": "WebPage", "@id": "https://kotlinlang.org/docs/gradle.html#webpage", "url": "https://kotlinlang.org/docs/gradle.html", "name": "Gradle | Kotlin", "description": "", "image": "https://kotlinlang.org/assets/images/open-graph/docs.png", "inLanguage":"en-US" }</script><!-- End Schema.org --><!-- Schema.org WebSite --><script type="application/ld+json">{ "@type": "WebSite", "@id": "https://kotlinlang.org/docs/#website", "url": "https://kotlinlang.org/docs/", "name": "Kotlin Help" }</script><!-- End Schema.org --><style>a[href="test-page.html"] { visibility: hidden; }</style></head><body data-id="gradle" data-main-title="Gradle" data-article-props="{"seeAlsoStyle":"links"}" data-template="article" data-breadcrumbs="Tools///Build tools///Gradle" data-edit-url="https://github.com/JetBrains/kotlin-web-site/edit/master/docs/topics/gradle/gradle.md"><div class="wrapper"><main class="panel _main"><header class="panel__header"><div class="container"><h3>Kotlin Help</h3><div class="panel-trigger"></div></div></header><section class="panel__content"><div class="container"><article class="article" data-shortcut-switcher="inactive"><h1 data-toc="gradle" id="gradle.md">Gradle</h1><p id="z2b0qud_2">Gradle is a build system that helps to automate and manage your building process. It downloads required dependencies, packages your code, and prepares it for compilation. Learn about Gradle basics and specifics on the <a href="https://docs.gradle.org/current/userguide/userguide.html" id="z2b0qud_8" data-external="true" rel="noopener noreferrer">Gradle website</a>.</p><p id="z2b0qud_3">You can set up your own project with <a href="gradle-configure-project.html" id="z2b0qud_9">these instructions</a> for different platforms or pass a small <a href="get-started-with-jvm-gradle-project.html" id="z2b0qud_10">step-by-step tutorial</a> that will show you how to create a simple backend "Hello World" application in Kotlin.</p><aside class="prompt" data-type="tip" data-title="" id="z2b0qud_4"><p id="z2b0qud_11">You can find information about the compatibility of Kotlin, Gradle, and Android Gradle plugin versions <a href="gradle-configure-project.html#apply-the-plugin" id="z2b0qud_12">here</a>.</p></aside><p id="z2b0qud_5">In this chapter, you can also learn about:</p><ul class="list _bullet" id="z2b0qud_6"><li class="list__item" id="z2b0qud_13"><p><a href="gradle-compiler-options.html" id="z2b0qud_16">Compiler options and how to pass them</a>.</p></li><li class="list__item" id="z2b0qud_14"><p><a href="gradle-compilation-and-caches.html" id="z2b0qud_17">Incremental compilation, caches support, build reports, and the Kotlin daemon</a>.</p></li><li class="list__item" id="z2b0qud_15"><p><a href="gradle-plugin-variants.html" id="z2b0qud_18">Support for Gradle plugin variants</a>.</p></li></ul><section class="chapter"><h2 id="what-s-next" data-toc="what-s-next">What's next?</h2><p id="z2b0qud_19">Learn about:</p><ul class="list _bullet" id="z2b0qud_20"><li class="list__item" id="z2b0qud_21"><p><span class="control" id="z2b0qud_25">Gradle Kotlin DSL</span>. The <a href="https://docs.gradle.org/current/userguide/kotlin_dsl.html" id="z2b0qud_26" data-external="true" rel="noopener noreferrer">Gradle Kotlin DSL</a> is a domain specific language that you can use to write build scripts quickly and efficiently.</p></li><li class="list__item" id="z2b0qud_22"><p><span class="control" id="z2b0qud_27">Annotation processing</span>. Kotlin supports annotation processing via the <a href="ksp-reference.html" id="z2b0qud_28">Kotlin Symbol processing API</a>.</p></li><li class="list__item" id="z2b0qud_23"><p><span class="control" id="z2b0qud_29">Generating documentation</span>. To generate documentation for Kotlin projects, use <a href="https://github.com/Kotlin/dokka" id="z2b0qud_30" data-external="true" rel="noopener noreferrer">Dokka</a>; please refer to the <a href="https://github.com/Kotlin/dokka/blob/master/README.md#using-the-gradle-plugin" id="z2b0qud_31" data-external="true" rel="noopener noreferrer">Dokka README</a> for configuration instructions. Dokka supports mixed-language projects and can generate output in multiple formats, including standard Javadoc.</p></li><li class="list__item" id="z2b0qud_24"><p><span class="control" id="z2b0qud_32">OSGi</span>. For OSGi support see the <a href="kotlin-osgi.html" id="z2b0qud_33">Kotlin OSGi page</a>.</p></li></ul></section><div class="last-modified">Last modified: 25 September 2024</div><div data-feedback-placeholder="true"></div><div class="navigation-links _bottom"><a href="keyword-reference.html" class="navigation-links__prev">Keywords and operators</a><a href="get-started-with-jvm-gradle-project.html" class="navigation-links__next">Get started with Gradle and Kotlin/JVM</a></div></article><div id="disqus_thread"></div></div></section></main></div><script src="static/v3/app.js"></script></body></html>