-
Notifications
You must be signed in to change notification settings - Fork 34
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 cache #155
Gradle cache #155
Conversation
Hi, |
We can use cacheIf to enable caching only if ignoreFailures == false. That's easy to add to the plugin-init.groovy. |
One of
My change fixes the UPTO-DATE check for the task, so now it can actually be UPTO-DATE.
What's your opinion on this? Do you want me to change anything? |
This was also the case before. Actually the uptodate check was working most of the time. Maybe it changed in one later Gradle version when @classpath was introduced. Nevertheless I like your change. I just have to think when to include this. One opportunity would be to release the Java 14 update in March as version 3.0, so I can also remove the old deprecated stuff, too. In that case I will add some more commits afterwards to change minimum java version and remove *-1.6 signatures files (merge them into the 1.7 ones).
All fine as first step. |
I am working on #160, which will update to Java 7 and forbiddenapis 3.0. After this is merged, I will apply your PR. Thanks anyways and sorry for the delay! |
Apart from the https/rat stuff, this is the minimal needed change to support gradle build caching properly.
It is still necessary to enable the cache explicitly with
outputs.cacheIf { true }
. This is intentional, because caching will cause no warnings to be logged if there is a cache hit, which might confuse users. This is not a problem withignoreFailures = false
, since failed tasks should not be cached.