I’m not sure about this sentence in chapter 8.2:
By implication, Hibernate core and its dependencies are also required at runtime.
The code states that it is a compile time dependency and in 8.3 it is explained that runtime includes compile dependencies which is the reversed. Am I missing something here?
Compile dependencies are usually also required at runtime. Gradle honors this by making the ‘runtime’ configuration extend the ‘compile’ configuration.
Yes, this is the way I assumed it works. But the example given and the text below don’t fit. I think instead of
compile group: 'org.hibernate', name: 'hibernate-core', version: '3.6.7.Final'
it should be
runtime group: 'org.hibernate', name: 'hibernate-core', version: '3.6.7.Final'
Or, the sentence “By implication, Hibernate core and its dependencies are also required at runtime.” does mean something different than i thought. What is the implication referred to?
The example is correct. Maybe the text could be rephrased. The implication is “x is compile dependency => x is runtime dependency”.
Oh, it just made click. A compile time dependency is always a runtime dependency, too. Sorry, this is so simple that I’m embarrassed I asked. A little venn diagram popped up in my head and the fog cleared. Thanks for you help!