Slackbot
10/01/2023, 2:29 PMAnze Sodja
10/02/2023, 6:37 AMVampire
10/03/2023, 1:24 PM@OutputDirectory, but individual output files, then they can also land in the same directory.Ivan CLOVIS Canet
10/03/2023, 1:41 PM:a . It creates files in build/a .
⢠there is a second task called :b . It depends on :a , and creates a subfolder in build/a.
⢠I would like to create a task :custom that works on the outputs of :a , which doesn't need anything from :b . :b is very slow, so I do not want :custom to depend on it.
Following the tips from other people in this channel, I created an intermediate Copy task that copies build/a to build/custom , so :custom works in its own folder.
However, Gradle still complains that build/a is created by :b , and :custom should depend on it.Anze Sodja
10/04/2023, 7:17 AMHowever, Gradle still complains thatYou don't need dependency, but you just have to specifiy at least the order relation. So if you don't want foris created bybuild/a, and:bshould depend on it.:custom
:custom to depend on :b , you can set the order with mustRunAfter and that should solve the issue.
E.g.: you set :custom mustRunAfter :b or :b mustRunAfter :custom . I guess second is better, since b is slow.
That way tasks won't depend on each other. So when you run just :custom, it won't run also :b . But they won't run in parallel with cc.
Another option is that you try to depend/output only invidiual output files and not whole folder (or whole task a) as Vampire suggestedVampire
10/04/2023, 10:47 AM:a, then you run :b.
Then you run :a again and it will not be up-to-date, as :a declares the whole build/a as output directory, so it sees its outputs were changed and runs again.
If caching is enabled, it would be even worse, because then - except if :a clears out build/a in the beginning - the file gernerated by :b would now be considered :a outputs too and stored in the cache entry.
You should really avoid having overlapping outputs.Vampire
10/04/2023, 10:50 AM:b output without ordering constraint.
What was maybe meant was a copy task that copies the :a files to a separate directory and use that to run :b, not :custom.
Besides that a copy task is rarely what you want, but usually a sync task, it probably wouldn't help either though.
You would probably not get the warning, as there is then a dependency between :custom and :b but you would again write to the output dir or :custom in :b and thus would disturb up-to-date checks.Ivan CLOVIS Canet
10/04/2023, 10:51 AM:a without `:b`'s changes, and I don't control the fact that they use the same directory :/Vampire
10/04/2023, 10:52 AMIvan CLOVIS Canet
10/04/2023, 10:52 AMIvan CLOVIS Canet
10/04/2023, 10:53 AMIvan CLOVIS Canet
10/04/2023, 10:54 AM