Gradle build cache is not enabled for task

拟墨画扇 提交于 2019-12-01 23:45:53

A task needs to opt-in to being cacheable (see Cacheable tasks), since it doesn't make sense for every task to be cacheable.

Opting in can happen by annotating the task with @CacheableTask or by using task.outputs.cacheIf { true }, so you could do that for the npm configure task.

Note that cacheable tasks need to declare their inputs and outputs correctly. If they don't, then you may experience invalid build failures.

Gradle documentation says:

There are third party plugins that work well with the build cache. The most prominent examples are the Android plugin 3.1+ and the Kotlin plugin 1.2.21+. For other third party plugins, check their documentation to find out whether they support the build cache.

So it depends on the plugin which provides the task npm-configure.

If you are using the gradle-node-plugin from SRS, it should work since version 1.2.0 according to their changelog.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!