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

VerifyGoogleJavaFormat task is not cacheable #43

Open
davidburstrom opened this issue Feb 26, 2020 · 4 comments
Open

VerifyGoogleJavaFormat task is not cacheable #43

davidburstrom opened this issue Feb 26, 2020 · 4 comments

Comments

@davidburstrom
Copy link

To speed up CI builds for multi-module builds, it would help if VerifyGoogleJavaFormat was made cacheable. https://docs.gradle.org/current/userguide/build_cache.html#enable_caching_of_non_cacheable_tasks

liblit added a commit to liblit/WALA that referenced this issue Jun 6, 2020
This works around a missing feature that has already been requested for
the Gradle google-java-format plugin:
<sherter/google-java-format-gradle-plugin#43>.
liblit added a commit to wala/WALA that referenced this issue Jun 6, 2020
This works around a missing feature that has already been requested for
the Gradle google-java-format plugin:
<sherter/google-java-format-gradle-plugin#43>.
@sherter
Copy link
Owner

sherter commented Jun 7, 2020

We have an internal caching mechanism that is more efficient than what would be possible with Gradle's inputs/outputs based caching approach. Since we format source files, our inputs and outputs are the same. If we run the formatting task and something changes, Gradle would consider the task not up-to-date on a second run. We do (the task is run, but it's a no-op)!

Also have a look at UpToDateSpec.groovy.

@sherter
Copy link
Owner

sherter commented Jun 7, 2020

Also see #18.

@davidburstromspotify
Copy link

That is all good and well, but I was referring to CI builds (clean builds, as per Gradle recommendations), in which I believe your caching mechanism does not come into play.

@sherter
Copy link
Owner

sherter commented Jun 7, 2020

That's probably right. This whole distributed build cache thing came after this plugin was conceived. I'll have to look into this...

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

3 participants