Dependency concepts

There are a few dependency-related concepts that are interesting to understand, even if you might not need to use them today. One of them is the concept of configurations, which explains the compile keyword that we have been using for dependencies throughout this chapter.

Configurations

Sometimes you might have to work with an SDK that is only present on certain devices, like a Bluetooth SDK from a specific vendor, for example. In order to be able to compile the code, you need to add the SDK to your compile classpath. You do not need to include the SDK in your APK though, because it is already on the device. This is where dependency configurations come in.

Gradle groups dependencies into configurations, which are just named sets ...

Get Gradle for Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.