gradle / build-tool-roadmap

Gradle Build Tool roadmap
https://roadmap.gradle.org/
41 stars 6 forks source link

Kotlin DSL `plugins {}` block interpreter works in all supported cases #64

Open eskatos opened 1 year ago

eskatos commented 1 year ago

The Kotlin DSL plugins {} block interpreter bypasses the Kotlin compiler when compiling scripts is required and the plugins {} block is declarative only. This provides substantial performance improvements when preconditions are met.

The first version introduced in Gradle 8.0 only supports a few constructs available in the plugins {} block. For example the usage of version catalog aliases is not supported. In such cases Gradle falls back to invoking the Kotlin compiler.

As part of this we could consider warning if the optimization cannot be applied.

The optimization could also be applied to precompiled scripts.