Single question:
In gradle, there are several configurations provided out of the box.
For example testCompile
, testProvided
, testRuntime
, javaCompile
, javaProvided
, and so on...
Could you explain what's the difference?
Configurations allow you to scope dependencies. Given this configuration hierarchy:
testRuntime -> testCompile -> runtime -> compile
Each configuration helps you limit where your dependencies are. *Runtime configurations allow you to include a dependency, but not have it as a compile dependency. This is helpful when you want to keep a framework loosely coupled from a project. A runtime dependency means that you need it for the app to run, but don't need it to compile.
The same thing applies for the test* configurations.
Ref:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With