Using Gradle w/ Kotlin DSL to create a Kotlin project

A quick introduction to Gradle’s fundamental principles & creating your first Kotlin project, with a few notes about conflicting standards in Kotlin and Java

Gabriel Shanahan
7 min readJan 13, 2020

Have you heard about the Kotlin Primer? It’s an extensive, hands-on and detailed guide to the Kotlin language full of unique and original explanations, interactive exercises, and concrete recommendations based on experience. It will transform anyone who knows Java into a Kotlin expert within a matter of days. Check it out!

This is the second article in a series about creating a Kotlin project with Gradle configured using the Kotlin DSL. In the previous one, we discussed why I think it’s a good idea to use Gradle w/ the Kotlin DSL in the first place. In this article, we’ll cover some of the very basics of Gradle, install it, run gradle init and talk about the result.

Gradle fundamental principles

Before we start, it is necessary to be familiar with some of the fundamental terms & principles Gradle uses. Right now, I’ll only go over the stuff you’ll need in order to follow the rest of the article. Other fundamental things, such as dependency management, will…

--

--