Slackbot
02/12/2024, 8:17 PMAdam
02/12/2024, 8:38 PMStylianos Gakis
02/12/2024, 9:33 PMVampire
02/12/2024, 9:42 PMconfigurations.all {
resolutionStrategy {
eachDependency {
require(requested.group != "showcase" || !requested.name.startsWith("feature-")) {
"Do not depend on a feature module you moron"
}
}
}
}
Vampire
02/12/2024, 9:42 PMVampire
02/12/2024, 9:43 PM* What went wrong:
Could not determine the dependencies of task ':compileJava'.
> Could not resolve all task dependencies for configuration ':compileClasspath'.
> Could not resolve project :feature-foo.
Required by:
project :
> Do not depend on a feature module you moron
Stylianos Gakis
02/13/2024, 1:45 PM:app
module to depend on all the feature modules, but thatās the only place really.
And Iād need to make sure to properly have each of my feature modules have this code block. I suppose if I make a convention plugin which adds this and make all of my feature modules use it, then Iāll be good.
Does this sound reasonable?Vampire
02/13/2024, 2:06 PMStylianos Gakis
02/13/2024, 3:14 PM.all {
but to use .configureEach {
, is it that it does not matter in this context, therefore we use all
or is it some other reason that is important in particular here?Vampire
02/13/2024, 3:18 PM.all
action causes all elements to be immediately realized when they are added and configured
.configureEach
action only runs as soon as the element is realized due to some other reason and only if it actually is realized
For built-in things this mainly makes sense on the tasks
container as you do not want all tasks to be configured as this wastes much time.
For the configurations
container it - at least currently - is not really relevant which of both you use as it is not treated lazily anyway so either way all get realized and configured.Stylianos Gakis
02/13/2024, 3:29 PM