October 2019
Intermediate to advanced
434 pages
11h 54m
English
To explore the Gradle Kotlin DSL, we're going to migrate our existing Android project to make use of the DSL.
The first step will be to go through both of our build.gradle files and ensure that all string literals are using double quotes (") instead of single quotes (') and that all Gradle function calls are using parentheses.
In the case of the top-level build.gradle file, this means adding parentheses to the classpath() function calls. This is required because Groovy allows you to omit these parentheses, whereas Kotlin requires them to be used. The following code demonstrates what this update looks like in our project-level build.gradle file:
// root-level build.gradlebuildscript { ext.kotlin_version ...
Read now
Unlock full access