The plugins block is special as it is evaluated on...
# gradle
m
The plugins block is special as it is evaluated on its own. That's why you can't use variables outside the plugins block inside it. Gradle loads the plugins block and then Kotlin DSL generates some accessors and methods like
kapt(…)
depending on which plugins are applied. Then the script itself is actually run.