Defer task creation in Gradle plugin
Opened this issue · 0 comments
swankjesse commented
We’re causing all KotlinWebpack
and KotlinCompile
tasks to be created eagerly because we’re using APIs like this:
target.tasks.withType(KotlinWebpack::class.java) { ... }
This slows down builds because it forces tasks to be created and configured, even if they won’t be executed by the current Gradle execution.
Unfortunately I think this might be a bit tricky. I don’t see an obvious way to get another plugins’ task names without also causing those tasks to be configured. And we need these names, cause our names are built on their names. (It’s possible we can do something like tasks.withType.names
and track when that set changes?)