I wonder how to work around a warning that started to appear with Gradle 3.2 (we’re on Gradle 3.4.1.):
“Configuring child specs of a copy task at execution time of the task has been deprecated and is scheduled to be removed in Gradle 4.0. Consider configuring the spec during configuration time, or using a separate task to do the configuration.”
What we use is a Tar task that has some
from clauses set at configuration time (good) and some others set at execution time (causing the warning). We do this because the set of resources to package up are not know (nor present) at configuration time. Most of the Tar content is created by the Gradle script, with the Tat being done at a later stage of execution.
I understand that the request to have from clauses only at configuration time stems from Gradle’s desire to do efficient and safe (!) up-to-date checks.
So one solution is to re-work that script portion to use the Ant tasks.
Could someone post an example for that mentioned alternative approach: “using a separate task to do the configuration” ? Thanks.