


Gradle has no idea how to compile your Java & Kotlin code into an APK file either.Android Studio has no idea how to compile your Java & Kotlin code into an APK file.To kick things off, let’s clear up some things: I put my foot down and decided that it was time for me to understand Gradle. What I got instead after 40 minutes was the realisation that I knew nothing about Gradle, hence I would have no chance at all at making it any better. I watched a talk from Google I/O ‘17 titled “Speeding Up Your Android Gradle Builds” confident that I’d unlock the key to all the Gradle speed I ever wanted.

At work, whenever I saw an Android dev blankly staring at the screen, I’d often jokingly ask them “are you waiting for Gradle to build?”Įventually I got frustrated and decided to figure out if I could cut down the build time. “What’s taking so long?” I’d ask Android Studio, hoping for some sort of a sign that it wasn’t just stuck. This lack of knowledge made me very impatient whenever I saw the words “Gradle Build Running” for more than 10 seconds. I knew that it was “the thing” that went to work whenever I clicked on the green play button in Android Studio, but I had no idea what it actually did. Because of this, I never really understood what Gradle was. Throughout my career, only a quarter of it has been spent working on Android applications. I’ll start off with a confession: I’m mainly an iOS developer. At the title says, it’s really meant for beginners. This article will not teach you how to write custom Gradle scripts or anything of that sort. I’ll then go through the default adle scripts that come with a new Android Project. I’ll go through the basics of Gradle and the Android Plugin for Gradle. The goal of this article is to give you a high level overview of Gradle and how it fits into the entire build system when developing Android applications.

Beginner's Guide to Gradle for Android Developers Nov 5, 2017
