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

ktlint check tasks should be cacheable #67

Closed
eskatos opened this issue Mar 12, 2018 · 5 comments
Closed

ktlint check tasks should be cacheable #67

eskatos opened this issue Mar 12, 2018 · 5 comments

Comments

@eskatos
Copy link
Contributor

eskatos commented Mar 12, 2018

The ktlint check tasks created by this plugin don't have any output registered, so they are never up to date and cannot be cached by the Gradle build cache.

The report files generated by those tasks should be registered as outputs and the task marked as cacheable.

Other tasks contributed by this plugin might be good candidates for build cache too, I just didn't look at them closely.

@JLLeitschuh
Copy link
Owner

This is generally a hard problem given the API that Gradle exposes.
See the forum post by @nedtwigg about it in Spotless:
https://discuss.gradle.org/t/two-cases-where-the-incremental-api-is-lacking/24266

@Tapchicoma
Copy link
Collaborator

I think there is no reason to make ktlintFormat type tasks cacheable, but definitely worth for ktlintCheck tasks!

@wolfs
Copy link
Contributor

wolfs commented May 15, 2018

The check task is now cacheable since #90 has been merged.

@JLLeitschuh
Copy link
Owner

@wolfs Thank you for the great work!

@Tapchicoma
Copy link
Collaborator

Closing this as @wolfs implemented it.

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

No branches or pull requests

4 participants