I'm trying to understand Gradle dependency Configurations, and after digging into some of the documentation (for instance, https://docs.gradle.org/current/userguide/java_library_plugin.html), I'm left with a bunch of related questions*:
In Gradle, what's the distinction between a jar, an artifact, a dependency, and a module? What are some examples of artifacts, dependencies, and modules that are not jars? Artifacts that are not modules? etc...
What are resolvable Configurations? I discovered that if configuration x.canBeResolved then I can call x.resolve to get a set of paths to jars without the x.resolve method throwing an error (Is this all that marking a configuration as consumable gets you?). But aren't all configurations sets of modules, and so shouldn't I be able to see what those are? If so, how?
What are consumable Configurations? What does marking a configuration "consumable" allow you to do / prevent you from doing? What are some good examples of consumable Configurations? How would one take advantage of a Configuration that is/isn't consumable?
What other properties of Configurations are important and why (e.g., are attributes used for anything apart from variants)?
What are variants, and how are they created and used, and why would you create/use them? (See https://gradle.github.io/webinar-dep-mgmt-part-1/#/more-definitions).
How do the
javaandjava-libraryplugins take advantage of these features of Configurations? In particular, how is theapiconfiguration made or treated differently, under the hood, from theimplementationconfiguration? Does this have anything to do with being resolvable/consumable?What other questions should I be asking at this point?
Specific examples, and code, are especially appreciated.
*I realize that many of these questions could be asked independently, and if you have a good answer (or link) for a single one, please share. However, I'm trying to get the big picture, so I've stuck them together under a single heading. Also, I suspect I won't be able to understand the answers to some of the questions without having the answers to others--e.g. jars vs artifacts vs dependencies vs modules--and I'm trying to reduce question-answer latency and general confusion.