In a multi module build, I wrote some logic to hav...
# community-support
g
In a multi module build, I wrote some logic to have each module automatically detect if there were any modified files since the last push, and in case, create a publication. Then when I will execute
publish
on the root, only the proper modules will have a publication to publish. However now I need somehow to bump up the version for the next iteration, but this shall happen only if there is, of course, at least one publication. Is there a way to achieve that?
I was thinking every module which has to publish setting a property on the
rootProject.ext
and then appending the logic to bump up in the
:publish
doLast
v
Any usage of
ext
or
extra
is a dirty work-around. 😉 And reaching into the root project model is just as bad as the other way around, it is cross-project configuration which you should not do. You could maybe collect the information in some build service or similar. 🤷‍♂️
g
uhm, ok just to be sure, what's the lifecycle of ext properties?
v
What do you mean by lifecycle in this context?
g
will it survive/be cached between different synch/daemons run?
v
No, just the current build execution