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

Caching usage in documentation #168

Open
sergey-morenets opened this issue Apr 28, 2021 · 1 comment
Open

Caching usage in documentation #168

sergey-morenets opened this issue Apr 28, 2021 · 1 comment

Comments

@sergey-morenets
Copy link

sergey-morenets commented Apr 28, 2021

Hi

Caching is one the most exciting features in Gradle so I would mention it in the plugin documentation.
So that new developers will be easier to use it. For example:

task buildAngular(type:YarnTask, dependsOn: 'yarn_install') {
   ///
   outputs.cacheIf { true }
   ///
}
@nickcaballero
Copy link

nickcaballero commented Dec 2, 2021

Just a note that generally this is probably not how you should use Gradle's caching since NPM/Yarn have a better understanding of their domains and therefore can provide better solutions to caching.

https://docs.gradle.org/7.3/userguide/more_about_tasks.html#sec:untracked_external_tool

Sometimes you want to integrate an external tool like Git or Npm, both of which do their own up-to-date checking. In that case it doesn’t make much sense for Gradle to also do up-to-date checks.

Related to #157. Also, specifically for Yarn > v1, they have the "Plug'n'Play" thing which doesn't leave much to be cached - https://yarnpkg.com/features/pnp.

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

2 participants