This message was deleted.
# community-support
s
This message was deleted.
c
Basically we’re wondering if it’s best to set version on specific tasks, like publishing or docker image tasks and avoiding the
project.version
altogether.
Or can gradle know when a subproject generates the jar my-library-1.0.5.jar that the version doesn’t matter, it’s the contents that need to change for it to be considered out-of-date?
v
Exactly, if the jar is a classpath, it is even aware not only of the contents, but even the public api of the files in that jar.
And more so, for project dependencies it does not even build jars just to compile downstream
It simply uses the compiled classes directory as building a jar is just a waste of build time
Gradle is pretty good in avoiding unnecessary work. 🙂
c
👍 yeah that’s usually been my understanding of it.
v
And yes, I'd set
project.version
. Actually I uusually set it by putting it to
gradle.properties
and not programmatically.
c
In this case we’re talking about projects with docker deployables that get a new version based on ci number.