Somewhat related to the above, is there anything t...
# dependency-management
m
Somewhat related to the above, is there anything to gain by doing
configurations.register("myConfiguration")
vs
configurations.create("myConfiguration")
?
Given that some of the APIs using configurations are not lazy (
extendsFrom()
), looks like I need to call
.get()
anyways, might as well realize the configuration eagerly?
t
if I have a "lazy" configuration, I always end up having to call
.get()
anyway 🤷
same 1
v
The only built-in container I know of that is properly treated lazy is the task container. On all others it is probably irrelevant. Unless I'm the future additional ones get lazified. So most often I use
register
and if something gets lazified necessary changes - if any - are already minified.
👍 2
j
Configurations will likely become lazy sometime in 9.x
🎉 1
All containers are lazy and are treated lazily. You should make an effort to use lazy APIs and avoid resolving all elements of a container. Gradle currently resolves all elements of the configuration container but we want to avoid this in upcoming versions
👌 1
m
@Justin Van Dort out of curiosity, what do I get from lazy configurations? Shouldn’t adding dependencies be very fast in general?