This message was deleted.
# community-support
s
This message was deleted.
v
if build caching is enabled?
Even if you enable task output caching and the producer task in question is cacheable, this cannot be a problem. Why, you may ask. Well, the outputs of a task are packed into an archive that is stored into the cache, so it cannot be used from there directly. 🙂 That is also the reason why for example task types like
Zip
or
Jar
or
Copy
are not cacheable, because it is usually faster to just create the archive or copy the files, than to get the archive from the cache - maybe even remote cache - and unpack it.
is it ok to just add something like
As the files are not generated by
other-project
but just there, and you have strict pathing requirements, I guess it is ok to do it like that, but don't nail me on it. 😄 Btw. the
jacoco-report-aggregation
plugin registers an outgoing variant that contains the source files. (including generated ones I think if applicable)
k
Thanks, this is very helpful!
the outputs of a task are packed into an archive that is stored into the cache, so it cannot be used from there directly
ah, I see, so this is different from the maven dependencies cache, where jars can be placed on the classpath directly from the cache (because the jvm can read jars directly)
the
jacoco-report-aggregation
plugin registers an outgoing variant that contains the source files
this is fascinating! 😄 if I read https://github.com/gradle/gradle/blob/b45fc72c2aa0c668d6025fe089cb4affac656100/subprojects/plugins/src/main/java/org/gradle/jvm/component/internal/DefaultJvmSoftwareComponent.java#L136 correctly, every jvm component has an outgoing variant for its main source files for report aggregation purposes
v
ah, I see, so this is different from the maven dependencies cache, where jars can be placed on the classpath directly from the cache (because the jvm can read jars directly)
Yes
every jvm component has an outgoing variant for its main source files for report aggregation purposes
Oh, right, I thought that plugin adds this variant, but indeed it just uses it, so yes you can just use that as you can see in
outgoingVariants
task output
🙏 1