Hey Dave!
This was a fun change Google made just after the book was published: the kotlin_version property is no longer automatically included when you create a project.
What used to happen is that you’d get a buildscript { ... } block in your project-level build.gradle file with an ext { ... } inside. This block contained any variables you wanted to use in your Gradle scripts.
You can either create this section in that project-level build.gradle file:
buildscript {
ext {
kotlin_version = '1.7.10'
// Other variables can live here
}
// Other blocks can be here
}
Otherwise, you can change the kotlin-stdlib-jdk8 dependency to include the Kotlin version rather than use the variable:
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"
Also, with newer versions of Kotlin, you should be able to exclude the explicit Kotlin dependency altogether.
Let me know if that works!
Michael