Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer task creation in Gradle plugin #1180

Open
swankjesse opened this issue Nov 27, 2023 · 0 comments
Open

Defer task creation in Gradle plugin #1180

swankjesse opened this issue Nov 27, 2023 · 0 comments

Comments

@swankjesse
Copy link
Collaborator

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant