Reason: Task ':apollo-mockserver:compileTestKotlinIosArm64' uses this output of task ':apollo-mockserver:signIosArm64Publication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Where should I file the issue? (or is there one already?)
⢠Should KGP only add
.klib
files as input to
compileKotlin
?
⢠Or should
Sign
use a separate directory for its output?
v
Vampire
12/05/2023, 5:08 PM
The latter.
Tasks should never have overlapping outputs.
So writing files to the output directory of another task or changing output files of other tasks in-place is very bad.
It disturbs up-to-checkes, it disturbs caching, it can also lead to corrupt cache entries with wrong files or files that do not really belong to the task and so on,
and could also cause tasks to behave differently as those additional files might be there or might be absent or even might be there but stale as from a previous run, which is why this check now exists that slaps you in the face. š
ā 1
š 1
m
mbonnin
12/05/2023, 5:12 PM
random thoughts: Gradle should provide a default output dir for tasks
mbonnin
12/05/2023, 5:12 PM
isolated from the other ones and in a unique namespace
mbonnin
12/05/2023, 5:13 PM
Anyways, I'm almost sure I saw a Gradle issue about this, I'll dig
mbonnin
12/05/2023, 5:14 PM
Ha found it, "overlapping" was the keyword I was missing