Slackbot
06/27/2023, 8:26 PMChris Lee
06/27/2023, 8:28 PMJendrik Johannes
06/28/2023, 6:14 AM@Inject
abstract protected ExecOperations getExec();
@Inject
abstract protected FileSystemOperations getFiles();
@TaskAction
public doWork() {
getExec().exec(...)
getFiles().copy(...)
}
For reading additional files, easiest way IMO is to do this:
providers.fileContents(...) // content will be tracked as CC input
Adam
06/28/2023, 7:18 AMProject.exec {}
and automatically replace them with ExecOperations.exec {}
, so manually injecting and replacing wouldn’t be necessary. I also think it would help with complying with Config Cache restrictions.Jendrik Johannes
06/28/2023, 7:28 AMProject
object around. The problem is not the "exec" method on the object, but that the object itself would need to be kept around. That's why all the utility methods (which do not care about the actual state of the object) are replaced by services.
I imagine you could do some magic code rewriting or something. But I think that would make Gradle even more confusing. Then there are some methods on Project that are not actually methods on Project....
I would rather see all of that deprecated/removed.Adam
06/28/2023, 7:34 AMChris Lee
06/28/2023, 1:32 PMVladimir Sitnikov
07/02/2023, 9:29 AM