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

Gradle plugin should leverage task configuration avoidance #562

Open
DPUkyle opened this issue Mar 16, 2021 · 0 comments
Open

Gradle plugin should leverage task configuration avoidance #562

DPUkyle opened this issue Mar 16, 2021 · 0 comments
Labels
enhancement General enhancement performance For identifying performance problems or making improvements plugin

Comments

@DPUkyle
Copy link
Member

DPUkyle commented Mar 16, 2021

For PegasusPlugin, invoking tasks.create is more heavyweight than the desirable tasks.register API. For very large projects, this new API can have a significant effect on build configuration time by lazily deferring Task object instantiation.

One caveat - the TaskContainer#register API is introduced with Gradle 4.9. Implementing it will effectively break projects who build with a lower version of Gradle when applying the pegasus plugin. If necessary, backwards-compatibility could be preserved by sampling org.gradle.util.GradleVersion#current. But even Gradle 4.9 is quite old and it's reasonable to expect consumers of the pegasus plugin to be building with Gradle 5 or higher. This could also be caught very early in the PegasusPlugin#apply method, failing gracefully and warning the user about a minimum required version.

Read more about task configuration avoidance here.

@BrianPin BrianPin added enhancement General enhancement performance For identifying performance problems or making improvements plugin labels Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancement performance For identifying performance problems or making improvements plugin
Projects
None yet
Development

No branches or pull requests

2 participants