Slackbot
06/28/2023, 1:53 PMMiles Peele
06/28/2023, 1:54 PMTask.project as much as possibleAaron Ferguson
06/28/2023, 1:55 PMAdam
06/28/2023, 1:55 PMTask.getProject() or any instance of Project is a problem because of Configuration Cache
https://docs.gradle.org/8.1.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
Config cache tries to store the Gradle config to disk using Java Serialization, but it can’t store a Project because it’s too big and complicated. But if you’re only running tasks that aren’t loaded from the config cache, then you’re not going to have a problem. But maybe those warnings were coming from Gradle plugins that were updated in 8.1.1 to be Config Cache compatible, or maybe you updated some other plugins as well that also fixed Config Cache problems?Aaron Ferguson
06/28/2023, 1:57 PMAdam
06/28/2023, 2:01 PMAaron Ferguson
06/28/2023, 2:04 PMAdam
06/28/2023, 2:06 PMCalling Task.getProject() from a task action at execution time is now deprecated and will be made an error in Gradle 8.0. This method can be used during configuration time, but it is recommended to avoid doing this.
Adam
06/28/2023, 2:07 PMAaron Ferguson
06/28/2023, 2:07 PMAaron Ferguson
06/28/2023, 2:09 PMAdam
06/28/2023, 2:13 PMAaron Ferguson
06/28/2023, 2:14 PMAaron Ferguson
06/28/2023, 2:14 PMAdam
06/28/2023, 2:14 PMVampire
06/28/2023, 2:16 PMSTABLE_CONFIGURATION_CACHE feature preview when on 7.6 and removed this during the upgrade to 8.1.1?Vampire
06/28/2023, 2:17 PMAaron Ferguson
06/28/2023, 2:18 PMAaron Ferguson
06/28/2023, 2:18 PMAaron Ferguson
06/28/2023, 2:19 PMAaron Ferguson
06/28/2023, 2:19 PMVampire
06/28/2023, 2:26 PMSTABLE_CONFIGURATION_CACHE is still enabled, you should still get the depreaction warning even if you disabled the configuration cache.Vampire
06/28/2023, 2:27 PMVampire
06/28/2023, 2:28 PMAaron Ferguson
06/28/2023, 2:54 PMAaron Ferguson
06/28/2023, 2:54 PM