then it no longer works, complaining: groovy.lang.MissingPropertyException: Could not find property ‘runtime’ on configuration container.
Is this because the configurations.runtime expression is getting evaluated during the Configuration phase, and that expression isn’t valid yet?
So I tried delaying evaluation by wrapping the returned expression in a closure, but then I got the exception: org.gradle.api.GradleException: Could not determine the dependencies of task ‘:foo:copyArtifactJars’.
How can I calculate a processed list of artifacts for my Copy Task?
Actually, after wrapping the returned expression in a closure (trying to delay evaluation), I got the exception:
org.gradle.api.GradleException: Could not determine the dependencies of task ‘:foo:copyArtifactJars’. but it has a cause of: Caused by: groovy.lang.MissingPropertyException: Could not find property ‘runtime’ on configuration container.
If I declare the @InputFiles another way will that stop the closure from getting evaluated early?
My real project has several subprojects in a single build.gradle file.
The copyArtifactJars task is in one of the subprojects, but I can’t put the method in the subproject with it (because of the nesting in the build.gradle file).
Is that why it doesn’t work for me - subprojects in a single build file?